* fix(show): expose guarded-write revision in JSON (bd-bwa7n)
Project RowVersion only at the bd show CLI edge so guarded subprocess clients receive the current opaque token without changing generic Issue, JSONL, or HTTP serialization. This preserves main's object-model boundary while restoring the show contract established by PR #4682.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* fix(show): resolve revision CLI/HTTP parity + emit legacy-zero token (bd-bwa7n)
Maintainer adoption fixup for PR #5353 (adopt-pr): pre-review CI normalization
plus the review-loop resolution of the CLI/HTTP parity decision that pre-review
deliberately deferred.
PR #5353 exposes the guarded-write revision (the row_lock optimistic-concurrency
token) in `bd show --json` via the CLI-edge DTO. That token is a per-write random
int64, so several oracles that pin bd's JSON shape needed to learn about it.
Pre-review CI normalization (mechanical volatile-token gaps):
- Contract corpus golden (cmd/bd/protocol): CanonicalizeJSON did not scrub the
new field, so the show blob diffed on the random value and the double-run
determinism check failed. Add a volatileValueKeys scrub for `revision` (pin the
field's presence, replace its value with <REVISION>, same treatment as
timestamps) and regenerate the two show goldens + manifest SHAs.
- Differential regression (tests/regression): the v0.49.6 baseline never emitted
`revision`, and its value is random per write, so it is pure cross-version
noise. Add it to volatileFields so normalizeIssue strips it before the
baseline/candidate diff.
Review-loop resolution (was DEFERRED at pre-review; now decided):
- CLI/HTTP read-parity (major): `bd show --json` emits `revision` but the
apigen-frozen GET /v0/beads/issues/{id} keeps RowVersion json:"-", so the
field-level parity oracle (TestProxiedServerServeReadParity/show) would flag it
as unreviewed drift. Resolve as an accepted CLI-only surface: add a documented
readsParityAllowlist["revision"] entry and rewrite the allowlist narrative.
Exposing the token over the frozen v0 HTTP object is out of scope; the token is
only meaningful to the CLI guarded-write path.
- Legacy-zero token (minor): drop `omitempty` from the show DTO so a legitimate
RowVersion==0 CAS token is emitted instead of being conflated with an absent
field; a guarded client must read the 0 it needs to send on un-mutated legacy
migration-0054 rows.
- Test evidence (minor): add TestProjectShowJSONDetailsEmitsZeroRevision pinning
the legacy-zero wire behavior.
Validated locally: git diff --check; go test ./internal/types (RowVersion),
./cmd/bd (focused show unit tests incl. the new zero-revision case),
./cmd/bd/protocol (corpus goldens unchanged), and the proxied Dolt parity oracle
TestProxiedServerServeReadParity (the show subtest now excuses `revision`).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: CI Bot <ci@beads.test>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>