beads/docs/getting-started
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
..
ide-setup.md [codex] Add Kiro setup recipe (#4535) 2026-07-27 22:28:43 -07:00
installation.md docs(troubleshooting): document the two native-Windows integration traps (#5838) 2026-08-20 05:41:39 -07:00
quickstart.md docs: caveat --parent label inheritance with size/effort labels (#4562) (#5123) 2026-07-31 01:44:50 -07:00
sync-setup.md docs: pin the Dolt version instead of steering users to releases/latest (ga-m0dlk) (#5899) 2026-08-20 22:41:24 -07:00
upgrading.md fix(schema,docs): make the shared data-behind consent step runnable (#6692) 2026-09-23 05:46:48 -07:00