fix: prevent bot-weapons smoke test from dirtying checked-in artifact#15
Merged
fix: prevent bot-weapons smoke test from dirtying checked-in artifact#15
Conversation
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>
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.
Summary
export:bot-weaponsCLI smoke test was overwriting the committedbot-weapon-recommendations.jsonwith a freshgenerated_attimestamp, causingmake checkto always produce a dirty working tree in CIargv[2]) toexport-bot-weapons.mjsso the default behavior is unchangedTest plan
make checkcompletes with no unintended file changesnpm run export:bot-weaponsstill writes to the default path🤖 Generated with Claude Code