You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: smoke-test that the compiled CLI embeds the rules-version hash #542
Follow-up from a review of the rule-cache key change. The rules-version hash is computed by a Bun macro at build time, and nothing checks that a compiled squirrel binary actually embeds it rather than computing it at runtime.
Acceptance Criteria
A CI step builds the CLI binary and asserts the embedded rules-version hash equals the one computed from the source tree
Changing a rule source file changes the embedded hash (the step proves it with a scratch edit, or a unit test of the macro input set)
Checked against 0.0.108 and current main (ad95fb2): criterion 1 STILL TRUE. Criterion 2 is covered by unit tests.
Criterion 1: the "Compile CLI" job (.github/workflows/ci.yml, build:) only runs bun run build. No step inspects the compiled binary for the hash.
Criterion 2: apps/cli/tests/audit/rules-fingerprint.test.ts already tests the macro's input set. The hash moves when a rule's code changes, when a rule file is added and when the lockfile changes, and it ignores test files. "is inlined as a sha-256 of this checkout" compares RULES_VERSION with fingerprintRuleSources() under bun test, but not inside a compiled binary.
Spot check on the released 0.0.108 binary: it does not contain the string rules fingerprint: source not found, which rules-fingerprint.ts would carry if the fingerprint ran at runtime. That fits the macro being inlined at build time, but it is a manual check, not the CI assertion this issue asks for.
Activity
nc9 commentedon Oct 11, 2026
Checked against 0.0.108 and current main (ad95fb2): criterion 1 STILL TRUE. Criterion 2 is covered by unit tests.
.github/workflows/ci.yml,build:) only runsbun run build. No step inspects the compiled binary for the hash.apps/cli/tests/audit/rules-fingerprint.test.tsalready tests the macro's input set. The hash moves when a rule's code changes, when a rule file is added and when the lockfile changes, and it ignores test files. "is inlined as a sha-256 of this checkout" comparesRULES_VERSIONwithfingerprintRuleSources()underbun test, but not inside a compiled binary.rules fingerprint: source not found, whichrules-fingerprint.tswould carry if the fingerprint ran at runtime. That fits the macro being inlined at build time, but it is a manual check, not the CI assertion this issue asks for.ci: verify the compiled CLI embeds the rules version for its checkout s…