beads/docs
Jim Wordelman fffed97d38
feat(dolt): git-origin collision guard in bd dolt remote add + bd doctor (be-7eu1d) (#4153)
* test(cli): be-lbhy2 dolt.local-only enforcement gate tests (TDD, be-3v2ou)

Failing tests for be-3v2ou (dolt.local-only enforcement, FR-01 to FR-05).
All tests fail or refuse to compile until the builder adds isDoltLocalOnly().

cmd/bd/dolt_local_only_test.go (unit, no build tag):
  - TestIsDoltLocalOnly_FalseByDefault
  - TestIsDoltLocalOnly_TrueWhenConfigSet
  - TestIsDoltLocalOnly_FalseAfterUnset
  - TestMaybeAutoPush_SkipsWhenLocalOnly

cmd/bd/dolt_local_only_embedded_test.go (build:embeddeddolt):
  - TestDoltLocalOnly_Push_ExitsZeroWithMessage
  - TestDoltLocalOnly_Push_LocalStoreCopy
  - TestDoltLocalOnly_Push_JSON_DisabledStatus
  - TestDoltLocalOnly_Pull_ExitsZeroWithMessage
  - TestDoltLocalOnly_Pull_JSON_DisabledStatus
  - TestDoltLocalOnly_RemoteAdd_RefusesExitOne
  - TestDoltLocalOnly_RemoteAdd_ErrorOnStderr
  - TestDoltLocalOnly_ConfigRoundTrip
  - TestDoltLocalOnly_DoltStatus_ShowsDisabled

Message copy from be-0jyq7 (UX spec). Exact strings asserted so the builder
cannot ship copy drift.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(dolt): implement dolt.local-only enforcement (be-3v2ou, FR-01 to FR-05)

- Add isDoltLocalOnly() in dolt_local_only.go (reads dolt.local-only config key)
- bd dolt push: exit-0 no-op with 'Remote sync is disabled...' message when set;
  --json emits {status:disabled,reason:dolt.local-only=true} via outputJSONRaw
- bd dolt pull: same exit-0 no-op + 'Nothing to pull.' message
- bd dolt remote add: exit-1 error to stderr ('cannot add Dolt remote: ... disabled')
- bd dolt status: appends 'Remote sync: disabled (dolt.local-only=true)' indicator
  in both embedded and server-mode text paths
- maybeAutoPush: guard fires before getStore() (before any store interaction)
- Fix test build tag: cgo (not embeddeddolt) to match CI embedded test convention
- Fix TestDoltLocalOnly_ConfigRoundTrip: bd config get returns "(not set ...)" not ""

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(dolt): git-origin collision guard in bd dolt remote add + bd doctor (be-7eu1d, FR-06 to FR-09)

- dolt_remote_guard.go: guardNormalizeURL() + doltRemoteMatchesGitOrigin() helpers
- dolt.go: --allow-git-origin flag; refuse (or warn) when Dolt remote URL matches git origin
- doctor/types.go: CategoryDolt = "Dolt Storage" + add to CategoryOrder
- doctor/remotes.go: CheckDoltRemoteGitOrigin() warning check
- doctor.go: wire Check 7f1 into the doctor run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(cli): regenerate CLI reference for --allow-git-origin

The PR added the --allow-git-origin flag to 'bd dolt remote add' but
did not regenerate docs, failing the 'doc flags freshness' check.
Output of ./scripts/generate-cli-docs.sh ./bd — adds the flag to
docs/CLI_REFERENCE.md and the dolt.md command pages (latest + versioned
snapshots).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(dolt): remove duplicate isDoltLocalOnly declaration from init.go

The function was extracted to dolt_local_only.go in the stacked PR but the
original declaration in init.go was not removed, causing a redeclared-in-block
build error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(cli): regenerate CLI reference for git-origin guard and doctor checks

Full regeneration for the complete PR: --allow-git-origin flag,
--force flag on dolt remote remove, and the bd doctor CheckDoltRemoteGitOrigin
check. Also regenerates federation.md for completeness. Output of
./scripts/generate-cli-docs.sh ./bd and ./scripts/generate-llms-full.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style(doctor): gofmt cmd/bd/doctor.go

The be-7eu1d git-origin guard block left double blank lines around the
new "Check 7f1" stanza, failing `make fmt-check` (CI "Check formatting"
and the gofmt stage of "PR Lint"). gofmt collapses them to single blanks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(cli): regenerate CLI reference + llms-full with pure-go bd

The previous regen (07dcb9a81) was built with a CGO-enabled bd, which
includes the CGO-only `bd federation` subcommands. CI builds the docs
binary with CGO_ENABLED=0 (scripts/ci/pr-policy.sh build_docs_binary),
so check-doc-flags rejected the extra federation subcommand pages.

Regenerated docs/CLI_REFERENCE.md, the federation cli-reference pages
(live + versioned 1.0.0/1.0.4/1.0.5), and website/static/llms-full.txt
with a CGO_ENABLED=0 binary. check-doc-flags + check-doc-freshness now
pass locally under LC_ALL=C.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* style(doctor): gofmt cmd/bd/doctor.go (remove stray blank line)

Fixes the 'Check formatting' CI failure on this PR — the only
PR-introduced gofmt miss among the changed Go files.

* fix(dolt): normalize git+https/git+ssh/SCP URLs in remote collision guard and doctor

Address @maphew's review on PR #4153 (be-e7k8):

1. Add doltremote.CanonicalForComparison() — normalizes both sides of a
   URL comparison to Dolt's git+ prefix form, then strips trailing slashes
   and .git. This makes https://github.com/org/repo.git compare equal to
   git+https://github.com/org/repo.git, and git@github.com:org/repo.git
   equal to git+ssh://git@github.com/org/repo.git.

2. Replace the simple guardNormalizeURL helper in dolt_remote_guard.go and
   normRemoteURL in doctor/remotes.go with doltremote.CanonicalForComparison
   so both paths share one implementation and stay in sync.

3. Fix build tag on dolt_remote_origin_guard_embedded_test.go from
   embeddeddolt to embeddeddolt && cgo: the file delegates to bdDoltSeparate
   which lives in a cgo-only file, so the embeddeddolt-only tag caused a
   compile failure under CGO_ENABLED=0 + embeddeddolt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(dolt): remove dead --force flag from bd dolt remote remove

The --force flag was registered on doltRemoteRemoveCmd but the Run
function never read it via cmd.Flags().GetBool("force") or any other
means, so it had no effect. Remove the flag registration rather than
wiring it up, per review on PR #4153, and regenerate the CLI reference
docs (docs/CLI_REFERENCE.md, website/docs/cli-reference/dolt.md,
website/static/llms-full.txt) so the dead flag no longer appears in
generated documentation.

Agent-Signature: claude-sonnet-5-high on behalf of matt wilkie
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(dolt): check outputJSONRaw error in local-only status paths

main changed outputJSONRaw to return an error after this branch was
written; the two dolt.local-only JSON status sites now handle it with
the same stderr idiom as the neighboring outputJSON callers, fixing the
errcheck CI failure on PR #4153.

Agent-Signature: claude-fable-5-high on behalf of matt wilkie
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Jim Wordelman <jim@wordelman.name>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: matt wilkie <maphew@gmail.com>
2026-07-04 14:37:51 -07:00
..
adr fix(init): guard JSONL init against remote history 2026-06-22 15:28:38 -07:00
design Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
staged-for-removal Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
ADAPTIVE_IDS.md feat: support issue_id_mode=counter for sequential IDs (#2013) 2026-02-22 23:49:46 -08:00
ADO_CONFIG.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
ADVANCED.md docs: fix broken xref to docs/EXTENDING.md in extension example (#3713) 2026-05-05 13:18:43 -07:00
AGENT_SIGNING.md docs: align agent maintainer conventions (#4237) 2026-06-20 20:44:08 -07:00
AIDER_INTEGRATION.md Document supported go install modes (bd-o5a) (#3480) 2026-04-25 11:30:19 -07:00
ANTIVIRUS.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
ARCHITECTURE.md docs: link canonical SYNC_CONCEPTS.md from deeper docs (#4248) 2026-05-29 22:44:54 -07:00
ATTRIBUTION.md fix: remove dead 3-way merge config remnants (GH#2353) 2026-03-05 15:57:33 -08:00
CI_CLEANUP_PLAN.md Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
CI_REQUIRED_CHECK_TOPOLOGY.md Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
CI_TEST_SURFACE_AUDIT.md Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
CLAUDE.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
CLAUDE_INTEGRATION.md fix(setup): finish hook JSON migration 2026-05-08 09:21:39 -07:00
CLI_REFERENCE.md feat(dolt): git-origin collision guard in bd dolt remote add + bd doctor (be-7eu1d) (#4153) 2026-07-04 14:37:51 -07:00
CODEX_INTEGRATION.md fix(codex): ship hook release safely 2026-05-27 13:19:41 -07:00
COLLISION_MATH.md docs: fix broken relative links across documentation 2025-12-16 00:46:08 -08:00
COMMUNITY_TOOLS.md Add bd-board to community tools (#4349) 2026-06-16 07:48:25 -07:00
CONFIG.md fix(linear): unwire staleness hook from core; gitignore last_pull (bd-6dnrw.12) 2026-06-11 01:14:08 -04:00
CONTRIBUTOR_NAMESPACE_ISOLATION.md cleanup: remove remaining Gas Town terminology from help text, docs, and comments 2026-03-22 13:27:43 -07:00
COPILOT_CLI_INTEGRATION.md feat: add Copilot CLI setup recipe (#3839) 2026-05-14 10:51:38 -07:00
COPILOT_INTEGRATION.md feat: add Copilot CLI setup recipe (#3839) 2026-05-14 10:51:38 -07:00
DEPENDENCIES.md docs(deps): add DEPENDENCIES.md covering dependency system and gates 2026-02-27 10:09:05 -08:00
DOC_INVENTORY.md docs: align agent maintainer conventions (#4237) 2026-06-20 20:44:08 -07:00
DOLT-BACKEND.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
DOLT.md fix(remote): remove cli invocations of 'dolt remote' and exclusively use store method and sql (#4236) 2026-06-05 13:58:21 -07:00
ERROR_HANDLING.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
EXCLUSIVE_LOCK.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
FAQ.md docs: link canonical SYNC_CONCEPTS.md from deeper docs (#4248) 2026-05-29 22:44:54 -07:00
GIT_INTEGRATION.md docs: link canonical SYNC_CONCEPTS.md from deeper docs (#4248) 2026-05-29 22:44:54 -07:00
graph-links.md refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
ICU-POLICY.md Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
INSTALLING.md docs: consolidate Homebrew tap-migration snippet across install/upgrade docs 2026-06-30 14:10:35 -07:00
INTEGRATION_CHARTER.md Document project scope boundaries (mybd-1fn) (#3842) 2026-05-13 06:49:11 -07:00
INTERNALS.md refactor: remove gastown/Gas Town string references from beads code and docs (bd-1ue8) 2026-03-20 18:39:50 -07:00
JSON_SCHEMA.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
LABELS.md cleanup: remove remaining Gas Town terminology from help text, docs, and comments 2026-03-22 13:27:43 -07:00
LINTING.md Add PR CI wrapper command surface (#4211) 2026-05-29 18:52:53 -07:00
messaging.md fix(create): commit labels during initial issue creation (#4149) 2026-05-24 19:23:46 -07:00
METADATA.md docs(metadata): document portability of execution model/effort hints (#4358) 2026-06-10 09:30:41 -07:00
MOLECULES.md Keep regular epics open after the last child closes (#3276) 2026-04-17 15:10:38 -07:00
MULTI_REPO_AGENTS.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
MULTI_REPO_MIGRATION.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
OBSERVABILITY.md /{cmd,docs,internal}: more cleanup 2026-03-31 12:33:52 -07:00
PERFORMANCE_TESTING.md docs: update stale SQLite references to Dolt across 10 documentation files 2026-02-16 01:22:58 -08:00
PLUGIN.md fix(init): use git origin as default Dolt remote (#3909) 2026-05-13 07:02:39 -07:00
PROJECT_CHARTER.md Document project scope boundaries (mybd-1fn) (#3842) 2026-05-13 06:49:11 -07:00
PROTECTED_BRANCHES.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
QUICKSTART.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
README_TESTING.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
RECOVERY.md docs(upgrade): add validated recipe for remote-backed / multi-clone upgrades (#4514) 2026-06-29 14:47:49 -07:00
RELEASE-STABILITY-GATE.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
RELEASING.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
REPO_CONTEXT.md docs: replace stale bd sync references with bd dolt push/pull (GH#2442, GH#2435) 2026-03-08 10:12:08 -07:00
ROUTING.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
RULES_AUDIT_DESIGN.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00
SECURITY-DEPENDENCY-EXCEPTIONS.md chore: harden release and dependency security 2026-04-28 08:45:22 +00:00
SETUP.md docs: align agent maintainer conventions (#4237) 2026-06-20 20:44:08 -07:00
SYNC_CONCEPTS.md docs: clarify export versus database backup (#4048) 2026-05-20 16:19:23 -07:00
SYNC_SETUP.md /{.github,docs,go,internal,scripts}: bump driver/dolt version to 2.1.4 (#4326) 2026-06-08 11:31:14 -07:00
TESTING.md /{.github,docs,go,internal,scripts}: bump driver/dolt version to 2.1.4 (#4326) 2026-06-08 11:31:14 -07:00
TESTING_PHILOSOPHY.md Consolidate docs evidence review inventory 2026-05-09 07:21:46 -07:00
TODO.md docs: remove stale JSONL references from ~73 markdown files (bd-9ni.4) 2026-02-22 22:18:02 -08:00
TROUBLESHOOTING.md fix(setup): harden symlink follow-up handling 2026-05-27 13:32:00 -07:00
UI_PHILOSOPHY.md docs: consolidate duplicate UI_PHILOSOPHY files (GH#745) 2025-12-27 18:01:59 -08:00
UNINSTALLING.md docs: publish community tools on website (#4299) 2026-06-03 13:44:47 -07:00
WORKTREES.md docs: update user-facing URLs from steveyegge/beads to gastownhall/beads 2026-04-24 08:17:42 -07:00