Skip to content

fix: prevent bot-weapons smoke test from dirtying checked-in artifact#15

Merged
hummat merged 4 commits intomainfrom
fix/bot-weapons-test-timestamp
Mar 23, 2026
Merged

fix: prevent bot-weapons smoke test from dirtying checked-in artifact#15
hummat merged 4 commits intomainfrom
fix/bot-weapons-test-timestamp

Conversation

@hummat
Copy link
Copy Markdown
Owner

@hummat hummat commented Mar 23, 2026

Summary

  • The export:bot-weapons CLI smoke test was overwriting the committed bot-weapon-recommendations.json with a fresh generated_at timestamp, causing make check to always produce a dirty working tree in CI
  • Added optional output path argument (argv[2]) to export-bot-weapons.mjs so the default behavior is unchanged
  • Updated the smoke test to write to a temp directory and clean up after itself

Test plan

  • All 850 tests pass
  • make check completes with no unintended file changes
  • npm run export:bot-weapons still writes to the default path

🤖 Generated with Claude Code

hummat and others added 4 commits March 22, 2026 18:36
The CLI smoke test ran export-bot-weapons.mjs without redirecting output,
overwriting the committed JSON with a fresh generated_at timestamp. This
caused make check to always produce a dirty working tree in CI.

Accept an optional output path via argv[2] and write the smoke test to a
temp directory instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CI was doing `git clone --depth 1` which fetches the latest commit,
but the project pins a specific revision in manifest.json. When the
upstream repo advances, the shallow clone gets a mismatched SHA and
edges-build fails with "Pinned source snapshot mismatch".

Read the pinned SHA from the manifest and fetch exactly that commit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The extract scripts (breed-data, stagger-settings, damage-profiles)
write to data/ground-truth/generated/ which is gitignored. On a fresh
CI checkout the directory doesn't exist, causing ENOENT failures.

Add mkdirSync with recursive:true before each writeFileSync, matching
the pattern already used by build-ground-truth-index.mjs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests in extract-breed-data.test.mjs read stagger-settings.json from
the generated directory, but stagger:build was not included in the
make check target. On fresh CI checkouts the file doesn't exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hummat hummat merged commit 253f94a into main Mar 23, 2026
1 check passed
@hummat hummat deleted the fix/bot-weapons-test-timestamp branch March 23, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant