Commit graph

199 commits

Author SHA1 Message Date
Harry Miller
9ca6b51b47
ci(nix): auto-update default.nix vendorHash on dependabot Go bumps (#3804)
* chore: track workflow formulas for portability

Force-add gh-issue-to-pr and gh-pr-review formulas so they can be
cloned to new machines. These live in .beads/formulas/ which is
normally gitignored, but formulas are code (not database state).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore: untrack workflow formulas

Remove gh-issue-to-pr and gh-pr-review formulas from git tracking.
These are already covered by .gitignore (.beads/) and shouldn't be
sent upstream.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci(nix): auto-update vendorHash for dependabot Go bumps (beads-bz5)

Dependabot Go-module bumps consistently fail the `nix build .#default`
CI gate because default.nix has a hardcoded vendorHash that any
go.mod/go.sum change invalidates. PRs sit stuck for days (#3468, #3637,
#3638 currently affected) until a maintainer manually computes the new
hash. This workflow detects the drift, runs the existing
scripts/update-nix-vendorhash.sh, and pushes the hash bump back to the
dependabot branch.

Uses pull_request_target because GITHUB_TOKEN is read-only on
pull_request workflows triggered by dependabot. Safety guards: only
runs when actor and PR user are both dependabot[bot] AND the PR head
is on the upstream repo (dependabot never opens PRs from forks).

Caveat documented in CONTRIBUTING.md: GitHub does not retrigger
pull_request workflows on GITHUB_TOKEN-authored commits, so a
maintainer may need to re-run nix-build once after the auto-fix push.
The workflow's own success serves as the green signal that the hash
is correct.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 15:36:16 -07:00
coffeegoddd☕️✨
24a1a93b0a /.github/workflows/ci.yml: run tests in CI 2026-05-19 16:09:43 -07:00
Julian Knutsen
598a4d2da8 fix(ci): use app token for flake lock PRs 2026-05-17 01:41:16 +00:00
Julian Knutsen
78cacb92ac Revert "fix(ci): create flake lock PRs from fork"
This reverts commit 26a7a96ca5.
2026-05-17 01:03:25 +00:00
Julian Knutsen
26a7a96ca5 fix(ci): create flake lock PRs from fork 2026-05-17 01:02:20 +00:00
coffeegoddd☕️✨
b4a88e029e /{docs,.github,internal,scripts}: dolt 1.88.1 2026-05-14 16:56:55 -07:00
seanmartinsmith
d07112bde7
docs: add lightweight PR description template (#3750)
adds .github/PULL_REQUEST_TEMPLATE.md with three short sections (What /
Why / Verification) and references it from CONTRIBUTING.md's Pull
Request Hygiene list.

scaffolding only - no checkboxes, no required fields, no enforcement.
contributors can replace or delete sections freely. helps reviewers
(human or agent) parse intent before diving into the diff and gives
AI-generated PRs a predictable shape to fill.

Fixes #3748
2026-05-06 12:32:16 -07:00
coffeegoddd☕️✨
6a2f851a46 /{.github,internal}: remove comments, install dolt in ci 2026-05-06 11:22:36 -07:00
matt wilkie
73507cfa6c
ci(regression): pull Dolt sql-server image so tests use shared container (#3737)
Without a cached `dolthub/dolt-sql-server:1.86.0` image,
`isDoltImageCached()` returns false in `internal/testutil/testdoltserver.go`,
`EnsureDoltContainerForTestMain` warns and skips, and `testDoltServerPort`
stays 0. The regression suite then falls back to embedded Dolt per workspace
with `HOME=<t.TempDir()>`, where lockfile/journal writes can race
`os.RemoveAll` during test cleanup.

Observed failure on main run 25413410192 (commit #3735):

    --- FAIL: TestCreateWithParentFlag (2.65s)
        testing.go:1464: TempDir RemoveAll cleanup:
          unlinkat /tmp/TestCreateWithParentFlag2554405098: directory not empty

The test logic passed; the failure was in the framework's TempDir cleanup.
The very next push (#3704) ran clean with no related code changes,
confirming this is environment-dependent flake, not a regression.

Pulling the image up front lets `TestMain` use the shared sql-server
container, removing the per-workspace embedded-Dolt path entirely.
The image tag must stay in sync with `DoltDockerImage` in
`internal/testutil/testdoltcommon.go`.
2026-05-05 20:22:01 -07:00
matt wilkie
87e698ad90
ci(docs): add --fallback-extensions html to lychee link check (#3736)
Docusaurus is configured with `trailingSlash: false`, which emits
`installation.html` etc. rather than `installation/index.html`. The
rendered HTML, however, uses extensionless links like
`/beads/getting-started/installation`. In offline mode lychee resolves
those literally against `website/link-check-root/` and reports them as
missing files.

Adding `--fallback-extensions html` tells lychee to retry with the
`.html` suffix when a bare-path target is not found, matching how the
deployed GitHub Pages site actually serves these URLs.

Verified locally: lychee reported 26,877 link errors before this change
and 0 after. Restores the Deploy Documentation workflow which has been
red on main since 2026-04-07.
2026-05-05 20:17:54 -07:00
matt wilkie
539fb64526
test(cmd/bd): build-tag cgo-only test helpers so pure-go tests compile (#3716)
The cmd/bd test package was wedged: a handful of test files (init_test.go,
bootstrap_test.go, test_helpers_test.go) carry //go:build cgo because they
pull in internal/storage/dolt, database/sql, and the embedded Dolt server.
Their helpers — captureStdout, captureStderr, stdioMutex, ensureTestMode,
saveAndRestoreGlobals, buildBDForInitTests, runGitForBootstrapTest, and
friends — are pure Go in body but were stranded behind the cgo tag along
with the heavy ones.

Untagged test files (dolt_test.go, init_safety_test.go, where_test.go)
called those helpers directly, so the entire cmd/bd test binary failed to
compile under CGO_ENABLED=0 with the gms_pure_go tag:

    cmd/bd/dolt_test.go:1237:10: undefined: captureStdout
    cmd/bd/init_safety_test.go:230:11: undefined: buildBDForInitTests
    cmd/bd/init_safety_test.go:233:2: undefined: runGitForBootstrapTest
    ...

PR #3704 (CLI docs from live help) added cmd/bd/help_all_test.go with
TestHelpList/TestHelpAll/TestHelpDoc — a pure-Go test that should run
without cgo. With cmd/bd's test binary uncompilable under CGO_ENABLED=0,
those tests were silent: codecov dropped patch coverage to 75% partly
because the new tests literally could not run via go test.

Fix: extract the pure-Go subset of test helpers into a new untagged file
test_helpers_pure_test.go and remove the duplicate definitions from the
cgo-tagged files. The cmd/bd test binary now compiles cleanly under
CGO_ENABLED=0 -tags gms_pure_go, and untagged test files no longer need
their own //go:build cgo because the helpers they call are available
without cgo.

CI lock-in: a new check-cmd-bd-puregeo-tests job in .github/workflows/ci.yml
compiles cmd/bd with CGO_ENABLED=0 and runs the pure-Go test subset, so a
regression that re-introduces cgo coupling fails fast at PR time rather
than silently neutering pure-Go tests.

Refs: mybd-ycx, GH#3683, PR #3704

Co-authored-by: CI Bot <ci@beads.test>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 20:12:58 -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
dependabot[bot]
33235723df
chore(deps): bump actions/setup-go from 5.6.0 to 6.4.0 (#3636)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.6.0 to 6.4.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5.6.0...4a3601121dd01d1626a1e23e37211e3254c1c06c)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-05 14:33:42 -07:00
dependabot[bot]
24486d142d
chore(deps): bump DeterminateSystems/determinate-nix-action (#3635)
Bumps [DeterminateSystems/determinate-nix-action](https://github.com/determinatesystems/determinate-nix-action) from 3.18.1 to 3.19.0.
- [Release notes](https://github.com/determinatesystems/determinate-nix-action/releases)
- [Commits](92ffb5400c...f4c468f228)

---
updated-dependencies:
- dependency-name: DeterminateSystems/determinate-nix-action
  dependency-version: 3.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-05 14:32:58 -07:00
matt wilkie
f481b76733 Keep Nix CI smoke test local (bd-7mh.6) 2026-04-28 07:24:43 -07:00
matt wilkie
e9ebb2bc4d Fix Nix CI Go toolchain selection (bd-7mh.6) 2026-04-28 07:00:35 -07:00
julianknutsen
d3cb80c3a9 chore: harden release and dependency security 2026-04-28 08:45:22 +00:00
matt wilkie
cc31c6046e
Rebalance embedded cmd CI shards (bd-8zg) (#3499) 2026-04-25 17:58:51 -07:00
Julian Knutsen
2cd8864d3d
ci: mint Homebrew tap token from GitHub App (#3472)
* ci: mint Homebrew tap token from GitHub App

* ci: gate release publishing to tag refs
2026-04-25 14:47:29 -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
matt wilkie
ecd2f7268c fix packaging and windows install regressions
Fixes #3388
Fixes #3399
Fixes #3404
Fixes #3454

Co-authored-by: jasononeil <315158+jasononeil@users.noreply.github.com>
Co-authored-by: seanmartinsmith <114885497+seanmartinsmith@users.noreply.github.com>
2026-04-24 11:48:39 -07:00
matt wilkie
26829ee66d ci: install dolt in regression workflow 2026-04-24 10:18:09 -07:00
Steven Syrek
c6d0cc2fd9
fix(init): refuse --force when remote has Dolt history (#3455)
* fix(init): refuse --force when remote has Dolt history

bd init --force in a repo whose origin has refs/dolt/data silently
skipped the bootstrap-from-remote path and then wired origin as a Dolt
remote anyway. The next write auto-pushed an orphan history, failing
with "no common ancestor". Recovery options were all destructive.

This change:

- Adds --reinit-local (named-intent replacement for --force) and
  --discard-remote (explicit cross-boundary authorization).
- Routes --force to --reinit-local with a DeprecationWarning. --force
  continues to work for ≥2 releases.
- Refuses bd init --force / --reinit-local when origin has
  refs/dolt/data, unless --discard-remote is also passed. Exit code 10
  (ExitRemoteDivergenceRefused).
- Adds stable numeric exit codes for init refusals (10/11/12).
- Adds bd init-safety documenting the full flag surface and the
  destroy-token format.
- Adds an internal race-safety re-check: if remote state changes
  during the TTY confirmation window, abort rather than overwrite.
- Retrofits the existing destroy-token echo at init.go:231 to not
  print a copy-pasteable destructive invocation, matching the new
  error-text-no-echo ADR invariant.

Adds:
- cmd/bd/init_safety.go — CheckRemoteSafety chokepoint (pure fn).
- cmd/bd/init_safety_test.go — guard matrix (13 cases) + subprocess
  regression test with a synthetic refs/dolt/data fixture.
- docs/adr/0002-init-safety-invariants.md — ADR encoding the five
  invariants (single-source identity, scope-bound --force, central
  chokepoint, error-text-no-echo, race-safety).
- docs/RECOVERY.md — named recovery playbooks per refusal exit code.
- .github/CODEOWNERS — review ownership for init*.go pointing at the
  ADR so future flags must extend the guard matrix.

Historical pattern (git log for cmd/bd/init.go): 8+ prior commits
patched individual surfaces of this class without encoding the
invariant. The guard matrix test is the structural hedge — adding a
new flag or data source is a signal to extend the table, not to add
another `&& !someFlag` at the call site.

(bd-q83)

* fix(init): satisfy lint for origin safety helpers (bd-main-nwo)

---------

Co-authored-by: matt wilkie <maphew@gmail.com>
2026-04-24 09:01:35 -07:00
matt wilkie
04ec3f52b9
Tier embedded Dolt CI for PRs (bd-0gz) (#3459) 2026-04-24 07:53:23 -07:00
Steven Syrek
f0057c7828
ci: install dolt binary on Linux and macOS test runners (#3440)
* ci: install dolt binary on Linux and macOS test runners

Install dolt via the official install.sh on Linux and via Homebrew on
macOS so the main test job can exercise the ~24 test gates that
previously silently skipped on every PR when dolt was absent from PATH.

Matches the installation pattern already used by nightly.yml.
Docker-testcontainer gates (testDoltServerPort == 0 skips) remain
skipped — a known GitHub Actions hang documented in
scripts/repro-dolt-hang/INCIDENT-REPORT.md and nightly.yml:37-41
prevents enabling testcontainers here.

* test: require dolt binary under GITHUB_ACTIONS

Add testutil.RequireDoltBinary: skips when the dolt CLI is absent
locally but fails the test under GITHUB_ACTIONS. Replace bare
exec.LookPath("dolt") skip-gates with the helper so ~24 tests that
previously fell through silently in CI now run — and hard-fail if
the CI workflow ever drops the dolt install step.

tests/regression/regression_test.go uses an inline variant because
its gate lives in TestMain, and internal/remotecache/cache_test.go
duplicates the helper inline to avoid an import cycle
(testutil -> doltutil -> remotecache).
2026-04-24 06:58:40 -07:00
coffeegoddd☕️✨
b76947f46b /.github/workflows/ci.yml: update comment 2026-04-22 12:18:12 -07:00
matt wilkie
15f31dc073
ci: don't fail workflows when codecov upload has no token (#3386)
Forked-PR workflow runs don't have access to CODECOV_TOKEN, so the
codecov/codecov-action@v6 Upload steps exit with "Token length: 0" and
the action's internal CLI fails. Despite fail_ci_if_error: false, the
action still surfaces a non-zero exit to the job, causing Test
(ubuntu-latest) to appear red on every external-contributor PR.

Add continue-on-error: true at the step level on all three codecov
Upload steps (ci.yml Upload coverage, ci.yml Upload test results,
nightly.yml Upload coverage). This guarantees the step is treated as
successful regardless of what the action's internal wrapper does —
belt-and-suspenders on top of fail_ci_if_error: false.

Verified against multiple affected PRs:
 - 3300 (taheris, Unix socket support)
 - 3214 (pstradowski, formula custom types — merged anyway)
 - 3255 (harry-miller, Linear round-trip — merged anyway)
 - 3197 (sjsyrek, husky hook layout)

All had their actual go test step pass; only codecov upload failed.

This is workflow-only; no Go code changes.
2026-04-20 18:31:56 -07:00
matt wilkie
b90ee4cf4c
ci: add nix build check to catch vendorHash drift (GH#3298) (#3364)
Adds a CI job that runs `nix build .#default` on PRs touching go.mod,
go.sum, default.nix, flake.nix, or flake.lock, so dependabot bumps
that invalidate vendorHash fail loudly in CI instead of silently
breaking Nix users on main (as happened in GH#3221).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 13:21:53 -07:00
dependabot[bot]
a6152f71e9
chore(deps): bump actions/checkout from 4 to 6 (#3320)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 14:44:15 -07:00
dependabot[bot]
5a51e330f3
chore(deps): bump actions/upload-pages-artifact from 4 to 5 (#3318)
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 14:43:49 -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
66af62221e
fix(ci): drop ICU linkage from test jobs, use -tags gms_pure_go everywhere (#3240)
* fix(ci): drop ICU linkage from Linux/macOS test jobs (bd-sz5, GH#3506)

Align the CI test matrix with how we ship: all Go build/test invocations
now use -tags gms_pure_go, matching the Windows job, goreleaser, and the
install scripts. Remove libicu-dev / icu4c installs and CGO_* env setup
from ubuntu-latest and macos-latest jobs in ci.yml, plus nightly,
migration-test, and cross-version-smoke workflows.

Upstream dolthub/go-mysql-server#3506 confirmed -tags=gms_pure_go is the
sanctioned escape hatch; testing an ICU-linked config nobody installs was
wasting CI minutes and producing spurious duplicate-rpath / malformed
LC_DYSYMTAB linker warnings on macOS.

Update docs/ICU-POLICY.md to reflect that the CI matrix no longer
intentionally omits the tag; scripts/test-cgo.sh remains as the local
developer tool for exercising the ICU code path on demand.

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

* fix(ci): add -tags gms_pure_go to test-helper go build shell-outs (bd-sz5)

Addresses review feedback on 7b36ab653. Several integration tests shell
out to `go build ./cmd/bd` (or `go build .`) from TestMain / t.Helper
setup functions. The outer `go test -tags 'integration gms_pure_go'`
tag does not propagate into these subprocesses, so the inner builds were
still trying to link ICU and failing with
`unicode/uregex.h: No such file or directory` in the nightly workflow.

Repo-wide audit of `exec.Command("go", "build", ...)` test helpers:
- internal/beads/beads_hash_multiclone_test.go (reviewer's cite)
- tests/regression/regression_test.go
- cmd/bd/protocol/helpers_test.go
- cmd/bd/doctor/dolt_e2e_test.go
- cmd/bd/{scripttest,import_prefix,explicit_db_nodb,init_embedded,
  main,init,cli_fast,shared_server_integration,doctor_repair,
  dolt_autostart_lifecycle_integration}_test.go

All 15 call sites now pass `-tags gms_pure_go`. `cmd/bd/preflight.go`
is production code (`bd preflight` user command), not a test helper,
and is intentionally left as-is.

Also narrow docs/ICU-POLICY.md "Common Mistakes" #3 -- libicu-dev is
needed only for local on-demand testing via scripts/test-cgo.sh, not
for CI test workflows (which no longer exercise the ICU path).

Verified: `go test -tags 'integration gms_pure_go' -run '^$' ./...`
passes cleanly from the worktree root (previously failed in
internal/beads).

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

* fix(preflight): add -tags gms_pure_go to test/lint shell-outs (bd-sz5)

preflight is a beads-maintainer pre-PR tool. On dev machines without
ICU dev libraries installed, `bd preflight --check` was failing at the
`go test -short ./...` step with the same `unicode/uregex.h` error we
fixed in nightly CI (bd13871bd).

Apply the gms_pure_go tag consistently:
- runTestCheck: `go test -tags gms_pure_go -short ./...`
- runLintCheck: `golangci-lint run --build-tags=gms_pure_go ./...`
- Update the user-visible Command labels to match
- Update the static checklist printed by `bd preflight` (no --check)
  so copy-pasted commands work on no-ICU machines

Matches the tag golangci-lint is now passed in CI, keeping local and
CI runs consistent.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 10:01:46 -07:00
matt wilkie
9211e73f2b
fix(ci): remove Microsoft apt repos before apt-get update (#3224)
* chore(bootstrap): remove unreachable nil-cfg guard in finalizeSyncedBootstrap

The caller chain (bootstrapCmd.Run → executeBootstrapPlan → executeSyncAction)
guarantees cfg is non-nil via DefaultConfig() fallback at bootstrap.go:178-180.

Follow-up to #3203.

Amp-Thread-ID: https://ampcode.com/threads/T-019d7fee-1326-74af-a566-9c45ad5b349e
Co-authored-by: Amp <amp@ampcode.com>

* fix(ci): remove Microsoft apt repos before apt-get update

GitHub's ubuntu-latest runners include Microsoft package repos
(azure-cli, microsoft-prod) that intermittently return 403 Forbidden,
causing apt-get update to fail and breaking the Install ICU4C step.

Remove these unused repo files before apt-get update in all workflows
(ci.yml, cross-version-smoke.yml, nightly.yml).

Amp-Thread-ID: https://ampcode.com/threads/T-019d83a9-4273-711e-be59-1ed089de1c65
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-04-12 20:28:23 -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
94992a24df fix(ci): correct action versions in cross-version smoke workflow
actions/checkout@v6 and actions/setup-go@v6 don't exist; use @v4 and @v5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:56:26 -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
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
530ffbc636
fix(ci): remove BEADS_TEST_MODE override and add gms_pure_go tag in migration-test (#3106) (#3108)
The workflow was setting BEADS_TEST_MODE=1 which disables Dolt auto-start,
breaking all server-era versions (v0.50-v0.62). Commit 4fc04597 intentionally
defaulted the harness to 0 but the workflow was not updated.

Also adds -tags gms_pure_go to the candidate build, consistent with
build_candidate() in binary.sh.

Fixes #3106

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:28:20 -07:00
matt wilkie
e3a3bb9bdc
fix(ci): resolve lychee baseUrl mismatch with symlink-based root directory (#3105)
The previous --remap approach didn't work because lychee resolves file://
URIs directly against the filesystem, ignoring remaps.

Instead, create a wrapper directory with a symlink:
  website/link-check-root/beads → website/build

This makes --root-dir website/link-check-root resolve /beads/foo to
website/link-check-root/beads/foo → website/build/foo correctly.

The symlink is outside website/build, so it doesn't affect the Pages
artifact upload.

Amp-Thread-ID: https://ampcode.com/threads/T-019d68c4-3efa-71bf-aa9d-6e25fc48fb9a

Co-authored-by: Amp <amp@ampcode.com>
2026-04-07 12:21:40 -07:00
matt wilkie
7fe590d637
fix(docs): repair broken links failing Deploy Documentation CI (#3103)
- architecture/index.md: /docs/DOLT.md → #dolt-server-mode anchor
- core-concepts/index.md: /core-concepts/dolt-server and /dolt-sync → anchor links (pages never existed)
- reference/configuration.md: /docs/CONFIG.md → GitHub source link
- deploy-docs.yml: add lychee --remap to strip /beads/ baseUrl prefix from internal links
- Apply same fixes to versioned_docs/version-1.0.0/

Amp-Thread-ID: https://ampcode.com/threads/T-019d68c4-3efa-71bf-aa9d-6e25fc48fb9a

Co-authored-by: Amp <amp@ampcode.com>
2026-04-07 10:17:55 -07:00
matt wilkie
6f15e70a2f
ci: add merge_group support and cancel stale runs (#3069) 2026-04-06 14:51:41 -07:00
matt wilkie
e4fca03f6b
feat: add migration test harness for cross-era upgrade fidelity (#3067)
* wip: add migration test harness for cross-era upgrade fidelity

Rich dataset generator, field-level fidelity checker, and migration
recipes for SQLite/Dolt-server/embedded-Dolt eras. Addresses GH#2938
upgrade pain by testing and documenting working upgrade paths.

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

* fix: snapshot JSON format handling and self-test mode

- show --json returns array, not object — use jq array concatenation
- Field is issue_type not type in bd JSON output
- Normalize empty comment_count to 0 (show vs list field differences)
- Add --self-test flag for harness validation without old binaries
- Fix local variable outside function in self-test block

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

* ci: re-trigger Kilo Code Review

* address review: timeouts, env var docs, quoting

- Add BD_OP_TIMEOUT (30s) for bd operations via timeout(1)
- Add DOWNLOAD_TIMEOUT (60s) for curl binary downloads
- Document all environment variables in run.sh header
- Convert init_flags from word-split string to proper bash array

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

* fix: fall back to source build when release binary has missing shared libs

Downloaded release binaries dynamically link ICU (libicui18n.so.74),
which isn't available on all systems. Now download_binary verifies the
binary actually runs, and falls back to building from source with
gms_pure_go tag when it doesn't. Also applies gms_pure_go to
build_candidate for consistency.

Ref: gastownhall/beads#3065

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:30:35 -07:00
Dustin Brown
8269ab7791
fix: add gms_pure_go tag to linux-amd64 build to remove ICU runtime dep (#2991)
The linux-amd64 release binary was the only CGO-enabled target missing
the gms_pure_go build tag, causing it to dynamically link against the
CI runner's libicui18n.so.74. Users on distros with newer ICU (e.g.
Arch with ICU 78) got "cannot open shared object file" errors.

Add the tag to match all other targets (linux-arm64, darwin, etc.),
remove the now-unnecessary libicu-dev from the release workflow, and
add a post-build ldd check to catch ICU linkage regressions.

Fixes #2986

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 17:21:16 -07:00
matt wilkie
a3923edf41 fix: narrow cross-version smoke CI triggers and warn on high skip rate
Remove push-to-main and PR triggers from cross-version smoke test
workflow — 30-45 min runtime is too costly for every push. Keep tag
pushes (releases/RCs) and manual dispatch.

Add a visible warning when >80% of tested versions are skipped, printed
to stderr and GitHub step summary. Prevents silent "all passed" when
nearly nothing actually ran.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 23:17:34 -07:00
Dmitry Verkhoturov
c9cefec85f
add tag trigger to cross-version smoke test workflow 2026-04-04 16:14:46 +00:00
Dmitry Verkhoturov
5eca896bd4
add pull_request trigger to cross-version smoke test workflow 2026-04-04 16:11:17 +00:00
Dmitry Verkhoturov
f7007967cb
fix: proper failure reporting for cross-version smoke test
- run old binaries from workspace cwd (not --db flag, breaks old versions)
- install dolt in CI for server-mode versions (v0.56-v0.62)
- fix pipefail handling that silently killed the script mid-run
- add results table output and GitHub Actions step summary
- report real failures instead of silently skipping broken upgrades
2026-04-04 16:05:40 +00:00
Dmitry Verkhoturov
48f611ab65
add cross-version smoke test for upgrade compatibility (GH#2968)
Tests that data created with old bd versions (epic, issues, dependencies)
is readable after upgrading to the candidate binary. Covers the last 30
release tags by default, with --from flag for broader sweeps.
2026-04-04 15:23:24 +00:00
beads/crew/emma
72170267e0 ci: fix macOS smoke test temp dir with dots in name
mktemp on macOS creates dirs like tmp.XXXXXXXX which contain dots.
Dots are invalid in Dolt database names. Use a clean subdirectory
with an explicit --prefix for the smoke test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 22:29:09 -07:00