Repository navigation
ci: restore the gitignored migration fixtures and fix the config cache leaking across homes - #48
Merged
Merged
Conversation
…e leaking across homes `go test ./...` failed on every checkout of main, and only on CI, because of two independent bugs. 1. The migration fixtures were never committed. `.gitignore` had an unanchored `AGENTS.md` rule under "local agent/editor tooling", which also matched the fake agent homes under `internal/migrate/testdata` (nanobot, openclaw, openhuman, zeroclaw, nanoclaw all ship their own AGENTS.md, and OpenHuman's memory.db fell under `*.db`). The files existed only on the machine that wrote the goldens, so every golden test that rendered them failed everywhere else. Anchoring the rule to `/AGENTS.md` and un-ignoring the fixture `.db` restores them, and this commit adds the fixture files themselves. Fixture contents were rewritten to the byte lengths the committed goldens record (113/42/42/80 chars, and the two role prompts), so the only golden lines that move are the `sha=`/`prompt_sha=` fingerprints those bytes feed. No assertion, expectation or status changed: every item is still ready/conflict exactly as before. 2. `config.Load()` served its cached config without checking which home it came from. Tests that set ANTARES_HOME per test got the previous test's config, so `TestDevicePairCLI` read the port from `TestDaemonStateRoundTripAndStaleCleanup`'s config.yaml (1 instead of 18999) and failed depending on test order. The cache now records the home and config path it was loaded from and only serves itself while both still match. This is a real bug outside tests too: anything that changes ANTARES_HOME or ANTARES_PROFILE in-process got stale settings. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
go test ./...fails on every checkout ofmain, and only on CI. Two independent causes, both fixed here; no test is skipped, weakened or deleted.1. The migration fixtures were never committed
.gitignorehad an unanchoredAGENTS.mdline under "local agent/editor tooling". Unanchored, it also matched the fake homes of other agents underinternal/migrate/testdata— nanobot, OpenClaw, OpenHuman and ZeroClaw all keep their ownAGENTS.md, and OpenHuman'smemory/memory.dbfell under*.db.Evidence:
So the files existed only on the machine that wrote the goldens, and
TestNanobotPlanGolden,TestNanobotConflicts,TestNanoclawDetect,TestNanoclawPlanV2,TestOpenClawPlan,TestOpenhumanDetect,TestOpenhumanPlan,TestZeroclawDetectandTestZeroclawPlanfailed everywhere else.The fix anchors the rule to
/AGENTS.md(repo root only) and un-ignores the fixture.db, then commits the fixtures themselves.About the golden updates
Four goldens change, and every changed line is a fingerprint of the restored fixture bytes:
nanobot/plan.goldenagents_mdsha=openclaw_plan.txtagents_mdsha=,role:workprompt_sha=openhuman/plan.goldenagents_mdsha=zeroclaw/plan_v3.goldenagents_mdsha=,role:coderprompt_sha=The original bytes are not recoverable — they were never in git history and no dangling blob holds them, so the fixtures are reconstructed. What is recoverable is exact: each golden records the trimmed byte length of the text it rendered (113 / 42 (x2) / 80 chars) and the NanoClaw memory entry's own text, so the reconstructions hit those lengths to the byte. Only
ContentHashoutput moved; every status, reason, count, order and summary line in those goldens is byte-identical, and the OpenHumanmemory.dbwarning and both role items are preserved (the first attempt at-updatesilently dropped them, which is how this was caught). Run with-updatetwice and the diff is empty.2.
config.Load()served a config from the wrong homeThe cache ignored which home it came from, so tests that set
ANTARES_HOMEper test got the previous test's config:TestDevicePairCLIsetsANTARES_PORT=18999, butLoad()returned the config cached for the previous test's home, whoseconfig.yamlpins port 1. Run alone, it passes. This is a real bug beyond tests: anything that changesANTARES_HOME/ANTARES_CONFIGin-process got another directory's settings. The cache now records the home and config path it was loaded from and only serves itself while both still match.Verification
go vet ./...clean,go test ./...green (previously 10 failures)git status --ignoredundertestdatais empty — nothing else is silently missing· N charsCI on this PR is the real check: the
smokejob has been skipped onmainfor weeks because it needsgoandweb, so it runs again here.