beads/docs
Julian Knutsen 16871ee152
fix(schema,docs): make the shared data-behind consent step runnable (#6692)
Post-merge review of #6658 (landed as 5b9e938b5) found two guidance defects
in the #6575 data-behind stop. The gate itself is correct; both are in the
remedy chain it prints.

1. The shared arm prescribed `bd migrate schema`, which cannot succeed in the
   state that prints it. A data-behind refusal has a remote by construction —
   behind-ness is read from `remotes/<name>/<branch>` — and the verb consent
   (`sharedMigrateConsent`) has exactly one reader, inside `sharedNoRemoteGate`,
   reachable only on the `!hasRemote` branch. So after the pull the retry routed
   `smartAutoMigrate -> shared -> fallbackReasonSharedStore`, whose blunt body
   prescribes the `bd migrate --force` the data-behind body explicitly says not
   to use. The option, `dataBehindBody`, `AgentDirective`, `fallbackReasonNote`
   and both `--global` retargets now name `bd migrate schema --force`, which
   trips `forceOrEnvConsent` via `isForcedMigrate`.

   Retargeting the command rather than widening the consent read is deliberate:
   with a remote configured, #4259's cross-clone fork risk still demands the
   designated-migrator confirmation, which is what `sharedNoRemoteGate`'s own
   comment says the scoping is for.

2. The JSON payload's `docs` pointer stayed on the migrate-or-adopt anchor,
   whose ordering rule says `bd dolt pull` is refused on every
   pending-migration open — contradicting the `pull-first` option in the same
   payload. The `IsDataBehind()` arm now points at a new "Clone behind the
   remote" section, and the two living ordering rules (upgrading.md,
   init-safety.md) record the exception.

Tests: the consent step is now checked by running it — the command is taken
from `Options()`, resolved through the same cobra lookup and predicates the
root pre-run uses, and fed to the real gate against a remote-backed shared
fixture, with the shipped bare verb as the counterfactual. Asserting the
option's wording is what let the dead command ship. `docs` is pinned in
`TestHandleRemoteMigrateGateJSON_DataBehind`.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 05:46:48 -07:00
..
architecture fix(gc): flatten/compact run full GC after the rewrite; bd gc --full; low-reclaim hint (#5907) (#6057) 2026-08-29 05:19:06 +00:00
cli-reference docs(pipeline): pin the CLI docs to the released bd; repair main's broken CLI reference (#4876) 2026-07-17 18:03:28 -07:00
core-concepts docs: supersedes is a replacement link, not a version chain (#6212) 2026-09-12 06:41:33 -07:00
diagrams docs: port the Excalidraw diagram pipeline (machinery only) 2026-07-12 10:37:17 -07:00
getting-started fix(schema,docs): make the shared data-behind consent step runnable (#6692) 2026-09-23 05:46:48 -07:00
images docs: port user docs into the Mintlify site tree under docs/ 2026-07-12 10:37:07 -07:00
integrations docs: document ado.reconcile_interval and inventory every storage span 2026-08-07 21:20:41 +00:00
multi-agent fix(reclaim): correct the heartbeat re-home invariant's scope in the new docs (wy-sp2l4) 2026-08-13 04:30:30 -07:00
recovery fix(schema,docs): make the shared data-behind consent step runnable (#6692) 2026-09-23 05:46:48 -07:00
reference Merge release/1.3.0 into main (post-tag forward-port) 2026-09-15 22:09:13 +00:00
workflows docs(gates): document multi-rig/proxied gate limitations for 1.3.0 (#6052) 2026-08-28 23:23:15 -07:00
cli-docs.pin chore(release): forward-port v1.2.2 to main (version record, retracts, recovery guide, gate record) (#5782) 2026-08-14 21:45:02 -07:00
CLI_REFERENCE.md docs(pipeline): pin the CLI docs to the released bd; repair main's broken CLI reference (#4876) 2026-07-17 18:03:28 -07:00
community-tools.md docs: add Beads Dashboard to Editor Extensions in community-tools.md (#5336) 2026-08-07 05:55:02 -07:00
docs.json chore(release): forward-port v1.2.2 to main (version record, retracts, recovery guide, gate record) (#5782) 2026-08-14 21:45:02 -07:00
index.md release: prep v1.3.0 — version bump, changelog rollup, release process docs, formula fixes (#6038) 2026-08-30 22:19:35 -07:00
RECOVERY.md docs(recovery): reduce the stub to a pure pointer 2026-07-17 18:56:33 -07:00
related-projects.md docs: apply PR #4722 review feedback to user docs 2026-07-12 11:06:57 -07:00