Repository navigation
ci: every job installs from the tracked lockfile - #405
Conversation
🟡 Reviewed1 actionable comment(s) · grounded on your code 🤖 developerz.ai — automated review, running on your model and your box. |
Two of the three CI jobs installed with `npm install`, and the npm lockfile is gitignored - so those jobs resolved dependencies to whatever was newest on the registry, on every run. A dependency published six hours after the last green run broke them, and the next push to main turned the node job red on a type error in files the push never touched. Every job now installs with `bun install --frozen-lockfile`, so the tracked lockfile is the resolution. The node and integration jobs still RUN under node - that is the point of those jobs; the runner is what the lockfile decides, not the tool that installs it. packages/aitm/test/integration/ci-install-lockfile.test.ts holds the rule: no install in the workflow may resolve from the registry's latest, and every job installs. Co-Authored-By: Claude Code <noreply@anthropic.com>
e546ad7 to
ea2bf58
Compare
There was a problem hiding this comment.
Review summary — 2 file(s), 3 finding(s).
Critical 0 · Major 0 · Minor 3 · Nit 0
CI now installs with bun install --frozen-lockfile in all three jobs, and a new integration test guards the workflow against floating installs. The change is sound and CI is green.
🤖 developerz.ai review — automated, running on your model and your box. What is this?
…t flag, and checks each job The guard read only single-line `run:` values, so an install written as a `run: |` block passed; it accepted `--frozen-lockfile` on npm, which has no such flag and resolves from the registry; and it compared the total install count to the job count, so one job installing twice hid a job with none. It now reads every `run:` body, single-line or block scalar, split on `&&`, `||` and `;`, and attributes each install to its job. A lockfile install is `npm ci` or a bun/yarn/pnpm install with `--frozen-lockfile`. Each rule is proven against a fixture before it runs on the real workflow, and both workflow rules were run red against a planted floating install and a job with its install removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Address review findings on #405
Queued — waiting for a free box. 🤖 developerz.ai, an automated agent, not a human — developerz-ai[bot] |
There was a problem hiding this comment.
Review summary — 1 file(s), 1 finding(s).
Critical 0 · Major 0 · Minor 1 · Nit 0
Guard rewrite verifies cleanly — block scalars, chained installs, the npm-flag trap and per-job attribution are all read and fixture-proven; one residual bypass remains: a run: | # comment header hides its body, so a floating install inside still passes both rules.
1 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
packages/aitm/test/integration/ci-install-lockfile.test.ts:82minor · test The indicator regex requiresrun:'s value to end at|/>, so a legal header likerun: | # install depsis parsed as an inline command, its body is skipped, and a floatingnpm installinside passes both rules. Accept a trailing comment:/^[|>][-+]?\d*(?:\s+#.*)?$/.
🤖 developerz.ai review — automated, running on your model and your box. What is this?
What
Two of the three CI jobs installed with
npm install, and the npm lockfile is gitignored — so those jobs resolved dependencies to whatever was newest on the registry, on every run.A dependency published six hours after the last green run breaks them, and it breaks them in files the change never touched:
So "CI green on
main" was true as history and not as a fact: the next push tomainturns thenodejob red, and the red has nothing to do with the change that caused it.Every job now installs with
bun install --frozen-lockfile, so the tracked lockfile is the resolution. Thenodeandintegrationjobs still run under node — that is the point of those jobs; the runner is what the lockfile decides, not the tool that installs it. Thebunjob is frozen too, so a manifest change without a lockfile update fails instead of silently resolving to something new.The guard
packages/aitm/test/integration/ci-install-lockfile.test.tsholds the rule:The workflow is the artifact under test: it is read, not re-implemented.
Verification
bin/checkgreen — typecheck, test typecheck, lint, the import-cycle check, the compat build, the Node test run and the integration suite (51 pass, 0 fail).npm install→ the lockfile rule fails;bun testandnode --test.Notes
mainred, so it blocks every other change in this repository — including the public-tree cleanup that depends on it.Closes #400
🤖 Generated with Claude Code