Repository navigation
[host01] Bootstrap reviewed npm before release preparation and publishing - #10
Conversation
|
OpenRouter review posted ( |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex security review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: 4620883a462b4581855bf707a8795532f2e2e7b4
Judge: openai/gpt-5.6-luna
Cost: $0.2823 (lanes $0.2802 + judge $0.0021)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 55.5s, 215803+2066 tokens (162444 cached), 5 tool round(s), via Azure, $0.19)z-ai/glm-5.3-flash: ok (4 finding(s), 675.2s, 1561093+65992 tokens (1209280 cached), 21 tool round(s), via CoreWeave, $0.0929)
Findings
🔵 Issue 1 — New bootstrap regression tests hardcode C:/Program Files/Git/bin/bash.exe for Windows
tests/publish-workflow.test.ts:200 · nit · identified by z-ai/glm-5.3-flash
On a Windows machine where Git for Windows is installed anywhere other than C:\Program Files\Git (Scoop, portable Git, custom install directory), spawnSync fails with ENOENT and all twelve new bootstrap cases error out, so a Windows contributor cannot run pnpm test even though the change is Linux-only. This is new code in this PR, and it is inconsistent with the repo's existing Windows support: scripts/release-packages.mjs branches to npm.cmd on win32 and tests/release-registry.test.ts selects git.exe on win32, both of which imply Windows developers are expected to run the suite.
The hardcoded path is at tests/publish-workflow.test.ts:200 (process.platform === "win32" ? "C:/Program Files/Git/bin/bash.exe" : "/bin/bash"). A more robust approach is resolving bash.exe from PATH/ProgramFiles env or skipping the bash-spawning cases on win32 with an explicit reason.
I checked that repo CI (publish.yml validate matrix and ci.yml) runs only on ubuntu-latest, so this affects local development only; that is why I rate it a nit rather than a CI break.
🔵 Issue 2 — 22-line bootstrap step is duplicated verbatim in prepare and publish with no drift guard
.github/workflows/publish.yml:394 · nit · identified by z-ai/glm-5.3-flash
The identical "Bootstrap the reviewed npm CLI" body is pasted twice (.github/workflows/publish.yml:130 and :394). A future change applied to only one copy — e.g., adding --retry to the download, hardening the launcher quoting, or fixing a bug in one job after a release incident — leaves preparation and publication provisioned by different logic, and nothing fails: the new tests execute each copy independently against the same fixture, so each copy passes its own case and no test compares the two bodies to each other or to a shared source.
The concrete cost is a repeat of the class of incident this PR fixes: npm provisioning behavior diverging between the job that packs the release and the job that publishes it, with tests staying green. Extracting the step into a composite action, or adding one assertion that both extracted shellStep(job, "Bootstrap the reviewed npm CLI") bodies are byte-identical, closes it cheaply.
I verified both copies are currently identical (diff hunks and grep at lines 130-155 / 394-419) and that tests/publish-workflow.test.ts runs them separately (bootstrapJobs = ["prepare", "publish"]) without any equality assertion.
🔵 Issue 3 — Bootstrap fixtures do not pin the download/extraction hardening flags or the node-path guard
tests/publish-workflow.test.ts:144 · nit · identified by z-ai/glm-5.3-flash
The new regression cases stub curl, sha256sum and tar as shell functions that validate only a few arguments, so several fail-closed guards in the shipped step are unpinned and could be silently removed while all twelve cases stay green:
- The
curlstub (tests/publish-workflow.test.ts:145-157) checks only the URL and--output; dropping--proto '=https',--proxy '',--max-filesize 16777216,--max-time 60, or--disable(the curlrc disable) from the workflow is invisible to the tests, weakening the documented HTTPS-only, proxy-free, size-bounded download thatdocs/RELEASING.md:113-119now guarantees. - The
tarstub (tests/publish-workflow.test.ts:171-186) checks only--file/--directory; removal of--extract --gzip,--no-same-owneror--no-same-permissionspasses. - No fixture mode exercises the
[[ "${node_path}" == /* && -f ... && -x ... ]]guard (publish.yml:139), so loosening or deleting that node-path assertion (e.g., tonode_path=$(command -v node)alone) also passes all cases while the launcher could then embed a bogusnode_path.
The stubs do pin the digest step's presence and argument shape and the owned-vs-host selection, so the central behavior is covered; this finding is about the unpinned hardening surface. Adding flag assertions to the stubs (or a bad-node mode) closes the gap. The in-file comment that download/digest/extraction are "controlled external ports" covers synthetic-bytes realism, not removal of these flags, so the gap is not already acknowledged.
🔵 Issue 4 — Test title typo: "over host npm11.16" is missing a space
tests/publish-workflow.test.ts:263 · nit · identified by z-ai/glm-5.3-flash
The success-case title at tests/publish-workflow.test.ts:263 reads "%s actual shell selects the owned reviewed CLI over host npm11.16 and preserves literal arguments" — npm11.16 should be npm 11.16. Cost is minor but real: this string appears verbatim in failure logs and test reporters, misdescribing the pinned host version the fixture simulates.
Counter-evidence checked: the neighboring title at line 306 ("$job actual bootstrap stops on $mode failure ...") is correctly spaced, so this is a one-off typo, not a convention.
|
Temporarily closing before the test-only fix push so reopening requests a fresh full-PR review. All four R1 findings have been addressed and the 33 workflow tests pass locally on Node 22 and 24; merge remains gated. |
|
All four R1 threads are fixed and resolved. Reopening the updated head for a fresh full-PR review and current CI. |
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: clean
Scope: latest-commit (commit-range)
Mode: verify
Commit: 91106d583df1c8bf8efcb92e6d7133e04178b9a7
Judge: openai/gpt-5.6-luna
Cost: $0.0742 (lanes $0.0741 + judge $0.0001)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 18.3s, 51904+491 tokens (34573 cached), 3 tool round(s), via Azure, $0.0569)z-ai/glm-5.3-flash: ok (0 finding(s), 170.5s, 389487+20122 tokens (193536 cached), 11 tool round(s), via PrimeIntellect, $0.0172)
Round 2 resolution
- 4 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is
risk). - Open findings after this round: 0 (0 bug-severity).
No structured findings from the successful lane(s).
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
The latest healthy review covered only the fix commit, so it is not the required full-PR gate. Reopening the unchanged head to request a full nine-file review; the current-head CI and code/security receipts remain unchanged. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: full-pr (full-pr)
Mode: verify
Commit: 91106d583df1c8bf8efcb92e6d7133e04178b9a7
Judge: openai/gpt-5.6-luna
Cost: $0.2973 (lanes $0.2962 + judge $0.0011)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 36.0s, 216249+1357 tokens (152437 cached), 5 tool round(s), via Azure, $0.21)z-ai/glm-5.3-flash: ok (1 finding(s), 288.7s, 1967943+47339 tokens (1661568 cached), 28 tool round(s), via CoreWeave, $0.0890)
Round 3 resolution
- No prior findings were open.
- Open findings after this round: 1 (0 bug-severity).
Findings
🟠 Issue 1 — Retained published v0.4.3 release can now re-trigger publication of the version the runbook retires
.github/workflows/publish.yml:4 · risk · identified by z-ai/glm-5.3-flash
The failed v0.4.3 GitHub release is being retained as published ("retain its release as a failed attempt"), and .github/workflows/publish.yml triggers on release: types: [published]. Before this PR, any re-trigger of that release died at "Check the npm version" because Node 24.18.0 ships npm 11.16.0 — an accidental guard. With the new bootstrap, that guard is gone: converting the retained release back to draft and re-publishing it (or attaching a new release object to the preserved tag) now runs the whole pipeline to completion and publishes a runtime @pegma/storage-dynamodb@0.4.3, the exact outcome this PR's documentation reclassifies as a permanently failed attempt whose successor is 0.4.4.
Mechanically nothing stops it. The identity job only verifies the tag signature, commit SHA, and ancestry (the signed v0.4.3 commit is an ancestor of origin/main); validate re-passes on the old commit because its gates passed in the original run; prepare checks out github.sha (the old commit, whose package.json says 0.4.3) and derives the manifest/release tag from that source, so every self-consistency check (record.version === manifest.releaseTag.slice(1), release-tag-matches-package-version) holds; and the preflight/publisher occupancy rule only requires the selected version to be absent from the registry — 0.4.3 was never published. There is no version allowlist anywhere: REVIEWED_NPM_VERSION: "11.18.0" pins the npm tool, but nothing pins the expected package candidate (e.g. an analogous REVIEWED_DYNAMODB_VERSION constant, or a check that the release tag's commit equals the current candidate source).
What I checked: the trigger block and identity checks in publish.yml (lines 3–31), the publisher's tag/version assertions in the inline heredoc, scripts/release-packages.mjs tag-to-version validation (which validates against the checked-out source, not a current-candidate constant), and the retention instructions in docs/RELEASING.md and AGENTS.md — the runbook forbids reusing or moving the tag, but that is procedural only; re-publishing the retained release object neither moves nor reuses the tag. The fix can be as small as pinning the expected candidate version in the workflow env alongside REVIEWED_NPM_VERSION, or explicitly instructing that the failed release be deleted or kept as a draft rather than retained published. I could not verify the release object's current state from the checkout; the risk assumes the documented "preserve the release" state.
|
For r3-1, the claimed new-bootstrap path does not follow GitHub's workflow selection rules. GitHub documents that a run uses the workflow revision associated with its event's SHA/ref; release events bind those to the tagged release commit and tag ref. The immutable The existing publisher also requires |
|
Requesting the final full-PR rereview on unchanged head 91106d5 after the factual r3-1 response. Existing current-head tests, package proofs and reviewer observation deadline remain unchanged. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: clean
Scope: full-pr (full-pr)
Mode: verify
Commit: 91106d583df1c8bf8efcb92e6d7133e04178b9a7
Judge: openai/gpt-5.6-luna
Cost: $0.2641 (lanes $0.2640 + judge $0.0001)
Lanes
openai/gpt-6.1-sol: ok (0 finding(s), 37.3s, 178056+1470 tokens (122065 cached), 4 tool round(s), via Azure, $0.18)z-ai/glm-5.3-flash: ok (0 finding(s), 507.7s, 1538265+68627 tokens (1328704 cached), 18 tool round(s), via CoreWeave, $0.0804)
Round 4 resolution
- 🤝
r3-1disputed — Retained publishedv0.4.3release can now re-trigger publication of the version the runbook retires: The rebuttal correctly identifies GitHub's event-bound workflow selection: republishing a release on an unchanged historical tag uses that tag's workflow revision, not the workflow newly merged into main. Therefore, the retainedv0.4.3release does not acquire this PR's npm bootstrap through the claimed trigger.
The current publisher also requires GITHUB_WORKFLOW_SHA === RELEASE_COMMIT and th…
- Open findings after this round: 0 (0 bug-severity).
No structured findings from the successful lane(s).
The
v0.4.3release stopped before preparation because Node 24.18.0 supplied npm 11.16.0 and the workflow checked for npm 11.18.0 without provisioning it. Preparation and the protected publisher now download the official, digest-pinned npm archive and select an owned launcher that invokes its exact CLI with the selected Node binary. This avoids the archive's stock wrapper selecting Node's global npm.The failed signed
v0.4.3tag is preserved. DynamoDB's next runtime candidate is0.4.4; registration-only0.4.2remains outside runtime qualification. Storage runtime code, Core0.4.0pins, reuse policy and publisher authority are unchanged.All four R1 findings are fixed in
91106d583df1c8bf8efcb92e6d7133e04178b9a7: discover Git Bash from the actual installation, compare the two bootstrap bodies, require the safety flags and reject a relative Node executable, and correct the test title. All 33 workflow cases, formatting, types and release metadata pass on actual Node 22.18.0 and 24.18.0. The actual pinned-archive bootstrap/extraction/launcher also passed on both versions. Independent source reviews found no remaining issue. Controlled shell fixtures do not claim cryptographic verification.A fresh full-PR review and complete CI suites are required for the fixed head. The earlier 353-test CI passes and local Node 22 full-suite pass apply to the previous head; its local Node 24 full run was canceled for these test-only fixes. Merge and publication remain gated on the current checks, full review and genuine packed-package qualification.