* fix(exec): match Windows environment key identity (#5618)
Centralize os/exec-compatible environment-key comparison and use it for credential, metrics, Git-hook, trace, and repro subprocess filters. Preserve exact Unix semantics and Unicode near-collisions.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Signed-off-by: Ewen Cuthiell <ewencuthiell@gmail.com>
* fix(worktree): scrub inherited Git routing state
Establish CWD as the worktree repository boundary before discovery can consume inherited Git routing. Fence the startup config probe, clear routing in-process before root pre-run discovery, and retain command-owned subprocess scrubbing as defense in depth without changing PID or signal semantics.
Fixes#5531
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* refactor(worktree): explain owned filtering and remove an unused shim
Document why filtering the fresh routing slice in place is safe and call
the shared routing-key classifier directly from tests. Retain the two
forwarders used by production worktree subprocess/removal paths.
Review: https://github.com/gastownhall/beads/pull/5623#pullrequestreview-5098421671
Bead: saa-cgh.23
Agent-Signature: unknown-model/unknown-reasoning
* fix(config): isolate identity and tracked-file Git probes from routing
Reuse the worktree routing owner for GetIdentity and isGitTracked so
explicit cwd/path selection is not displaced by inherited repository,
index or injected config state. Preserve identity precedence and the
tracked-secret refusal contract, with real target/decoy regressions.
Follow-up: https://github.com/gastownhall/beads/issues/6222
Dependency: https://github.com/gastownhall/beads/pull/5623
Reported-by: bee-ghosttrack
Bead: saa-cgh.93
Agent-Signature: unknown-model/unknown-reasoning
* test(execenv): exercise every environment operation under both host rules
Thread the host choice through narrow private helpers behind the existing
exported functions. Keep one normalization owner and retain native wrapper
tests; the additional table covers both host branches for equality, prefix
matching, last-wins lookup, filtering and input preservation.
Review: https://github.com/gastownhall/beads/pull/5672#pullrequestreview-5096948965
Bead: saa-cgh.78
Agent-Signature: unknown-model/unknown-reasoning
* docs(worktree): explain startup Git environment scope (saa-cgh.23)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(execenv): exercise exported host policy wiring (saa-cgh.78)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(config): share subprocess key identity for Git routing (saa-cgh.93)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(hooks): isolate tracked-file guard from Git routing (saa-cgh.98)
Follow-up to bee-ghosttrack's review of gastownhall/beads#6322; refs #6356.
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(config): isolate role commands from Git routing (saa-cgh.99)
Follow-up to bee-ghosttrack's review of gastownhall/beads#6322; refs #6357.
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(env): exercise shared key helpers on native Windows (saa-cgh.78)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* refactor(gitenv): share key parsing and normalize routing membership once (saa-cgh.93)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* docs(config): explain role command routing policy (saa-cgh.99)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(hooks): retain legitimate inherited tracking context (saa-cgh.98)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(hooks): isolate trusted global configuration fixture (saa-cgh.98)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(hooks): isolate role cleanup in the selected repository (saa-cgh.109.4)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(hooks): reset only common local role configuration (saa-cgh.109.10)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(hooks): scope hooks-path cleanup to selected common config (saa-cgh.109.11)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(hooks): make worktree role preservation independent (saa-cgh.120)
Agent-Signature: Codex-unknown-model-unknown-reasoning on behalf of Ewen Cuthiell
* Report selected config read failures during hook reset (saa-cgh.120)
Agent-Signature: Codex-unknown-model-unknown-reasoning on behalf of Ewen Cuthiell
* fix(hooks): keep successful config stdout separate from diagnostics (saa-cgh.120)
Agent-Signature: Codex-unknown-model-unknown-reasoning on behalf of Ewen Cuthiell
* fix(config): pin role writes to fresh common context (GH#6384) (saa-cgh.120.3)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(config): retain Git diagnostics from role writes (saa-cgh.120.3)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(config): assert the actual Git lock diagnostic (saa-cgh.120.3)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(config,hooks): restore the inherited-tracking fallback in the secret guard
Maintainer review fixes for PR #6454 (adopt-pr iteration 1). The scorecard
approved at 913/1000 with no blocker or major surviving synthesis; these are
the non-gating findings that were cheap to close while the fixup was open.
Finding 1 (minor, security) is the only in-range regression in the report. The
range switched internal/config.isGitTracked from the inherited environment to
gitenv.ScrubRouting only, so a config.yaml tracked solely through legitimate
routing -- a bare repository whose work tree is named by GIT_DIR/GIT_WORK_TREE
-- reported untracked, and a secret-key write that upstream-base refused was
silently allowed. Restores the scrubbed-then-inherited union the same stack
already gave cmd/bd.isGitTrackedFile.
Finding 4 (nit) composes with it rather than conflicting, so both land as one
change: the inherited probe now runs only when the scrubbed probe failed for a
configuration reason. git's exit codes discriminate exactly -- 0 tracked, 1
repository reached but path untracked (final), 128 no reachable repository --
so the ordinary untracked-hook miss no longer spawns a second `git ls-files`
while the bare-work-tree fallback is preserved.
Finding 2 (minor). scrubWorktreeRemovalGitEnvForOS keyed its stricter
no-optional-locks policy on strings.ToUpper while the rest of the PR uses
execenv key identity. The two disagree in both directions on Windows:
GIT_OPTIONAL_LOCKS with a dotted capital I (U+0130) survived the scrub although
Git honors it, and GIT_OPTIONAL_LOCK with a long s (U+017F) was dropped
although os/exec keeps it distinct. normalizeWorktreeGitEnvKey is deleted in
favour of execenv.KeyEqualForOS. Base applied ToUpper on all platforms, so this
is a consistency fix in newly rewritten code, not a regression.
Finding 5 (nit). The comment above resetHooksPathIfBeadsManaged's probe
asserted that repoRoot and commonDir share the cached Git context. Probed
false: with cwd A and GIT_DIR=B/.git, `git rev-parse --git-common-dir
--show-toplevel` prints B/.git and A. Restated as intent.
Finding 3 (scrubGitHookEnv is a fifth, strictly weaker routing scrubber) is
deliberately not taken here: cmd/bd/export_auto.go is untouched by this range,
so the hazard is byte-identical at base, and the synthesis scoped it to a
follow-up bead rather than growing this stack.
Each fix is mutation-proved. Reverting isGitTracked reds only the new
TestSecretGitTrackingHonorsInheritedBareWorkTree -- including "refusal = <nil>",
the actual security consequence -- while the incumbent decoy test stays green,
so the pin adds coverage rather than duplicating it. Restoring ToUpper reds
only the new Windows row, showing both directions at once.
TestGuardHookWritePathHonorsInheritedRepository gains a fixture guard asserting
its scrubbed probe fails for a configuration reason rather than exit 1, so a
future fixture change cannot silently make the fallback unreachable.
scrubWorktreeRemovalGitEnvForOS had no test at all before this.
Green locally: ./internal/config, ./internal/execenv, ./internal/gitenv,
./internal/githooksenv, ./internal/gittraceenv, ./internal/metrics, ./scripts,
./internal/beads (the GIT_CONFIG_GLOBAL blast radius neither reviewer ran), and
a blast-radius cmd/bd run over the hooks, worktree, role and uninstall suites.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Signed-off-by: Ewen Cuthiell <ewencuthiell@gmail.com>
Co-authored-by: Bee <bee@ghosttrack.com>
Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* fix(gitignore): preserve CRLF when appending project rules (saa-cgh.96)
Reported by bee-ghosttrack in gastownhall/beads#6343.
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(gitignore): pin detector edge cases and clarify append behavior (saa-cgh.96)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(gitignore): preserve line endings in Git exclude appends (saa-cgh.104)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* refactor(gitignore): share append byte composition (saa-cgh.105)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(gitignore): clarify exclude fixture path variable (saa-cgh.104)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* docs(gitignore): explain append aliasing and trailing CR completion (saa-cgh.105)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(gitignore): refuse exclude writes after read errors (saa-cgh.110)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* refactor(gitignore): use shared composition for exclude rules (saa-cgh.111)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(gitignore): omit the empty exclude leading separator (saa-cgh.112)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(init): refuse unreadable global ignore files (saa-cgh.115)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(init): own global ignore fixture working directory (saa-cgh.115)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* fix(init): preserve line endings in global ignore appends (saa-cgh.116)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(init): cover dangling global ignore symlinks (saa-cgh.120)
Agent-Signature: Codex-unknown-model-unknown-reasoning on behalf of Ewen Cuthiell
* Use a literal CRLF fixture for global ignore composition (saa-cgh.120)
Agent-Signature: Codex-unknown-model-unknown-reasoning on behalf of Ewen Cuthiell
* refactor(init): retire the unused global-ignore writer (saa-cgh.120.5)
Agent-Signature: unknown-model/unknown-reasoning on behalf of Ewen Cuthiell
* test(feat): red — check-doc-freshness.sh: fail when a file has more than one 'Last reviewed:' marker line (refs be-g7tqg)
* feat: green — check-doc-freshness.sh: fail when a file has more than one 'Last reviewed:' marker line (refs be-g7tqg)
* The newsletter dropped every commit made before the hour it ran
`--since` takes an APPROXIDATE, so the bare date this built did not mean the
start of that day -- it meant that day at the CURRENT TIME OF DAY. Measured
on a live tree at 17:02 local:
git log --since=2026-09-10 -> 0 commits
git log --since=2026-09-10T00:00:00 -> 60 commits
Sixty commits dropped, silently, in a script whose output is published. The
same invocation answered differently depending on the hour it ran.
The half-fix is a trap, and it is the one the town-wide description leads to.
The finding has been circulated as "--since is a traversal cutoff"; that is
true and it is not this bug. Swapping in --since-as-filter while keeping the
bare date keeps the whole defect, because approxidate applies to the VALUE
regardless of which flag reads it:
git log --since-as-filter=2026-09-10 -> 0 commits
git log --since-as-filter=2026-09-10T00:00:00 -> 60 commits
So both are fixed here: a full timestamp for the approxidate, and
--since-as-filter (git 2.37+) for the cutoff, with a comment saying not to
simplify either back.
FOUR copies, not the three named, in two versions drifted 184 lines apart --
beads/{mayor,refinery} and gastown/{mayor,refinery}. The defective block was
byte-identical in both (md5 6fdd32e6 over lines 156-160). All four working
trees are patched; the 184-line drift is left alone, because converging them
is a decision nobody has made.
Verified through the patched code rather than by exit code: exec'ing the new
get_commits_since for 2026-09-10 returns 60 where the old form returns 0.
igr-9qdx
Executed-By: mayor
* fix(newsletter): fail loudly when git is too old for --since-as-filter
--since-as-filter needs git 2.37 (2022-06). On anything older `git log`
exits 129 with `error: unknown option 'since-as-filter=...'` on stderr,
stdout is empty, and get_commits_since returned [] — reproducing the
silent-and-shorter newsletter this change exists to fix, with a new cause.
Check the return code and raise with the version floor named. An empty
stdout on a zero exit is still a legitimate "no commits in range".
Verified against a shim that rejects the flag the way git < 2.37 does:
with the guard, RuntimeError naming the floor; with it reverted, 0 commits
and no error; on real git 2.43, 40 commits, unchanged.
* docs(newsletter): record the new git >= 2.37 floor
--since-as-filter puts the script's first hard git-version floor on the release
path (beads-release.formula.toml:866/:870 -> release-complete), but nothing
outside get_commits_since()'s docstring said so. On an older runner the release
step aborts and the operator has to trace the cause into a function body.
Add it to the module docstring alongside its existing requirement sections, and
to the README Setup section. No silent fallback to plain --since -- that
reinstates the truncation this PR exists to remove.
Placement is deliberate: the prose does NOT go in the `# /// script` PEP 723
block. That fence is parsed as TOML, so a comment line there is a hard launcher
failure, measured on uv 0.9.5:
# /// script
# requires-python = ">=3.10"
# Requires git >= 2.37 for --since-as-filter
# ///
$ uv run probe.py
error: TOML parse error at line 3, column 10 ... key with no value
exit 2
The docstring already carries the Usage / Environment Variables / Configuration
File sections, so Requirements belongs beside them. After the edit
`uv run scripts/generate-newsletter.py --help` exits 0, and the error string
quoted in the README is byte-identical to the f-string it documents.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* ci(proxied-cmd): green — give the proxied-shard job its own step timeout, refresh manifest (refs be-bruke)
The job-level timeout-minutes was the only backstop for the "Test
proxied-server cmd shard" step, and it counts the "Download binaries"
step too — so a slow download alone could exhaust the job budget and
kill an otherwise-healthy shard's test run with no way to tell the two
failure modes apart. Give the test step its own 16m timeout inside the
existing 30m job budget, and regenerate the bin-packed shard manifest
via scripts/ci/gen_proxied_shard_manifest.py so it stays in sync with
the current TestProxiedServer* set (0 drift, all 15 shards fallback:0).
* ci(proxied-cmd): mirror the shard timeouts onto the main lane, regen the manifest at the adoption base
Adoption review of #6689, iteration 1 — three minor findings, applied here
rather than deferred.
main.yml's `test-proxied-cmd` is the same job as pr-risk.yml's twin — same
proxied-test-shard.sh, same manifest, same total 15 — behind a
download/verify step inside a 20m budget with no step timeout, so the exact
ambiguous-timeout failure mode this PR removes from the PR lane survived on
the post-merge lane, which is where triage happens with nobody watching.
Mirror both edits (job 20m -> 30m, step 16m) and record the ordering at the
step, since it is not obvious from the site that 16m is deliberately below
the script's own -test.timeout=15m plus setup.
The manifest's only record of the cost proxy's two known blind spots lived
in a hand-written comment block the regeneration deleted:
TestProxiedServerListSortRetiresTheWalk seeds 1400 rows and walks the
listing three ways off a single init, and TestProxiedServerServeReadParity
is the CLI/HTTP read-parity oracle whose presence in this gate-required lane
is what makes the anti-drift claim enforced. Re-adding prose to a generated
file would just be deleted again, so it moves into the generator's emitted
header.
Base drift since authoring left the refreshed manifest one test stale —
#6584 added TestProxiedServerBackupRefusedOnExternalTopology, which
hash-distributed to shard 14 — so "0 drift, all 15 shards fallback:0" was
already false on the merge base. Benign (unlisted tests hash-distribute and
still run, and drift removed no name, so the strict parser's stale-entry
hard-fail was unreachable), but the stated deliverable did not hold.
Regenerated at the adoption base: 149 of 149 discovered tests listed,
fallback:0 on every shard, peak load unchanged at 39 estimated inits. That
figure is a point-in-time measurement, not an invariant: nothing in CI diffs
the committed manifest against a regeneration, so it re-drifts the moment
the next TestProxiedServer* lands. A freshness step
(`gen_proxied_shard_manifest.py 15 | diff - <manifest>`) on a lane already
triggered by .github/scripts/* would make it one; that is follow-up scope.
Verified: the generator reproduces the committed manifest byte-identically;
BEADS_TEST_SHARD_LIST_ONLY=1 across all 15 shards assigns all 149 discovered
TestProxiedServer* functions exactly once with no duplicates or orphans;
actionlint clean on both workflows.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* fix(test): reap dolt sql-servers leaked by killed test runs
A `go test -timeout` panic skips every t.Cleanup and TestMain defer, so a
test run killed that way left its `dolt sql-server` running forever. Two
gaps kept anything from ever noticing:
1. On darwin the deleted-cwd signal could not fire. macOS lsof prints the
bare path of a working directory that has been unlinked — no
" (deleted)" suffix, unlike Linux's /proc/<pid>/cwd — so readDarwinCwd
always reported deleted=false and selectOrphanTestServerPIDs' orphan arm
was dead code on this platform. It now stats the path and treats ENOENT
(and only ENOENT) as deletion, via a pure parseDarwinCwd that takes the
stat function so the classification is unit-testable.
2. Nothing ever looked at a DEAD run's temp root again. Each suite swept
only its own root, after its own m.Run() — the one moment a killed run
never reaches. New in internal/doltserver: WriteSuiteOwnerMarker claims a
root with the owning PID, and SweepDeadSuiteRoots globs a suite's prefix
at the START of the next run and reaps only roots whose recorded owner is
gone. An unclaimed root and a root whose owner is alive (a parallel
package, a second `go test`) are both left exactly as they are, so this
keeps SweepOrphanedTestServers' contract: never a shared temp dir, never
another suite's live server. decideSuiteRoot holds that judgment alone
and is table-tested; the liveness probe is build-tagged darwin/linux with
an always-alive stub elsewhere, making the helper a no-op there.
Wired into the cmd/bd and internal/storage/dolt TestMains, plus a new
TestMain for internal/storage/uow — the package that produced the observed
orphan and had no suite lifecycle at all. It pins TMPDIR under a suite root
so every t.TempDir() is sweepable, and newTestUOWProvider's cleanup now
reads the backend pid file before proxy.Shutdown and fails the test if that
server is still alive five seconds later, so a leak is visible where it is
caused rather than inferred later from a sweep.
Each wired TestMain reports a non-empty post-run sweep loudly, and fails the
run on it only under BEADS_TEST_FAIL_ON_LEAK=1 — opt-in so one flaky test
cannot redden a package for everyone. No workflow sets it yet.
Tests: go test ./internal/doltserver/ -run 'Sweep|Orphan|Suite' -count=1;
go test ./internal/storage/uow/ -run TestUOWDependencyEditorContract -count=1
-timeout 10m (real dolt); go test ./cmd/bd/ -run 'TestMain|TestVersion'
-count=1 -timeout 5m; go build ./...; go vet over the three packages;
gofmt -l . clean; golangci-lint (gosec + misspell) clean over the touched
packages. Verified on a live box: the orphan with the deleted cwd was
reaped, while the production server, an unclaimed suite root's server, and
an unrelated dolt server were all left running.
Refs: wy-j2zc8q
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1sjyiTjodNqNqEzEFbKAE
* fix(test): bound the sweep to temp roots and verify before killing
Round 2 on the leaked-test-server sweep, addressing an adversarial review of
2d9d656b5. Every finding was about the same thing: the first pass reached
further than its own doc comments claimed.
1. selectOrphanTestServerPIDs' deleted-cwd arm was root-independent, and the
darwin fix had just brought it to life on macOS. A PRODUCTION server is
spawned with cmd.Dir = <workspace>/.beads/dolt, so a developer who moved
that workspace — or whose external volume unmounted — would have their
live server reaped by any test run on the box. The arm now also requires
the deleted path to have been under a temp root (tempDirRoots: os.TempDir
plus /tmp, each in both its literal and symlink-resolved form, which is
what makes macOS's /var/folders vs /private/var/folders pair match). This
was a live hazard on linux too.
2. SweepDeadSuiteRoots promised it only touched marker-owned dead roots, but
reached SweepOrphanedTestServers, whose deleted-cwd arm spans the whole
box — at suite START, with sibling packages mid-run. It now uses a new
strictly root-scoped entry point, sweepServersUnderRoots, with the shared
SIGTERM/SIGKILL loop factored out as reapServerPIDs on each platform. The
end-of-run sweep in the TestMains still uses the broad one, which finding
1 has now bounded to temp dirs.
3. The uow cleanup's exit check blind-killed a bare PID. The server is not
this process's child, so its PID is reusable, and proxy.Shutdown
deliberately REFUSES to signal a record it cannot verify — killing that
very PID defeated the protection. It now keeps the whole pidfile record,
runs only when Shutdown returned an error (success already kills and
confirms), and gates both the liveness check and the kill on
procid.Verify / procid.Open with the recorded birth token. Timeout raised
to 30s, since Shutdown's own budget is 5s + 2s.
4. os.RemoveAll deletes the marker early, so a partial failure left an
unclaimed root that no later run could ever touch. Removal now does a
chmod u+w walk first (mirroring cmd/bd's forceRemoveAll, which exists
because that root doubles as an isolated $HOME full of read-only module
cache entries), and on a still-failing removal it rewrites the marker with
the same dead PID so the next run retries.
5. internal/storage/dolt created its root and ran the sweep above the
isHelperSubprocess early return: eight concurrent helpers each swept and
each claimed a root that os.Exit then abandoned. Moved below it; a helper
inherits the parent's live BEADS_TEST_CIRCUIT_DIR through the BEADS_
allowlist in integration.FilterEnv.
6. SweepDeadSuiteRoots globs a world-writable directory, so a planted root
with a dead-PID marker could aim it at a tree of someone else's choosing.
It now requires the root's uid to be os.Getuid() (unix-only file, accept-
all stub elsewhere, where the sweep is inert anyway).
7. The symlink leg of the selection test skips instead of failing where
os.Symlink is unprivileged. 8. "favour" -> "favor".
Tests: go test ./internal/doltserver/ -run 'Sweep|Orphan|Suite|Darwin'
-count=1 -v (49 cases, incl. new ones for a moved production workspace, an
unmounted volume, the observed orphan in both macOS path forms, the
root-scoped selection, canonicalRoots, tempDirRoots, the marker-restore path
and the read-only-directory removal); gofmt -l . clean; go vet over
doltserver, uow, cmd/bd and storage/dolt; GOOS=windows and GOOS=linux go vet
./internal/doltserver/; golangci-lint clean over all four trees;
scripts/check-build-tags.sh clean; go build ./...; go test -c for uow,
cmd/bd and storage/dolt. The three live dolt sql-servers on the box were
untouched throughout.
Refs: wy-j2zc8q
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1sjyiTjodNqNqEzEFbKAE
* fix(test): isolate helper circuit state, re-verify late exits, bound TMPDIR
Round 3, from the verification pass on efb7a1c39 (PASS-WITH-NITS).
1. internal/storage/dolt: moving the suite root below the isHelperSubprocess
return also took the per-helper circuit-breaker directory with it, so all
eight of TestMultiProcessSchemaInit's helpers would have inherited the
parent's BEADS_TEST_CIRCUIT_DIR and read-modify-written ONE file keyed
host:port:db, concurrently — a fresh flake risk in the exact test the move
was meant to protect. The helper branch now makes its own temp directory
and overrides the variable, as it effectively did before. No sweep and no
owner marker for helpers: they start no server, and a helper that leaves
through os.Exit would only abandon a marked root.
2. internal/storage/uow: requireBackendExited could observe the server alive
and then have it exit before procid.Open/Kill, which report a plain
"does not match token" that IsProcessGone does not match — so a server
that stopped a few milliseconds late was reported as one that survived
Shutdown entirely. Both failure paths now re-verify once and stay silent
when the process is gone; only a verifiably-live process is a t.Errorf. A
record with no birth token now logs the skip instead of returning
silently, so it cannot pass for a clean check.
3. internal/doltserver: tempDirRoots now drops roots too broad to be evidence
of anything. TMPDIR is an ordinary environment variable, so os.TempDir()
can hand back "/" or a home directory, and either would put every
workspace on the box back inside the deleted-cwd arm. isCredibleTempRoot
rejects the filesystem root, a relative path, and any directory that is or
contains $HOME, while /tmp, /private/tmp and /var/folders/… survive.
4. The identical SIGTERM/SIGKILL loop in sweep_darwin.go and sweep_linux.go
is now one reapServerPIDs in sweep_reap_unix.go, taking the platform's
identity probe as an isServer validator. It sits in a darwin||linux file
rather than the portable sweep.go because the signaling is POSIX; the
selection logic that decides which pids reach it stays platform-agnostic
in sweep.go.
Tests: go test ./internal/doltserver/ -run 'Sweep|Orphan|Suite|Darwin|TempDir'
-count=1 (53 cases; new TestTempDirRootsRejectsOverbroadTMPDIR drives
TMPDIR=/ and TMPDIR=$HOME through the real os.TempDir, and
TestIsCredibleTempRoot tables the predicate); gofmt -l . clean; go vet over
doltserver, uow, storage/dolt and cmd/bd; GOOS=windows and GOOS=linux go vet
./internal/doltserver/; golangci-lint clean over all four trees;
scripts/check-build-tags.sh clean; go build ./...; go test -c for uow,
cmd/bd and storage/dolt.
Refs: wy-j2zc8q
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1sjyiTjodNqNqEzEFbKAE
* fix(sweep): keep /tmp credible when HOME is a sandbox under it (wy-j2zc8q)
PR core went red on every Linux runner: TestTempDirRootsBoundTheOrphanArm
and TestTempDirRootsRejectsOverbroadTMPDIR reported tempDirRoots() empty.
Cause: scripts/ci/lib/test-env.sh exports HOME under a mktemp -d root in
/tmp, and isCredibleTempRoot rejected any root that CONTAINS the home —
so /tmp itself was thrown out and the deleted-cwd arm silently disabled on
exactly the boxes whose killed runs it exists to clean up after. macOS
never showed it: the sandbox home lands under /var/folders, and the
hardcoded /tmp survived.
The carve-out: a home living inside the fixed /tmp fallback is a SANDBOX
home that anchors no workspaces, so a root that merely contains it stays
credible. A root that IS the home is still dropped whatever the home looks
like, and the sandbox test is judged against the hardcoded /tmp, never
os.TempDir(), so TMPDIR=/home with HOME=/home/runner still reads as a real
home under an overbroad root.
Tests: the overbroad-TMPDIR test now pins HOME to a real-shaped
non-temp path (the ambient one is the sandbox on CI, where "a workspace
under HOME" and "a path under /tmp" are the same path), plus two new
subtests for the sandbox shape and a sandbox row set in the predicate
table. Reproduced the red and the fix on Linux in docker with
HOME=/tmp/beads-test-env-abc/home; also green with HOME=/home/runner and
/root, and on macOS.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEmu5ZSFoappn7s9yUQ3aF
* fix(test): stop leaking daemonized shared-server dolt from test fixtures (wy-j2zc8q)
Every uow fixture that provisions a shared-server workspace now registers
ONE cleanup, verifiedShutdownCleanup, which stops the proxy and its
`dolt sql-server` and — when proxy.Shutdown reports an error — asserts the
recorded backend pid is actually gone (procid birth-token gated) instead of
printing a t.Logf line into a passing test. Nine copies of the silent idiom
are gone; an AST guard fails the package if a fixture provisions a workspace
without the cleanup, or calls proxy.Shutdown by hand.
A reaped server now FAILS the suite that leaked it (ApplyLeakPolicy), with
BEADS_TEST_ALLOW_LEAK=1 as the triage-only downgrade. The previous default
warned on stderr and exited 0, which is how all three recurrences rode green
suites and were rediscovered from a dev box's process table.
The dead-run root sweep (owner marker + SweepDeadSuiteRoots) is extended to
the remaining packages that pin a suite temp root and start servers:
cmd/bd/doctor (cgo + !cgo), cmd/bd/doctor/fix (cgo + !cgo), internal/beads.
* test(uow): guard pairs shutdownOnInterrupt with verifiedShutdownCleanup, exempts validation-error fixtures (wy-j2zc8q)
Salvaged from the executor's worktree after the quiet-hours stop: rules A/B/C
over *testing.T functions, non-vacuity counters per rule.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWogqyZMByH2fYqUcafXvw
* fix(sweep): treat the per-user temp tree as a sandbox home root (wy-j2zc8q)
isSandboxHome whitelisted only /tmp, so on macOS a suite that pins HOME to a
t.TempDir() (cmd/bd/test_repo_beads_guard_test.go:128,
internal/beads/testmain_test.go:50) put HOME inside os.TempDir() itself
(/var/folders/xx/yy/T). isCredibleTempRoot then dropped os.TempDir() as "a
directory containing the user's home", tempDirRoots() collapsed to
[/tmp /private/tmp], and the deleted-cwd arm of SweepOrphanedTestServers was
inert on every Mac.
Judge sandbox-ness against a FIXED platform table (isUnderFixedTempRoots /
fixedTempRoots): /tmp everywhere, plus /var/folders on darwin,
canonicalRoots-expanded so /private/var/folders matches. TMPDIR still never
votes on its own credibility, so TMPDIR=/home with HOME=/home/runner keeps
reading as a real home under an overbroad root.
goos is a parameter, not a read of runtime.GOOS, so the darwin row is pinned
from Linux too.
Ran: go test -count=1 -run
'TestSandboxHomeUnderPerUserTempRoot|TestTempDirRoots|TestIsCredibleTempRoot|TestCanonicalRoots'
./internal/doltserver/ (ok); the pre-fix repro
HOME=$TMPDIR/fake-home-probe go test -run TestTempDirRootsBoundTheOrphanArm
now passes.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVJ7A7qWZYATyg2TsqggSA
* test(uow): exempt rule C by explicit name marker, not an error assertion (wy-j2zc8q)
The old rule-C exemption — "a function calling require.Error/ErrorContains
asserts the constructor rejected its arguments" — inferred intent from the
body, and TestNewExternalDoltServerUOWProvider_PreexistingDirtyDatabaseIsNotHealed
satisfied it by accident: it provisions a REAL external server, require.NoError
on the constructor, then asserts an error from a later query. Deleting BOTH
cleanup helpers from it left the guard green (mutation G).
Exempt only on an explicit, greppable name marker (_ValidationErrors), and
check the marker is not a lie: an exempted function must assert a rejection
(require.Error/ErrorContains) and must assert nothing succeeded (no
require.NoError/assert.NoError) — closing the rename-to-dodge path too. No
non-vacuity floor on the exemption count: if the marker stops matching, rule C
only gets stricter and the validation fixtures fail loudly.
Positive controls (both reverted):
- mutation G (drop both helpers from PreexistingDirty…) → FAIL:
"TestNewExternalDoltServerUOWProvider_PreexistingDirtyDatabaseIsNotHealed
provisions a shared-server workspace but never calls
verifiedShutdownCleanup(t, storeRootDir)"
- mutation G renamed to wear the marker → FAIL: "wears the
\"_ValidationErrors\" exemption but calls require.NoError/assert.NoError"
Ran: go test -count=1 ./internal/storage/uow/ -run
'TestEveryServerFixtureRegistersVerifiedCleanup' (ok; census: rule A paired 9,
rule C checked 8, exempted 2). go vet ./internal/storage/uow/ clean.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVJ7A7qWZYATyg2TsqggSA
* test(doctor): fail the doctor and fix suites on a swept leak (wy-j2zc8q)
ApplyLeakPolicy was wired into 4 of 7 TestMains; the three doctor-side suites
called SweepOrphanedTestServers and discarded its result, so a leaked dolt
sql-server there was reaped silently and the run still went green — the exact
blindness the policy exists to remove.
Four call sites across the three suites, in the pattern
cmd/bd/test_repo_beads_guard_test.go:52-54 and
internal/storage/uow/testmain_test.go:65-66 already use:
cmd/bd/doctor/testmain_nocgo_test.go -> "cmd/bd/doctor"
cmd/bd/doctor/dolt_e2e_test.go (cgo) -> "cmd/bd/doctor"
cmd/bd/doctor/fix/testmain_cgo_test.go -> "cmd/bd/doctor/fix"
cmd/bd/doctor/fix/testmain_nocgo_test.go -> "cmd/bd/doctor/fix"
Both build-tag variants compile.
Ran: go vet ./cmd/bd/doctor/... (0 issues); CGO_ENABLED=0 go vet
./cmd/bd/doctor/... (0 issues); go build ./... OK; go vet ./internal/doltserver/
./internal/storage/uow/ ./cmd/bd/doctor/... OK; gofmt -l internal cmd empty;
GOOS=linux go build ./... OK; GOOS=windows go build ./... OK.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVJ7A7qWZYATyg2TsqggSA
* fix(sweep): pin darwin's fixed temp roots to their resolved forms (wy-j2zc8q)
fixedTempRoots("darwin") listed {"/tmp", "/var/folders"} and left the
/private/… forms to canonicalRoots' filepath.EvalSymlinks, which reads the
HOST filesystem: it adds them on a Mac and nothing at all on Linux. The
platform table is a claim ABOUT darwin that TestSandboxHomeUnderPerUserTempRoot
deliberately judges from any platform, so ubuntu CI saw
isUnderFixedTempRoots("/private/var/folders/…/fake-home", "darwin") = false.
Spell the resolved forms out in the table instead — "/private/tmp" and
"/private/var/folders" — so the answer is host-independent. canonicalRoots
dedups, so on a Mac they are exactly what it would have added anyway, and the
darwin lsof cwd form now matches from any judging platform. Linux rows are
unchanged.
The subtest is also given a direct assertion on the table's contents: the
isUnderFixedTempRoots rows alone cannot catch a dropped literal when they run
on a Mac (EvalSymlinks puts it back), so the mutation that started this would
have passed locally forever.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MPryBr9EE2Px9crZ4NrTT
* test(bd): move the darwin sweep guard onto the leak-fails-the-suite contract (wy-j2zc8q)
TestRunTestsAndSweepReapsOrphanedServer predates ApplyLeakPolicy (097757b3e,
wy-s4zdj) and asserted the OLD policy: a swept orphan still exits 0. With the
policy in place it fails on macOS CI with runTestsAndSweep() = 1, want 0 —
the test was pinning exactly the behavior this PR removes.
Restate it as the two-case contract it is now: the existing case expects 1
(a swept leak fails an otherwise-passing suite), and a sibling sets
doltserver.AllowLeakEnv to "1" and expects 0. Both still assert the fake
server was actually reaped; the fake-dolt shape and the reap wait are
unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MPryBr9EE2Px9crZ4NrTT
* fix(sweep): report the leaked server's working directory, not just its PID (wy-j2zc8q)
Both leak lines named PIDs only:
Info: swept 1 orphaned test dolt sql-server process(es): [21881]
FAIL: cmd/bd leaked 1 dolt sql-server process(es) [21881]; swept them.
By the time anyone reads that, 21881 has been dead for minutes and identifies
nothing — so a package with hundreds of tests reported a leak with no way to
find which fixture caused it. The sweep already knew the answer: every
candidate carries the cwd it was serving (serverCandidate.cwd), and a leaked
test server's cwd is the .beads/dolt under the suite's temp tree, which Go
names after the test that made it (<root>/TestSomeName1234/001).
Thread it through. selectCandidatePIDs/selectOrphanTestServerPIDs become
selectServers/selectOrphanTestServers returning a new exported SweptServer
{PID, Cwd}, reapServerPIDs becomes reapServers over the same type, and
SweepOrphanedTestServers and ApplyLeakPolicy carry it end to end — every
existing call site is a pass-through from the one to the other, so they are
unchanged. SweptServer.String renders "<pid> cwd=<dir>", which is what the
two stderr lines now print:
Info: swept 1 ... process(es): [21881 cwd=/tmp/TestFoo123/001/.beads/dolt]
Tests: the darwin ps/lsof selection path now asserts whole SweptServers
(cwd included) rather than PIDs; TestSweptServerNamesItsDirectory pins the
rendering; TestApplyLeakPolicyNamesTheLeakingDirectory captures stderr and
pins the cwd in both the FAIL and the downgraded Warning line; and
TestReapServersReportsTheLeakedDirectory pins the Info line against a real
reaped process. sweep_other.go (non-unix) keeps the same shape.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MPryBr9EE2Px9crZ4NrTT
* fix(test): stop the shared dolt sql-server three init fixtures daemonize (wy-j2zc8q)
The leak the new guard catches. `bd init` in shared-server mode takes the
shouldInitSharedGlobalDB branch (cmd/bd/init.go:1417) and calls
doltserver.Start(sharedDir), which DAEMONIZES — cmd.Process.Release(), no
Wait, cmd.Dir = <sharedDir>/dolt (doltserver.go:1443-1446). Three cmd/bd
fixtures run that as a subprocess with BEADS_DOLT_SHARED_SERVER=1 and never
stop it, so the server outlives the `bd` that started it, the test that ran
it and the suite whose temp HOME it is serving:
cmd/bd/dolt_worktree_remote_test.go:34 (--prefix remote-sync)
cmd/bd/init_test.go:2096 (--prefix bare-fallback)
cmd/bd/init_test.go:2318 (--prefix bare-core)
Evidence: a full local `go test ./cmd/bd/` left
`dolt sql-server --config <suite root>/.beads/shared-server/dolt-server-config.yaml`
running with cwd /private/var/folders/…/beads-bd-tests-1850365081/.beads/
shared-server/dolt and databases beads_global + remote_sync — the remote-sync
prefix names the fixture. All three resolve the SAME $HOME/.beads/shared-server,
so only the last starter leaves a survivor; the process table names one while
three carry the defect.
stopSharedServerCleanup (new cmd/bd/shared_server_cleanup_test.go) is the one
cleanup they now register, before the first subprocess so the t.Fatalf paths
are covered: record the pid from doltserver.IsRunning BEFORE stopping (a clean
Stop deletes the pid file), capture its procid birth token, doltserver.Stop,
then assert the recorded process actually left — t.Errorf and a force-kill if
it did not. Birth-token gated throughout: the server is not this process's
child, so its PID is reusable the moment it exits. Same shape as
verifiedShutdownCleanup in internal/storage/uow (35faf60e5).
Verified both ways on the same two tests:
before: FAIL: cmd/bd leaked 1 dolt sql-server process(es)
[4217 cwd=/private/var/folders/…/beads-bd-tests-1902359010/.beads/shared-server/dolt]
after: no Info/FAIL leak line, no sql-server left under any suite root
The three assertion failures in those tests (dolt_worktree_remote_test.go
sync.remote, init_test.go DoltMode server/embedded) reproduce identically with
and without this commit — pre-existing, untouched here.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MPryBr9EE2Px9crZ4NrTT
* fix(test): stop the shared and proxied servers the init-metrics fixture daemonizes (wy-j2zc8q)
The post-run sweep on 164661ce4c named a fourth leaker on both CI runners:
`bd-metrics-home-*/.beads/shared-server/dolt`, TestInitMetricsEmittedPerDoltMode's
shared_server_via_flag case. That fixture runs `bd init --shared-server` with
HOME set only in the subprocess env, so the daemonized shared server lives
under a tree the in-process stopSharedServerCleanup never looks at. The same
table's proxied_server_via_flag case leaves a proxy plus its backend server
under <repo>/.beads/dolt with proxy.pid / proxy-child.pid records that no
dolt-server.pid cleanup can see.
- stopDoltServerCleanup(t, beadsDir): the existing verified stop, now with
an explicit beads directory; stopSharedServerCleanup keeps its signature.
- stopProxiedServerCleanup(t, proxyRoot): proxy.Shutdown (the verified stop
`bd dolt stop` performs) when either record exists.
- runBdInitForMetrics registers both before the subprocess runs, and the
shared case now passes BEADS_DOLT_SERVER_PORT=<free port> so it actually
starts a server on a box whose 3308 is already taken instead of silently
skipping the path (the previously unused extraEnv field carries it).
Probe: with the two registrations commented out the sweep reports both
servers (`swept 2 ... bd-metrics-home-*/.beads/shared-server/dolt ...
bd-metrics-repo-*/.beads/dolt`); with them in place the package is ok.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXZ9wbaFUnzRWcMj7iBxmq
* fix(test): scope suite leak attribution and verify cleanup (bd-154w)
Maintainer fixup for PR #6441, review attempts 1, 2, and 3.
Wire dbproxy/server into the marked suite-root lifecycle and verify the
standard fixture's backend shutdown before its directory is removed.
Capture synthetic leak-policy stderr, share the suite-root guard helper,
and document the manual repro harness's unconditional Kill/Wait cleanup.
Use SweepSuiteTestServers for every failure-producing post-run sweep,
including CGO, non-CGO, and integration callers. It delegates to the
existing strict root selector so a clean suite cannot reap another live
suite's deleted-cwd leak or fail in its place. Keep abandoned-run cleanup
separate through owner-checked SweepDeadSuiteRoots, and deprecate the
legacy global sweep for TestMain use without deleting contributor tests.
Pin and mark the integration suite's temporary root to retain detection.
Add a Linux process regression proving clean B preserves A's deleted-cwd
server and passes, then A reaps its own server and fails. Retain dead-owner
cleanup coverage and guard both integration temporary-directory APIs.
Pin the storage, CLI, and internal/beads suite roots before fixtures run,
with guards for both temporary-directory APIs. Preserve the storage helper
subprocess early return and the original parent for abandoned-root cleanup.
A Linux subprocess regression exercises the real storage TestMain: an
owned deleted-cwd fixture fails its suite while a foreign process survives.
Keep the CLI sandbox HOME beside fixtures so ~/.beads cannot become a
fixture ancestor and interfere with worktree repository discovery.
Keep integration server data owned but allocate its Unix socket in a short,
private directory with explicit cleanup. Exercise a data path exceeding
the Unix socket path budget while retaining the real SQL round trip.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Agent-Signature: Codex-unknown-model-unknown-reasoning on behalf of Julian Knutsen
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Eddie the Engineer <julianknutsen@users.noreply.github.com>
Forward-ports the 38 commits that shipped on release/1.3.0 (tagged v1.3.0 at
f45b249ce) into main, as RELEASING.md mandates after a tag. None of them had
ever been forward-ported. Recorded as a merge so main becomes a superset of
the release branch and the lineage is in the history.
Migration ordinal collision (the reason this needed a human-shaped merge):
both branches independently claimed clone-local ignored slot 0026 under
different filenames, so git merged both in with no conflict and left the
series with two migrations at ordinal 26 — a single-integer cursor cannot
address that, and migrationSource.list() panics on it.
Main's ignored/0026_add_wisps_current_revision is renumbered to 0027.
Release's 0026_dep_rekey_dedup_marker is in the shipped v1.3.0 tag, so field
stores have already recorded it at 26 and it can never move; main's twin has
never shipped in any release, so it is the one that is free to move. 0027 was
unused in the ignored series (both sides topped out at 26).
This trips check-migration-hygiene.sh Check C (frozen migrations), which has
no exemption mechanism. That is expected and accepted: breaking the collision
requires a rename, and the ignored series' cursor table is itself dolt-ignored,
so its content hashes are clone-local and never participate in the cross-clone
ContentHashSkew comparison that Check C exists to protect. Main's 0067 body is
deliberately NOT edited for the same reason in reverse — it is main-plane and
its hash IS compared across clones.
Conflicts resolved:
CHANGELOG.md release's finalized [1.3.0] section kept
byte-identical; main's two unreleased
entries (#6023, #5859) moved up under
[Unreleased] where they belong
cmd/bd/init_safety.go union — release's added paragraph is
cmd/bd/init_safety_help.go accurate against the merged code (three
exit-12 sources, incl. init.go:3147)
internal/storage/uow/dolt_sql_provider.go
kept main's newProvider refactor AND
release's readOnly field/assertion;
newProvider gained readOnly: opts.readOnly
so release's read-through-refused-migration
behavior survives main's refactor
.github/workflows/main.yml single -timeout=30m per release's #6091
scripts/ci_workflow_test.go design (flag on the invocation, not in
matrix.test-flags); the shadowed 25m in
matrix.test-flags removed
scripts/migration-test/lib/versions.sh
union — main's darwin/arm64 corpus plus
release's v1.2.2 linux/amd64 entry
integrations/beads-mcp/uv.lock ruff 0.16.5 (release, newer); block is
internally consistent, uv lock --check ok
default.nix vendorHash left at main's value and is
KNOWN STALE — see below
Version stamp lands at 1.3.0 (main had been sitting at the previously-released
1.2.2, this project's between-releases pattern). check-versions.sh: 24/24.
Known follow-up: default.nix vendorHash. The merged go.mod/go.sum is a genuine
union (release's kin-openapi/oapi-codegen bumps + main's newer Dolt stack) and
matches neither side, so neither recorded hash is correct. It must be
regenerated with scripts/update-nix-vendorhash.sh. The repo's automatic fixer
(update-vendor-hash.yml) is dependabot-only and will not run on this PR.
* release: prep v1.3.0-rc.2
Sanctioned RC bump per RELEASING.md "Cut an RC":
./scripts/update-versions.sh 1.3.0-rc.2
The Windows PE numeric fields (winres file_version/product_version and
the manifest <assemblyIdentity> version) stay at the base version 1.3.0
because PE versions must be purely numeric; the FileVersion/ProductVersion
strings carry the full 1.3.0-rc.2, and uv.lock carries the PEP 440
normalization 1.3.0rc2. scripts/check-versions.sh passes all 24 gates.
Also adds the three user-facing fixes found by testing rc.1 against
gascity to the [1.3.0] Fixed section: #6118 (an env-pointed server was
classified as workspace-owned, bypassing the shared-store migrate gate),
#6119 (a config.yaml server-mode workspace was refused as legacy), and
#6120 (a metadata-less server-mode workspace opened a phantom embedded
database and returned a false-empty list). #6121 is CI-only and takes no
changelog entry, matching #6091.
The [1.3.0] date is deliberately left alone — the stamp-changelog step
owns it at final-release time.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(release): complete the rc.2 rollup and add the info.go RC digest
Review fixups on top of the rc.2 prep. Two release-notes surfaces were
incomplete for this PR's own commit range, which grew when the prep patch
was rebased onto a base that already shipped #6269.
CHANGELOG rollup (gating). The `bd ready --claim` row-cap refusal sits under
`[Unreleased]`, which by Keep-a-Changelog semantics means it ships in no
release — but `git merge-base --is-ancestor 24a9da6cc HEAD` says rc.2 ships
the behavior, and it is the only breaking change in the range. Moved it into
`[1.3.0] ### Changed`, leaving `[Unreleased]` empty exactly as it was at the
`v1.3.0-rc.1` tag, and tagged it `(#6269)` so the rollup audit RELEASING.md
prescribes can identify its commit. This is the verbatim Release Checklist
item at RELEASING.md:150-153; `cmd/bd/info.go:227` points users at "the
[1.3.0] section", so section placement is the authoritative surface.
info.go digest. `versionChanges` had no RC entry, so `bd upgrade review` and
`bd info --whats-new` never surfaced #6118/#6119/#6120 to a 1.2.2 upgrader,
and the stale `1.3.0` SHARED SERVER item describes the #5920/#6048 gate
without the #6118 bypass fix. Added a `1.3.0-rc.2` entry per the
`1.1.0-rc.2` precedent (info.go:282), covering the three fixes plus the
ready-claim change, per RELEASING.md:154 and "Cut an RC" step 1. This also
stops the unknown-`since` fallback from dumping the whole release history at
an rc.2 user. Known residual: `1.3.0-rc.1` still has no entry, so an
rc.1->rc.2 upgrader keeps hitting that fallback; pre-existing, out of scope
for this bump.
Correction to the prep commit message: "the stamp-changelog step owns [the
CHANGELOG date] at final-release time" is not what that step does.
`.beads/formulas/beads-release.formula.toml:428-440` sed-inserts a new
`## [{{version}}] - $DATE` header beneath `## [Unreleased]`; it never
re-dates an existing section. With `## [1.3.0] - 2026-08-28` already dated,
running it at final release produces a duplicate `## [1.3.0]` heading. Final
1.3.0 prep must hand-restamp instead, or that step needs fixing first.
Validated: ./scripts/check-versions.sh 24/24 at 1.3.0-rc.2; go build/vet
./cmd/bd; go test ./cmd/bd -run
'TestVersionChanges|TestGetVersionsSince|TestDisplayVersion'; git diff
--check clean; `[Unreleased]` confirmed empty.
* docs(recovery): re-review init-safety playbooks; refresh the 90-day marker (#6411)
* docs(recovery): re-review init-safety playbooks; refresh the 90-day marker
The Last-reviewed marker crossed the 90-day freshness threshold on Sep 7,
turning 'Check doc flags freshness' (and with it PR Policy and the required
CI Gate) red for EVERY open PR — #6262 is merge-queued and UNSTABLE on
exactly this.
Reviewed against the declared freshness sources (init.go, init_safety.go,
init_safety_test.go, dolt.go), which changed materially since June
(notably the destructive-preflight replacement in #5310 and the
server-flag precedence work): the four playbooks' premises still hold —
--destroy-token/--reinit-local/--discard-remote all exist and are the
refusal remedies, the force-refusal-on-origin-history invariant is intact,
and the pk-fork-refused deep link from dolt.go:416 resolves. One drift
noted, not a correctness issue: the three init-* anchors are no longer
deep-linked from refusal messages post-#5310 (bd help init-safety links
the doc generically); a fuller playbook revalidation against the new
preflight wording is follow-up material, not a blocker.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(recovery): correct the init-safety exit-code mapping under the renewed marker
Maintainer review fixup for #6411. The marker bump renews a 90-day freshness
warranty asserting the four playbooks' premises still hold; review found one
that does not, so fix it rather than reset the clock over it.
init-local-exists was headed `Exit code: 11 (ExitLocalExistsRefused)` but led
with the "Refusing to destroy N issues in non-interactive mode." symptom,
which returns 12 (ExitDestroyTokenMissing, cmd/bd/init.go:2712-2715). Exit
11's only non-test site is the interactive typed-confirm decline
(cmd/bd/init.go:2696) — the same split cmd/bd/protocol/exit_codes_init_test.go
already documents. The section's recovery (`bd init --reinit-local`) also
dead-ended: runInitReinitPreflight gates on reinitLocal alone, so the
non-interactive caller the symptom names re-triggers the identical exit-12
refusal.
- doc: head init-local-exists with both codes, lead with the true exit-11
interactive symptom, append --destroy-token to the non-interactive recovery,
and add the refusal as a second symptom under init-token-missing, whose
"Why this happens" attributed the token to --discard-remote alone.
- doc: scope the intro's "points here to a labeled anchor" claim to the
post-#5310 reality the marker commit itself disclosed (only pk-fork-refused
is still deep-linked).
- code: correct the ExitLocalExistsRefused and ExitDestroyTokenMissing
comments, which are where the doc inherited its mapping error from, and
widen the same --discard-remote-only framing in `bd help init-safety`.
- gate: add cmd/bd/dolt.go to check-doc-freshness.sh — the doc declares it a
freshness source but the script did not enforce it, so drift in the pk-fork
playbook's source never tripped the re-review duty.
Comment, doc, and help text only; no behavior change. Verified:
check-doc-freshness.sh PASSED 10/10 with the added source, go test ./scripts/,
the cmd/bd init-safety tests, and the cmd/bd/protocol exit-code contract tests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(ci): sync the doc-freshness test fixture with the init-safety source list
The maintainer review fixup for #6411 added `cmd/bd/dolt.go` to the
`docs/recovery/init-safety.md` entry of the DOCS array in
scripts/check-doc-freshness.sh (and to the doc's own `Freshness source:`
marker), but scripts/check_doc_freshness_test.go pins the same list in
`freshnessDocuments`, which it uses to build the fixture tree every
subtest runs the real script against. The fixture doc's marker line is
written from that pinned list, so the script -- correctly -- reported
`FAIL: Freshness source does not name cmd/bd/dolt.go` for every case.
That reds `.github/workflows/pr.yml`'s check-doc-freshness-platforms
matrix, which runs
`go test '-tags=integration,gms_pure_go' -count=1 -run '^TestDocFreshness' ./scripts`.
GitHub CI never saw it: the six workflows are green on the pushed head
94d76b5a4, which is the one-line marker bump alone, while the fixup that
edits the DOCS array has been local-only through the review loop.
Add `cmd/bd/dolt.go` to the pinned list so the mirror matches the script.
Validated in the adopted worktree:
- `go test '-tags=integration,gms_pure_go' -count=1 -run '^TestDocFreshness' ./scripts` -> ok
(fails without this commit; passes at 94d76b5a4, so the break is fixup-introduced)
- `./scripts/check-doc-freshness.sh` -> PASSED against the real tree
- `go build ./...`, `go vet ./cmd/bd/... ./scripts/...` -> clean
- `go test ./test/docsync` (Mintlify nav/link guard) -> ok
- `go test ./cmd/bd/protocol -run Exit` -> ok
- the 14 `cmd/bd/init_safety_test.go` tests -> ok
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* fix(release): key rc.1 in versionChanges; admit exit 12's interactive decline
Maintainer review fixups for the v1.3.0-rc.2 prep adoption. Both findings
are minor and non-gating; both are cheapest to fix before the tag.
versionChanges gained a 1.3.0-rc.2 key but has no 1.3.0-rc.1 key, so the
one upgrade hop this RC creates -- rc.1 testers (the reporters of
#6118-#6120) moving to rc.2 -- misses the exact-string index scan in
getVersionsSince and falls through to its "upgrading from a very old
version" branch, which returns the ENTIRE list. `bd upgrade review` then
dumps all 81 release entries instead of the one-entry rc.2 digest written
for exactly that audience -- while the shipped [1.3.0] entry tells users
to prefer it to `bd info --whats-new` "which dumps the whole release
history". The lookup runs in the NEW binary, so an rc.1 key can only
reach an rc.1 user by shipping inside rc.2; it cannot be added later.
The 1.1.0 line carries both of its rc keys (info.go:293,305) and this
restores that pattern. Placement is immediately below the rc.2 entry:
getVersionsSince cuts by index, and the 2026-08-31 date keeps the array
monotonic for TestGetVersionsSinceOrder. Verified with the built package:
getVersionsSince("1.3.0-rc.1") now returns exactly the rc.2 entry, and
the 1.2.2 hop still resolves, now as [1.3.0, rc.1, rc.2].
The ExitDestroyTokenMissing doc comment and the `bd help init-safety`
exit table say 12 means a destructive re-init "in non-interactive mode",
but handleRemoteSafetyDecision returns 12 from a branch guarded by
term.IsTerminal (cmd/bd/init.go:3147) when the interactive
--discard-remote typed-token confirmation is declined -- a third producer
alongside init.go:2744 and init_safety.go:162. A script or playbook
branching on "12 => we were non-interactive" can misdiagnose an
interactive decline. The clause is verbatim pre-existing, but the commit
it rides on re-audited exactly this exit-code documentation and made the
sibling exit-11 "sole source" claim exactly precise, so it is corrected
here rather than re-asserted. Both sites gain one clause.
Comment, help text, and release-metadata only; no behavior change and no
constant values changed. Verified: check-versions.sh in sync at
1.3.0-rc.2, check-doc-freshness.sh PASSED, gofmt clean, git diff --check
clean, and the cmd/bd version-tracking and init-safety tests green.
Follow-up (not this PR): no test pins the RC-key chain, which is how the
missing key passed CI silently; a presence-pin would close the class.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* docs(recovery): re-review init-safety playbooks; refresh the 90-day marker
The Last-reviewed marker crossed the 90-day freshness threshold on Sep 7,
turning 'Check doc flags freshness' (and with it PR Policy and the required
CI Gate) red for EVERY open PR — #6262 is merge-queued and UNSTABLE on
exactly this.
Reviewed against the declared freshness sources (init.go, init_safety.go,
init_safety_test.go, dolt.go), which changed materially since June
(notably the destructive-preflight replacement in #5310 and the
server-flag precedence work): the four playbooks' premises still hold —
--destroy-token/--reinit-local/--discard-remote all exist and are the
refusal remedies, the force-refusal-on-origin-history invariant is intact,
and the pk-fork-refused deep link from dolt.go:416 resolves. One drift
noted, not a correctness issue: the three init-* anchors are no longer
deep-linked from refusal messages post-#5310 (bd help init-safety links
the doc generically); a fuller playbook revalidation against the new
preflight wording is follow-up material, not a blocker.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(recovery): correct the init-safety exit-code mapping under the renewed marker
Maintainer review fixup for #6411. The marker bump renews a 90-day freshness
warranty asserting the four playbooks' premises still hold; review found one
that does not, so fix it rather than reset the clock over it.
init-local-exists was headed `Exit code: 11 (ExitLocalExistsRefused)` but led
with the "Refusing to destroy N issues in non-interactive mode." symptom,
which returns 12 (ExitDestroyTokenMissing, cmd/bd/init.go:2712-2715). Exit
11's only non-test site is the interactive typed-confirm decline
(cmd/bd/init.go:2696) — the same split cmd/bd/protocol/exit_codes_init_test.go
already documents. The section's recovery (`bd init --reinit-local`) also
dead-ended: runInitReinitPreflight gates on reinitLocal alone, so the
non-interactive caller the symptom names re-triggers the identical exit-12
refusal.
- doc: head init-local-exists with both codes, lead with the true exit-11
interactive symptom, append --destroy-token to the non-interactive recovery,
and add the refusal as a second symptom under init-token-missing, whose
"Why this happens" attributed the token to --discard-remote alone.
- doc: scope the intro's "points here to a labeled anchor" claim to the
post-#5310 reality the marker commit itself disclosed (only pk-fork-refused
is still deep-linked).
- code: correct the ExitLocalExistsRefused and ExitDestroyTokenMissing
comments, which are where the doc inherited its mapping error from, and
widen the same --discard-remote-only framing in `bd help init-safety`.
- gate: add cmd/bd/dolt.go to check-doc-freshness.sh — the doc declares it a
freshness source but the script did not enforce it, so drift in the pk-fork
playbook's source never tripped the re-review duty.
Comment, doc, and help text only; no behavior change. Verified:
check-doc-freshness.sh PASSED 10/10 with the added source, go test ./scripts/,
the cmd/bd init-safety tests, and the cmd/bd/protocol exit-code contract tests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(ci): sync the doc-freshness test fixture with the init-safety source list
The maintainer review fixup for #6411 added `cmd/bd/dolt.go` to the
`docs/recovery/init-safety.md` entry of the DOCS array in
scripts/check-doc-freshness.sh (and to the doc's own `Freshness source:`
marker), but scripts/check_doc_freshness_test.go pins the same list in
`freshnessDocuments`, which it uses to build the fixture tree every
subtest runs the real script against. The fixture doc's marker line is
written from that pinned list, so the script -- correctly -- reported
`FAIL: Freshness source does not name cmd/bd/dolt.go` for every case.
That reds `.github/workflows/pr.yml`'s check-doc-freshness-platforms
matrix, which runs
`go test '-tags=integration,gms_pure_go' -count=1 -run '^TestDocFreshness' ./scripts`.
GitHub CI never saw it: the six workflows are green on the pushed head
94d76b5a4, which is the one-line marker bump alone, while the fixup that
edits the DOCS array has been local-only through the review loop.
Add `cmd/bd/dolt.go` to the pinned list so the mirror matches the script.
Validated in the adopted worktree:
- `go test '-tags=integration,gms_pure_go' -count=1 -run '^TestDocFreshness' ./scripts` -> ok
(fails without this commit; passes at 94d76b5a4, so the break is fixup-introduced)
- `./scripts/check-doc-freshness.sh` -> PASSED against the real tree
- `go build ./...`, `go vet ./cmd/bd/... ./scripts/...` -> clean
- `go test ./test/docsync` (Mintlify nav/link guard) -> ok
- `go test ./cmd/bd/protocol -run Exit` -> ok
- the 14 `cmd/bd/init_safety_test.go` tests -> ok
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* migration-test: port the historical-Dolt upgrade corpus to darwin/arm64
The harness was Linux/amd64-only, gated by an unconditional uname check.
Porting it turned out to need more than the linux-only STRICT_RELEASE_ASSETS
table: sourcing lib/versions.sh's associative arrays fails outright under
macOS's bundled bash 3.2 (no `declare -A` support), `realpath -e` and
`find -printf` are GNU-only, the release-binary version probe's sandboxed
PATH=/usr/bin:/bin has no `timeout` on macOS, and the v0.9.1 source build's
own scratch dir was never canonicalized against macOS's symlinked TMPDIR.
- lib/versions.sh: guard on bash >= 4 with an actionable message instead of
a cryptic mid-file parse error; add reviewed darwin|arm64 asset+checksum
entries for all 12 corpus versions (existence confirmed via `gh release
view`, checksums taken from each release's own checksums.txt — the same
provenance as the existing linux|amd64 rows, cross-checked byte-for-byte
against them).
- historical-dolt-upgrade-test.sh: accept linux/x86_64 or darwin/arm64
(still an explicit allowlist, not a generic passthrough); replace the two
`find -printf` uses with a portable per-entry describer (Linux keeps the
original find command unchanged) and a plain `-exec basename`.
- lib/binary.sh: add resolve_existing_path (realpath -e on Linux, plain
realpath elsewhere — verified to already require existence on macOS);
resolve `timeout` to an absolute path before entering the sandboxed probe
rather than widening its PATH; canonicalize the v0.9.1 build's scratch dir
immediately after mktemp; parameterize its GOOS/GOARCH/cache-path instead
of hardcoding linux/amd64.
Validated natively on darwin/arm64: syntax-checked under bash 5; the
existing legacy-bridge-test.sh smoke suite passes unchanged (including its
assertion that the sandboxed probe PATH stays exactly /usr/bin:/bin); real
end-to-end runs of run.sh (the actual CI entrypoint) pass for the embedded
Dolt lane (v1.1.2), the external server-Dolt lane against the pinned Dolt
runtime (v0.62.0 — production's current schema), and a classic-SQLite bridge
lane (v0.49.6). linux|amd64 behavior is unchanged (existing entries and
branches are untouched byte-for-byte; only new darwin-only branches added).
v0.9.1's own lane gets past every platform fix here and then hits an
unrelated, pre-existing bug: migrate-legacy-to-current.sh's bridge
comparison stringifies timestamps as local-time-with-offset on the old side
and UTC-Z on the candidate side, so it only happens to line up when the
runner's local timezone is UTC (true for CI, false here). Left unfixed as
out of scope for a platform-corpus change — noted for the reviewer.
Ref: ga-9sghx (Gas Town HQ)
* fix(ga-9sghx): address PR #6072 review feedback
bee-ghosttrack's review (CHANGES_REQUESTED) found resolve_existing_path's
non-Linux branch assumed BSD realpath, but Homebrew coreutils puts GNU
realpath on macOS PATH too — and GNU's flagless default silently accepts
a missing final path component, dropping the existence guarantee this
function promises callers. Add an explicit [ -e "$1" ] guard so it holds
regardless of which realpath resolves.
Also skip the v0.63.3 embedded-Dolt lane specifically on darwin/arm64:
that release's published darwin/arm64 binary was built without CGO and
can't open an embedded-Dolt store at all — an upstream release artifact
limitation, not fixable here. Skipping just that one version (with an
explicit, non-silent message) keeps ./run.sh from being permanently red
on a Mac; every other embedded-Dolt version is unaffected.
Verified: legacy-bridge-test.sh passes; --version v0.63.3 now exits via
the explicit skip instead of the CGO error; resolve_existing_path
unit-checked directly for both the existing-path and missing-path cases.
---------
Co-authored-by: Test <test@example.com>
* test(feat): red — Align dolt-sql-server test container version with host DOLT_VERSION pin (refs be-egcj2.3)
* feat: green — Align dolt-sql-server test container version with host DOLT_VERSION pin (refs be-egcj2.3)
* chore(ci): retrigger CI after transient golangci-lint schema-fetch timeout (refs be-fjj0i)
`SED_INPLACE="sed -i ''"` cannot carry an empty argument. After word-splitting,
the two quote characters survive as a literal two-character argument, so BSD sed
reads '' as the backup SUFFIX rather than as "no suffix" and writes
`default.nix''` beside the real file on every macOS run.
Reproduction (bash, macOS):
echo 'vendorHash = "old";' > default.nix
SED_INPLACE="sed -i ''"
$SED_INPLACE "s|old|new|" default.nix
ls
# default.nix default.nix''
The stray is not ignored by .gitignore and carries the placeholder
sha256-AAAA... hash the script sets in step 1, so a `git add -A` after running
the script commits a file whose vendorHash can never validate. I hit exactly
that on a resync.
Fixed by branching at the call site in a function, where an empty argument is
passed as a real argument instead of surviving word-splitting as text. Same
detection, same two call sites, no behavior change on GNU sed.
* ci(macos): give the macOS test lane the 30m timeout the Linux lane already has
#6091 gave scripts/ci/pr-core.sh an explicit -timeout=30m because ./cmd/bd
has outgrown Go's implicit 10m per-package default. The macOS lanes invoke
`go test` inline in workflow YAML and never got the same treatment, so they
still run against a 10m wall.
Measured macOS ./cmd/bd durations across 17 recent runs: 357, 387, 389, 418,
419, 422, 486, 494, 536, 542, 547, 549, 558, 560, 590, 597, 600 — a coin flip
against 600s. #6091's own macOS lane passed at 596.719s, 3.3s of margin.
No single test is responsible, so when the alarm fires the panic names
whichever test was in flight and reads like a hang rather than the package
running out of clock.
30m is not a new number: main.yml's integration shards, ci-measurements.yml
and nightly.yml already give this same code 30m on every -race lane.
Changed:
- pr.yml Test (macos-latest)
- main.yml Test (macos-latest), and the ubuntu-latest coverage lane beside
it, which runs the same ./... under -race with coverage on and also had
no explicit timeout
- ci-measurements.yml "macos short" and "pr-core" — the measurement twins
of the above, which at 10m clip their own longest samples into panics
In main.yml the flag sits on the invocation rather than in matrix.test-flags
so editing the matrix cannot silently drop it.
De-slowing or sharding ./cmd/bd is the real fix and belongs on main; this
only stops the clock from being the thing that fails.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(ci): pin the macOS lanes' explicit -timeout=30m
TestMacOSTestJobsReuseWorkspaceBDBinary asserts the macOS `Test` step's
`run` string verbatim, so adding -timeout=30m to pr.yml and main.yml left
the test still asserting the pre-change command. Both the macOS lane and
PR Core failed on it:
ci_workflow_test.go:282: step "Test" run = "... -timeout=30m ...",
want "... -skip '^TestEmbedded' ./..."
Update the two pinned strings so the tripwire guards the commands the
lanes actually run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Both legs of main.yml's `test` matrix run every package in one `./...`
invocation with no `-timeout`, so they rode go test's DEFAULT 10m
per-package deadline. cmd/bd has outgrown it: scripts/test.sh already
documents the floor for local runs (~1090s of test time / ~18min wall for
cmd/bd, which is why TEST_TIMEOUT defaults to 25m there), and on
2026-09-01 main run 33497003321 failed twice with
`panic: test timed out after 10m0s` in cmd/bd AND, as collateral in the
same parallel coverage pass, internal/storage/uow — with DIFFERENT tests
only 1-12s in flight on each attempt (a package-wide crawl on the 2-core
coverage-instrumented runner, not a hang), while a rerun of the identical
tree passed.
Give both legs the repo's own 25m per-package deadline and keep it inside
one finite job budget (`timeout-minutes: 45`), the shape
test-embedded-conformance already documents: the go deadline fires first
and prints goroutine stacks, so a REAL hang stays diagnosable instead of
being cut off by a bare job kill.
The ubuntu leg's `matrix.test-flags` is dead config — its coverage step
hardcodes its own flags — so the ubuntu deadline goes on the gotestsum
line and the macOS one on `test-flags`, the only leg that reads it.
scripts/ci_workflow_test.go pins that macOS string exactly, so the
ratchet moves with it (adversarial review F1: without this the diff is a
deterministic red on main and on every PR).
Verified: go test -count=1 ./scripts rc=0 (the ci_workflow ratchet over
the patched main.yml); actionlint .github/workflows/main.yml rc=0.
cmd/bd has outgrown Go's implicit 10m per-package default. Measured
through this wrapper it takes 572s, leaving under 5% margin, so runner
variance pushes it over: it failed at 600.343s and 600.728s on two
consecutive runs of #6090 while #6038 landed just under.
No single test is responsible, so the timeout panic names whichever test
was in flight and reads like a hang rather than the package running out
of clock.
30m matches every other -race lane in the repo for this same code:
main.yml's integration package and cmd/bd shards, ci-measurements.yml,
and nightly.yml. Splitting or de-slowing cmd/bd is the real fix and
belongs on main; this only stops the clock from being the failure.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* chore: bump version to 1.3.0
Runs scripts/update-versions.sh 1.3.0, the sanctioned path per RELEASING.md.
Covers everything scripts/check-versions.sh gates: cmd/bd/version.go, the
three plugin manifests plus the marketplace, the MCP pyproject/__init__/
uv.lock pin, npm-package/package.json, the tracked .githooks managed-section
markers, default.nix and the Windows PE resource metadata.
scripts/check-versions.sh passes at 1.3.0.
* docs(changelog): roll up [1.3.0] for 2026-08-28
Creates the [1.3.0] section dated 2026-08-28 and leaves [Unreleased] empty
but present.
- Rolls up everything that was under [Unreleased].
- Adds a 'Breaking changes for v1.2.2 users' section. v1.2.2 shipped the
v1.1.2 tree, so its users never received [1.2.1]; the five behavioral
breaks documented there are restated (close policy on bd update -s, search
including closed, the interactive-only last-touched fallback, bd human list
status handling, dolt push/sync remote-adoption consent) with a pointer to
the historical section rather than a copy of it. The two breaks new in
1.3.0 (BEADS_DOLT_PORT precedence, actor '--' decoding) are indexed here
and written up in full under Changed.
- Adds upgrade notes: first invocation auto-migrates v53 -> v66 (13
migrations, 0054..0066, verified against the embedded migrations dir);
per-step progress on stderr is TTY-gated, so CI sees nothing; back up
first; the forward skew guard means co-resident older binaries refuse the
store, so a shared-store fleet upgrades together; rollback via the recovery
runbook's cursor-rollback procedure.
- Adds entries for eight changes that had no changelog line at all, each
verified against the code on this branch: --profile -> --cpu-profile with
no alias (#5126); the one-time content-derived aux-row id rekey, main 0061
(#5150); events becoming clone-local, 0062 (#5162); the interactions.jsonl
sidecar becoming opt-in behind audit.enabled (#4688); bd import erroring on
redirected stdin with no source (#5171); auto-backup defaulting off under a
sql-server (wy-zrmqr); bd hooks install --chain/--force becoming no-ops
under marker sections (#5284); the new *.gate.lock workspace/physical-root
gate files (#5046, #5093); and purge/prune tier selection (#5995).
- Moves the 'sort on listIssues' entry (#5666) out of [1.2.2] and into
[1.3.0]. Its commit 8aaefe2d4 is not an ancestor of the v1.2.2 tag, so it
never shipped in that release.
* feat(info): add the 1.3.0 versionChanges entry
RELEASING.md makes cmd/bd/info.go a required release step: versionChanges is
the channel 'bd info --whats-new' uses to tell an agent what changed under it.
The entry matches the existing format and carries the same upgrade notes as
CHANGELOG's [1.3.0] — the v53->v66 migration and its cost, the fleet
implication of the forward skew guard, the rollback pointer, the seven
behavioral breaks a v1.2.2 user meets, and the headline changes.
* docs(releasing): document the release-branch process, fix the semver wording, close the audited checklist gaps
Release-branch process (now in use for 1.3.0): a new 'Release Branches'
section covers cutting release/x.y.z from a SHA green on both Main and
Nightly Full Tests, landing every release-targeted change as a PR based on
the release branch and labeled status/needs-review-auto, tagging from the
branch, and forward-porting to main afterwards. Hotfixes are folded into the
same shape rather than a parallel one.
Semver: MAJOR is now removals and incompatible interface changes; documented
behavioral breaks that ship with migration notes are a MINOR bump, with the
obligation that makes that legitimate (CHANGELOG entry naming the override,
plus an info.go summary). 1.3.0 is cited as the worked example.
Checklist gaps the audit found: cross-compiling every goreleaser target
before tagging (GH#5662 — PR CI builds none of them, and the freebsd break
burned the v1.2.0 tag), the docs cutover (cli-docs.pin bump plus regen, and
the hand-maintained release line on docs/index.md, which had gone stale at
1.1.0), a release-notes rollup check for both an unemptied [Unreleased] and
entries misfiled under a previous tag, an explicit check-versions.sh gate,
and the info.go entry.
Also retires the bump-version.sh instructions: that script has been a
deprecation stub that exits 1 for some time, so the document's primary
version-bump instruction could not work. Replaced with update-versions.sh
plus check-versions.sh, and the file list corrected against what the script
touches now (uv.lock, the copilot plugin, the .githooks markers, winres) —
the old list named cmd/bd/templates/hooks/* and PLUGIN.md, neither of which
it writes. 'The Easy Way' now names the release molecule; release.sh is a
gateway that prints it.
Fixes the drifted table of contents while in the area.
* fix(release-formula): bump via update-versions.sh, verify via check-versions.sh
The formula carried its own hand-rolled copy of the version bump, and it had
drifted from the scripts it was copied from. bump-plugin-json pointed at
claude-plugin/.claude-plugin/plugin.json, a path that has not existed since
the plugins moved under plugins/beads/ — so the step would have failed
outright — and the copy covered none of the files added to the gate since:
the codex and copilot plugin manifests, integrations/beads-mcp/uv.lock, and
the BEADS INTEGRATION markers in .githooks/*. A release driven by this
formula would either die on the stale path or ship inconsistent versions,
which is how the v1.1.1 tag burned (stale uv.lock, discovered only in the
tag-triggered run) and how the v1.2.0 bump reddened main (stale hook
markers).
Replaces the seven hand-rolled bump steps with one that runs
scripts/update-versions.sh, which is the sanctioned path and cannot drift
from itself, and turns verify-versions into scripts/check-versions.sh — the
same gate the release-tag pre-push hook and CI run — instead of a grep list
that has to be maintained in parallel with the real one. Both steps carry the
two failure modes worth knowing about: uv missing (leaves uv.lock stale, fails
only after the tag exists) and the hook markers being rewritten wholesale
rather than matched.
Also renames push-main to reflect the release-branch process now documented
in RELEASING.md, and adds the forward-port reminder there.
Verified: each listed file checked against scripts/update-versions.sh and
scripts/check-versions.sh as they exist on this branch, and against a real
./scripts/update-versions.sh 1.3.0 run. go test ./scripts/ -run Release
passes (the formula still parses, and the cleanup-stale-dolt-orphans,
verify-homebrew-core and local-install assertions are untouched).
* docs: point the release banner at 1.3.0 and tell 1.2.2 users what this upgrade costs
The docs homepage carries a hand-maintained 'These docs are for the X.Y.Z
release' line that nothing generates or validates, so it had gone stale at
1.1.0 while the CLI docs pin had already moved to v1.2.2. It now names 1.3.0
and sends the reader to Upgrading first, since this upgrade crosses a schema
migration. RELEASING.md now carries a checklist item for it.
docs/getting-started/upgrading.md was entirely version-agnostic: strong on
mechanism (install methods, hooks, the remote-migrate gate, backup-first,
the multi-clone flow) and silent on which release you are coming from. A
1.2.2 user could read the whole page without learning that their database is
at v53 and that this step crosses 13 migrations. Adds an 'Upgrading to 1.3.0'
section covering the v53->v66 jump and why it is bigger than a routine one,
the slower first invocation and its TTY-gated per-step progress, the
forward-skew consequence for a shared store (upgrade every client together),
and the cursor-rollback runbook. It links to the backup and multi-clone
procedures already on the page rather than restating them.
Also adds the schema-version-mismatch runbook to the Recovery index table.
It was reachable only from the sidebar and the CHANGELOG, and the new
Upgrading section links to it.
Generated docs untouched: scripts/check-cli-docs-drift.sh passes against the
v1.2.2 pin, and the pin bump is a post-tag step (generate-cli-docs.sh builds
bd from the pinned tag, which does not exist until v1.3.0 is pushed).
go test ./test/docsync and scripts/check-doc-freshness.sh pass.
* fix(release-notes): correct the backup advice, the migration count, and the breaks undercount
Review round on #6038. Four findings, all of which made the upgrade notes
actively misleading rather than merely incomplete.
CRITICAL — bare 'bd backup' takes no backup. backupCmd is a runless cobra
parent (no Run/RunE, children init/sync/restore/remove/status, no default),
so cobra prints usage and exits 0 without writing anything. A user following
'bd backup' before an irreversible 27-migration upgrade sees help text and
proceeds believing a snapshot exists; in a script, 'bd backup && ...' proceeds
on exit 0. Replaced with 'bd backup init <path>' then 'bd backup sync' in
CHANGELOG, info.go and upgrading.md, and said in each place that bare
'bd backup' takes no backup.
Also CRITICAL, same class: the backup had no ordering rule. Under 1.3.0
'bd export' triggers autoMigrateOnVersionBump before it exports, so a backup
taken after installing is a post-migration snapshot that cannot protect
against the migration going wrong. All three copies now say to back up with
the OLD binary before installing, and carry the neighbouring rule that
remote-backed stores must finish 'bd dolt push' first, since the
pending-migration gate refuses push/pull too.
Migration count: '13' was the main series only. schema.go runs the main
source then the ignored source through the same 'Applying migration %04d'
printer, and the ignored series moves 0011 -> 0025 here, so the run is ~27
migrations and the counter visibly restarts from 0066 back to 0012. That
backwards jump is exactly the signature an operator reads as a loop and
kills — while these same notes say 'do not interrupt it'. All three copies
now state ~27, show the restart in sample output with real migration names,
and label it as not a restart.
Breaks undercount: 'seven' read as an enumeration, but [1.2.1] carries three
more entries explicitly labelled BREAKING that a v1.2.2 user also meets.
Retitled as highlights with an explicit pointer to the full [1.2.1] section,
and added the three: '--readonly serve' now refused (load-bearing next to the
'restart any long-running bd serve' advice — it will not come back up), the
config kv-plane drop, and the backend package's orphan-handling removal. The
info.go entry gets the same pointer and the same three, since 'bd info' is the
only copy reachable after installing.
Upgrade-time reader is now pointed at 'bd upgrade review', which computes the
delta since the previously-run version via getVersionsSince, instead of
'bd info --whats-new', whose showWhatsNew loops the entire versionChanges
array with no cap (~80 entries) to deliver the ~11 relevant bullets.
* fix(check-versions): gate the copilot manifest and the winres files, stop overclaiming
Three review findings, all cases where the gate said more than it checked.
Copilot manifest was bumped but never gated. update-versions.sh:101 rewrites
plugins/beads/.copilot-plugin/plugin.json with a sed anchored on the OLD
version, and check-versions.sh never read the file — the string 'copilot' did
not appear in it. That is the same drift class that carried stale .githooks
markers through v1.2.0: once the file drifts the bump silently no-ops on it,
the green line prints, the pre-push hook and CI pass, and the Copilot plugin
ships advertising the previous version. Now gated. Verified it fails: drifting
the file to 1.2.2 reddens the run and exits 1.
winres was verified by nothing after the formula rewrite deleted the steps
that grepped it. Restored as real gates rather than formula prose, since
manifest.xml's <assemblyIdentity> version has no backstop at all —
gen-winres.sh re-derives winres.json's numeric fields from version.go at build
time, but the manifest's version is embedded verbatim, and update-versions.sh
rewrites it with a sed anchored on the old base version. Prerelease-correct:
file_version/product_version and the manifest's four-part version are checked
against the BASE version while FileVersion/ProductVersion are checked against
the full string, which is what update-versions.sh writes. The manifest grep is
anchored at line start because the XML declaration also carries a version=
attribute. Verified it fails on drift.
The success line claimed a 'released-docs policy pass' for a check that no
longer exists — the script reads no docs file — while this same release adds
a MANUAL docs-cutover checklist item precisely because nothing automated
covers docs. An operator reading that line would reasonably skip the manual
checks. Now says version files only, and names the manual steps. The two
vestigial echoes left behind by the deleted check are gone.
The failure remedy was also wrong, and wrong in the direction that loops the
operator: it said to re-run update-versions.sh, which derives CURRENT_VERSION
from cmd/bd/version.go (line 70) and substitutes old->new literally. After the
first bump version.go already holds the new version, so a re-run rewrites
new->new and no-ops on exactly the drifted file the gate just named. Verified
empirically — with the copilot manifest and manifest.xml drifted to 1.2.2,
'update-versions.sh 1.3.0' prints 'Bumping: 1.3.0 → 1.3.0' and leaves both at
1.2.2. Only the githooks markers (wholesale regex) and uv.lock (uv lock) heal
on a re-run, and the message now says so and gives the three remedies that
actually work.
shellcheck clean.
* docs(releasing): make the release-branch policy internally consistent
The policy landed in the previous commit but three procedures in the same
files still contradicted it, and the formula implemented the wrong one.
RELEASING.md said 'Nothing is pushed straight to the release branch' and then,
150 lines down, direct-pushed the release branch and minted the tag before the
merge. Two concrete failures: with branch protection the push is rejected
after the tag already exists locally, and with a squash merge the tag points
at a commit that is not an ancestor of release/x.y.z — goreleaser packages
CHANGELOG.md FROM THE TAG into every published archive, so the release ships
the pre-review notes. Both the CHANGELOG-commit block and the bump block now
open a PR, and tagging is a separate step against the merged commit. The
literal 'git push origin main' under the substitution blockquote is gone, as
is the direct push in the docs-pin block.
The formula implemented the wrong order too: commit-release -> create-tag ->
push-main. Reordered to commit-release -> push-main (land the PR) -> create-tag
(on the merged commit) -> push-tag, and create-tag now states why the order
matters.
preflight-pull was untouched by the last commit and still hard-coded main:
divergence recovery was 'git reset --hard origin/main'. Running the molecule on
a release branch and following that destroys the reviewed release-prep commit
and leaves the operator tagging an untested main SHA — precisely the failure
the policy exists to prevent. It now pins the release branch into a variable
first and resets to that; the backup branch moved to Option 1 rather than
Option 3.
'git push origin release/{{version}}' broke every prerelease run: the branch
convention is release/x.y.z, so an RC rendered release/1.3.0-rc.1 and failed
with 'src refspec does not match any', and the forward-port 'git log
main..release/{{version}}' then died on an unknown revision. Now derives the
base version and says why.
The RC workflow still cut tags from the tip of main, which is what the new
policy calls 'a SHA nobody has fully tested' — and worse, an RC exists to
validate the SHA the stable release ships, while the stable tag now comes off
the release branch, so it validated a different SHA by construction. RCs are
now cut on the base version's release branch, and promotion stays on it.
Accuracy fixes in the same pass: verify-versions no longer claims the (now
corrected) 'released-docs policy' string or tells the operator to re-run the
bump — a no-op after the first run, proven in the previous commit — and no
longer prints a prerelease-broken 'grep -c {{version}} winres.json # 4', which
yields 2 for an RC because the numeric PE fields carry the base version. It
now points at check-versions.sh, which gates winres correctly. The 'three
plugin manifests' and 'compares everything else against it' claims are
corrected to match what the script actually reads, and RELEASING.md names
default.nix and README.md as bumped-but-ungated.
go test ./scripts/ and ./test/docsync/ pass; formula still parses and the DAG
is acyclic.
* ci: run PR workflows on release/** branches
Release-targeted PRs currently run almost no CI. pr.yml, pr-risk.yml,
conformance.yml, regression.yml and cross-version-smoke.yml all declare
'pull_request: branches: [ main ]', and every push trigger in the repo is
'branches: [main]' or 'tags: v*'. So a push to release/1.3.0 fires zero
workflows, and a PR based on it gets only the three workflows with no branch
filter (migration-test, nix-build on its paths, docs-mintlify).
That puts the new release-branch policy on a contradiction: it routes the
version bump and 'any fix the release validation turns up' onto a branch where
they land with no unit, lint, conformance or regression coverage, and the
first full signal is the tag build — where a failure burns the tag by this
document's own rule. The policy was written to stop tagging untested SHAs and
was quietly producing them.
Adds release/** to the pull_request branch filter of those five. Push triggers
are deliberately left alone: release branches take changes through PRs, so the
pull_request event is the one that matters, and widening push would double
every run on merge.
cross-version-smoke is the highest-value of the five here — a release-targeted
PR is exactly where cross-version upgrade breakage is most expensive to find
at tag time.
This PR is the vehicle because it targets release/1.3.0, so the new filters
take effect for its own subsequent pushes.
All five files parse; go test ./scripts/ (which includes the workflow lint
tests) passes.
* docs: reconcile the 1.3.0 upgrade notes with the merged release set
Merging origin/release/1.3.0 changed three facts the upgrade notes assert.
Migration count. The merge added ignored/0026_dep_rekey_dedup_marker (#6045),
so the clone-local series now runs 0012 -> 0026, not 0012 -> 0025. Recounted
from the tree: 13 main-series (0054..0066, unchanged) + 15 clone-local = ~28,
not ~27. Corrected in CHANGELOG, cmd/bd/info.go and upgrading.md, including
the trailing line count in the 'counter restarts' explanation.
Shared servers. #6048 (#5920, #5043) means a shared dolt sql-server is no
longer auto-migrated at all — it waits for explicit consent via
'bd migrate schema'. The notes said flatly that 'the first invocation migrates
your schema in place', which is now true only for embedded/local stores and
would have sent a shared-server operator looking for a migration that never
runs. All three copies now scope that claim and point at the new 'Shared
servers' section upgrading.md gained in the same merge. Verified
'bd migrate schema' exists (cmd/bd/migrate.go:848) and that --global is a root
persistent flag (main.go:818), so the cited invocations are real.
#5896. The auto-export entry said #5896 'stays open for embedded mode, where
bd delete still wedges auto-export'. #6059 closed exactly that. Reworded to
point at the store-history heal rather than claiming a live bug.
check-versions.sh 25/25 green, go build ./... clean, go test ./scripts/... and
./test/docsync/ pass, check-cli-docs-drift and check-doc-freshness pass.
* docs(changelog): fold in the proposed changelog lines from the merged 1.3.0 set
Adds the 'proposed changelog' text carried in the bodies of the PRs that
merged into release/1.3.0 after this rollup was first written. Text is the
authors' own; where a body gave it in conventional-commit form rather than as
a bullet, the sentence is preserved and only the 'fix(scope):' prefix dropped
and a bold lead added to match the section.
Changed: #6048 (two bullets — shared-store consent, and the smart gate's
first-mover/fast-forward arms going embedded-only), #6036 (exported packages
marked EXPERIMENTAL), #6053's revision-token bullet, #6049 (migration-test and
upgrade-smoke wisp-plane coverage).
Fixed: #6040 (server-mode lost updates), #6044 (removed-backend rejection),
#6045 (convergent dependency rekey), #6046 (tracked ignored_schema_migrations
heal), #6054 (ignored-cursor floor clamp), #6059 (delete-wedge heal), #6057
(full GC after flatten/compact), #6060 (--storage-class routes), #6061
(journal actor attribution), #6062 (proxied/gateway init errors), and #6053's
two typed-JSON bullets.
Security: new subsection for #6047 (Go 1.26.7 toolchain bump closing seven
reachable stdlib advisories, plus the dependency bumps clearing all 25).
Placed after Fixed per Keep a Changelog ordering.
Documentation: #6052's multi-rig/proxied gate limitation. Its body calls it a
release-notes line rather than a changelog line, so it may want moving.
Contributor credit carried where the PR body gives it: #6040 keeps its
'Reported and fixed by @nova-submodules' sentence, and #6044 gains a note that
its detection helper is ported from @steveyegge's #4740. NOTE: #5064 (aux
row-key encoding drift) carries credit to @marcodelpin in its body but no
proposed changelog line, so it has no entry here — flagging rather than
inventing one.
#6043 was a REPLACEMENT, not an addition: it asked for the existing
MIGRATION-FREEZE bullet to be swapped for vendor-neutral text. Done — the old
bullet named the gt CLI, 'town root' and 'gt migrate thaw'; the new one
describes the generic marker discovery, exit code 14, and the wider set of
maintenance that stands down.
#6055 and #6056 were still OPEN at the time of writing. Their four proposed
lines are included but fenced in a PROVISIONAL HTML comment block that says to
delete it before tagging if either PR does not land.
check-versions.sh 25/25, go build clean, go test ./scripts/... and
./test/docsync/ pass, check-cli-docs-drift and check-doc-freshness pass.
* docs(changelog): credit the three carried contributor fixes
Adds the entries for the merged PRs that carried contributor work but shipped
no proposed changelog line of their own, in the maintainer's supplied wording,
expanded to the surrounding entries' voice.
ATTRIBUTION CORRECTED on #5064. The supplied wording read 'Reported by
@marcodelpin, fixed by @maphew'; the PR body says the opposite. Its '## Credit'
section: 'The fix is @marcodelpin's, from 767d5dcd on their fork... The
diagnosis behind it — the chunk-level characterisation, the negative result on
the minimised fixture, the dolt 2.1.10 re-test, the recover-rows verification —
is theirs too... isSchemaEncodingDriftErr and its table-driven test come from
that commit.' @maphew (the PR author) absorbed it with a review-requested
semantic rework. Written as 'Diagnosis and fix by @marcodelpin, carried and
reworked by @maphew' so the contributor is not demoted to reporter of a bug
they also fixed.
Scope corrected on the same entry. The supplied wording reads as new behavior,
but git grep against the v1.1.2 tag finds both isSchemaEncodingDriftErr and
aux_row_rekey_drifted already present in internal/storage/schema/
aux_row_id_backfill.go — v1.2.2 is the v1.1.2 tree, so v1.2.2 users already
have this fix, and it is already documented under [1.1.2]. #5064 carries it
onto the main line. The entry says so, so a v1.2.2 reader does not conclude
they were exposed and go looking for a migration that does not concern them.
#5783 and #6037 verified against their PR bodies before writing; both supplied
claims hold. #5783: Config.LenientOpen reached server mode but newServerMode
never read it and the field's doc comment said 'Ignored in server mode', so the
dirty-table refusal's own recovery command could not run — and server mode has
no 'move the directory aside and re-bootstrap' alternative. #6037: bd init
persists a git-origin-derived sync.remote into the tracked config by design,
bootstrap rejected exactly that shape before the origin auto-detect, and
Action=='none' conflated 'already exists' with 'refused', printing a success
tick and exiting 0 having created nothing.
Also notes in the PROVISIONAL fence that the RC is gated on #6055/#6056
merging, so the fence comes off at RC-prep time rather than being an open
question.
check-versions.sh 25/25, go test ./test/docsync/ passes.
* fix(release): create release-prep branch before pushing it
The new release-branch/prep-PR flow pushed `release-prep/v<version>`
without ever creating that branch, so `push-main` (and the RELEASING.md
runbook) failed on first run with
`error: src refspec release-prep/v<version> does not match any`.
Add `git checkout -b` before each prep-branch push — the formula
`push-main` step and both RELEASING.md landing snippets — so the branch
exists before it is pushed, mirroring the existing `REL_BRANCH` guard in
the same step.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* ci: add advisory cyclomatic complexity reporting (bd-7g21)
Add a pinned gocyclo report, checked-in baseline, stable-key PR diff, and opt-in guard for shipped Go code. Run the report on every PR as a non-required artifact while maintainers measure signal quality; preserve existing complexity as grandfathered debt.
Agent-Signature: unknown-model/unknown-reasoning
* test(protocol): refresh dependency removal corpus
* test(migration): seed and assert the wisp plane on the v1.1.2 upgrade lane
The migration-test harness has never seeded a wisp. Its shared fixture is three
issues, a dependency, a label and a comment, and thirteen version lanes assert
its exact `length == 3` shape — so the plane that 1.3.0's chain actually
rewrites (wisps, wisp_dependencies, wisp_comments, leases, events and the
ignored-migration cursor) reaches the candidate empty, and every migration in
main 0054-0066 plus ignored 0012-0025 runs as DDL over zero rows.
Add a separate `run_wisp_plane_upgrade` lane in its own workspace, dispatched
after the shared embedded lane the way the v0.55.4 second lane already is, so
no existing assertion changes. It seeds two issues and five wisps covering the
open, closed, blocked-by-issue, blocked-by-wisp and conditional-blocks classes,
plus a wisp comment, a wisp label, an issue-blocked-by-wisp edge through
dependencies.depends_on_wisp_id, and a file:// Dolt remote published with the
old binary.
There is no `bd dolt sql`, so plane state is read with the already-pinned
external Dolt v2.1.8 CLI as a read-only oracle. `dolt sql -q` can exit 0 on
failure, so every read is decided by its CSV payload rather than its status.
Assertions and the trap each one guards:
- wisp survival and row counts gc must not collect a fresh closed wisp
- updated_at stability 0059/ignored-0015 derived-state restamp
- is_blocked truth table + bd blocked the wisp-aware blocker predicate
- dolt_ignore superset the #5947 read-before-write clobber
- dolt_status clean migrations must not leave dirty tables
- events row count across 0062 the drop/commit/recreate flip
- leases + granted_node present the #5366 contradicted-cursor replay
- unblock on close blocks vs conditional-blocks release
- journal shape + wisp writability 0064/0066 and 0060 storage_class
- full-fingerprint second open the ignored track, which `Schema
already at vN` cannot see at all
That last one matters most: MigrateUp reports `applied` from the main track
only and never adds appliedIgnored, so the harness's existing no-op check is
structurally blind to an ignored-track replay. The fingerprint is the only
guard there is.
Extend the pinned-runtime gate and the workflow's Dolt install step to the
wisp-capable versions, which now need that binary as an oracle. Cache keys are
untouched: corpora are seeded fresh per run and the cache holds only release
binaries keyed by asset checksum.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(migration): extend the wisp lane to v1.1.0 and the pre-split v1.0.1 regime
v1.1.2 alone only proves the post-split regime. v1.0.1 is the one source in the
corpus that still stores wisp dependencies in the legacy single-target shape
(issue_id, depends_on_id) and has no ignored-migration cursor at all, so it is
the only lane where the candidate has to perform the ignored/0003-0005 split,
the 0047 delegate repair and the 0058 heal on populated rows, and bootstrap the
ignored cursor from nothing rather than find both already done.
Add verify_wisp_dependency_split: the three split target columns exist, the
legacy column is gone, and each seeded edge lands on the right target —
wisp-on-issue and conditional-blocks in depends_on_issue_id, wisp-on-wisp in
depends_on_wisp_id, and the issue-on-wisp edge in the main dependencies table's
depends_on_wisp_id. Mis-homing those rows is the "duplicate primary key given"
hazard class in migrations/README.md, and it is invisible to every count-based
check.
Make verify_no_restamp regime-aware, because which migrations replay is a
property of the source cursor. 0059 and ignored/0015 self-assign
`updated_at = updated_at`; their predecessors 0046, 0047 and ignored/0007 do
not. A v1.0.1 store replays all of them, so every non-closed row legitimately
moves. A v1.1.x store has 0046/0047 behind its main cursor, so issues must not
move at all — but its ignored cursor says 0011 while leases.granted_node does
not exist, the sentinel disbelieves the cursor, and the ignored series replays
anyway (#5366), dragging in unguarded ignored/0007.
What is gated in both regimes is the part that is unconditionally true: closed
rows never move, because every recompute is scoped
`WHERE status NOT IN ('closed', 'pinned')`. That bites the moment one forgets
its scope. The tighter guard on everything else is the idempotence fingerprint,
which requires a second open to move nothing at all.
Record the per-version capability probe results as a table rather than leaving
them as assumptions, and run bd doctor quick on every wisp lane instead of only
the ones with a remote.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(smoke): add a tolerant wisp-plane scenario to the release gate
cross-version-smoke.yml runs upgrade-smoke-test.sh as the release gate, and all
six of its scenarios work entirely in the versioned plane. The wisp tables
therefore reach the candidate empty, and 0054-0066 plus ignored 0012-0025 only
ever run as DDL over zero rows — the same blind spot Scenario 6 was written to
close for the dependencies split.
Scenario 7 seeds a wisp with the old binary, gives it a blocker edge so the
is_blocked recompute has real work to do, upgrades, and then checks the
surfaces that break when the replay is wrong: the wisp is still listed, the
blocker queries stay wisp-aware without erroring, the wisp is still writable
through the migrated storage_class default, and doctor quick is happy.
The matrix reaches back thirty releases on a tag push, so a binary that cannot
create a wisp or cannot produce a parseable id passes with a SKIP instead of
failing. Same tolerant, grep-based, dependency-free style as the rest of the
file: no jq, no Dolt CLI.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(migration): cover the #5816 dirty tracked wisp-table state
#5816 is still open: an ignored-named table that is tracked at HEAD *and* dirty,
with ignored migrations pending, hard-locks the open. Nothing in either upgrade
harness has ever constructed that state, so the containment surface is
untested.
It is not reachable from clean OSS lineage — every release since v0.63.3
registers the dolt_ignore patterns before creating the tables — so the scenario
builds it deliberately: force-add and commit the wisp tables through the pinned
Dolt CLI, then dirty one again with an ordinary old-binary wisp write. That is
the shape real clones from forks and older-behavior lineages arrive in, and it
is the only place this file issues DML through the oracle.
Because the bug is open, the scenario deliberately does not gate on whether the
candidate accepts or refuses. It gates on what must hold either way: the
command terminates rather than hard-locking, and no wisp rows are lost. A
refusal additionally has to name the dirty tables instead of failing opaquely.
Carries a TODO(#5816) to tighten to must-succeed once the fix lands.
Observed on the current candidate: a clean refusal in about a second naming
`wisps`, with all rows intact.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(migration): add v1.2.2 to the corpus and make the lane dispatch array-driven
v1.2.2 is the tag field upgrades actually start from — the recovery release that
superseded the accidental v1.2.1 — and it has never been in this corpus. It is
the v1.1.2 tree re-tagged, so it adds no new storage regime; it closes the
"the exact tag in the field was never tested" gap for the price of one matrix
job.
Adding it exposed a latent trap: the dispatch loop carried its own hardcoded
copy of the embedded-Dolt version list, so a version added to
EMBEDDED_DOLT_VERSIONS in lib/versions.sh was silently routed into the
server-Dolt bridge lane instead, and failed there with a confusing "candidate
list did not refuse with explicit migration is required". Dispatch on
membership of the array that already declares the corpus, so the list exists
once.
Asset checksum verified against the published beads_1.2.2_linux_amd64.tar.gz.
No existing cache-identity string changes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* fix(ci): make a failed pinned-dolt download actually fail the job
scripts/ci/install-dolt.sh retried the download with
if curl -fsSL -o "$workdir/$asset" "$url"; then
break
fi
status=$?
`status=$?` there reads the status of the *if compound*, not of curl. A
compound whose condition fails and which has no else branch is itself
successful, so `status` was 0 on every failed attempt, and the
retries-exhausted branch ran `exit 0`. A download that never succeeded
reported success.
That defeats the entire point of the script. The step goes green, the
version-drift guard at the bottom never runs, and the job proceeds on
whatever `dolt` the runner image already had on PATH -- the unpinned
binary the pin exists to keep out, and the one that made
TestFreshBootstrapHealIncarnation flake when releases/latest moved to
2.3.x.
Capture curl's status directly instead, and include it in the
retries-exhausted message so the log says which failure it was.
Guarded by TestInstallDoltPropagatesDownloadFailure, which runs the real
script against stub curl/sleep/tar/sudo/dolt/uname on PATH. Against the
unfixed script exactly one subtest reddens ("exhausted retries": exit 0,
want 42); "immediate success", "eventual success" and "installed version
drifts" stay green, so the harness demonstrably observes success and the
new signal is specific to this bug rather than to everything failing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* test(ci): pin what install-dolt.sh actually downloads and installs
The review council mutated the script and found two changes the new test
waved through: swapping the pinned release URL for releases/latest, and
installing mode 0644 into /opt/dolt instead of 0755 into /usr/local/bin.
Both are exactly the drift this script exists to prevent, and both left
all four subtests green because the test only counted calls. The sibling
pull_dolt_image_test.go already asserts its docker argv; this one now
does the same for curl and sudo.
The council also flagged the drift guard itself: `[[ $installed !=
*"$version"* ]]` accepts any version containing the pin as a substring,
so 12.2.0 and 2.2.0-rc1 both pass. Compare the version token exactly.
Red before green, by real on-disk swaps (a -overlay cannot reach a file
the test execs):
releases/latest URL all 5 subtests red (was: all green)
install -m 0644 /opt/dolt 4 of 5 red -- exhausted_retries stays
green because it never reaches sudo
substring drift guard only installed_version_merely_contains
_the_pin reddens
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* fix(schema): CLI bundle never got migration 0065's wisp_comments widening (ga-61ruw)
Second and last live instance of the class #5903 fixed for 0060: the Dolt CLI
batch path silently no-ops a PREPARE'd ALTER TABLE while EXECUTE reports
success (dolthub/dolt#11345, fixed in 2.3.0 — but the CLI is pinned to 2.2.0
by #5894 because 2.3.0 broke DOLT_RESET). So 0065's wisp_comments.text
TEXT->LONGTEXT widening never reached the fresh-schema bundle.
Measured, not argued. Applying AllMigrationsSQL() through dolt 2.1.8, 2.2.0
(the pinned CLI) and 2.3.1 and diffing information_schema — with wisp_ tables
INCLUDED, unlike the parity oracle — produced exactly one difference on main
@825cd4c9:
column|wisp_comments|004|text|text|NO (2.1.8, 2.2.0)
column|wisp_comments|004|text|longtext|NO (2.3.1)
After this change all three agree on all 504 lines. 2.1.8 and 2.2.0 are
byte-identical to each other, so the host CLI is a faithful stand-in for the
pinned one.
WHY THE OBVIOUS FIX FAILED, AND WHAT REPLACES IT. A bare direct MODIFY was
tried before and backed out: it reproduces as
`error ... ALTER TABLE wisp_comments MODIFY COLUMN text LONGTEXT NOT NULL:
table not found: wisp_comments` inside
TestFullChainFromPreWispsAndMissingDependenciesIDConvergesThroughDoltCLI,
which replays the substitution over a database that never synced the
clone-local wisp tables (#4695/#4176) and whose 0047 repair recreates only
wisps and wisp_dependencies.
The substitution surface now says so out loud. cliSubstituteAssumesWispTables
names the substitutes that presume the wisp tables exist — 0053, which the
full-chain test already special-cased by version number, and now 0065. Replay
callers use the frozen source text, whose own PREPARE guard no-ops correctly
because an INFORMATION_SCHEMA probe for a missing table yields NULL and
IF(NULL = 1, ...) takes the 'SELECT 1' branch.
TestMigration0065NoopsWithoutWispCommentsThroughDoltCLI pins that, with the
direct substitute failing on the same database as its control.
CLOSING THE CLASS. 0060 and 0065 were both found by accident, six days apart,
because nothing looks for this shape: check-migration-hygiene.sh check E flags
prepared DML, not prepared ALTER, and the parity oracle excludes wisp_ tables
by name. internal/storage/schema/cli_prepared_ddl.go adds
TestBundleMigrationsWithPreparedALTERAreOverriddenOrJustified: it scans the
substituted bundle text for prepared ALTER TABLE and requires each hit to have
either a direct-DDL override or an entry in preparedALTERSafeOnFreshBundle
with a written reason. No Dolt binary is involved, so a CLI upgrade cannot
mask it the way it masked the oracle.
Mutation-verified end to end. A synthetic 0066 with a prepared ALTER and no
override makes the guard fail with a message naming the file and statement;
the same bundle really does drift (issues.storage_class varchar(16) on 2.2.0
vs varchar(32) on 2.3.1); adding an override makes it pass; removing the
migration returns green. Removing 0065's override reds both the new guard and
the #5903-style string assertion.
The seven grandfathered entries were measured the same way — build the bundle
truncated to just before migration N, apply N's frozen text on 2.3.1 where
prepared DDL always executes, diff. Six change nothing (their guards do not
fire on a fresh database); 0050's guard does fire, but ALTER COLUMN ... DROP
DEFAULT is one of the forms that executes on 2.2.0. 0065's own text moves that
diff, which is the control proving the six empty diffs mean something.
Probed subcommand split on 2.1.8, with a direct ALTER as the must-land
control: ADD COLUMN, MODIFY COLUMN, DROP COLUMN and ADD PRIMARY KEY vanish;
DROP DEFAULT, RENAME COLUMN, ADD/DROP INDEX, ADD CONSTRAINT, CREATE INDEX,
RENAME TABLE and CALL all execute. The guard flags every prepared ALTER TABLE
anyway — over-flagging costs one justified inventory entry and avoids guessing
about forms nobody probed.
NOT WIDENING THE PARITY ORACLE, and here is the evidence rather than a
shrug. AllMigrationsSQL() walks the main series only, and there is no
ignored-series bundle to pair with it. Applying bundle-only vs
bundle-plus-ignored-series through 2.3.1, the ignored plane owns
wisps.is_blocked (+ two indexes), the dropped uuid() defaults on
wisp_comments/wisp_dependencies/wisp_events .id, wisp_events.old_value and
new_value as LONGTEXT, leases.granted_node and ignored_schema_migrations
itself. Every one would read as a spurious "only in runtime" line, so covering
the ephemeral plane means building an ignored-series bundle, not deleting a
predicate. That analysis is now recorded in the oracle's own comment.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test(dolt): stop the argv-limit test depending on the migration bundle's size
TestRunDoltSQLHandlesLargeScript asserted that schema.AllMigrationsSQL()
exceeds Linux's MAX_ARG_STRLEN (131072 bytes), so that the script it pipes
really does exercise the argv path. That precondition is the right idea and
the wrong measurement: the bundle's size is an accident of migration content.
Registering 0065's direct-DDL override in the previous commit REPLACED a
~2.4KB guarded PREPARE block with a 62-byte statement and took the bundle from
132601 to 130281 bytes, so the test went red on Linux and macOS for a reason
with nothing to do with argv. Every future override shrinks it again; every
future migration grows it back.
Build a script that is definitely oversized instead of hoping. padPastArgvLimit
appends SELECT 1; statements — which the CLI still has to parse — until the
script clears the limit, and leaves an already-oversized script alone. The
precondition assertion stays, now covering the padded script, so a broken
helper cannot quietly leave the test passing on a script that would have fit
in argv.
TestPadPastArgvLimit is the control for that helper, across empty, just-under,
exactly-at and already-over inputs. Mutation-verified: stubbing the padding out
reds it on every under-limit case.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(dolt): git-remote tests need a sql-server that shares their filesystem
The four git-remote tests that push through the store API fail on every run
of the new test-server-storage-full lane (#5836), which is what has the
merge pipeline stalled: shards 1, 9, 10 and 15 all die with
the remote: origin 'git+file:///tmp/embedded-git-remote-test-*/remote.git'
could not be accessed; fatal: ... does not appear to be a git repository
setupEmbeddedGitRemote dates from when this package had an in-process
embedded engine. store.go now hardcodes serverMode:true, so New() connects
to the suite's shared Dolt server — which TestMain runs in a Docker
container whose only mount is the image's own /var/lib/dolt. CALL DOLT_PUSH
executes inside that container, so the host bare repo the test just created
does not exist for it, and neither does the store's own Path (which is why
TestGitRemotePushSkipsUserPrePushHook cannot find its cache mirror and
TestGitRemoteSyncRoundTrip's clone comes up empty). The dolt credential
hints in the log are generic advice, not a credential problem — nothing
here needs a credential.
Give these tests their own local dolt sql-server rooted at the store's data
directory, the arrangement TestGitRemoteExternalServerRouting,
TestSQLRemotePersistsAcrossExternalServerRestart and
TestCredentialCLIRoutingE2E already use. The server is spawned with
doltserver.ServerSpawnEnv(), the same environment bd gives the server it
starts: a `dolt` CLI command run against a directory a sql-server already
serves is proxied to that server, so the git subprocess is spawned by the
server and the CLI-side guards (git tracing, core.hooksPath) only take
effect if the server carries them too.
Two consequences fall out and are fixed here:
- The setup now takes a genesis CommitAll. Commit() deliberately skips
config (GH#2455), so issue_prefix stayed dirty forever: Pull() refuses
to auto-commit a dirty internal config key, and a peer cloning the
database got no prefix at all. The CLI sibling setupGitRemote has
always done this with DOLT_COMMIT('-Am', 'Genesis: schema and config').
- The gate is testutil.RequireDoltBinary rather than skipIfNoDolt: these
tests no longer need the shared container, only dolt and git, so
requiring the container would be a skip for no reason.
Setup asserts <Path>/<db>/.dolt exists on this filesystem, so if the store
ever drifts back onto a containerized server these tests fail loudly
instead of quietly testing nothing.
Verified against the real shard script on a live Dolt server: shard 1 goes
from 1 failure to 0, shard 9 from 1 to 0.
* test(dolt): pin what TestCreateIssueAfterPull's Pull actually delivered
Shard 1 still fails in CI after the topology fix, now at the last assertion:
'GetIssue(ai-clone-001) failed: not found'. Deterministic across two CI runs,
not reproducible locally on dolt 2.1.8 or 2.3.1 (the whole shard is green
here). The end-of-test assertion cannot distinguish 'Pull() reported success
but merged nothing' from 'Pull() delivered the row and the post-pull
CreateIssue dropped it', which are different bugs in different places.
Assert immediately after Pull, before the post-pull write, so the CI failure
names which one it is.
* fix(ci): pin the Dolt CLI — 2.3.0 broke DOLT_RESET on fresh databases
Test (Server Dolt Full Suite 12/16) has been failing on a coin flip with
TestFreshBootstrapHealIncarnation/exact_creator_heals_its_interrupted_bootstrap
creator-authorized migration: schema migration: pending schema migrations
alter pre-existing dirty tables: issues; run 'bd dolt commit' ... (#4566)
schema: fresh-bootstrap reset: Error 1105 (HY000): context canceled
That second line is the whole story, and it is not a beads bug. The heal was
authorized and its capability consumed; what failed is the
CALL DOLT_RESET('--hard') in schema.MigrateUpWithLock. Dolt 2.3.0 regressed
that procedure: roughly one freshly created database in twenty comes up with
it permanently unusable, answering "Error 1105 (HY000): context canceled" to
every session, from any connection, for the life of the server process. It is
not transient and not load-related — a beads-free probe that only does
CREATE DATABASE followed immediately by the procedure reproduces it:
dolt 2.1.8 0/40 databases broken
dolt 2.2.0 0/60
dolt 2.3.0 3/60
dolt 2.3.1 3/100
Every workflow installed the CLI by piping dolthub/dolt's releases/latest
install.sh, so the binary under test changed the moment 2.3.x shipped —
while internal/testutil/testdoltcommon.go had the sql-server container pinned
at 2.2.0 the whole time. Server-mode tests run both halves at once against the
same databases, so the suite was exercising a Dolt pair no release ever
shipped. Pin the CLI to the container's release and keep the two locked
together:
- scripts/ci/install-dolt.sh installs a pinned Dolt, verifies `dolt version`
on PATH actually resolves to it, and records the per-version measurements
and the criterion for raising the pin.
- All 25 install sites across six workflows route through it.
- TestWorkflowsInstallPinnedDolt rejects any reintroduction of
releases/latest; TestPinnedDoltCLIMatchesContainerImage fails when the CLI
pin, DoltDockerImage and pull-dolt-image.sh disagree.
The test itself is unchanged in what it asserts. It gains one preflight probe:
before exercising the heal it checks that this server can hard-reset the
database it just created, so a broken Dolt is named as such instead of
surfacing as the generic #4566 refusal — which reads like a beads defect and
sends the reader to "run 'bd dolt commit'", advice that cannot work when the
reset the heal needs is the thing that is broken. On a pristine database the
probe is a no-op, and over 60 fresh databases a successful first reset never
broke a later one.
Verification: 48 runs of the test (6 workers x 8) and two full shard-12 runs
on the pinned 2.2.0, zero failures. Same binary on 2.3.1: 3 of 24 runs still
fail, now in 0.04s with the explicit diagnosis instead of 1s in with the
misleading one.
Beyond this test: bd dolt compact, bd dolt flatten and mergesettle's rollback
all issue DOLT_RESET('--hard'), so they are unreliable for real users on any
Dolt 2.3.x server. That needs an upstream report; pinning CI does not fix it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* test(feat): red — Fix: check-testing-short.sh flags comments and misnames the offending function (refs be-0v13)
* feat: green — Fix: check-testing-short.sh flags comments and misnames the offending function (refs be-0v13)
Skip comment-only mentions of testing.Short() before the allowlist
check: read the exact matched line and treat a line whose first
non-whitespace characters are // as non-offending. Existing
func-attribution logic already reports "unknown" for a hit above the
first func in a file, so no change was needed there.
Also fixes two test-fixture bugs found while confirming RED: the RED
test file's own source contained the literal substring testing.Short()
(now built via string concatenation into a shortCall const so the
checker doesn't flag this file when it scans the real repo tree), and
single-file temp-dir fixtures omitted the grep filename prefix
(now every fixture dir gets a companion .go file so find+grep always
sees 2+ filenames, matching real repo-root invocations).
* test(scripts): red — check-testing-short.sh must not attribute a hit between two functions to the preceding one (refs be-r56j)
* fix(scripts): green — resolve testing.Short() hits to the containing function, not the nearest preceding one (refs be-r56j)
* chore: release gate PASS for be-053u-check-testing-short-round2
* ci: retrigger — unrelated Ryuk reaper flake in storage/uow/tracker job
The "Test (storage domain + uow)" job failed on an infrastructure flake
unrelated to this PR's diff. That job runs three package trees in one
go test invocation (.github/workflows/pr.yml:676), so Go runs their test
binaries in parallel and each starts its own Dolt testcontainer. The
binaries share a single testcontainers Ryuk reaper; in this run the
internal/tracker binary reused a sibling's reaper and its handshake was
reset:
23:12:21 Reaper obtained from Docker for this test session 6a74346c
23:12:21 Reaper handshake failed: read ack: ... connection reset by peer
With no live connection holding the session open, Ryuk reaped the
session's containers. The tracker package's Dolt container went down
mid-suite and every subsequent store-backed test failed with
"connection refused" on 127.0.0.1:32772.
This is be-2on, root-caused on a different PR (#5339) with the identical
signature. The durable fix is PR #5770 (disable Ryuk on the Dolt
testcontainer steps), which is open and awaiting upstream merge.
This PR touches only scripts/check-testing-short.sh, its test, and a
release-gate record — nothing in internal/tracker or the Dolt path.
Empty commit to re-trigger CI.
* test(ci): red — gastownhall/beads: no PR-CI lane runs TestBenchDBPurgeDoesNotLeak against a live Dolt server (checkDolt SKIP) (refs be-aiy5)
* feat(ci): green — gastownhall/beads: no PR-CI lane runs TestBenchDBPurgeDoesNotLeak against a live Dolt server (checkDolt SKIP) (refs be-aiy5)
Add test-server-storage-full as a sibling job to test-server-storage in
pr-risk.yml. build-embedded already compiles every top-level test in
internal/storage/dolt into one binary (embedded-test-binaries); the
existing job only ever runs -test.run '^TestConformance$' against it.
The new job reuses that same artifact and live-server setup with no new
build step, and runs everything else via -test.skip '^TestConformance$'
so previously-stranded tests (TestCreateGuard_*, federation/concurrent
suites, and diff-owned tests such as TestBenchDBPurgeDoesNotLeak on PR
#5792) get a real PASS/FAIL instead of a silent SKIP. Sets
BEADS_TEST_ENV_RUN_DOLT=1 so federation_test.go's own live-server check
fails loudly rather than skipping if this job's setup ever regresses.
Wired into ci-gate: added to needs, CI_GATE_REQUIRED, and the
tier-gated skipped_ok fallback (mirrors test-server-storage's existing
treatment in each).
Also updates two pre-existing meta-tests over pr-risk.yml that pinned
exact snapshots of the file this job necessarily changes:
scripts/ci_capability_selector_test.go's ci-gate authority snapshot,
and scripts/pull_dolt_image_test.go's retry-helper call count
(pr-risk.yml: 2 -> 3, the new job's own Dolt-image-pull step).
* chore: release gate PASS for be-pp7e (PR-CI lane for TestBenchDBPurgeDoesNotLeak)
Deploy gate record for be-pp7e, gating be-aiy5's PR-CI lane addition
(runs TestBenchDBPurgeDoesNotLeak against a live Dolt server instead of
letting checkDolt SKIP it). Review: be-w90n, verdict pass. All 7 gate
criteria PASS; two pre-existing/unrelated failures encountered during
evaluation (be-jy56, be-vf95) were attributed and excluded from the
verdict.
* test(ci): red — shard test-server-storage-full across 16 matrix jobs (refs be-yy25)
TestPRRiskGateReachesFullServerDoltStorageSuite now asserts
pr-risk.yml's test-server-storage-full job is a fail-fast:false matrix
over shard 1..16, with the Test step invoking
server-storage-test-shard.sh, instead of pinning the old single-job
unsharded command. Fails against the current workflow, which still
runs all 1126 tests unsharded in one 15m job (be-extn).
* feat(ci): green — shard test-server-storage-full across 16 matrix jobs (refs be-yy25)
Adds .github/scripts/server-storage-test-shard.sh (mirrors
embedded-storage-test-shard.sh: discovers internal/storage/dolt/*_test.go,
excludes TestConformance, manifest-plus-hash-fallback shard assignment) and
its shard manifest .github/scripts/server-storage-test-shards.txt, pinning
TestCloudAuthCLIRouting (~9.5m) alone on shard 1 and spreading the other
known 10-20s-heavy tests across the rest.
pr-risk.yml's test-server-storage-full job becomes a fail-fast:false matrix
over shard 1..16, Test step now runs server-storage-test-shard.sh instead of
the old unsharded single-job command that died at 256/1126 tests after
15m28s with zero failures (job 95616282508).
Documents the new lane in engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md alongside the
existing embedded matrix description.
TestPRRiskGateReachesFullServerDoltStorageSuite now passes. Offline shard
partition verified disjoint and complete across all 1125 discovered tests
(BEADS_TEST_SHARD_LIST_ONLY=1 for i=1..16). (be-extn)
* test(feat): red — Fix: sharded lane runs prebuilt test binary from repo root, breaking ../schema/migrations and ../issueops (6 tests) (refs be-gepv)
* feat: green — Fix: sharded lane runs prebuilt test binary from repo root, breaking ../schema/migrations and ../issueops (6 tests) (refs be-gepv)
* chore: release gate PASS for be-23f3
Extends deploy/be-pp7e-gate (PR gastownhall/beads#5836) with be-gepv's
fix rather than cutting a fresh isolated branch: be-gepv's own bead
text and be-extn's precedent both establish this fix belongs on the
already-open PR. All 7 gate criteria PASS; two repo-wide lint/policy
failures attributed to already-tracked pre-existing issues (be-vf95,
be-jy56), confirmed untouched by this PR lineage.
be-gepv, be-6yo1, be-23f3
* fix(dolt): federation test isolation + panic (be-3c78s)
TestFederationDatabaseIsolation and TestFederationVersionControlAPIs are
federation-prototype tests that predate the suite's shared-server,
branch-per-test isolation architecture (setupTestStore/StartTestBranch)
and were never updated to account for it.
- setupFederationStore hardcoded Database: "beads" for both towns. New()
always connects in server mode against one shared Dolt server for the
whole test binary (TestMain), so Path alone doesn't isolate two stores
— Database does. Both towns silently shared one database, so Alpha
could read Beta's issues and vice versa. Give each town its own
database (beads_test_federation_<prefix>, matching the beads_test AD-01
cleanup-firewall prefix).
- TestFederationDatabaseIsolation's not-found assertions assumed GetIssue
returns (nil, nil) on a miss. It never does — issueops.GetIssueInTx
always returns a wrapped storage.ErrNotFound. Switched to
errors.Is(err, storage.ErrNotFound).
- TestFederationVersionControlAPIs hardcoded Checkout(ctx, "main") to
return to its "starting" branch, but setupTestStore already checks out
a private branch (test-<name>-<hex>) — "main" is a branch shared by
every parallel test in the binary and never has vc-001. That mismatch
is what produced the nil-pointer panic (GetIssue's error was discarded
via `_`, and the resulting nil issue was dereferenced). Capture the
real starting branch via CurrentBranch() right after setupTestStore()
and check both previously-discarded GetIssue errors before
dereferencing.
Neither bug is a production security issue: New(), Checkout(), and
GetIssue() all behave exactly as specified. Both bugs are confined to
this prototype test file's own setup/assertions, which hadn't caught up
to the isolation model the rest of the suite already uses correctly.
Verified via `go build`/`go vet`/`go test -c` (all clean) and running the
compiled binary, which now reaches and cleanly SKIPs both tests (no
Docker locally) instead of the previous isolation failure / panic
surfacing at compile-adjacent runtime. Full GREEN confirmation is via
CI, which has a working Dolt/Docker environment.
Refs be-3c78s
* chore: release gate PASS for be-42tlj
* test(feat): red — Fix: unbounded apt-get in CI burns the whole 15m job timeout (migration-test.yml, release.yml) (refs be-na2q)
* fix(feat): green — Fix: unbounded apt-get in CI burns the whole 15m job timeout (migration-test.yml, release.yml) (refs be-na2q)
* fix(ci): make apt-get update retry exhaustion deliberate, not a silent fall-through
After three failed `apt-get update` attempts the loop simply ended and the
step went on to `apt-get install` against a stale index, with nothing in the
log saying the index was never refreshed. That contradicted the PR body's
claim that the step "fails fast with a clear error".
Proceeding best-effort is the right behavior -- the runner image's cached
index installs these packages far more often than not, and failing here would
turn a transient mirror outage into a red build -- so make it an explicit,
logged decision instead of a fall-through:
- track whether any attempt succeeded and emit
`:⚠️:apt-get update failed after 3 attempts; proceeding with
cached index` when none did
- drop "; retrying" from the per-attempt warning, which was wrong on the
final attempt
- skip the 10s backoff after the last attempt, where there is nothing left
to wait for
The workflow tests pin both new strings, so a revert to the silent
fall-through goes red.
* fix(ci): raise apt step timeout-minutes above the retry budget they backstop
The step-level caps were tighter than the inner `timeout` calls they were
meant to backstop, so they reproduced the mid-flight kill this hardening
exists to remove -- just at 6 and 8 minutes instead of 15:
migration-test.yml worst case 3x120s + 2x10s + 180s = 560s vs cap 360s
release.yml worst case 3x120s + 2x10s + 300s = 680s vs cap 480s
Raise them to 11m and 13m, each ~100s above its own worst case, and record
the arithmetic next to the value so the next edit re-derives it. 11m also
stays under the historical-upgrades job's own 15m budget, so a stuck step
fails as a step rather than cancelling the job with no apt-specific signal.
The goreleaser job sets no job-level timeout-minutes at all, which makes its
step cap the only bound on a stuck apt there.
The workflow tests now assert the relations instead of only pinning the
minute counts:
- step timeout-minutes must exceed the step's own worst-case budget,
computed from the attempt count, per-attempt timeout, backoff and
install timeout that the same table pins against the YAML
- it must stay below the job's timeout-minutes where the job sets one
Both read the value off the workflow rather than off the table's own
constant, so they stay honest if the YAML drifts.
* Pin authenticated historical release catalog (bd-9q3.1)
Establish the exact 122-version SumDB-backed source universe and record proxy prereleases, archived repository-only tags, current repository-tag drift, and optional release asset provenance. Offline validation pins the complete reviewed catalog identity.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Simplify validateCatalog into phase helpers
Extract validateCatalog's validation phases into validateVersionEntries,
validateEntryProvenance, validateTagDrift, validateSourceRelations, and
validateExclusions, dropping its cyclomatic/cognitive complexity from
43/43 to 11/8. Behavior and error paths are unchanged: the pinned catalog
digest and offline hermetic validation still pass.
Also derive the proxy @v/list URL from modulePath so version listing and
module downloads cannot drift to different module identities.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(review): dedupe bd init legacy-upgrade guard; document release catalog anchor
Maintainer review fixups for PR #5100 (adopt-pr review loop, attempt 1).
cmd/bd/init.go: remove the duplicate guardLegacyUpgradeWorkspace block in bd init. After the rebase onto feature/v12-u0-history-20260719 the base already carried the guard, so the PR's added block was a byte-identical second call that re-ran the read-only workspace classification twice and misrepresented the diff intent. A single guard call before the existing-workspace safety checks is retained; behavior is unchanged (reviewer-confirmed idempotent).
scripts/migration-test/catalog/README.md: document that the pinned release catalog is currently a self-validated reference anchor (pinned SHA-256 identity + strict offline validator + go test ./... digest gate) whose intended consumer is the stacked v1.2 upgrade-census / runtime-schema coverage work, since no migration-test harness consumes it yet.
Addresses the two minor findings from the Claude + Codex review synthesis (decision: approve; scorecard 971/1000). Contributor commits preserved.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(migration-test/catalog): correct semver prerelease ordering
versionCompare tie-broke same-core versions with strings.Compare, so
v1.2.3-rc.10 sorted before v1.2.3-rc.2 and a stable release sorted before
its own prereleases. generate and validate share this comparator, so a
wrong canonical order self-validates against the pinned digest and the
anti-tamper check cannot catch it. Replace the lexicographic tiebreak with
a SemVer 2.0.0 section 11 prerelease comparator (numeric-aware identifier
comparison, numeric < alphanumeric, longer set wins, stable > prerelease)
and add regression coverage including rc.2 vs rc.10. The checked catalog's
canonical order and pinned digest are unchanged: its only same-core group,
v1.1.0-rc.1/-rc.2, sorts identically.
Maintainer adoption fixups for PR #5100 review:
- tighten origin-ref provenance from any refs/ prefix to the exact
refs/tags/<version> or refs/heads/main shapes actually used
- key the digest-pinned Catalog/Entry/SourceZip/AssetRecord composite
literals to avoid silent field-shift on a future struct reorder
- drop the inert GONOSUMDB= env entry and print the recomputed SHA-256
from generate to make deliberate digest updates less error-prone
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>
* fix(examples): tidy both example modules and build them in CI
Both Go modules under examples/ fail a plain `go build` on current main:
go: updates to go.mod needed; to update it:
go mod tidy
They are separate modules that reach the parent through
`replace github.com/steveyegge/beads => ../..`, so their go.mod and go.sum
record the parent's entire dependency graph. Every root dependency change
therefore invalidates them — and nothing in CI ever compiled them, so the drift
accumulated silently. examples/ is the first code a new user copies, which makes
this a bad first five minutes rather than a cosmetic wart.
Two parts:
1. `go mod tidy` in examples/bd-example-extension-go and examples/library-usage.
The extension example carries most of the churn (~1.6k lines of go.sum),
which is inherent to recording the parent graph through the replace directive
and is why an earlier fix (#4942, the Go 1.26.5 bump) deliberately left it
out. Both modules now build clean with the project's canonical
`-tags gms_pure_go`.
2. scripts/build-examples.sh plus a `build-examples` job in the PR workflow, so
the same drift cannot recur unnoticed. The script discovers example modules
from `git ls-files 'examples/*/go.mod'` (no hardcoded list), sources
.buildflags for the canonical CGO/tag settings, builds into a scratch
directory so it leaves no untracked binaries, reports every failing module
rather than stopping at the first, and prints the exact `go mod tidy`
command to run.
The job is deliberately NOT added to ci-gate's required list. Because of the
replace directive it would fail on any root go.mod change not mirrored into the
examples, so making it blocking imposes a "tidy the examples too" step on every
dependency bump. That is a maintainer call about contributor friction; the job
is visible on the checks list either way, and pr.yml records how to promote it.
Verified locally: both modules build with -tags gms_pure_go; the script exits 1
and names the module when an example go.mod is reverted to its pre-tidy state;
scripts/check-build-tags.sh stays clean (the script sources .buildflags).
Agent-Signature: claude-opus-5-high on behalf of matt wilkie
* fix(examples): address dual-vendor review — vet not build, advisory job, portability
Reviewed by a claude reviewer and scripts/codex-agent reviewer (gpt-5.6-sol).
Four fixes, two of them correctness.
1. `go build -o <dir>/ ./...` was a FALSE GREEN: with -o naming a directory, Go
compiles only the MAIN packages and silently skips every library package.
Reproduced in an isolated module with a good main package plus a library
package containing a type error — `go build -o dir/ ./...` exits 0 while
`go build ./...` and `go vet ./...` both exit 1. The mirror-image bug: a
library-only example module fails `go build` with "no main packages to
build", a false red. Switched to `go vet ./...`, which type-checks every
package INCLUDING test files (examples/library-usage/main_test.go exercises
a lot of live API, and `go mod tidy` counts its imports, so a build that
never compiles it left part of the recorded graph unverified), writes no
artifacts, and still fails on the stale-go.mod condition this exists for.
That also deletes the mktemp/trap/scratch-dir machinery entirely.
2. "Not in ci-gate" is NOT "non-blocking", which the previous comment claimed.
Verified in source: pr-preflight.sh gates on every FAILURE in the raw
statusCheckRollup and calls block(), and pr-babysit requires all rollup
entries SUCCESS/NEUTRAL/SKIPPED before merging. Both ignore ci-gate
membership. So the previous state was the one posture that stalls the merge
patrol repo-wide after any un-mirrored dependency bump while advertising
itself as optional. The job is now continue-on-error: true — genuinely
advisory — and the comment records how to promote it to a real gate. Whether
it SHOULD be a gate remains the maintainers' call.
3. Portability and robustness in the script, all reproduced by the reviewers:
- `mapfile` does not exist in bash 3.2 (stock macOS) and `xargs -r` is
GNU-only, so the advertised local check could not run on macOS. Replaced
with a NUL-delimited read loop, which also fixes module paths containing
whitespace (`git ls-files | xargs -n1 dirname` turned "examples/has
space/go.mod" into two bogus entries).
- `source ./.buildflags` was unguarded under `set -uo pipefail`; a failure
continued with GOFLAGS unset and would type-check the ICU path while
check-build-tags.sh still passed, since that only greps for the literal
string. Now a hard exit.
- Finding zero modules exited 0. A job that checks nothing must not report
success; it is now an error.
Verified: both modules vet clean; reverting an example go.mod to its pre-tidy
state still exits 1 with the exact `go mod tidy` command; a broken library
package now fails where it previously passed; check-build-tags.sh clean
(97 files); shellcheck clean.
Agent-Signature: claude-opus-5-high on behalf of matt wilkie
* fix(examples): drop GNU-only sort -z from the module discovery pipeline
BSD sort has no -z, so on stock macOS — the exact platform the Bash-3.2
compatibility block targets — the sort stage emptied the pipeline and the
script exited claiming 'found no example modules'. git ls-files output is
already sorted, so the stage bought nothing. Found by cross-vendor review
(codex gpt-5.6-sol) of this branch.
Agent-Signature: claude-fable-5-high on behalf of maphew
* fix(ci,examples): disable setup-go cache in build-examples; re-tidy examples after merge
TestGoCacheOwnershipTopology requires every setup-go step in pr.yml to set
cache: false (caching is owned by explicit restore/save steps); the new
build-examples job predates that policy landing on main. Also re-run
go mod tidy in both example modules so their recorded dependency graphs
match the merged main — exactly the drift this PR's CI job exists to catch.
Agent-Signature: claude-fable-5-high on behalf of maphew
* ci(examples): bound build-examples with timeout-minutes: 10
continue-on-error keeps a red result advisory, but a hung job at the
6-hour default timeout holds the check pending, stalling merge-lane
consumers the advisory posture was meant to protect. Matches
pr-preflight-platforms' bound.
Agent-Signature: claude-fable-5-high on behalf of maphew
* ci(examples): make the advisory posture real - step-level continue-on-error
Job-level continue-on-error still reports the check run as FAILURE in the
PR rollup (only the workflow-run conclusion flips), and pr-preflight /
pr-babysit gate on per-check-run conclusions - so the job as written was
de facto blocking while advertising itself advisory. Follow the cygwin-leg
precedent: continue-on-error on the build step, outcome-guarded ::warning
annotation on failure. Also restore the repo-wide Go module cache (the
examples' graph is the parent's via the replace directive) so the job
stops cold-downloading the full dependency graph on every PR.
Agent-Signature: claude-fable-5-high on behalf of maphew
* test: register build-examples' module-cache restore in the cache topology registry
TestGoCacheOwnershipTopology keeps an explicit inventory of every cache
step per job; the advisory-lane fix added a restore step to build-examples
without registering it, so the whole scripts package went red on this
head. Register the job (inventory, managed map, ordering, setup-go id)
and drop the step's unused 'restore-cache' id — the registry compares
ids, and nothing references it.
Agent-Signature: claude-fable-5-high on behalf of maphew
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019CwiLhLbAGZdJtKYT76CPp
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The v1.2.0 bump (fa3d8cc5c) reddened main: the tracked .githooks/* managed
sections embed the binary Version in their BEGIN/END markers, and
TestTrackedManagedHookSectionsMatchGenerator (added with the sections in
#5522) holds them byte-equal to the cmd/bd/hooks.go generator — but
update-versions.sh's hook step was a stale comment saying there were no
hook files to update (true of the old cmd/bd/templates/hooks/*, not of the
tracked rendered copies). update-versions.sh now rewrites the marker
version wholesale (not from CURRENT_VERSION — the markers were already
drifted at v1.1.0 when the 1.2.0 bump ran), and check-versions.sh gates
the markers so a bump that skips them is refused before the push instead
of reddening main after it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Ewen Cuthiell <ewencuthiell@gmail.com>
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Co-authored-by: Steve Yegge <steve.yegge@gmail.com>
Use Go's supported wasm executor wrapper directly in the required CI lane. Preserve non-vacuous exact-test outcome checks and aggregate-gate propagation without runner host-attestation ceremony.
Fixes#5491
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Mark the launchability probe skipped in ordinary package runs so a helper-only guard cannot be mistaken for executed coverage.
Signed-off-by: Ewen Cuthiell <ewencuthiell@gmail.com>
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* build: make repository text EOL deterministic
Apply one repository-wide LF policy to detected text so Windows checkout settings cannot turn ordinary Go source or future text formats into CRLF. Preserve concise rationale for LF-sensitive hook templates, embedded Markdown, migration hashes, and generated-doc comparisons; keep the tracked JPEG explicitly binary and remove redundant path selectors.
Exercise a real isolated Git checkout with core.autocrlf=true through a narrow test package. Bind the existing required Ubuntu, macOS, and Windows matrix to exact expected GOOS values, fail closed on missing or wrong host identity and skipped or zero EOL coverage, and preserve the original doc-freshness command as a separate step.
Resolve and positively identify one canonical Git executable, reuse it under a curated environment with repo-local hooks, and protect the workflow topology with regression tests. Bind the required aggregate to startup-clean absolute Linux Bash and uname identities, require the exact POSIX checkout workspace, and re-enter privileged profile-free Bash with exec so ambient functions or startup state cannot turn a gate failure into success.
Exercise the aggregate shell boundary in subprocess regressions with hostile exported source and exit functions, poisoned startup options, paired clean and failing fixtures, wrong-host falsification, and invalid-workspace cases.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* build: split CI-gate hardening from EOL policy
Remove the profile-free CI-gate host-binding chain and its structural and subprocess tests from PR #5319 so the final diff matches the accepted repository EOL motivation. Preserve the required three-host EOL policy lane and its CI Gate propagation. The merge-gate hardening will be reconstructed from current main under its own threat model and review vehicle.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Select timeout or gtimeout only after a successful GNU coreutils identity probe, validate BEADS_HOOK_TIMEOUT as positive whole seconds, and preserve the Perl and warned direct fallbacks under inherited shell options.
Keep GNU and Perl deadlines soft and backend-scoped, preserve natural status 137, regenerate every tracked hook artifact, and exercise the real process boundary through the required three-host preflight.
Fixes#5503
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Three beads (ga-uwix0.1, ga-2yaqp.5, ga-2yaqp.6) plus a fable review round.
Docs and spec prose only: all 19 touched .go files are gofmt-normalized,
comment-stripped byte-identical to main. The one exception is deliberate and
reviewed — scripts/check_doc_freshness_test.go gains a data row, because the
delegated gate ruling required it.
ga-uwix0.1 — #5516 gave bd serve optional bearer auth and made it MANDATORY
beyond loopback; fifteen prose sites still said the opposite. The three the
council named are reworded to the stronger true form (the actor is not the
authenticated principal even where a bearer is required; a shared token admits
a client to the WHOLE surface and grants no narrower right). The sweep for a
fourth found eight more in five spellings the audit's grep could not reach,
including claim.go's "any client can claim as any name", release.go's
no-AUTHORIZATION variant, and six memory/settings-plane sites where the true
statement is sharper: a bearer decides WHO may call, never what a caller who
is let in may read. The review round found four more in the CHANGELOG's
UNRELEASED section, which round one had misclassified as released history —
they would have shipped false in the same release as the auth entry.
The serve runbook's "Binding beyond loopback" section was actionably wrong: it
said the flag "prints a warning and changes nothing else", and its refusals
table quoted a string not in the binary. Rewritten against a build, with every
flag, error string, event name and reason value produced by running the
command. It gains the operational trap nobody had written down: /healthz is
auth-exempt and GET /v0/beads/ready is not, so an unauthenticated readiness
probe earns a 401 forever while liveness stays green. The runbook is now IN
scripts/check-doc-freshness.sh, pinned to the four files it is read against.
ga-2yaqp.5 — nine prose defects, every count re-derived rather than trusted;
three of the audit's own numbers had moved again. 38 route rows and 36
capability-bearing ones; thirteen pinned schemas, not twelve or seven; six
missing entries in the no-query-parameter list, not five; twenty-eight role
accessors, not twenty-seven; nineteen patch members, not thirteen. Two prose
"code counts" were counting paragraphs. CodeAlreadyClaimed claimed the holder
is always attached when only one of four producers always attaches it and
releaseIssue never does. MetadataCAS's leaf contradicted its own shipped wire.
The path/operationId inversion is now recorded where a spec author looks.
ga-2yaqp.6 — the role checklist refreshed against what this wave's additions
actually cost, traced to real commits. Step 10 sent people to a name list
#5460 deleted. The "four more edits" claim was stated twice and undercounted
both times: the two freshest wire slices share a nine-file core plus
roles_test.go. The step-with-no-number gained the fact that explains its
instances — write-role decorators wrap, read-role decorators recurse, so the
call lands on the stub, and both real instances are reads. The wave got its
first CHANGELOG entry: six new public operations, not three, and zero new role
accessors in the window.
Review verdict: FIX-REQUIRED then all items addressed. The reviewer
live-falsified the strong auth form and failed to break it, and confirmed
every recount re-derives exact.
Derive the complete test-runner output with go env GOEXE before both
building and exporting it. Add a fast process regression for launchability
and caller precedence, maintained by the existing three-host preflight lane.
Fixes#5502
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* fix(githooks): build golangci-lint with the repo's Go, not golangci-lint's
The pre-commit hook ran `go run golangci-lint@v2.10.1`. For a pkg@version
build the go command honours the TARGET module's toolchain directive, so
GOTOOLCHAIN=auto downgraded to go1.25.12 — and golangci-lint built by
go1.25 refuses this repo's `go 1.26.5` at config load:
go: github.com/golangci/golangci-lint/v2@v2.10.1 requires go >= 1.25.0; switching to go1.25.12
Error: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.5)
Every Go commit failed there, so the hook taught six-plus contributors to
reach for --no-verify — the one habit a lint gate must never train.
CI never hit it because actions/setup-go installs the go.mod version and
exports GOTOOLCHAIN=local, so its `go install ...@v2.10.1` compiles the
linter with go1.26.5. Pinning GOTOOLCHAIN to the go directive reproduces
that resolution on any host, including one whose base toolchain is older
than the repo's target (where a bare GOTOOLCHAIN=local would pin the
linter to that older toolchain instead).
Verified on a real staged Go change: red before with the message above,
`0 issues.` after, and still exit 1 on a planted errcheck violation.
Bead: ga-2ltro.13
* ci: lint PRs for what they introduce, sweep the whole tree on main
Both PR lint gates linted the whole tree: the `lint` job left
only-new-issues at its false default, and pr-lint-wrapper ran
`make ci-pr-lint` over ./... . So a single lint word landing on main —
twice this wave, once a prose misspell — turned EVERY open PR red for a
change it did not make, and each author had to either fix someone else's
line or wait.
The tradeoff, recorded beside the job: a pre-existing issue in untouched
code no longer blocks a PR, and because "new" is measured off the diff, a
violation carried in by a MOVE or a rename does. What it buys is that a
main-side word now reds main's own run, where it belongs. main.yml
already runs both jobs unscoped on every push, so whole-tree coverage —
including the GOOS=windows cross-lint — is unchanged; only its blast
radius moves.
The wrapper takes its scope from BD_LINT_NEW_FROM_MERGE_BASE, set only
by pr.yml, so `make ci-pr-lint` run by hand still sweeps the tree. That
makes the local wrapper STRICTER than the PR gate rather than equal to
it, which is what LINTING.md and CI_CLEANUP_PLAN.md said before and no
longer would: both now state the two-lane contract and say the local
run's extra strictness is deliberate. Their freshness markers move with
the workflow and wrapper files they are pinned to.
Bead: ga-uwix0.2
---------
Co-authored-by: Julian Knutsen <ci@beads.test>
* fix(hooks): make js/wasm execution explicitly unsupported (saa-cgh.14)
Provide the runHook implementation required by the shared hook runner on js/wasm. Keep process execution out of the WebAssembly target and return a precise unsupported-platform error when the platform-specific boundary is reached.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* ci: enforce js/wasm hook boundary (saa-cgh.14)
Exercise the exact unsupported-execution contract under Go js/wasm and pinned Node in an existing required leaf job. Guard the host identity, exact test selection, and required-gate reachability against false-green drift.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* ci: bind js/wasm proof authority (saa-cgh.14)
Launch the required boundary proof through startup-clean privileged Bash, bind its Go, GOROOT, and Node identities, and curate inherited runtime controls. Parse the exact test result with Bash builtins so ambient helpers cannot counterfeit execution counts.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
* ci: follow up js/wasm review (saa-cgh.14)
Keep go.mod as the sole Go-version authority for the required wasm lane, centralize pinned setup action identities, and document the singleton test selector's maintenance contract.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
The race-enabled UOW package now runs close enough to Go's implicit 10-minute deadline that ordinary CI variance can fail unrelated changes. Give the storage tier 15 minutes, preserve the doctor/fix tier's existing 10-minute behavior explicitly, and bound their shared job at 30 minutes. Mirror the policy in PR and main workflows and pin the nested budgets plus required-gate wiring in a structural test.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Resolve shim and state paths under the same minimal Bash environment used by
the test commands so Git for Windows cannot remap /tmp between setup and
execution.
Reset the effective command PATH inside profile-free Bash and prove docker,
sleep, and go resolve to the generated shims before either target script runs.
This keeps ambient host tools and real retry sleeps out of the harnesses while
preserving their exact argv, call-count, and exit-status assertions.
Agent-Signature: codex-gpt-5-unknown-reasoning on behalf of Ewen Cuthiell
Add the storage substrate the durable events journal is built on, ahead of the
engine that writes to it.
bd_events_journal records every committed bead mutation; bd_events_seq is the
single-row counter its seq is drawn from. Both are clone-local: registered in
doltIgnorePatterns before the migration runs, so the CREATE never lands as
tracked-at-HEAD in the first place. That placement is the whole design. A
journal row per mutation on the versioned plane would restore the history churn
0062 just removed, and a per-clone counter on a replicated table would conflict
on every merge — so the journal describes THIS clone's working set, and nothing
else. seq is deliberately not AUTO_INCREMENT: that assigns at INSERT rather than
at commit, so under concurrent transactions a lower seq can commit after a
higher one is already visible and a consumer tailing WHERE seq > cursor skips it
permanently. Drawing seq from a shared counter row inside the mutation's own
transaction converts that silent skip into a detected conflict.
The tracked 0064 and the ignored-series twin 0022 create the identical shape, so
the fresh-init door and the fresh-clone door converge; both tables join the
per-table shape diff in migrate_ignored_plane_shape_test.go, which is what pins
that. The hygiene script's clone-local table list is extended to match
doltIgnorePatterns, its documented mirror.
journalscan holds the AST primitives the completeness guards will share:
per-function bead-table DML detection (literal, %s, and %[1]s table names) and a
call-graph fixpoint. Detecting mutators by the SQL they execute rather than by
name is what stops a mutator named off-pattern from shipping un-journaled, so
the detector itself is unit-tested — a false negative there silently disarms
every guard built on it.
lock_test's dirty-guard shape pinned its mocked cursor to LatestVersion()-2 to
keep 0062 (the migration that touches `events`) among the pending set. That
offset stops covering 0062 the moment anything newer lands, which 0063 and this
change do; it is now pinned to the flip migration's own version.
Re-port of OSS PR #4916 (head 3666e5026) onto current main, folding in the
3bfed2431 hardening generation. Migrations renumbered from that lineage's
0056/ignored-0014.
Co-authored-by: CI Bot <ci@beads.test>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Agent-Signature: claude-code-claude-opus-5[1m]-unknown-reasoning on behalf of julianknutsen
TestGoCacheOwnershipTopology pins the released actions/cache SHA; the
actions-group bump moved cache/restore and cache/save from v5.1.0
(caa2961) to v6.1.0 (55cc834), so the ratchet constant moves with it.
Verified 55cc834 is the tagged v6.1.0/v6 release commit upstream.
Reported by the first caller to use scripts/mutation-equivalence.sh at scale: it
killed 5 of 9 mutation runs, presenting as "not a worktree of $REPO" for a path
that plainly was one.
grep -q exits on the first match, which SIGPIPEs the git worktree list feeding
it. Under set -o pipefail the pipeline is then nonzero and the negation takes
the failure branch, rejecting a legitimate worktree. It only bites once the
listing is large enough that git is still writing when grep exits — this repo
has ~370 worktrees and a 53 KB listing — so it reads as intermittent and
machine-specific.
Captured into a variable instead of piped. Verified both directions: a real
worktree is now recognised and falls through to the branch-checked-out guard as
intended.
The guard this broke was added two commits earlier, in response to a review that
found the tool would hard-reset a live checkout. Tightening it introduced a
failure mode that made it refuse legitimate ones. Worth recording, because the
reflex when a guard misfires is to loosen the guard rather than look for the bug
in it — and the caller who hit this worked around the symptom rather than
reporting it, which is how a tool acquires a reputation for flakiness.
Follow-up to the four-slice deduplication pass (#5398, #5399, #5405, #5406).
No behaviour change.
That pass retired ~700 lines net, and its reviews found about a dozen coverage
losses and six tests that could not fail — every one of them green under
go build, go vet, go test and golangci-lint. The reasoning that caught them
lived in review transcripts and a scratch directory. Written down nowhere, the
next pass rediscovers it by shipping the loss first.
The engdoc section states each rule as the check that would have caught the
failure earlier: a mutation verdict is only true of the body you mutated; a
wrapper is a composition the contract structurally cannot see; write a residue
from the decision surface rather than the mutants you happened to run, since
half of what one such residue missed were POSITIVE assertions; ask what the
fixture makes unobservable, because every fixture-defect case had correct
assertions; never let a role-answer assertion replace a raw-row one; cite by
symbol, not line.
scripts/mutation-equivalence.sh is the tool. It ran the entire pass from a
scratch directory, which means it would not have survived it.
A fact-check review then found more wrong with this change than with anything it
describes. The section cited `runTransaction`, which does not exist in the dolt
package — while teaching symbol citation. It claimed no contract case reads
is_blocked; there are 45 references across ten files, several added by the pass
it describes. Three of its counts did not reconcile with the merged record, and
one was curated to make a sentence read true. All corrected, with the counts now
qualified and the pull requests named as the record.
The same review demonstrated three false-REDUNDANT routes in the script — the
one wrong answer that costs coverage — plus a guard that refused the repo only
by accident, and would have hard-reset the caller's own checkout on a slightly
different setup. Build failures and timeouts are now reported UNUSABLE rather
than read as catches; checkout and reset failures are fatal rather than
measuring a different commit; off-file mutations are fatal; A == B is refused;
and the worktree must be a detached scratch worktree of the repo.
A seventh guard came from using it: it measures HEAD, not the working tree, so
uncommitted work is invisible and the run reads INCONCLUSIVE. It now warns.
* Add sealed-copy SQLite migration bridge (bd-mvh)
Create a fresh current workspace from a fingerprinted copy of an authenticated historical SQLite workspace. Keep every historical executable inside an isolated destination and reject malformed or semantically lossy cutovers without touching the source.
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Test User <test@test.com>
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Refuse implicit historical workspace upgrades (bd-mvh)
Detect historical SQLite and legacy Dolt layouts before config migration, version tracking, init, bootstrap, doctor, or store construction. Require the sealed-copy bridge while preserving current shared-server admission against the explicitly selected workspace.
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Test User <test@test.com>
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Qualify authenticated historical upgrades (bd-mvh)
Replace generic recipe discovery with a fixed, checksum-pinned corpus spanning the reviewed SQLite, server-Dolt, and embedded-Dolt eras. Assert source isolation, representative data fidelity, schema idempotence, and rollback retention while keeping historical executables inside bounded temporary environments.
Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
Co-authored-by: Test User <test@test.com>
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Add authenticated legacy SQLite reader (bd-tku)
Let the current binary read the exact v0.49.6/v0.50.3 SQLite contract from a sealed private DB/WAL copy and emit canonical JSONL for the normal fresh-Dolt import path. Reject schema drift and values that current import would lose, default, truncate, or deduplicate.
Qualify both authentic releases end to end, including current DATETIME(0) canonicalization and reader-to-fresh-import timestamp equality.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Fix empty embedded-root upgrade bypass (bd-e6m)
Require an actual embedded Dolt repository marker before current layout precedence can suppress historical SQLite or legacy Dolt refusal.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* fix(migrate): maintainer review fixups for legacy SQLite upgrade PR
- decompose the legacy-workspace guard and extract the dependency-row loader
(behavior-preserving), and align the legacy SQLite reader projection with
issueops.ScanIssueFrom arity after the 0060/0061 rebase, guarded by a
projection arity test.
- assert the historical-upgrade harness schema no-op by shape
("Schema already at v<N>") instead of a hardcoded v59, so the migration-test
matrix stops reddening on every schema bump (candidate now prints v61).
* Fix historical upgrade review blockers (bd-mvh)
Route direct SQLite lanes through the current authenticated reader, guard no-store commands before legacy workspace mutation, and move coarse embedded repository detection behind the storage adapter. Restore the legacy reader projection contract and verify source-preserving behavior across the repaired paths.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Fix historical upgrade edge cases (bd-mvh)
Refuse ambiguous local server-Dolt roots before storage opens and normalize nullable legacy SQLite sentinel fields during authenticated export.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
* Fix final historical upgrade review blockers (bd-mvh)
Make explicit server selection outrank stale embedded repository markers, so ambiguous local server roots still fail closed.
Permit zero-record cutovers only through the authenticated direct SQLite reader, verify the empty round trip against a fresh current export, and align the upgrade guidance with the enforced admission matrix.
Agent-Signature: codex-unknown-model-unknown-reasoning on behalf of CI Bot
---------
Co-authored-by: CI Bot <ci@beads.test>
Co-authored-by: Test User <test@test.com>