Commit graph

168 commits

Author SHA1 Message Date
Julian Knutsen
7d8c0e23be test(release): add v1.2.2 verification script and test plan
Automates the release gate for the recovery re-release: fresh-workspace
round-trip at v53, incident refusal on a v1.2.1-migrated v65 database,
the skew-bypass stopgap, the runbook's cursor rollback and events
re-track, replay safety of a later 1.2.x re-migration, and the strict
tag-mode version gates. Verified 21/21 legs green against a real
v1.2.1-migrated embedded-Dolt database.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 01:15:45 +00:00
matt wilkie
b3a29a78cc
fix(scripts): document CGO override + stderr-warn in CLI docgen guard (#4532)
Why: regenerating CLI docs on a machine with a C compiler links CGO by
default, so `bd federation --help` emits the full federation subcommand tree.
The committed docs are built by CI with CGO_ENABLED=0, which stubs federation
("built without CGO support"), so a naive regen produces ~hundreds of lines of
spurious federation churn (federation.md, CLI_REFERENCE.md, llms-full.txt)
unrelated to the actual change. The existing guard force-rebuilds a pure-go
binary but offered no escape hatch and announced the swap on stdout.

What:
- Route the CGO-mismatch notice to stderr (keeps --check/CI stdout clean and
  makes it a proper warning).
- Add a documented BD_DOCS_ALLOW_CGO=1 override hook so an intentional
  full-federation regen can trust the supplied binary as-is; default stays
  safe (rebuild pinned CGO_ENABLED=0 -tags gms_pure_go).
- Make the message name the pure-go recipe and reference the stub marker
  ("Federation commands require CGO", cmd/bd/federation_nocgo.go).
- Document the override in the script's --help text.

generate-llms-full.sh builds no bd binary, so it needs no change.

Agent-Signature: claude-opus-4-8-high on behalf of matt wilkie
2026-07-01 23:00:20 -07:00
matt wilkie
fa4dce4548
chore: re-land v1.1.0-rc.1 release prep (#4486)
Re-lands the v1.1.0-rc.1 release prep so the candidate can be reviewed before
the tag is cut (#4476 auto-merged the original prep; #4477 backed it out).

Restores v1.1.0-rc.1 version metadata across all package manifests, the
prerelease-aware release workflow and version scripts (prerelease tags skip the
stable docs-snapshot requirement and stay off the stable Homebrew/PyPI/npm
channels), the CHANGELOG and cmd/bd/info.go entries, and regenerates uv.lock to
1.1.0rc1.

Beyond the straight re-land:
- fix(release): match the winres/manifest numeric PE versions on the base
  version in update-versions.sh, so a later prerelease-to-different-base bump
  does not silently leave them stale.
- docs(release): document the prerelease / release-candidate workflow in
  RELEASING.md.

Agent-Signature: claude-opus-4-8-xhigh on behalf of matt wilkie
2026-06-25 20:10:18 -07:00
matt wilkie
5aa4474518
revert: back out v1.1.0-rc.1 release prep (re-land after maintainer review) (#4477)
* revert: back out v1.1.0-rc.1 release prep

Reverts merge commit 427fdd0c85 from #4476 so the RC release prep can go back through maintainer review.

Agent-Signature: codex-gpt-5.5-xhigh on behalf of matt wilkie

* fix(mcp): sync uv.lock to reverted 1.0.5 version

The #4476 revert rolled integrations/beads-mcp/pyproject.toml back to
1.0.5 but left uv.lock pinned at 1.1.0rc1, so `uv lock --locked` (the
Package Gate (MCP) check) failed and the aggregate CI Gate went red.
Regenerate the lockfile so pyproject and uv.lock agree on 1.0.5.

Agent-Signature: claude-unknown-model-high on behalf of matt wilkie
2026-06-24 08:48:58 -07:00
matt wilkie
dfa8ea4813
fix(docgen): generate CLI docs in one process (#4474)
Add a bulk help docs writer that emits the root CLI reference and website command pages from a single Cobra walk. Update the shell generator to call that mode, preserve the pure-Go docs binary guard, and refresh historical versioned CLI docs only when release snapshotting requests a specific version.

Agent-Signature: codex-gpt-5.5-medium on behalf of matt wilkie
2026-06-22 18:25:58 -07:00
matt wilkie
db32346392 chore: prepare v1.1.0-rc.1 release
Allow prerelease version bumps without promoting stable docs, keep Windows resource versions numeric for prerelease builds, and skip Homebrew/npm/PyPI publishing for prerelease tags while still producing GitHub prerelease artifacts.

Agent-Signature: codex-gpt-5.5-xhigh on behalf of matt wilkie
2026-06-22 18:18:40 -07:00
matt wilkie
058134d81c
docs: align agent maintainer conventions (#4237)
* docs: align agent maintainer conventions

Agent-Signature: codex-gpt-5.5-medium on behalf of matt wilkie

* docs: refresh checked-in AGENTS.md managed block to generated content

The PR self-review flagged the execution metadata key rename (item 4) as a
local experiment; that content was already dropped from this branch. Upstream
PR #4358 has since documented the existing execution_* model/effort keys as
portable hints in docs/METADATA.md, which remains the canonical reference.

Refresh the checked-in AGENTS.md managed Beads block to the current rendered
full-profile section so the marker hash is truthful. This drops the
experimental "read execution metadata first" workflow step from the managed
block (execution hints stay documented in docs/METADATA.md and
AGENT_INSTRUCTIONS.md) and picks up the conservative agent context profiles
from #4220.

Agent-Signature: claude-unknown-model-high on behalf of matt wilkie
2026-06-20 20:44:08 -07:00
matt wilkie
1de37278ad ci(docs): blame-scoped CLI docs freshness gate + fix patch artifact (#4301)
The doc freshness gate regenerated all generated doc artifacts and failed
the PR on any diff, even drift the contributor did not cause: staleness
inherited from the base branch, or local regeneration environments that
do not match CI's canonical build. Contributors ended up futzing with
regeneration loops for docs unrelated to their change (#4300, #4301).

New scripts/check-cli-docs-drift.sh keeps the strict regenerate-and-diff
probe as the fast path, but on failure in a PR it attributes the drift
before failing anyone: it regenerates the artifacts at HEAD and at the
merge-base in scratch worktrees, each with the canonical pinned build
(CGO_ENABLED=0 -tags gms_pure_go). If the PR neither changed the
regenerated CLI surface nor touched generated files, the drift is
inherited: warn and pass. Contributors only own docs for code they
actually touched.

When the drift IS attributable, CI now writes the exact regenerated fix
as a patch and uploads it as the cli-docs-freshness-patch artifact, so
the fix never depends on the contributor's local environment: download,
git apply, push.

Strict behavior is preserved wherever there is no PR base ref: pushes to
main, releases, and plain local runs. The pr-policy wrapper picks up the
same logic through check-doc-flags.sh.

Refs #4301, #4203. Complements #4312 (docgen binary pinning).

Agent-Signature: claude-unknown-model-high on behalf of matt wilkie
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-14 23:40:17 -07:00
Steve Yegge
6a1e7af9b9 fix(audit): sand down the P3 sharp edges from the June 9-11 audit (bd-578h9.17)
Eight of the nineteen roll-up items were safe, self-contained fixes:

- dolt: autoResolveConflictsAfterCLIPull pins a single connection and
  resets @@dolt_allow_commit_conflicts before releasing it (discarding
  the conn if the reset fails) so the session variable no longer leaks
  into the pool (item 4)
- issueops: mergeAffectedSets propagates context cancellation instead of
  degrading to a full recompute on a dead context (item 6)
- .gitattributes: migration SQL pinned to LF so CRLF checkouts hash
  identically to release builds (item 8)
- schema: remote-migrate gate message warns that re-cloning discards
  unpushed local work and says how to save it first (item 13)
- dberrors: ancestor-PK table extraction regex is now case-insensitive,
  matching the lowercased detector; add unit tests (item 14)
- hygiene lint: flag UUID_SHORT() and migration-time CURRENT_TIMESTAMP
  (DEFAULT / ON UPDATE attribute positions excluded); run the check on
  direct pushes to main, not just PRs (item 16)
- embeddeddolt: TestSchemaAfterInit asserts dependencies.id has no
  DEFAULT, proving 0050's prepared DROP DEFAULT applies via dolt sql and
  settling the 0051-variant premise question (item 17)
- doctor dep-keys: failed repairs are counted and summarized as FAILED
  instead of Fixed, and the Dolt commit stages only the repaired tables
  instead of -Am sweeping the whole working set (item 19)

Remaining items are accepted with dispositions recorded on the issue.
Also gofmt cycles.go (left unformatted by the round-3 commit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 19:54:21 -04:00
Steve Yegge
5bdc8bc6e7 ci(migrations): enforce migration hygiene: dup versions, nondeterministic SQL, frozen shipped files (bd-6dnrw.15)
scripts/check-migration-hygiene.sh consolidates the inline duplicate-version
CI check and adds two guards derived from the Apr-Jun audit:

- Lint UUID()/NOW()/RAND() in migration SQL (the PR 4039 / #4259 root-cause
  class), with a justification-required allowlist grandfathering shipped
  files. Stale or unjustified allowlist entries fail CI.
- Freeze migration files that exist on the base branch (the PR 3991/3918/3942
  in-place-edit class): modification, deletion, or rename fails; fix forward
  with a new version. Complements the PR 4270 content hashes, which assume
  applied migration content never changes.

CODEOWNERS now routes migrations/ and the hygiene script to maintainers
(enforcement still needs the code-owner branch-protection toggle, tracked
under bd-6dnrw.23). Duplicate-version coverage now includes migrations/ignored/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 23:57:41 -04:00
Dustin Brown
9a1c88b63a
/{.github,docs,go,internal,scripts}: bump driver/dolt version to 2.1.4 (#4326)
* /{.github,docs,go,internal,scripts}: bump driver/dolt version to 2.1.4

* /default.nix: update hash
2026-06-08 11:31:14 -07:00
matt wilkie
1851ad85d6
fix(deps): deterministic dependency primary keys for cross-clone merge-safety (#4259)
Fixes #4259 by replacing clone-local dependency UUIDs with deterministic IDs derived from the dependency edge. Existing rows are backfilled, the random default is removed so missed insert paths fail loudly, and same-edge merge conflicts become normal resolvable row conflicts instead of unmergeable duplicate logical edges.

Agent-Signature: kilocode-gpt-5.5-unknown-reasoning on behalf of maphew
2026-06-07 14:47:58 -07:00
coffeegoddd☕️✨
f9a6f503c4 /{docs,website,scripts}: holy fuck again 2026-06-03 15:10:34 -07:00
matt wilkie
cea892d43f
docs: publish community tools on website (#4299)
* docs: publish community tools on website

Mirror docs/COMMUNITY_TOOLS.md into Docusaurus so the Pages build publishes it for the default released docs and unreleased docs without relying on manual copy steps.

Agent-Signature: codex-gpt-5.5-high on behalf of matt wilkie

* docs: publish core support docs on website

Mirror Sync Concepts, Labels, Metadata, Uninstalling, and Antivirus docs into Docusaurus and include them in the default released snapshot and LLM bundle.

Clarify that agent execution and verification metadata are examples of metadata as a schema extension point, not native issue fields.

Agent-Signature: codex-gpt-5.5-high on behalf of matt wilkie

* docs: clarify metadata examples

Replace local verification queue metadata with a tracker round-trip example so public metadata docs show upstream-aligned schema extension patterns.

Agent-Signature: codex-gpt-5.5-high on behalf of matt wilkie
---------
2026-06-03 13:44:47 -07:00
Julian Knutsen
9e8d411f71
Add PR CI wrapper command surface (#4211)
* ci: add PR wrapper command surface

* ci: collect wrapper timing in PR checks

* docs: record initial CI wrapper measurements

* ci: add manual measurement workflow

* ci: allow branch measurement dispatch

* ci: keep measuring independent commands after failures

* docs: record branch-dispatched CI measurement

* ci: keep measuring package suites after failures

* docs: record CI measurement batch

* fix: repair CI-measured test failures

* test: make local Go gates hermetic

* ci: add sharded integration measurement lane

* test: fix internal beads integration TestMain

* docs: record fixed integration shard measurement

* ci: add hybrid integration sharding measurement

* ci: speed up cmd/bd test shard discovery

* ci: add 16-way integration sharding measurement

* ci: measure prebuilt cmd bd sharding

* docs: record prebuilt sharding measurement

* docs: design CI build artifact stage

* docs: record repeat prebuilt integration measurement

* ci: add build artifact stage

* ci: reuse build artifact in linux test lane

* ci: promote main linux integration shards

* ci: gate legacy platform tests to main

* ci: satisfy workflow shell lint

* ci: ignore archived migrations in duplicate check

* ci: add package gate wrappers

* test: clean up testing short boundaries

* ci: allow unreleased version docs lag

* ci: gate releases on package checks

* ci: split workflow by tier

* ci: add aggregate PR gates
2026-05-29 18:52:53 -07:00
matt wilkie
801fb95d17
ci(release): guard against version/docs drift on release (#4247)
Root cause of the 1.0.5 incident: the beads-release formula's snapshot-docs
step is advisory prose, not enforced. A release can bump cmd/bd/version.go and
tag/push while skipping the Docusaurus snapshot, and nothing blocks publish, so
the drift only surfaces as a red main after artifacts ship.

Three layered guards:

A. Atomic bump — scripts/snapshot-release-docs.sh encapsulates the docs
   snapshot (docusaurus docs:version + lastVersion + regenerate CLI/llms +
   verify) as one idempotent unit. scripts/update-versions.sh now calls it so
   version.go and the docs snapshot cannot diverge (escape hatch: --skip-docs).
   The formula's snapshot-docs step now invokes the same script.

B. Pre-publish gate — release.yml gains a verify-version-consistency job that
   checks the tag matches version.go and runs check-versions.sh. goreleaser
   (and thus all downstream publish jobs) needs it; publish-pypi keeps its
   always() decoupling from goreleaser but is hard-gated on the verify result.
   Drift now blocks publish instead of redding main afterward.

C. Pre-push refusal — .githooks/pre-push runs check-versions.sh when a
   refs/tags/v* tag is pushed and refuses on drift, catching it on the
   developer's machine before CI. Installed via the existing core.hooksPath.

Verified: shellcheck clean; release.yml valid YAML; script guard paths and the
hook's branch/tag dispatch tested.

Refs: mybd-a5hn

Agent-Signature: claude-opus-4-8-medium on behalf of matt wilkie
2026-05-28 21:52:10 -07:00
matt wilkie
52a5ecf9e5
test(upgrade-smoke): exercise dependency blocker paths on migrated DB (#4238)
The upgrade-smoke gate created issues but never a dependency, so the
data-copy in 0041_split_dependencies_target only ran as DDL on an empty
table, and the rewritten ready_issues (0044) / blocked_issues (0045) views
plus the is_blocked backfill (0046/0047) got zero post-migration query
coverage. That is exactly the surface of the current `bd close` errno 1105
on a stale schema.

Add Scenario 6: create a blocker task + dependent bug, wire the dependency
with the PREVIOUS binary (so the row is written in the pre-split schema),
upgrade to candidate, then assert the migrated dependency survives and the
blocker paths work — bd ready, bd blocked, bd close all succeed, the
dependent is reported blocked pre-close and ready post-close.

Verified green against the real v1.0.4 -> candidate path (all 6 scenarios
pass).

Agent-Signature: claude-opus-4-8-high on behalf of matt wilkie
2026-05-28 15:30:21 -07:00
matt wilkie
602593b47d
fix(install): use declared module path for go fallback (#4215)
The repository has moved to gastownhall/beads, but released Go modules still declare github.com/steveyegge/beads. The installer fallback should use the declared module path, and the docs/check should keep future guidance from regressing.

_codex-gpt-5.5-medium on behalf of matt wilkie_
2026-05-27 21:48:24 -07:00
matt wilkie
14d9d28805
docs: gate llms-full freshness with CLI reference (#4182)
_codex-gpt-5.5-medium on behalf of CI Bot_

Co-authored-by: CI Bot <ci@beads.test>
2026-05-26 16:02:20 -07:00
matt wilkie
a90671ce0b
docs: check reference doc freshness (#4181)
_codex-gpt-5.5-medium on behalf of matt wilkie_
2026-05-26 15:59:12 -07:00
matt wilkie
ade96333fd
docs: guard plugin CLI reference pointer (#4177)
Record the plugin CLI reference as a pointer-only resource and extend the doc freshness check so it fails if that resource drifts back into a copied command reference.

_codex-gpt-5.5-medium on behalf of CI Bot_
Co-authored-by: CI Bot <ci@beads.test>
2026-05-26 15:31:24 -07:00
matt wilkie
458cf899c2
test(cmd/bd): route sync.Once test temp dirs through TestMain cleanup (#4108)
Five package-level sync.Once builders in cmd/bd/ called
os.MkdirTemp("", ...) with no corresponding cleanup, leaking
~179MB-1.4GB of test artifacts per run into $TMPDIR. On tmpfs
hosts (e.g. Fedora Atomic /tmp = 50% of RAM) this exhausted /tmp
after a few runs. Leaking sites:

  - test_repo_beads_guard_test.go   beads-bd-tests-*
  - test_helpers_pure_test.go       bd-init-test-*
  - init_embedded_test.go           bd-embedded-init-test-*
  - shared_server_integration_test  beads-shared-server-bd-*
  - init_permissions_test.go        bd-init-permissions-test-*
  - explicit_db_nodb_test.go        bd-testbin-*

Fix: anchor all six temp dirs under the existing TestMain tmp
parent via a new testTempDir helper. The defer in testMainInner
already calls forceRemoveAll on that parent (chmod-tolerant for
Go modcache 0444 files), so all six get cleaned in one place.

Also adds 'make clean-test-tmp' (scripts/clean-test-tmp.sh) for
sweeping orphans left by SIGKILLed test runs, and documents the
tmpfs caveat in AGENT_INSTRUCTIONS.md.

Fixes gastownhall/beads#4106 (bd-3q2u)

_amp-unknown-model-unknown-reasoning on behalf of matt wilkie_

Amp-Thread-ID: https://ampcode.com/threads/T-019e512d-edf1-72e3-a252-6328e63bff3f

Co-authored-by: Amp <amp@ampcode.com>
2026-05-22 16:48:22 -07:00
Julian Knutsen
8517ba1afa
test: add perf reference benchmarks (#4032)
* test: add perf reference benchmarks

* test: tighten perf reference benchmarks

* Fix perf benchmark review findings (bd-fsgqsj)
2026-05-19 18:39:13 -07:00
Dustin Brown
1866f161db
Merge pull request #3946 from coffeegoddd/db/1.88.1
/{docs,.github,internal,scripts}: dolt 1.88.1
2026-05-15 09:04:23 -07:00
coffeegoddd☕️✨
b4a88e029e /{docs,.github,internal,scripts}: dolt 1.88.1 2026-05-14 16:56:55 -07:00
Julian Palmerio
25703f8635
feat: add Copilot CLI setup recipe (#3839)
Adds `bd setup copilot` as a recipe-driven integration that installs a native Copilot CLI plugin manifest (.copilot-plugin/plugin.json) with SessionStart/PreCompact hooks and repository instructions (.github/copilot-instructions.md).

Co-authored-by: Julian Palmerio <julianpalmerio@hotmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-14 10:51:38 -07:00
matt wilkie
c97c416242
docs: publish v1.0.4 docs snapshot (#3845)
* docs: publish v1.0.4 docs snapshot

* release: guard docs version snapshots
2026-05-09 14:42:25 -07:00
matt wilkie
ec116c46f5
Consolidate docs evidence review inventory
Complete mybd-pnm docs evidence review.\n\n- Add verified docs disposition inventory and canonical seams.\n- Stage stale duplicate docs under docs/staged-for-removal with a manifest.\n- Refresh generated CLI docs and harden the generator for CRLF/stdin handling.\n\nFollow-up: mybd-xfr for automated docs freshness checks.
2026-05-09 07:21:46 -07:00
matt wilkie
01f57ee3df
test: fix release preflight harness checks
Fix release pre-flight harness checks found while validating v1.0.4.

- prefer initialized dbPath over inherited BEADS_DIR for no-DB commands
- update npm integration assumptions for grouped help and embedded Dolt behavior
- read Version from cmd/bd/version.go in upgrade smoke test
- resolve relative CANDIDATE_BIN before running candidate commands from temp workspaces
- skip hook/agent setup in upgrade smoke init to avoid old-version timeout paths
- seed worktree hook-path test before git worktree add

Fixes #3764.

Verification:
- go test -tags gms_pure_go ./cmd/bd -count=1
- npm --prefix npm-package run test:all
- ./scripts/release.sh 1.0.4 --dry-run
- go test -tags gms_pure_go ./...
- make test-upgrade

Note: local make test-regression timed out separately in TestEpicWithChildrenStatus after most scenarios passed; CI passed on this PR.
2026-05-07 10:30:35 -07:00
Julian Knutsen
7a1f7e4cde
fix(release): harden shipped release formula adoption (#3668) 2026-05-06 12:14:54 -07:00
matt wilkie
b2a4d1d04a
docs: generate CLI reference from live help (#3704)
* docs: generate CLI reference from live help

* docs(cli): move bd version stamp from per-command pages to index only

Drops the `(bd version X.Y.Z)` suffix from the auto-generated header on
every per-command CLI reference page (writeSingleCommandDoc) and the
docs/CLI_REFERENCE.md preamble (writeAllHelp). The version label now
lives only on the index page emitted by scripts/generate-cli-docs.sh:

- Dev tree (website/docs/cli-reference/index.md, docs/CLI_REFERENCE.md):
  labelled "Latest"
- Versioned snapshots (website/versioned_docs/version-X.Y.Z/...):
  labelled with the explicit semver tag parsed from the directory name

This eliminates the 100+-file no-signal diff a release version bump
otherwise produces, restoring the "regen as a separate small commit"
workflow PR #3704 enables. After this change a version bump alone
yields zero diff on the dev tree; only the new versioned snapshot
created at release-cut time carries the new tag. No datestamps are
introduced anywhere — scripts/generate-cli-docs.sh --check remains
deterministic across CI runs.

Refs: mybd-afb, PR #3704

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

---------

Co-authored-by: CI Bot <ci@beads.test>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 19:43:49 -07:00
matt wilkie
f3d57da63a
fix(release): ship beads-release formula (#3631)
Merged after maintainer review for release prep. CI was green and PR was approved.
2026-05-02 14:02:36 -07:00
Eugene Brevdo
43715adde7 Add shared Beads plugin package 2026-05-02 10:59:40 -07:00
matt wilkie
e2e4975044
Document supported go install modes (bd-o5a) (#3480)
- Removed bare first-party go install .../cmd/bd@latest guidance from docs,
    website docs, plugin/npm docs, examples, and doctor hints.
  - Standardized on:
      - CGO_ENABLED=0 go install ... for server-mode only
      - CGO_ENABLED=1 GOFLAGS=-tags=gms_pure_go go install ... for embedded-
        capable
  - Added scripts/check-go-install-guidance.sh and wired it into CI.
  - Updated default.nix to use gms_pure_go instead of ICU flags.

  Validation passed locally:

  - make test
  - golangci-lint run --build-tags=gms_pure_go ./...
  - ./scripts/check-go-install-guidance.sh
  - ./scripts/check-build-tags.sh
  - go test -tags gms_pure_go ./cmd/bd/doctor
  - doc flag check
2026-04-25 11:30:19 -07:00
matt wilkie
6e506b6ddd
Add PR preflight and contributor intake guidance (#3470)
* Handle legacy PR status contexts

* docs: add contributor PR intake checklist

* docs: wire PR preflight into agent guidance
2026-04-24 15:44:06 -07:00
Ben Madore
3b39ce577a
docs: update user-facing URLs from steveyegge/beads to gastownhall/beads
Co-authored-by: Ben Madore <823868+madorb@users.noreply.github.com>
2026-04-24 08:17:42 -07:00
matt wilkie
2ade22e84c
chore(build): codify the gms_pure_go build-tag policy (GH#3303)
Converges the sprinkle of -tags=gms_pure_go fixes into a single source plus a source-time CI guard. .buildflags is now canonical (exports GOFLAGS, CGO_ENABLED), scripts source it, scripts/check-build-tags.sh runs in CI to catch bare go commands. Fixes 5 latent bugs the guard caught (regression.yml, Makefile bench/test-regression, devcontainer, embedded-test-shard fallback, smoke-test scripts).
2026-04-16 12:28:11 -07:00
matt wilkie
5715f54ce4
feat: make CGO_ENABLED=0 the blessed go install path (GH#3303)
Option D from GH#3303. Routes go install users through CGO_ENABLED=0 as the simplest path (server-mode only, no C toolchain needed). install.sh falls back to nocgo if cgo install fails. Detailed nocgo error message guides users to server mode or an embedded-capable install. Updates INSTALLING.md and ICU-POLICY.md accordingly.
2026-04-16 12:06:31 -07:00
matt wilkie
df25aa9229
Rename ICU-only test path to explicit opt-in workflow (bd-b18) (#3291) 2026-04-16 08:54:24 -07:00
matt wilkie
fda23dc8e1
Default test/install helpers to gms_pure_go (#3259) 2026-04-14 10:05:07 -07:00
matt wilkie
df2078b56f
fix(ci): collapse multiline expression in cross-version-smoke workflow (#3189)
* fix(ci): collapse multiline expression in cross-version-smoke workflow

Multi-line plain YAML scalars are invalid — the ${{ }} expression
spanning multiple lines caused GitHub to reject the workflow file
immediately (0s, "workflow file issue") on every push to main.

Collapse to a single-line expression; semantics are unchanged.

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

* fix(ci): fix smoke test CWD, mode check, --silent compat, and prefix dots

Three independent bugs causing all 5 upgrade smoke scenarios to fail:

1. Smoke test CWD (root cause of most failures)
   - All `bd` invocations ran from the test script's CWD (the beads repo
     checkout), not from the isolated workspace $WS. This caused:
     * bd init to detect the beads repo's `origin` remote (has
       refs/dolt/data) and clone the entire beads Dolt database into $WS,
       corrupting the upgrade scenario and wasting minutes on chunk downloads.
     * `git config beads.role` to be written to the beads repo's git config
       instead of $WS's, so scenario 4's role check always failed.
   - Fix: add `prev()` and `cand()` helpers that cd into $WS before running.

2. `create --silent` not in binaries older than ~v1.1.0
   - --silent was added after the v1.0.0 release; calling it with older
     binaries silently failed (error to stderr, empty stdout), making every
     create attempt look like an init failure.
   - Fix: `prev_create()` helper tries --silent first, falls back to
     parsing any ID-like token from plain create output.

3. Mode preservation check used wrong path
   - Embedded Dolt stores data in `.beads/embeddeddolt/` (a directory).
     The test checked for `.beads/beads.db` (a file), which never exists
     in embedded mode, so the "DB exists before/after upgrade" assertions
     always failed.
   - Fix: `embedded_db_exists()` checks for either the directory
     (current embedded mode) or the legacy SQLite file.

Also fix issue_prefix dot sanitization in init.go (TestEmbeddedInit/
prefix_dot_sanitized): when a prefix like "GPUPolynomials.jl" is used,
`issue_prefix` stored in the DB must have dots replaced with underscores
(matching DoltDatabase sanitization), otherwise issue IDs contain dots.

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

* fix(ci): handle embedded-mode edge cases in upgrade smoke test

Three remaining failures after the CWD fix:

1. `storage.mode (not set)` treated as failure
   The `config get storage.mode` output includes the key name and "(not set)"
   when the config key doesn't exist. Embedded mode is the default and doesn't
   require an explicit setting, so any "not set" output should be accepted.
   Also accept the empty-string case that can arise with older config formats.

2. Embedded DB check too strict for v0.63.x
   v0.63.x was the first embedded-mode release; its init installed hooks and
   set beads.role correctly but may not have fully initialized the embeddeddolt/
   directory in CI due to early-release bugs. Changed the pre-upgrade check to
   verify `.beads/` directory exists (init ran) rather than the specific
   embeddeddolt/ subdirectory.

3. Create failures in old binaries treated as hard failures
   When an old binary cannot create issues (e.g. v0.63.x embedded init bug),
   the test now skips the data-migration and mutation checks with a `pass`
   (annotated as "skipped") rather than failing. The role-preservation and
   doctor checks still run.

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

* fix(ci): handle pre-embedded (server-mode) releases in smoke test scenario 3

v0.60.0-v0.62.0 used server mode and required an external Dolt server
to initialize. Without a running server in CI, their init installs hooks
but cannot create .beads/. The mode-preservation scenario was treating
this as a failure.

Change the pre-upgrade check in scenario 3 to skip gracefully when
.beads/ doesn't exist (old binary requires external server). The scenario
still runs candidate init and verifies the candidate defaults to embedded
mode — which is the meaningful test.

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 10:34:02 -07:00
matt wilkie
a61911f65b merge: resolve conflicts with main for PR #3146
- cross-version-smoke.yml: keep PR's matrix/PR-gate design over main's simpler version
- Makefile: incorporate main's test-cross-version and test-migration targets
- upgrade-smoke-test.sh: keep PR's Scenario 5 (mutation), SMOKE_VERSIONS multi-version mode, and gastownhall URL fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:30:03 -07:00
sahtechie-png
b599839bbb
fix: handle release archives that extract into a subdirectory (#3167)
Thanks @sahtechie-png for the thorough issue report and fix!
2026-04-10 11:05:30 -07:00
matt wilkie
9035839bc4 fix: smoke test mutations + add PR gate trigger (GH-2968)
Extends upgrade-smoke-test.sh with a mutation scenario (Scenario 5)
that runs bd update --notes after a version upgrade and verifies the
change persists. Adds cross-version-smoke.yml workflow with a
pull_request trigger (last 5 releases) for PR-time regression detection,
plus the existing tag-push trigger testing last 30 releases. Also fixes
the release download URL from steveyegge/beads to gastownhall/beads and
adds SMOKE_VERSIONS env var support for multi-version runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 10:37:46 -07:00
matt wilkie
164e25195e
fix: remove unsupported stepping-stone migration paths (#3073) (#3110)
Multi-hop upgrade paths through old releases are inherently broken
because intermediate binaries have bugs that cannot be patched
retroactively. Users should upgrade directly to the latest release.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:56:56 -07:00
matt wilkie
7916e029bc
fix: remove ICU runtime dependency from release binaries (#3066)
The gms_pure_go build tag already tells go-mysql-server to use Go's
stdlib regex instead of ICU-backed go-icu-regex. However, .buildflags
and the Makefile were unconditionally injecting ICU linker flags
(including -licui18n -licuuc -licudata on Linux), which re-introduced
the ICU shared-library dependency at link time.

This caused release binaries to require a specific ICU version
(e.g., libicui18n.so.74), making them non-portable across Linux distros
with different ICU versions.

Changes:
- .buildflags: Remove ICU flag injection; only export CGO_ENABLED=1
- Makefile: Replace ICU4C detection block with BUILD_TAGS := gms_pure_go;
  use the tag for all platforms (not just Windows)
- scripts/verify-cgo.sh: Add readelf check to fail if ICU shared-library
  dependency is present in ELF binaries
- scripts/install.sh: Add -tags gms_pure_go to build_from_source()

CGO remains enabled for embedded Dolt support. Only the ICU regex
backend is swapped for Go's stdlib regex, which is sufficient since
bd does not use SQL REGEXP functions.

Amp-Thread-ID: https://ampcode.com/threads/T-019d6450-7b10-77ee-b3d0-58e9474e61da

Co-authored-by: Amp <amp@ampcode.com>
2026-04-07 09:48:44 -07:00
Isaac Karrer
7f0a165f4e
feat(docs): version Docusaurus site and align llms-full with snapshots (#3033)
* feat(docs): version Docusaurus site and align llms-full with snapshots

Add docs version 1.0.0, version dropdown, lastVersion defaulting to stable,
merged markdown config, and RELEASING steps for future doc snapshots.
generate-llms-full.sh reads the latest entry in versions.json.

README links the published documentation site.

Closes #2644

Made-with: Cursor

* fix(docs): update org URLs to gastownhall and refresh 1.0.0 snapshot

- Update default orgName in docusaurus.config.ts from steveyegge to
  gastownhall to match the repo's new home
- Update hardcoded steveyegge URLs in generate-llms-full.sh
- Refresh versioned_docs 1.0.0 snapshot to include quickstart changes
  from #3032 which merged after the original snapshot was taken
- Regenerate llms-full.txt with corrected URLs and updated content

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

---------

Co-authored-by: matt wilkie <maphew@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 21:12:54 -07:00
matt wilkie
1c19151eba
docs: add cross-era migration instructions to upgrading guide (#3081)
docs: add cross-era migration instructions to upgrading guide
2026-04-06 20:11:00 -07:00
matt wilkie
8d94fafd0c
fix: preserve dependencies and labels in SQLite-era JSONL migration (#3079) (#3082)
All three test plan items verified:
- Migration harness: 0 fidelity violations, deps and labels replayed correctly
- Graceful skip for absent tables confirmed
- Unit tests pass (unrelated /tmp disk quota failures only)
2026-04-06 20:08:55 -07:00
Dustin Brown
b84ab143c8
Merge pull request #3074 from coffeegoddd/db/shared-schema
fix(dolt,embeddeddolt): unify schema between stores, optimize ignored tables schema recreation
2026-04-06 16:54:23 -07:00