Repository navigation
Harden release preparation and blob validation - #13
Conversation
Codex Review SummaryThis 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. |
|
OpenRouter review posted ( |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: partial
Scope: full-pr (full-pr)
Mode: initial
Commit: e5a44d63ff89c09d39f4d52de2d1a732fc92b55a
Judge: openai/gpt-5.6-luna (repaired(canonical+1): source coverage preserved before publication cap)
Cost: $0.4806 (lanes $0.4739 + judge $0.0067)
Lanes
meta/muse-spark-1.2: ok (5 finding(s), 73.3s, 336845+10324 tokens (96053 cached), 5 tool round(s), via Meta, $0.36)z-ai/glm-5.3-flash: ok (8 finding(s), 359.2s, 1900657+61683 tokens (1677312 cached), 24 tool round(s), via PrimeIntellect, $0.11)
Warning
The PR head advanced after this review's diff was collected. This review is pinned to commit e5a44d6 and does not cover the newest push.
Warning
z-ai/glm-5.3-flash: coverage claims 1 finding(s) in 'packages/storage-cloudflare-r2/src/index.ts' but 0 were reported
Findings
🟠 Issue 1 — Strict ETag requirement removes S3-compatible HEAD fallback
packages/storage-s3/src/index.ts:506 · risk · identified by meta/muse-spark-1.2
createS3BlobStore, createCloudflareR2BlobStore and createAzureBlobStore now requireEtag on every put response and throw BlobStoreError if ETag is missing/empty, instead of falling back to a HEAD read. An S3-compatible endpoint that legitimately omits ETag on PutObject (observed on some proxy/gateway builds) will now fail every put even though the bytes are durably stored, turning a successful write into an error the caller must retry.
Evidence: diff removes headRaw fallback in packages/storage-s3/src/index.ts and packages/storage-cloudflare-r2/src/index.ts (previously if (etag === undefined) { headRaw }) and uploadData check in packages/storage-azure-blob/src/index.ts. The conformance suite does not cover missing-ETag servers; test/localstack.ts now pins IMAGE = "localstack/localstack:4.3.0" which does emit ETag, so CI hides the interop gap.
Checked: read the three adapter files; verified fallback code is gone and requireEtag now throws. Gap: no test asserts behavior against an ETag-omitting backend.
🟠 Issue 2 — Publish workflow records artifact digest but never anchors it
.github/workflows/publish.yml:22 · risk · identified by meta/muse-spark-1.2
prepare now exports artifact-digest as a job output and prints Prepared artifact SHA-256 ${ARTIFACT_DIGEST} to the summary, but publish (and smoke) only verify RELEASE_MANIFEST_DIGEST against package-manifest.json. A tampered tarball that is mutated in lockstep with a forged manifest will still pass because the artifact-level digest is never consumed cross-job.
Evidence: publish.yml:outputs includes artifact-digest: ${{ steps.upload.outputs.artifact-digest }}, and Record the prepared artifact digest writes it to summary, yet no downstream job declares needs.prepare.outputs.artifact-digest or test "${actual}" = "${RELEASE_ARTIFACT_DIGEST}". The in-line verification recomputes sha256/sha512 per tarball but does not compare the upload-artifact's own digest.
Checked: read publish.yml prepare/publish/smoke env and outputs; grepped for artifact-digest usage outside prepare. Gap: the digest is observability only, not a security gate.
🟠 Issue 3 — Publish job re-implements release validation inline, creating untested drift points against scripts/release-packages.mjs
.github/workflows/publish.yml:287 · risk · identified by z-ai/glm-5.3-flash
Adding a fifth adapter package per the documented procedure (docs/RELEASING.md Inventory: "Adding an adapter package means adding it there" — i.e. only scripts/release-packages.mjs) will pass prepare and smoke — the manifest will carry 5 records and the smoke job imports all five tarballs — and then fail in publish at manifest.packages.length !== packages.length, after the full Node 22/24 gate, the signed-tag ceremony, and the npm-publish environment approval. Same for a future schema bump: the heredoc hard-codes schemaVersion !== 3, the exact manifest/record key-set strings, the tag/version/integrity regexes, and the retry/skip logic, all of which also live in scripts/release-packages.mjs (verifyPreparedManifest, publishPreparedRelease, decidePublication, confirmRegistryIntegrity). The failure is fail-closed, but it is discovered at the very last, most expensive step of a release.
Concrete duplicated blocks with no single source of truth:
- the hard-coded
packagesarray of four@pegma/*names in the heredoc vsRELEASE_PACKAGES— no test compares them (tests/release-packages.test.tspins only thatpublishcontainsscript_path="${RUNNER_TEMP}/publish-release.mjs"and does not containscripts/release-packages.mjs, which actively forbids reusing the tested script); - the manifest/record validation copies of
verifyPreparedManifest; - the publish/skip/confirm loop copies of
decidePublication/confirmRegistryIntegrity; - the "Authenticate the release source" shell block duplicated verbatim in
prepareand "Re-authenticate the release source" inpublish— neither copy's shell logic is executed by any test, so tightening one (e.g. the prerelease or tag-format check) silently leaves the other weaker.
Checked: read the full workflow and scripts/release-packages.mjs; searched tests/release-packages.test.ts for any equivalence assertion between the workflow's inline list/validation and RELEASE_PACKAGES/verifyPreparedManifest — none exists. Suggested repair: generate the inline script (or the package list/constants) from scripts/release-packages.mjs at prepare time inside the artifact, or add a test that asserts the workflow heredoc's constants match the script's exports.
🟠 Issue 4 — S3/R2 adapters now fail puts after the object was written when the server omits an ETag
packages/storage-s3/src/index.ts:509 · risk · identified by z-ai/glm-5.3-flash
A host pointing the S3 or R2 adapter at an S3-compatible endpoint that omits ETag on PutObject responses (some gateways, proxies, and older S3 clones — the removed code's own comment said "Some S3-compatible servers omit ETag on put") previously got a working put: the adapter re-read the object via HEAD and returned the stored etag. After this change, finishPut calls requireEtag(response.ETag, key) and throws, so every such put now fails — but the catch block wraps finishPut, and since the object was already written server-side, the caller sees a BlobStoreError ("S3 put failed for ...", cause "S3 returned no etag for object ...") for a write that succeeded. A caller that treats put failure as "not stored" and retries writes the object twice.
Same instance in the R2 adapter at packages/storage-cloudflare-r2/src/index.ts:510.
This does align S3/R2 with the Azure adapter, which already required a put-response etag (packages/storage-azure-blob/src/index.ts:420-426), and the conformance suite requires puts to return a non-empty etag — so the intent is defensible. But it is a silent compatibility regression for backends that previously worked, and the new failure mode (error-after-successful-write) is the least recoverable way to express it.
Checked: packages/storage-s3/README.md and packages/storage-cloudflare-r2/README.md never documented the old fallback (no etag mentions), so no doc contradicts the change; searched the conformance suite for any case exercising a missing put ETag — none exists (LocalStack and Azurite always return ETags), so this path is untested by design. Worth at least a release note and, ideally, a documented remediation for affected hosts.
🟠 Issue 5 — Dot-segment rule silently removes documented list-prefix capability and breaks reads of previously legal keys
packages/storage-blobs/src/index.ts:343 · risk · identified by z-ai/glm-5.3-flash
assertBlobPathString now rejects any . or .. path segment, which changes two public behaviors at once.
First, listing: the removed JSDoc on assertValidBlobPrefix explicitly promised "the exact strings . and .. are allowed as prefixes so keys such as .hidden remain listable". Keys beginning with . (segment .hidden, .well-known/...) are still perfectly legal to store, but the natural prefix for enumerating top-level dotfiles — list({ prefix: "." }) — now throws BlobValidationError, and "" is rejected too, so the only remaining option is a no-prefix listing plus client-side filtering. A consumer that followed the old documented contract breaks on upgrade.
Second, existing data: keys like a/./b or a/. were previously storable and readable (only the exact keys . and .. were rejected). After upgrading, get, head, and delete of such keys throw before any backend call, so objects already stored under those keys become unreachable through the port until the store is migrated.
The hardening itself is reasonable (path-segment safety across backends), and the conformance suite was updated to pin it, but the regression is undocumented: neither packages/storage-blobs/README.md nor docs/RELEASING.md mentions the key/prefix rule change or a migration path.
Checked: packages/storage-blobs/README.md documents prefix listing but not the removed allowance; grep across docs/ and the package READMEs found no other statement of the old contract; the change is deliberate (test renamed to "rejects keys and prefixes with dot path segments").
🔵 Issue 6 — Stale workflow line references in security scan doc
docs/securityscan.md:147 · nit · identified by meta/muse-spark-1.2
After the publish workflow was split into prepare/smoke/publish with bare-repo re-authentication, docs/securityscan.md:147 still cites publish.yml:74-86, 113-120 (and the summary table still describes the old handoff). An auditor following that location lands in the wrong job and misses the new Re-authenticate the release source and inline publish-release.mjs steps.
Evidence: the PR rewrites publish.yml from ~120 lines to ~350 lines, introduces artifact-digest output, --skip-smoke, and a publish-release.mjs cat heredoc, but docs/securityscan.md was not touched. Grep for publish\.yml still hits the old line range; list_dir shows workflows remain ci.yml, codeql.yml, publish.yml.
Check: read docs/securityscan.md and grepped for \.github/workflows – the file inventories the workflow but was not updated. Gap: doc drift is not caught by tests/release-packages.test.ts which only asserts workflow string content, not securityscan.md.
🔵 Issue 7 — Duplicated empty-chunk limit constant across four packages
packages/storage-blobs/src/index.ts:281 · nit · identified by meta/muse-spark-1.2
MAX_EMPTY_BODY_CHUNKS_WITHOUT_PROGRESS = 10_000 is copy-pasted in packages/storage-blobs/src/index.ts:281, packages/storage-azure-blob/src/index.ts:31, packages/storage-cloudflare-r2/src/index.ts:33, packages/storage-s3/src/index.ts:33. A future tuning (e.g., raising to 50k for large streaming workloads) that edits only the port leaves adapters with the old limit, causing inconsistent BlobValidationError vs pass behavior for the same stream.
Evidence: grep for MAX_EMPTY_BODY hits four files with identical literal; packages/storage-blobs/src/conformance.ts asserts reads > 10_000 for the excessive-empty-chunks case, tying the test to that magic number. No shared export is used.
Checked: read_file on each index file confirms identical definition and identical readBody logic; no central constant is imported.
🔵 Issue 8 — Isolated npm env diverges between workflow inline script and release script
.github/workflows/publish.yml:230 · nit · identified by meta/muse-spark-1.2
The publish workflow's inline publish-release.mjs allows only PATH,HOME,USERPROFILE,SystemRoot,SYSTEMROOT,TEMP,TMP,TMPDIR,CI plus GITHUB_/ACTIONS_ID_TOKEN_/RUNNER_ prefixes, while scripts/release-packages.mjs:isolatedNpmEnvironment also allows ComSpec,COMSPEC,PATHEXT,WINDIR. On a Windows runner the inline script would strip those vars, potentially breaking npm spawn (ComSpec/PATHEXT are needed to locate npm.cmd), whereas the script's helper would keep them. The drift also means a future addition to one allowlist may not be mirrored.
Evidence: compared publish.yml allowedNames set (9 entries) with scripts/release-packages.mjs allowed set (13 entries including Windows vars). list_dir confirms runners are ubuntu-latest today, so current CI is unaffected, but the published workflow is documented as the source of truth for provenance and should match the script.
Checked: read both files; grepped allowedNames/allowed definitions.
🔵 Issue 9 — RELEASING.md overclaims what the pre-checkout tag authentication verifies
docs/RELEASING.md:44 · nit · identified by z-ai/glm-5.3-flash
The doc states that before any repository code runs, the workflow's bare-repository authentication verifies the tag "matches a public package version in the release inventory". It does not: the Authenticate the release source step only checks prerelease=false, the tag-format regex, that the ref is a signed annotated tag, that the peeled target equals RELEASE_COMMIT, and main ancestry. The tag↔package-version match happens later, after checkout, inside scripts/release-packages.mjs (validateRepository: release tag must be v${sharedVersion}, plus validateReleaseTag). A reader auditing the release gate from the doc alone would believe the version binding is enforced before any repository code executes, which is exactly the property the surrounding paragraph is asserting. Reword the bullet to move that check to the post-checkout description.
🔵 Issue 10 — docs/securityscan.md line anchors and publish-flow description are stale after the restructure
docs/securityscan.md:147 · nit · identified by z-ai/glm-5.3-flash
The security record pins the cross-job manifest anchoring to ".github/workflows/publish.yml:74-86, 113-120" and "scripts/release-packages.mjs:509-560 (verifyPreparedManifest)" and describes the publish job as running verifyPreparedManifest from the script. After this PR those line numbers point at different content, the publish job no longer calls the script at all (the test suite now forbids scripts/release-packages.mjs inside the publish job), and the flow gained a smoke job plus workflow-owned inline validation. Separately, line 84 describes the port as "./.. rejected as keys", which is now imprecise — all dot path segments are rejected, in keys and prefixes alike. The record is dated 2026-07-29, so it may be intentionally frozen; but since this PR changes the very machinery the LOW finding describes, a short addendum ("superseded by the prepare/smoke/publish split") would keep the audit trail honest.
🔵 Issue 11 — isolatedNpmEnvironment strips proxy/mirror settings, breaking release:pack for proxied development environments
scripts/release-packages.mjs:171 · nit · identified by z-ai/glm-5.3-flash
runNpm now wraps every npm invocation (pack, view, smoke installs, publish) in isolatedNpmEnvironment, which writes empty user.npmrc/global.npmrc files and filters the environment to a fixed allowlist (PATH, HOME, TEMP, GITHUB_*, ACTIONS_ID_TOKEN_*, RUNNER_*, …). In CI that is the intended hardening. Locally, the documented workflow "run the complete gate" (pnpm run release:pack) now silently ignores a maintainer's ~/.npmrc registry mirror, proxy/https-proxy config, and HTTP_PROXY/HTTPS_PROXY/NO_PROXY env vars: npm view hard-pins --registry https://registry.npmjs.org/ and the smoke consumer installs fetch transitives directly from npmjs.org. A maintainer behind a corporate proxy or mirror gets opaque network failures inside release:pack that did not exist before this PR. Consider allowing the standard proxy variables through (they do not affect which registry is consulted for the published bytes) or documenting the new requirement.
🔵 Issue 12 — Publish job uses the bundled npm instead of the reviewed npm@11.18.0, with a floor-only gate
.github/workflows/publish.yml:255 · nit · identified by z-ai/glm-5.3-flash
prepare and smoke both run a "Use the reviewed npm release" step (npm install --global npm@11.18.0); the publish job does not — its inline script spawns whatever npm ships with the pinned Node 24.18.0, gated only from below (trusted publishing requires npm 11.5.1 or newer; any 11.x ≥ 11.5.1 and any future npm 12+ pass). The pinned Node effectively pins npm today, so this cannot bite until someone bumps node-version in the publish job without re-reviewing the publishing npm — at which point trusted-publishing/provenance behavior could shift with no upper bound and no test. Either accept and document that asymmetry (the doc currently only attributes the "reviewed npm" to preparation), or cap the gate at the reviewed minor (11.18.x), matching the repository's REVIEWED_PNPM discipline. Note that installing npm@11.18.0 inside the id-token: write job is presumably avoided on purpose; a version cap achieves the same review guarantee without installing anything.
🔵 Issue 13 — CI: "1" env additions are inert — nothing in the repository reads CI
.github/workflows/ci.yml:20 · nit · identified by z-ai/glm-5.3-flash
The new env: CI: "1" blocks in the validate job (ci.yml) and in the prepare/smoke/publish jobs (publish.yml) have no functional effect in this repository: a repo-wide grep finds no reader of process.env.CI (the only matches are the string "CI" inside the npm-env allowlists at scripts/release-packages.mjs:143 and the workflow's own inline script), and GitHub Actions already exports CI=true on hosted runners, so the tools that do consult CI truthiness (vitest, pnpm) behave identically before and after. The PR validation list suggests the intent was parity with local CI=1 pnpm ... runs; since no repo code branches on CI, the lines are dead configuration. Harmless, but if a future gating behavior is expected from CI=1 (e.g. enabling the LocalStack/Azurite harnesses locally), it currently does not exist and should not be assumed from this change.
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: partial
Scope: full-pr (full-pr)
Mode: initial
Commit: df7641a63344e05c9e4d619db6716fd157d93c27
Judge: openai/gpt-5.6-luna
Cost: $0.3819 (lanes $0.3765 + judge $0.0053)
Lanes
meta/muse-spark-1.2: ok (0 finding(s), 60.4s, 251433+6201 tokens (98741 cached), 4 tool round(s), via Meta, $0.23)z-ai/glm-5.3-flash: ok (11 finding(s), 362.5s, 2355993+64360 tokens (2009088 cached), 25 tool round(s), via PrimeIntellect, $0.14)
Warning
The PR head advanced after this review's diff was collected. This review is pinned to commit df7641a and does not cover the newest push.
Findings
🟠 Issue 1 — S3/R2 put now throws after the object was stored when the server omits an ETag
packages/storage-s3/src/index.ts:509 · risk · identified by z-ai/glm-5.3-flash
Scenario: a host points createS3BlobStore/createCloudflareR2BlobStore at an S3-compatible server that accepts a PUT but omits the ETag header. The object is written, then finishPut calls requireEtag(response.ETag, key) and throws BlobStoreError("S3 returned no etag ..."), which the surrounding catch re-wraps as "S3 put failed for ...". The caller sees a storage failure for a write that succeeded, so retry loops re-upload, GC flows may treat the object as never stored, and post-write conditional logic never receives an etag.
The removed code explicitly handled this case: the deleted finishPut had "Some S3-compatible servers omit ETag on put; re-read via HEAD" and recovered via headRaw(key). The hardening intent ("require write response tokens") is legitimate, but this is a silent compatibility regression for exactly the deployments the old comment acknowledged — and the CI harness (LocalStack) always returns ETags, so the suite cannot catch it. The same change landed in packages/storage-cloudflare-r2/src/index.ts:510 (requireEtag(response.ETag, key)).
Checked: requireEtag exists in both files (s3:315, r2:314) and throws on undefined/empty; no test exercises the missing-ETag path (grep for "ETag"/"finishPut"/"headRaw" in the R2 test file finds nothing; the conformance suite cannot produce an ETag-less PUT against LocalStack). Proof gap: I could not run the adapters against a server that omits ETag, so the impact is inferred from the deleted code's own comment.
🟠 Issue 2 — Dot-segment rule makes previously accepted keys and list prefixes hard errors, stranding stored data
packages/storage-blobs/src/index.ts:343 · risk · identified by z-ai/glm-5.3-flash
Scenario: a consumer upgrades to the next release and calls get("a/./b"), delete("a/../b"), or list({ prefix: "." }) against a backend that already contains such objects. Every one of these now throws BlobValidationError (must not contain dot path segments.), so previously stored, previously readable data becomes unreachable through the port — get, head, delete, and prefix listing all fail before any backend call.
Before this change, only the exact keys . and .. were rejected; a/./b, a/../b, ./a, a/., a/.. were all valid keys, and the deleted doc comment in assertValidBlobPrefix explicitly said the exact strings . and .. were allowed as prefixes "so keys such as .hidden remain listable". A host that listed dot-files with prefix: "." now gets a validation error with no migration note.
Checked: the conformance suite was updated to enforce the new rule (packages/storage-blobs/src/conformance.ts:444-464) and no in-repo test or fixture depends on the old behavior (grepped for prefix: "." and dotted keys — only the new conformance case). The tightening looks intentional (it closes real traversal/normalization ambiguity), but it is a breaking change to accepted inputs and stored-data reachability; nothing in README.md or the package READMEs records it. Suggested repair: document the change, and bump the package version per the contract-freeze rule (see the separate version-bump finding).
🟠 Issue 3 — Guarantee-changing PR ships without the minor version bump the repo's own freeze protocol requires
packages/storage-blobs/package.json:3 · risk · identified by z-ai/glm-5.3-flash
Scenario: this branch merges and the next release is cut as a patch. Consumers on 0.2.0 get, in a patch bump, stricter key/prefix validation, wildcard ifMatch rejection, mandatory ETag on S3/R2 puts, and mandatory absolute Azure container URLs — behavior changes that break previously working inputs and stored data.
docs/ADAPTER_AUTHORING.md ("Freezing the contract") states that changing a guarantee requires: conformance cases in the same change, implementation in every in-repo adapter, and "A minor version bump on the port package". This PR satisfies the first two (new conformance cases exist) but all four packages/*/package.json remain at 0.2.0 and the root README still advertises 0.2.0.
Checked: no package.json version appears in the diff; README.md and packages/storage-blobs/README.md still say 0.2.0. Proof gap: maintainers may bump versions in a separate release-prep PR before tagging, but nothing in this PR or docs/RELEASING.md forces that sequence.
🔵 Issue 4 — ADAPTER_AUTHORING.md 'pass them through' etag rule now contradicts the required wildcard rejection
docs/ADAPTER_AUTHORING.md:142 · nit · identified by z-ai/glm-5.3-flash
Scenario: an author writes a new adapter following "Mapping rules" rule 3 — "Etags. Opaque strings; pass them through. Never invent etag semantics" — and passes ifMatch: "*" straight to the backend. The new conformance case rejects wildcard ifMatch values (packages/storage-blobs/src/conformance.ts:778) then fails the adapter, because the port now requires client-side rejection of * and whitespace-wrapped * for both put and delete.
The guide's rule is now actively wrong for wildcard values, and neither it nor the README conditional table (packages/storage-blobs/README.md:61-62) mentions the new rejection. Since the doc is the onboarding path for every future backend, this will produce repeat conformance failures with a confusing cause.
Checked: the wildcard rejection was added to all four assertEtag implementations (blobs, azure, r2, s3) but docs/ADAPTER_AUTHORING.md was not touched by this PR.
🔵 Issue 5 — RELEASING.md still says any stable vX.Y.Z tag is accepted, but code rejects the whole v0.0.x series
docs/RELEASING.md:46 · nit · identified by z-ai/glm-5.3-flash
Scenario: a maintainer prepares a v0.0.3 hotfix-style tag for the (still pre-1.0) port. docs/RELEASING.md:46 promises "a stable annotated vX.Y.Z tag" is sufficient, but the new regex ^v(0\.[1-9][0-9]*|[1-9][0-9]*\.[0-9]+)\.[0-9]+$ in validateReleaseTag and in both publish.yml bash auth steps rejects every v0.0.* tag, so the workflow aborts with "Release tag format is invalid" after the maintainer did everything the runbook says.
The restriction is deliberate (the new test is literally named "rejects release tags outside the stable package series"), but the runbook was not updated to state it.
Checked: scripts/release-packages.mjs tag regex, both publish.yml copies of the check, and tests/release-packages.test.ts; no doc states the 0.0.x exclusion.
🟠 Issue 6 — Publish-gate validation logic duplicated into an untestable workflow heredoc with only substring test coverage
.github/workflows/publish.yml:260 · risk · identified by z-ai/glm-5.3-flash
Scenario: a future edit rewrites part of the inline publish-release.mjs heredoc (or verifyPreparedManifest in scripts/release-packages.mjs gains a check the heredoc never gets). CI stays green: the only tests touching this are string-presence assertions in tests/release-packages.test.ts (toContain/not.toContain on workflow text), which cannot fail for a logic change. A quietly weakened publish gate — e.g., one copy drops the tarball-hash or inventory check — would ship tarballs without any failing test.
The new inline script re-implements, by hand, the manifest shape check (gitCommit,packages,releaseTag,schemaVersion), per-record validation, inventory equality, and hash comparison that verifyPreparedManifest + assertReleaseInventory already implement in the reviewed script. Additionally, the new schema-v3 fields (sha256, exports) and assertReleaseInventory have no direct unit tests at all; only parseArguments, the tag regex, and digest verification are exercised.
Checked: read tests/release-packages.test.ts end-to-end — no test imports or executes the heredoc, and none builds a schema-3 manifest to feed verifyPreparedManifest's new validations. Suggested repair: keep a single validator (e.g., have the publish job invoke a small checked-in script, or extract and unit-test the shared validation) and add manifest-tampering tests for the new schema fields.
🟠 Issue 7 — Publish job is the only npm-consuming job that does not pin the npm version its OIDC gate depends on
.github/workflows/publish.yml:238 · risk · identified by z-ai/glm-5.3-flash
Scenario: the runner's default npm for Node 24.18.0 (or whatever spawnSync("npm", ...) resolves on PATH) is older than 11.5.1. prepare and smoke both pin npm@11.18.0 via npm install --global, but the publish job deliberately installs nothing, so the release passes prepare and smoke and then dies at the inline script's "trusted publishing requires npm 11.5.1 or newer" check — the one stage where the version actually matters for OIDC provenance, with no in-workflow remedy.
This asymmetry is partly self-inflicted: the substring test expect(publish).not.toContain("npm install") forbids pinning npm in the publish job, so the constraint and the gap are locked in together.
Checked: publish job steps are Re-authenticate → Set up Node.js → download artifact → inline script; the version gate lives only in the heredoc. Proof gap: I cannot verify offline which npm version Node 24.18.0 bundles or what PATH resolution yields on the runner image, so this may be benign today — but it is environment-dependent and will fail noisily (after ~prepare+smoke cost) if the runner baseline shifts.
🔵 Issue 8 — securityscan.md now cites stale publish.yml/release-packages.mjs line numbers and the pre-restructure publish flow
docs/securityscan.md:147 · nit · identified by z-ai/glm-5.3-flash
Scenario: a future auditor follows docs/securityscan.md's resolution note for the artifact-handoff finding: "Location: .github/workflows/publish.yml:74-86, 113-120; scripts/release-packages.mjs:509-560 (verifyPreparedManifest)" and "publish passes it to release:publish via --expected-manifest-digest". After this PR, those line numbers point at unrelated content, publication no longer goes through release-packages.mjs publish at all (the publish job uses an inline script; the smoke job uses the smoke command), and the digest is also verified with sha256sum twice before the script runs.
The doc presents itself as the record of how the publish pipeline's trust boundary is enforced; its description now names a mechanism that no longer exists.
Checked: current publish.yml (3 jobs, heredoc-based publish) and scripts/release-packages.mjs line layout. The doc is dated/dialed as a historical record, but the "Location/Evidence" fields are presented as pointers, not history.
🔵 Issue 9 — LocalStack image pin changed from 4.3 to 4.3.0 without verifying the exact tag exists
test/localstack.ts:23 · nit · identified by z-ai/glm-5.3-flash
Scenario: if localstack/localstack:4.3.0 is not a published Docker Hub tag, docker run fails in setup() and every S3/R2 conformance test (CI plus local dev) fails with "Failed to start LocalStack via Docker" — a total test breakage from a one-character pin change.
Pinning from the floating 4.3 to an exact version is good practice in principle; the risk is only whether the patch-level tag exists.
Proof gap: I have no network access to check Docker Hub, so this is a verification gap rather than a confirmed failure — the fix agent should confirm 4.3.0 is a real tag (or use the digest-pinned form) before merging.
🔵 Issue 10 — Azure adapter now rejects non-absolute containerClient.url, removing the old fallback for relative URLs
packages/storage-azure-blob/src/index.ts:306 · nit · identified by z-ai/glm-5.3-flash
Scenario: a host (most realistically, a unit-test double or a wrapper exposing url as a relative/account-relative string) constructs createAzureBlobStore with a containerClient whose url is not an absolute URL. Previously the adapter fell back to the raw string for the cursor backendId; now construction throws BlobValidationError("containerClient.url must be absolute.") before any operation runs.
Real ContainerClient.url from @azure/storage-blob is always absolute, so production impact is limited to mocks and unusual wrappers — but it is another silent input-contract tightening in the same release, consistent with the compat-cost finding above.
Checked: the new containment check itself (containedBlockBlobClient) is sound — origin + percent-encoded pathname prefix comparison covers Azurite path-style URLs and custom domains, and the new dedicated test pins the cross-container case. Only the absolute-URL requirement is a regression risk.
🔵 Issue 11 — Empty-body-chunk limiter constant duplicated across four files with no shared source of truth
packages/storage-blobs/src/index.ts:283 · nit · identified by z-ai/glm-5.3-flash
Scenario: someone tunes MAX_EMPTY_BODY_CHUNKS_WITHOUT_PROGRESS in the port (packages/storage-blobs/src/index.ts:283) and later in one adapter but forgets another; the store contracts silently diverge (e.g., the memory store accepts a stream an S3 deployment rejects). The conformance case cannot catch drift: it asserts only reads > 10_000, which passes for any limit ≥ 10,000 on every adapter.
The constant and the whole readBody block are now copy-pasted across packages/storage-blobs, storage-azure-blob, storage-cloudflare-r2, and storage-s3 (four independent definitions). Exporting the constant (and ideally a shared helper) from @pegma/storage-blobs would keep the port's guarantee single-sourced.
Checked: grep confirms four identical declarations; the conformance assertion is a one-sided bound.
|
Follow-up completed in
Local gate: formatting, types, release metadata, 263 tests, and the separated package/smoke flow all pass. |
|
Follow-up for the review pinned to
The publication logic remains workflow-owned and inline because the publication job must not execute code from the release tag. The added parity tests make package inventory, schema version, tag checks, npm version, and environment allowlist changes fail during the ordinary gate. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: partial
Scope: full-pr (full-pr)
Mode: initial
Commit: a50ee41f614dbd0781a645fdb652035395c57684
Judge: openai/gpt-5.6-luna
Cost: $0.2823 (lanes $0.2742 + judge $0.0081) + at least $0.0931 (incomplete)
Lanes
meta/muse-spark-1.2: ok (8 finding(s), 74.2s, 261651+8392 tokens (80452 cached), 4 tool round(s), via Meta, $0.27)z-ai/glm-5.3-flash: ok (9 finding(s), 811.3s, 1621856+81036 tokens (1096887 cached), 18 tool round(s), 1 retried request(s), salvaged finish, via CoreWeave, at least $0.0931 (incomplete))
Warning
The PR head advanced after this review's diff was collected. This review is pinned to commit a50ee41 and does not cover the newest push.
Warning
meta/muse-spark-1.2: coverage claims 2 finding(s) in '.github/workflows/publish.yml' but 1 were reported
Warning
meta/muse-spark-1.2: coverage claims 1 finding(s) in 'packages/storage-cloudflare-r2/src/index.ts' but 0 were reported
Warning
z-ai/glm-5.3-flash: coverage claims 6 finding(s) in '.github/workflows/publish.yml' but 4 were reported
Warning
z-ai/glm-5.3-flash: coverage claims 1 finding(s) in 'packages/storage-cloudflare-r2/src/index.ts' but 0 were reported
Findings
🔴 Issue 1 — Adapter etag validation omits control-character check
packages/storage-azure-blob/src/index.ts:99 · bug · identified by meta/muse-spark-1.2
A caller that supplies an ifMatch value containing a C0 control character (for example "a\u0000b") will be accepted by the Azure, S3, and R2 adapters but rejected by the port/memory store.
The port reference (packages/storage-blobs/src/index.ts:assertEtag) rejects control characters via hasDisallowedControl in addition to the wildcard "*" check. The three adapter copies (packages/storage-azure-blob/src/index.ts:99, packages/storage-s3/src/index.ts:163, packages/storage-cloudflare-r2/src/index.ts:162) only check for empty string and trim() === "*". The conformance suite treats illegal ifMatch as BlobValidationError regardless of backend, so a key that passes on an adapter but would fail on memory breaks the adapter-is-specification contract and can push a raw control byte into the provider SDK header path.
Checked the four assertEtag implementations and the new wildcard conformance case rejects wildcard ifMatch values; no control-character case exists for adapters, and grep for hasDisallowedControl shows no adapter usage.
🟠 Issue 2 — Azure container URL validation now rejects previously-tolerated relative URLs
packages/storage-azure-blob/src/index.ts:303 · risk · identified by meta/muse-spark-1.2
A host that constructs a ContainerClient with a relative url (for example a test double returning url: "/container") will now throw BlobValidationError: containerClient.url must be absolute at store creation instead of falling back to the raw string.
Previously createAzureBlobStore tried new URL(container.url) and fell back to the raw value for cursor backendId. The new code (packages/storage-azure-blob/src/index.ts:303-314) unconditionally throws when new URL fails, and containedBlockBlobClient also assumes absolute blob URLs. Existing unit tests use a helper that produces absolute https:// URLs, so the regression is not caught, but any custom ContainerClient mock that relied on the fallback will break on upgrade.
Verified the old fallback block was removed and the new throw new BlobValidationError("containerClient.url must be absolute.") path has no relative-URL test coverage.
🟠 Issue 3 — S3 and R2 put now fail when backend omits ETag
packages/storage-s3/src/index.ts:500 · risk · identified by meta/muse-spark-1.2
A successful object write will surface as BlobStoreError if the S3/R2-compatible endpoint returns a PutObject response without ETag, even though the bytes are durably stored.
Previously createS3BlobStore and createCloudflareR2BlobStore fell back to a HEAD to retrieve the etag (headRaw) when response.ETag was missing. The PR replaces finishPut with a synchronous requireEtag(response.ETag, key) that throws BlobStoreError: S3/R2 returned no etag (packages/storage-s3/src/index.ts:509, packages/storage-cloudflare-r2/src/index.ts:510). The new adapter tests deliberately expect this throw and then verify head still sees the object (packages/storage-s3/src/index.test.ts:184, packages/storage-cloudflare-r2/src/index.test.ts:184), confirming the object is stored but the caller observes a failure. LocalStack or MinIO variants that omit ETag on PutObject will now fail every put.
Checked prior implementation diff and the requireEtag helper; no opt-in to restore the HEAD fallback remains.
🔵 Issue 4 — Stream buffering is duplicated across four packages
packages/storage-blobs/src/index.ts:602 · nit · identified by meta/muse-spark-1.2
A fix to empty-chunk throttling or size-limit handling must be applied in four places, increasing the chance of divergence.
The PR introduces identical readBody implementations with MAX_EMPTY_BODY_CHUNKS_WITHOUT_PROGRESS, exponential growth (Math.min(limitBytes, Math.max(nextTotal, bytes.byteLength===0 ? 16*1024 : bytes.byteLength*2))), and emptyChunksWithoutProgress tracking in packages/storage-blobs/src/index.ts:602, packages/storage-azure-blob/src/index.ts:119, packages/storage-s3/src/index.ts:192, and packages/storage-cloudflare-r2/src/index.ts:191. The constant lives in the port but the logic is copy-pasted. A future change to the 10_000 threshold or the 16*1024 initial capacity could be missed in one adapter.
Verified via grep MAX_EMPTY_BODY that four definitions exist and no shared helper is imported.
🟠 Issue 5 — Dot-segment validation rejects trailing-slash dot prefixes
packages/storage-blobs/src/index.ts:341 · risk · identified by meta/muse-spark-1.2
A list({ prefix: "a/./", limit }) call that includes a dot segment followed by a trailing slash will be rejected, which is correct per the new spec but is a stricter break than the old . / .. exact-key check.
assertBlobPathString now splits on "/" and rejects any segment equal to "." or ".." (packages/storage-blobs/src/index.ts:341). The previous port only rejected the exact keys "." and "..", so prefixes like "./a", "a/./b", "a/.", and "a/.." previously passed for list (which explicitly allowed "."/".." prefixes). The new conformance case rejects keys and prefixes with dot path segments and the README update (packages/storage-blobs/README.md:67) document the break, but a caller that listed "./hidden"-style prefixes will now get BlobValidationError instead of an empty page.
Checked the diff hunk, the conformance bulk test covering a/./a/.., and that split("/") also treats "a//b" (empty segment) as allowed, which may be surprising alongside the dot check.
🟠 Issue 6 — Release workflow pins package list and NPM version in two places
.github/workflows/publish.yml:200 · risk · identified by meta/muse-spark-1.2
A drift between scripts/release-packages.mjs:RELEASE_PACKAGES/REVIEWED_NPM and the inline publish.yml packages/npmVersion constants will make publish:prepare succeed locally but fail in the OIDC publish job, or vice versa.
The workflow embeds its own const packages = ["@pegma/storage-blobs", ...] and npmVersion !== "11.18.0" (https://registry.npmjs.org/ hard-coded) inside a heredoc script (publish.yml:around 200 and around 395). The source of truth remains scripts/release-packages.mjs:RELEASE_PACKAGES and REVIEWED_NPM. The test keeps workflow-owned publication constants aligned (tests/release-packages.test.ts:67) catches drift in CI, but if that test is skipped or not run before a tag push, a mismatched package addition would seal four tarballs locally and then the workflow-owned verifier would reject the manifest as invalid (manifest.packages.length !== packages.length).
Verified both lists exist and the test parses the workflow file with regex, but the workflow itself does not import the module.
🔵 Issue 7 — Manifest inventory check is exact but error messages hide expected vs actual
scripts/release-packages.mjs:697 · nit · identified by meta/muse-spark-1.2
When a stray file is left in .release/ (for example a leftover .npmrc or hidden dotfile), assertReleaseInventory will throw a generic release output inventory does not match the prepared package list without indicating which file is extra.
Both scripts/release-packages.mjs:assertReleaseInventory and the inline publish script (publish.yml:around 280 and around 260) compare JSON.stringify(actualInventory) !== JSON.stringify(expectedInventory) and fail with a single message. Debugging a failed release job from logs will require guessing which artifact entry is stray. The prior include-hidden-files: true allowed hidden files; the new include-hidden-files: false (publish.yml:128) makes this check more sensitive.
Checked assertReleaseInventory implementations; they do not log expected vs actual before failing.
🔵 Issue 8 — LocalStack harness now binds to loopback only
test/localstack.ts:121 · nit · identified by meta/muse-spark-1.2
The change is intentional hardening, but existing contributor scripts that relied on the default 0.0.0.0:10101 mapping will no longer be reachable from other containers.
test/localstack.ts:121 changes Docker -p ${PORT}:4566 to -p 127.0.0.1:${PORT}:4566 and pins the image to localstack/localstack:4.3.0 (test/localstack.ts:23). A developer who runs tests from inside Docker (or exposes LocalStack to a VM) will see connection refused instead of the previous open binding. No documentation other than the PR body mentions the loopback restriction.
Verified the diff hunk and that LOCALSTACK_ENDPOINT remains http://127.0.0.1:10101, which already assumed loopback.
🔴 Issue 9 — Publish job cannot satisfy its own exact npm 11.18.0 gate
.github/workflows/publish.yml · bug · identified by z-ai/glm-5.3-flash
On every release, the publish job fails at publication requires npm 11.18.0 unless the runner's preinstalled npm happens to be exactly 11.18.0. The job has no step installing the reviewed npm, unlike prepare and smoke, which both run npm install --global npm@11.18.0; the smoke job's install step is itself evidence the author expects the bundled npm to differ from 11.18.0.
Mechanism: the inline publish script spawns npm from PATH (which setup-node points at Node 24.18.0's bundled npm) and hard-fails unless npm --version equals "11.18.0" exactly (if (npmVersion !== "11.18.0") { fail("publication requires npm 11.18.0") }, near the end of the heredoc in .github/workflows/publish.yml). Node-bundled npm is not controlled by this repo, the release path only executes on release events, and the PR's validation (pnpm test, release:check) cannot exercise it — the first signal is a failed production publish. Because release runs use the workflow file at the release commit, fixing this afterwards requires re-tagging a new release.
The natural repair is also blocked by a test: tests/release-packages.test.ts asserts expect(publish).not.toContain("npm install"), which forbids npm install --global npm@11.18.0 even though the assertion's intent is only to keep project dependency installs out of the publisher. Fixing the job requires narrowing that guard (e.g. forbid pnpm install/npm ci but allow the global npm bootstrap) in the same change.
Checked: full read of .github/workflows/publish.yml (publish job steps contain no npm bootstrap), scripts/release-packages.mjs (REVIEWED_NPM_VERSION = "11.18.0", requireTrustedPublishingNpm), and tests/release-packages.test.ts. Proof gap: I could not verify offline which npm version Node 24.18.0 bundles; if it is exactly 11.18.0 the gate passes by coincidence today, but nothing in the repo enforces or documents that pairing and any future Node bump breaks it silently.
🟠 Issue 10 — include-hidden-files: false may exclude the hidden .release/ artifact root
.github/workflows/publish.yml:141 · risk · identified by z-ai/glm-5.3-flash
If the pinned actions/upload-artifact (v5.0.0 SHA) treats hidden directories like hidden files, uploading path: .release/ with include-hidden-files: false produces an empty artifact and if-no-files-found: error fails the prepare job — the release dies before smoke/publish ever run. GitHub's hidden-file definition covers "files or directories that start with a period", and the workflow on main deliberately set include-hidden-files: true for this same upload, so removing the flag is the change that alters behavior for a hidden root directory.
Cost is amplified by the release model: release runs execute the workflow file at the release commit, so a fix requires a new tag rather than a plain merge to main.
Proof gap: I could not execute the action or inspect its vendored glob implementation offline. With fast-glob semantics a literal .release path segment is matched regardless of the dot option, so the upload may well succeed; the cheap verification is a dry run of the upload step or reading search.ts at the pinned SHA. If exclusion is per-file-basename only, this finding is void; otherwise rename the output directory (e.g. release/) or restore include-hidden-files: true — the strict assertReleaseInventory check already guards against stray hidden files entering the artifact.
Checked: the upload step in .github/workflows/publish.yml; tests/release-packages.test.ts pins expect(prepare).toContain("include-hidden-files: false"), so the change is intentional — but intent is not evidence the hidden-root case is safe.
🟠 Issue 11 — S3/R2 put now throws on ETag-less success responses, breaking S3-compatible backends that omit ETag
packages/storage-s3/src/index.ts:509 · risk · identified by z-ai/glm-5.3-flash
A backend whose PutObject succeeds but returns no ETag — the exact class the removed code called out ("Some S3-compatible servers omit ETag on put") — now makes every put throw BlobStoreError("S3 put failed …") after the object has already been stored. Callers that treat a throw as "not stored" will retry or mark the upload failed; a retry with ifNoneMatch: "*" then returns { ok: false, reason: "exists" }, leaving the caller with an object it believes does not exist and no etag short of a separate head.
Mechanism: finishPut became synchronous and routes through requireEtag(response.ETag, key), which throws instead of the previous HEAD-fallback recovery (headRaw recovered the stored etag and the put returned success). Affected instances (same mechanism, same repair):
packages/storage-s3/src/index.ts:509packages/storage-cloudflare-r2/src/index.ts:510
The new tests ("rejects a write response without an etag") pin the new behavior against LocalStack, which always returns ETags, so the conformance suite cannot detect the compatibility loss — and per the README's "honest intersection" rule, a requirement not every S3-compatible backend can honor is now mandatory for all of them.
Checked: full reads of both adapters (requireEtag exists at s3:315 / r2:314 and is also used by head/get/list, which were already strict before this PR — only the put fallback was removed); greps found no remaining references to the removed fallback; docs/ does not document the old fallback, so no stale docs. If dropping those backends is the accepted trade-off, it should at least be documented in the adapter READMEs.
🔵 Issue 12 — Listing with prefix . is no longer possible; no replacement for enumerating dot-prefixed keys
packages/storage-blobs/src/index.ts:405 · nit · identified by z-ai/glm-5.3-flash
Code that enumerated all dot-prefixed keys (e.g. a GC pass over .-namespaced data) via list({ prefix: "." }) now throws BlobValidationError. The old port explicitly allowed . and .. as prefixes "so keys such as .hidden remain listable"; the rewrite rejects every dot segment in assertBlobPathString, and the only remaining route is a prefixless full listing with client-side filtering — a pagination-cost regression on large backends.
Writing .hidden / .well-known/... keys still works, and per-segment prefixes like .well-known/ still list; only the bare ./.. prefix is lost. The README's new "Keys and prefixes" section documents what is rejected but not that the old enumeration idiom disappeared.
Checked: packages/storage-blobs/src/index.ts (assertValidBlobPrefix now delegates to the dot-segment check), the updated conformance case ("rejects keys and prefixes with dot path segments" asserts list({ prefix: key }) rejects), and the storage-blobs README. Nit because a prefixless listing remains a correct, if costlier, substitute.
🔵 Issue 13 — Azure store now rejects non-absolute containerClient.url at construction
packages/storage-azure-blob/src/index.ts:305 · nit · identified by z-ai/glm-5.3-flash
A host (or structural test double) whose ContainerClient.url is not an absolute URL now gets BlobValidationError("containerClient.url must be absolute.") from createAzureBlobStore before any operation runs; previously the code fell back to using the raw string as the endpoint (losing only SAS stripping). The real SDK always produces absolute URLs, so @azure/storage-blob users are unaffected, but the adapter's option is a structural ContainerClient and the old fallback was the tolerant path for custom implementations.
Checked: packages/storage-azure-blob/src/index.ts:305-308 (new throw with cause: error), the azure test suite (all stores are built from real Azurite clients, so nothing exercises the old fallback), and the adapter docs (no promise of relative-URL support). Nit — the hardening is defensible; flagging only the silent behavior change for custom client implementations.
🔵 Issue 14 — Smoke job defines RELEASE_COMMIT that the smoke path never reads
.github/workflows/publish.yml:159 · nit · identified by z-ai/glm-5.3-flash
No runtime failure; the cost is confusion and drift. smokePreparedRelease/verifyPreparedManifest never consult process.env.RELEASE_COMMIT — the manifest's gitCommit is checked against git rev-parse HEAD in the smoke checkout — while only publishPreparedRelease reads that variable, and the workflow no longer runs that path. The RELEASE_COMMIT: ${{ github.sha }} entry in the smoke job's env block is dead configuration.
Checked: full read of scripts/release-packages.mjs (smoke code path) and the workflow's smoke job. Nit.
🔵 Issue 15 — Isolated npm environment strips proxy/CA variables, breaking registry access on proxied runners
scripts/release-packages.mjs:140 · nit · identified by z-ai/glm-5.3-flash
On a self-hosted or proxied runner that reaches registry.npmjs.org only via HTTPS_PROXY/HTTP_PROXY/NO_PROXY (or needs a custom CA via SSL_CERT_FILE/NODE_EXTRA_CA_CERTS), every npm child spawned by the release tooling fails: the shared allowlist forwards only PATH, HOME, temp/Windows vars, CI, and GITHUB_*/ACTIONS_ID_TOKEN_*/RUNNER_*, so npm's standard proxy and CA environment variables are dropped. The symptom would be npm view/install/publish network errors that do not reproduce when the same commands run outside the isolated environment — expensive to diagnose mid-release.
Instances (same mechanism, same fix — add the standard proxy/CA names to the allowlist):
scripts/release-packages.mjs:140(isolatedNpmEnvironment, used by pack, registry view, and smoke install paths)- the inline publish script's
npmEnvfilter in.github/workflows/publish.yml(identical allowlist)
The declared runner is GitHub-hosted ubuntu-latest, which has no proxy, so this never fires in the default setup — nit unless self-hosted runners are in scope.
Checked: both allowlists in full; no proxy or CA variable appears in either.
🔵 Issue 16 — artifact-digest output is recorded but never verified by any consumer
.github/workflows/publish.yml:22 · nit · identified by z-ai/glm-5.3-flash
No failure; the cost is a false sense of anchoring. prepare.outputs.artifact-digest (from steps.upload.outputs.artifact-digest) is computed and printed to the step summary, but neither smoke nor publish compares anything against it — only the manifest digest crosses the job boundary. A reader auditing the release chain may assume the artifact bytes are anchored by this output when they are not.
Checked: full workflow read; grep for artifact-digest finds only the output declaration and the summary line. Nit — either consume it in a downstream job or drop it.
🔵 Issue 17 — Publication validation now duplicated between the inline workflow script and release-packages.mjs, whose publish path is dead
scripts/release-packages.mjs · nit · identified by z-ai/glm-5.3-flash
Drift risk between two near-equal implementations of manifest/record/inventory validation. The workflow's publish job no longer calls node scripts/release-packages.mjs publish (the updated test now asserts the publish job does NOT contain scripts/release-packages.mjs), so publishPreparedRelease, requireTrustedPublishingNpm, decidePublication, and confirmRegistryIntegrity in scripts/release-packages.mjs are unreachable from the release pipeline, yet remain exported and pinned by the retry-safe publication tests. Future rule changes must be applied twice; the alignment test pins only a handful of constants (package list, schemaVersion, npm version, env names, tag patterns), so logic-level drift — e.g. a new manifest field validated in one copy only — would pass CI and surface only during a real release, where it fails production and requires re-tagging.
Checked: scripts/release-packages.mjs in full, the workflow, and tests/release-packages.test.ts. Nit — either delete the script-side publish path or keep a single source of truth; maintaining two live copies is the worst option.
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: cac25fd08292f1cfa51a2f35e4121a4658e7787a
Judge: openai/gpt-5.6-luna
Cost: $0.4621 (lanes $0.4558 + judge $0.0063)
Lanes
meta/muse-spark-1.2: ok (6 finding(s), 77.8s, 312942+7951 tokens (85158 cached), 5 tool round(s), via Meta, $0.33)z-ai/glm-5.3-flash: ok (6 finding(s), 422.5s, 2117000+69565 tokens (1898496 cached), 18 tool round(s), via PrimeIntellect, $0.12)
Findings
🟠 Issue 1 — Duplicated release-tag regex can drift between workflow and script
.github/workflows/publish.yml:28 · risk · identified by meta/muse-spark-1.2
Failure scenario: the stable-tag regex ^v(0\.[1-9][0-9]*|[1-9][0-9]*\.[0-9]+)\.[0-9]+$ is duplicated in two workflow steps (Authenticate the release source and Re-authenticate the release source) and separately in scripts/release-packages.mjs (validateReleaseTag / verifyPreparedManifest). A future edit that updates one copy but not the others would let a tag like v0.0.9 pass preparation but fail publication (or vice-versa), breaking the documented invariant that v0.0.x is never a release tag.
Evidence: publish.yml contains the same if [[ ! "${RELEASE_TAG}" =~ ^v(0\.[1-9][0-9]*|... block twice, and release-packages.mjs:274 and :948 repeat the pattern independently. Tests in tests/release-packages.test.ts:96-111 assert the two workflow copies are equal but do not assert equality with the script regex.
Checked: grep for the pattern across the checkout shows three independent literals; list_dir confirms no shared include file. Proof gap: no single source-of-truth import exists today beyond the workflow-embedded script comparison.
🔵 Issue 2 — Copied empty-chunk stream buffering across four packages
packages/storage-blobs/src/index.ts:608 · nit · identified by meta/muse-spark-1.2
Failure scenario: readBody plus MAX_EMPTY_BODY_CHUNKS_WITHOUT_PROGRESS (10,000) and the growing-buffer logic is copy-pasted verbatim into @pegma/storage-blobs, storage-azure-blob, storage-s3, and storage-cloudflare-r2. A bug fix (e.g., changing the 16 KiB seed size or the cancel semantics) applied to one package but missed in another lets a malicious or buggy ReadableStream that emits 10,001 empty chunks be accepted by one adapter and rejected by the others, breaking the conformance-suite promise that the port is the honest intersection.
Evidence: packages/storage-blobs/src/index.ts:608-675, packages/storage-azure-blob/src/index.ts:126-194, packages/storage-s3/src/index.ts:200-264, packages/storage-cloudflare-r2/src/index.ts:199-263 are identical except for comments. There is no shared utility imported by the adapters.
Checked: grep MAX_EMPTY_BODY_CHUNKS_WITHOUT_PROGRESS finds four definitions/usages; no shared readBody module exists in the checkout.
🟠 Issue 3 — Azure container URL check does not normalize percent-encoding
packages/storage-azure-blob/src/index.ts:336 · risk · identified by meta/muse-spark-1.2
Failure scenario: containedBlockBlobClient validates blobUrl.origin === containerUrl.origin and blobUrl.pathname.startsWith(containerPathPrefix) without decoding. An attacker-controlled or buggy ContainerClient.getBlockBlobClient could return https://account.blob.core.windows.net/container/%2e%2e/other or %2F-encoded segments. pathname would still start with /container/ (because %2e stays encoded), so the check passes, but the request hitting Azure would be interpreted as a path traversal outside the configured container.
Evidence: packages/storage-azure-blob/src/index.ts:336-353 builds containerPathPrefix from containerUrl.pathname and compares raw blobUrl.pathname. No decodeURIComponent or URL normalization is applied before the prefix check.
Checked: read the file directly; the preceding containerUrl.search=""/hash="" stripping shows the intent is security-boundary enforcement, but encoded traversal remains unhandled. Azure’s service normalizes encoded slashes/dots server-side, so the check is not equivalent.
🟠 Issue 4 — Isolated npm environment drops proxy configuration
scripts/release-packages.mjs:150 · risk · identified by meta/muse-spark-1.2
Failure scenario: isolatedNpmEnvironment in both scripts/release-packages.mjs and the inline publish.yml script allow-lists only PATH, HOME, USERPROFILE, SystemRoot, TEMP, TMP, TMPDIR, CI, ComSpec, PATHEXT, WINDIR, plus GITHUB_*, ACTIONS_ID_TOKEN_*, RUNNER_*. In CI environments that require HTTP_PROXY, HTTPS_PROXY, NO_PROXY, or npm_config_proxy to reach registry.npmjs.org, npm view / npm publish inside the isolated temp dir fails with network errors, aborting a legitimate release and leaving the retry loop to time out.
Evidence: scripts/release-packages.mjs:150-178 and publish.yml inline script allowedNames set. No proxy variables are forwarded, and NPM_CONFIG_USERCONFIG/GLOBALCONFIG are pointed at empty files, so no fallback proxy config is read.
Checked: grep for isolatedNpmEnvironment and manual read of the publish script; the previous code inherited process.env wholesale, so this is a new filtering behavior.
🔵 Issue 5 — Publish workflow inlines release logic instead of sharing module
.github/workflows/publish.yml:185 · nit · identified by meta/muse-spark-1.2
Failure scenario: the publish job no longer calls scripts/release-packages.mjs and instead cats a ~300-line Node script into $RUNNER_TEMP/publish-release.mjs. That script duplicates package inventory, schema version (3), REVIEWED_NPM version (11.18.0), env allow-list, and tarball hashing from release-packages.mjs. A version bump or integrity-regex change in the module that is not manually mirrored in the workflow lets the workflow publish with stale expectations (e.g., old schemaVersion or old tarball-name rule) while local release:check passes, causing a release to be rejected after artifact upload.
Evidence: publish.yml:185-380 contains the full inline script; tests/release-packages.test.ts:72-112 explicitly checks that packages, schemaVersion, and npmVersion stay aligned, proving drift is a known risk. The inline script is not imported, so the test can only detect drift after the fact.
Checked: compared release-packages.mjs:59-61 RELEASE_MANIFEST_SCHEMA_VERSION and REVIEWED_NPM_VERSION with the workflow literals; they match today but have no single source import.
🔵 Issue 6 — LocalStack harness now loopback-bound without fallback for existing port holder
test/localstack.ts:118 · nit · identified by meta/muse-spark-1.2
Failure scenario: test/localstack.ts:118 changed -p ${LOCALSTACK_PORT}:4566 to -p 127.0.0.1:${LOCALSTACK_PORT}:4566. If setup() is called on a runner where 127.0.0.1:10101 is already held by a non-LocalStack process, portAccepting returns true, waitForS3Ready polls /_localstack/health for 30 s and then throws a generic S3 was not healthy error. The previous binding would have failed fast on docker run port conflict, which is clearer to diagnose. The hardening is correct for security, but the error path is now more opaque for a common local-dev collision.
Evidence: test/localstack.ts:30-65 portAccepting/waitForS3Ready and setup():48-55 early-return; docs/securityscan.md notes test harnesses as low-stakes.
Checked: read test/localstack.ts after the diff; the health check still fetches http://127.0.0.1:${LOCALSTACK_PORT}/_localstack/health so reachability is consistent with the new binding.
🟠 Issue 7 — Publish job requires npm exactly 11.18.0 but never installs it
.github/workflows/publish.yml:463 · risk · identified by z-ai/glm-5.3-flash
A stable release completes the full prepare gate and the smoke job, then the publish job runs Verify and publish the sealed packages. Its first gate spawns npm --version from the runner's Node install and fails with "publication requires npm 11.18.0" unless Node 24.18.0's bundled npm happens to be exactly 11.18.0 — blocking the release at the very last step, after everything else succeeded.
Evidence: the prepare (line 97) and smoke (line 164) jobs both run npm install --global npm@11.18.0 before doing npm work; the publish job has no equivalent step. Before this change, requireTrustedPublishingNpm in scripts/release-packages.mjs accepted any npm >= 11.5.1, so the uninstalled bundled npm was acceptable; this PR tightens the check to exact equality in the heredoc (npmVersion !== "11.18.0", line 463) without adding the install step that makes the other two jobs satisfy it.
Secondary drift risk: the new keeps workflow-owned publication constants aligned test in tests/release-packages.test.ts pins the heredoc's npmVersion !== "..." string to REVIEWED_NPM.version, but not the two npm install --global npm@11.18.0 literals, so a future reviewed-npm bump in scripts/release-packages.mjs can be applied to the heredoc while the install steps keep provisioning the old version.
Proof gap: I could not determine from the repository which npm version Node 24.18.0 bundles; if it is exactly 11.18.0 the pipeline works today, but it still depends on an unpinned coincidence that breaks on the next node-version bump. Fix direction: give the publish job the same npm install --global npm@${REVIEWED_NPM.version} step (or pin the version via setup-node/npm setup) instead of relying on the bundled CLI.
🟠 Issue 8 — Release workflow now fetches origin anonymously, breaking releases from non-public repositories
.github/workflows/publish.yml:63 · risk · identified by z-ai/glm-5.3-flash
On a private repository (or any private mirror reusing this workflow), a stable release now dies at the very first step: Authenticate the release source runs git -C "${verify_dir}" fetch ... origin against https://github.com/${GITHUB_REPOSITORY}.git with no credentials configured anywhere in that bare repository, and the later git fetch steps in prepare also run after a persist-credentials: false checkout, so nothing authenticates plain git fetch. Both fail with a git authentication error and no release can ever publish.
Evidence: lines 59–66 fetch refs/heads/main and the release tag anonymously before any checkout exists; lines 75–85 check out with persist-credentials: false and then perform a manual git fetch of main and the tag (the old flow relied on actions/checkout's persisted credentials for its git fetch origin main step); the publish job repeats the anonymous bare-repo fetch at lines 225–233.
What I checked: the smoke job's checkout (persist-credentials: false, depth 1) needs no follow-up fetches, so only prepare and publish are affected; the workflow has no token:/http.*.extraheader configuration for the manual fetches. For a public repository everything works, so the failure is conditional on repository visibility — but it is a hard regression versus the previous credential-bearing flow whenever the repo is not public-readable.
🟠 Issue 9 — Inline publish script duplicates release-packages.mjs with only partial drift protection
.github/workflows/publish.yml:260 · risk · identified by z-ai/glm-5.3-flash
A future change to scripts/release-packages.mjs — a new manifest field, a stronger tarball check, a change to the registry-probe or retry rules — can be merged with its tests green while the workflow's heredoc copy keeps enforcing the older, weaker logic at actual publication time, because the two copies are maintained by hand.
Evidence: the heredoc starting at line 260 reimplements manifest/schema validation, per-tarball SHA-256/SHA-512 verification, exact inventory enforcement, registry integrity probing, the E404-only "absent version" fallback, publish flags (--access public --provenance --ignore-scripts), and the confirm-with-backoff loop from scripts/release-packages.mjs. The new alignment test (tests/release-packages.test.ts:69) pins only the package list, manifest.schemaVersion !== 3, the npm version string, the four Windows env-var names, tag-pattern equality across jobs, and the verify-tag/merge-base --is-ancestor counts. None of the hash-verification block, integrity/SHA-256 regexes, inventory check, retry/backoff semantics, publish flag set, or dependency publish order is pinned.
Cost: the checked-in pin test gives the impression the two implementations are locked together, but only a handful of constants are; publication could silently run weaker checks than the reviewed script while CI stays green. Consider making the publish job run node scripts/release-packages.mjs publish (with its GITHUB_ACTIONS guard) or extending the alignment test to the security-critical blocks.
🔵 Issue 10 — docs/securityscan.md release-pipeline references and fix description are stale
docs/securityscan.md:136 · nit · identified by z-ai/glm-5.3-flash
A reader auditing the security record finds the resolved Low finding ("Publish pipeline trusts the cross-job artifact's self-consistency") described as: prepare records the digest "and publish passes it to release:publish via --expected-manifest-digest", with locations .github/workflows/publish.yml:74-86, 113-120 and scripts/release-packages.mjs:509-560.
This PR invalidates that record: the publish job no longer calls scripts/release-packages.mjs at all (verification moved into the inline heredoc, publish.yml:260), the manifest-digest step moved to roughly line 134, and verifyPreparedManifest's line span changed. The docs/securityscan.md:166 note that "the digest is already written to the step summary at publish.yml:86" also points at a line that no longer holds that content.
The scan doc's own scope excludes docs/*.md, so this is documentation hygiene, not a code defect — but the security record now cites line numbers and a mechanism that describe a superseded implementation.
🔵 Issue 11 — Key/prefix guarantee tightened without the minor version bump the freeze rule requires
packages/storage-blobs/src/index.ts:345 · nit · identified by z-ai/glm-5.3-flash
A consumer using a list prefix of . (explicitly allowed and documented before this change — the deleted doc comment said "the exact strings . and .. are allowed as prefixes so keys such as .hidden remain listable") upgrades within 0.2.x and starts getting BlobValidationError from list, put, get, head, and delete, with no semver signal if the next release is a patch.
Evidence: assertBlobPathString now rejects ./.. path segments in keys and prefixes (line 345), assertValidBlobKey lost its exact-key carve-out, and the conformance suite gained the "rejects keys and prefixes with dot path segments" case. docs/ADAPTER_AUTHORING.md's "Freezing the contract" section states that changing a guarantee requires conformance cases in the same change, implementation in every in-repo adapter, and a minor version bump on the port package. The first two requirements are met; packages/storage-blobs/package.json still says 0.2.0.
Checked: docs/RELEASING.md keeps version changes in ordinary reviewed PRs, so the bump may be deliberately deferred to a version PR — flagging it so the freeze rule is honored before this ships in a 0.2.x tag. The README ("Pin exact versions" on 0.x) mitigates but does not remove the surprise.
🔵 Issue 12 — New smoke command rejects tagless locally prepared manifests
scripts/release-packages.mjs:943 · nit · identified by z-ai/glm-5.3-flash
A maintainer runs pnpm run release:pack locally without RELEASE_TAG set: prepareRelease writes "releaseTag": null into the manifest (line 841) and its inline smoke tests pass, but running the new node scripts/release-packages.mjs smoke against that .release directory now fails with the generic "prepared package manifest is invalid", because verifyPreparedManifest requires prepared.releaseTag to match the strict stable-series tag regex (lines 943–947) and test(null) is true.
Cost: the newly added smoke command cannot re-verify a locally prepared release; only tag-anchored manifests prepared with --require-release-tag work, so a useful local verification path (pack on one machine, smoke on another) silently doesn't exist for tagless preparations.
Checked: the workflow always passes --require-release-tag (publish.yml line ~120), so CI is unaffected; this only narrows local tooling. If tagless manifests are meant to be out of scope for smoke, a clearer error message distinguishing "tagless manifest" from "invalid manifest" would avoid misdiagnosis.
| "TEMP", | ||
| "TMP", | ||
| "TMPDIR", | ||
| "CI", |
There was a problem hiding this comment.
🟠 Isolated npm environment drops proxy configuration (risk)
Failure scenario: isolatedNpmEnvironment in both scripts/release-packages.mjs and the inline publish.yml script allow-lists only PATH, HOME, USERPROFILE, SystemRoot, TEMP, TMP, TMPDIR, CI, ComSpec, PATHEXT, WINDIR, plus GITHUB_*, ACTIONS_ID_TOKEN_*, RUNNER_*. In CI environments that require HTTP_PROXY, HTTPS_PROXY, NO_PROXY, or npm_config_proxy to reach registry.npmjs.org, npm view / npm publish inside the isolated temp dir fails with network errors, aborting a legitimate release and leaving the retry loop to time out.
Evidence: scripts/release-packages.mjs:150-178 and publish.yml inline script allowedNames set. No proxy variables are forwarded, and NPM_CONFIG_USERCONFIG/GLOBALCONFIG are pointed at empty files, so no fallback proxy config is read.
Checked: grep for isolatedNpmEnvironment and manual read of the publish script; the previous code inherited process.env wholesale, so this is a new filtering behavior.
There was a problem hiding this comment.
No change: the requested isolated publication environment explicitly removes proxy and custom certificate overrides. The official registry is fixed on each command, and preserving these overrides would contradict that contract.
| publish: | ||
| needs: [prepare, smoke] | ||
| runs-on: ubuntu-latest | ||
| environment: npm-publish |
There was a problem hiding this comment.
🔵 Publish workflow inlines release logic instead of sharing module (nit)
Failure scenario: the publish job no longer calls scripts/release-packages.mjs and instead cats a ~300-line Node script into $RUNNER_TEMP/publish-release.mjs. That script duplicates package inventory, schema version (3), REVIEWED_NPM version (11.18.0), env allow-list, and tarball hashing from release-packages.mjs. A version bump or integrity-regex change in the module that is not manually mirrored in the workflow lets the workflow publish with stale expectations (e.g., old schemaVersion or old tarball-name rule) while local release:check passes, causing a release to be rejected after artifact upload.
Evidence: publish.yml:185-380 contains the full inline script; tests/release-packages.test.ts:72-112 explicitly checks that packages, schemaVersion, and npmVersion stay aligned, proving drift is a known risk. The inline script is not imported, so the test can only detect drift after the fact.
Checked: compared release-packages.mjs:59-61 RELEASE_MANIFEST_SCHEMA_VERSION and REVIEWED_NPM_VERSION with the workflow literals; they match today but have no single source import.
There was a problem hiding this comment.
No change: the publisher must execute workflow-owned inline logic and must not check out or run release-tag scripts. The parity test covers the shared constants and critical publish markers.
|
|
||
| try { | ||
| const npmVersion = runNpm(["--version"]).stdout.trim(); | ||
| if (npmVersion !== "11.18.0") { |
There was a problem hiding this comment.
🟠 Publish job requires npm exactly 11.18.0 but never installs it (risk)
A stable release completes the full prepare gate and the smoke job, then the publish job runs Verify and publish the sealed packages. Its first gate spawns npm --version from the runner's Node install and fails with "publication requires npm 11.18.0" unless Node 24.18.0's bundled npm happens to be exactly 11.18.0 — blocking the release at the very last step, after everything else succeeded.
Evidence: the prepare (line 97) and smoke (line 164) jobs both run npm install --global npm@11.18.0 before doing npm work; the publish job has no equivalent step. Before this change, requireTrustedPublishingNpm in scripts/release-packages.mjs accepted any npm >= 11.5.1, so the uninstalled bundled npm was acceptable; this PR tightens the check to exact equality in the heredoc (npmVersion !== "11.18.0", line 463) without adding the install step that makes the other two jobs satisfy it.
Secondary drift risk: the new keeps workflow-owned publication constants aligned test in tests/release-packages.test.ts pins the heredoc's npmVersion !== "..." string to REVIEWED_NPM.version, but not the two npm install --global npm@11.18.0 literals, so a future reviewed-npm bump in scripts/release-packages.mjs can be applied to the heredoc while the install steps keep provisioning the old version.
Proof gap: I could not determine from the repository which npm version Node 24.18.0 bundles; if it is exactly 11.18.0 the pipeline works today, but it still depends on an unpinned coincidence that breaks on the next node-version bump. Fix direction: give the publish job the same npm install --global npm@${REVIEWED_NPM.version} step (or pin the version via setup-node/npm setup) instead of relying on the bundled CLI.
There was a problem hiding this comment.
No change to the publisher: Node is pinned to 24.18.0, whose bundled npm is 11.18.0, and the exact gate is intentional. Installing tooling in the OIDC job is excluded. Updated in f844a4c: tests now pin both preparation-job npm installs to the reviewed version.
| git -C "${verify_dir}" remote add origin "https://github.com/${GITHUB_REPOSITORY}.git" | ||
| git -C "${verify_dir}" config gpg.format ssh | ||
| git -C "${verify_dir}" config gpg.ssh.allowedSignersFile "${allowed_signers}" | ||
| git -C "${verify_dir}" fetch --no-tags origin refs/heads/main:refs/remotes/origin/main |
There was a problem hiding this comment.
🟠 Release workflow now fetches origin anonymously, breaking releases from non-public repositories (risk)
On a private repository (or any private mirror reusing this workflow), a stable release now dies at the very first step: Authenticate the release source runs git -C "${verify_dir}" fetch ... origin against https://github.com/${GITHUB_REPOSITORY}.git with no credentials configured anywhere in that bare repository, and the later git fetch steps in prepare also run after a persist-credentials: false checkout, so nothing authenticates plain git fetch. Both fail with a git authentication error and no release can ever publish.
Evidence: lines 59–66 fetch refs/heads/main and the release tag anonymously before any checkout exists; lines 75–85 check out with persist-credentials: false and then perform a manual git fetch of main and the tag (the old flow relied on actions/checkout's persisted credentials for its git fetch origin main step); the publish job repeats the anonymous bare-repo fetch at lines 225–233.
What I checked: the smoke job's checkout (persist-credentials: false, depth 1) needs no follow-up fetches, so only prepare and publish are affected; the workflow has no token:/http.*.extraheader configuration for the manual fetches. For a public repository everything works, so the failure is conditional on repository visibility — but it is a hard regression versus the previous credential-bearing flow whenever the repo is not public-readable.
There was a problem hiding this comment.
No change: this repository is public, and anonymous pre-checkout fetches are intentional so source authentication does not depend on a persisted checkout credential.
|
|
||
| script_path="${RUNNER_TEMP}/publish-release.mjs" | ||
| umask 077 | ||
| cat > "${script_path}" <<'NODE' |
There was a problem hiding this comment.
🟠 Inline publish script duplicates release-packages.mjs with only partial drift protection (risk)
A future change to scripts/release-packages.mjs — a new manifest field, a stronger tarball check, a change to the registry-probe or retry rules — can be merged with its tests green while the workflow's heredoc copy keeps enforcing the older, weaker logic at actual publication time, because the two copies are maintained by hand.
Evidence: the heredoc starting at line 260 reimplements manifest/schema validation, per-tarball SHA-256/SHA-512 verification, exact inventory enforcement, registry integrity probing, the E404-only "absent version" fallback, publish flags (--access public --provenance --ignore-scripts), and the confirm-with-backoff loop from scripts/release-packages.mjs. The new alignment test (tests/release-packages.test.ts:69) pins only the package list, manifest.schemaVersion !== 3, the npm version string, the four Windows env-var names, tag-pattern equality across jobs, and the verify-tag/merge-base --is-ancestor counts. None of the hash-verification block, integrity/SHA-256 regexes, inventory check, retry/backoff semantics, publish flag set, or dependency publish order is pinned.
Cost: the checked-in pin test gives the impression the two implementations are locked together, but only a handful of constants are; publication could silently run weaker checks than the reviewed script while CI stays green. Consider making the publish job run node scripts/release-packages.mjs publish (with its GITHUB_ACTIONS guard) or extending the alignment test to the security-critical blocks.
There was a problem hiding this comment.
The inline implementation is required so publication executes no release-tag code. Updated in f844a4c: parity tests now cover the stable-tag expression, package order, schema, npm version, both hashes, inventory, registry absence handling, and required publish flags.
| `${label} may have at most ${MAX_BLOB_KEY_SEGMENTS} path segments.`, | ||
| ); | ||
| } | ||
| if (segments.some((segment) => segment === "." || segment === "..")) { |
There was a problem hiding this comment.
🔵 Key/prefix guarantee tightened without the minor version bump the freeze rule requires (nit)
A consumer using a list prefix of . (explicitly allowed and documented before this change — the deleted doc comment said "the exact strings . and .. are allowed as prefixes so keys such as .hidden remain listable") upgrades within 0.2.x and starts getting BlobValidationError from list, put, get, head, and delete, with no semver signal if the next release is a patch.
Evidence: assertBlobPathString now rejects ./.. path segments in keys and prefixes (line 345), assertValidBlobKey lost its exact-key carve-out, and the conformance suite gained the "rejects keys and prefixes with dot path segments" case. docs/ADAPTER_AUTHORING.md's "Freezing the contract" section states that changing a guarantee requires conformance cases in the same change, implementation in every in-repo adapter, and a minor version bump on the port package. The first two requirements are met; packages/storage-blobs/package.json still says 0.2.0.
Checked: docs/RELEASING.md keeps version changes in ordinary reviewed PRs, so the bump may be deliberately deferred to a version PR — flagging it so the freeze rule is honored before this ships in a 0.2.x tag. The README ("Pin exact versions" on 0.x) mitigates but does not remove the surprise.
There was a problem hiding this comment.
No change: the requested key rule and conformance cases are explicit, while package version changes are expressly excluded from this slice. All packages therefore remain at 0.2.0.
|
Fixed in
The remaining notes reflect deliberate constraints:
|
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: partial
Scope: latest-commit (commit-range)
Mode: verify
Commit: 822f803a2764f0ca0b6b63a93275f023c82058bd
Judge: openai/gpt-5.6-luna
Cost: $0.1554 (lanes $0.1553 + judge $0.0001)
Lanes
meta/muse-spark-1.2: ok (0 finding(s), 41.0s, 124381+6016 tokens (42692 cached), 3 tool round(s), via Meta, $0.13)z-ai/glm-5.3-flash: ok (0 finding(s), 320.5s, 661856+26280 tokens (559332 cached), 19 tool round(s), via OpenInference, $0.0212)
Round 2 resolution
⚠️ r1-1fixed incorrectly — Duplicated release-tag regex can drift between workflow and script: Workflow still duplicates tag regex in two steps (publish.yml:39 and 210) and script still duplicates it in validateReleaseTag/verifyPreparedManifest. A parity test was added (tests/release-packages.test.ts keeps workflow-owned constants aligned) that checks the two workflow copies are identical, but it does not compare the workflow regex to scripts/release-packages.mjs, so workflow↔script drift (…- 🤝
r1-3disputed — Azure container URL check does not normalize percent-encoding: Re-examined packages/storage-azure-blob/src/index.ts lines 220-245. The claimed traversal mechanism does not hold for Azure Blob Storage: the container is the first path segment and blob names are flat, container-scoped identifiers. A URL likehttps://account/container/%2e%2e/otherpasses thestartsWithcheck and resolves to a blob literally named../otherinside the configured container, no… - 🤝
r1-4disputed — Isolated npm environment drops proxy configuration: isolatedNpmEnvironment in scripts/release-packages.mjs and the inline publish script still allow-lists only PATH/HOME/etc + GITHUB_/ACTIONS_ID_TOKEN_/RUNNER_*, dropping HTTP_PROXY etc. Fixing agent states empty npm configs and removal of proxy overrides are explicit security requirements for isolated release commands — intentional tradeoff, not an oversight absent new evidence. - ❌
r1-7not fixed — Publish job requires npm exactly 11.18.0 but never installs it: publish job still has no 'npm install --global npm@11.18.0' step (prepare and smoke do), but Verify and publish step fails if npm --version != 11.18.0 (publish.yml inline script). A stable release that passed prepare/smoke will still block at publication when the runner's bundled npm is not exactly 11.18.0. - ❌
r1-8not fixed — Release workflow now fetches origin anonymously, breaking releases from non-public repositories: publish.yml still does git init --bare + remote add https://github.com/${GITHUB_REPOSITORY}.git + git fetch origin and later git fetch after checkout with persist-credentials:false, with no credentials configured in the bare repo. Current publish.yml:63,83,235 etc unchanged; private repository fetches still fail with authentication error. - 🤝
r1-9disputed — Inline publish script duplicates release-packages.mjs with only partial drift protection: Inline publish-release.mjs heredoc in publish.yml still reimplements release-packages.mjs logic. Fixing agent justifies this as intentional: publish job must not execute code from the release tag and must be workflow-owned. Parity tests for packages/schema/npm version/env allowlist were added, making the duplication a deliberate security tradeoff rather than an accidental drift. - 6 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is
risk). - Open findings after this round: 3 (0 bug-severity).
Warning
The PR head advanced after this review's diff was collected. This review is pinned to commit 822f803 and does not cover the newest push.
No structured findings from the successful lane(s).
|
Current-head follow-up: Review item 10 is intentionally unchanged: the historical scan record is outside this maintenance slice, and changing it would conflict with the explicit public-artifact wording constraints. The current release guide and executable workflow tests remain the normative references. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: clean
Scope: latest-commit (commit-range)
Mode: verify
Commit: f844a4cffd8523d6fda74df9d462abdbb363a939
Judge: openai/gpt-5.6-luna
Cost: $0.1331 (lanes $0.1329 + judge $0.0001)
Lanes
meta/muse-spark-1.2: ok (0 finding(s), 36.2s, 93088+4535 tokens (13779 cached), 2 tool round(s), via Meta, $0.12)z-ai/glm-5.3-flash: ok (0 finding(s), 76.3s, 218186+10880 tokens (174336 cached), 6 tool round(s), via Particle AI, $0.0125)
Round 2 resolution
- ✅
r1-1fixed correctly — Duplicated release-tag regex can drift between workflow and script: Script now centralizes tag validation in exportedSTABLE_RELEASE_TAG(scripts/release-packages.mjs:31) and both validation paths use it (validateReleaseTag,verifyPreparedManifest). Workflow parity testtests/release-packages.test.tsextracts the two shell regexes via/if \[\[ ! "\$\{RELEASE_TAG\}" =~/and assertstagPatterns[0] === STABLE_RELEASE_TAG.sourceand that both copies are … - ✅
r1-3fixed correctly — Azure container URL check does not normalize percent-encoding:packages/storage-azure-blob/src/index.ts:216-276now decodes both container and blob pathnames (decodeURIComponent), checks raw prefix (blobUrl.pathname.startsWith(containerPathPrefix)) and decoded prefix (decodedBlobPath.startsWith(decodedContainerPathPrefix)), rejectsdecodedBlobPathdecode errors, and rejects decoded dot segments (relativePath.split('/').some(s=>s==='.'||s==='..')).… - 🤝
r1-4disputed — Isolated npm environment drops proxy configuration: No code change. Bothscripts/release-packages.mjs:isolatedNpmEnvironmentand the inline publish script inpublish.ymlintentionally allow-list only PATH/HOME/etc + GITHUB_/RUNNER_, clear user/global npmrc, and pinregistryon every command. PreservingHTTP_PROXY/HTTPS_PROXY/npm_config_proxywould contradict the documented isolated, registry-pinned contract. Failure in proxy-required … - 🤝
r1-7disputed — Publish job requires npm exactly 11.18.0 but never installs it: No publisher change.publishjob pinsactions/setup-node@...withnode-version: 24.18.0, whose bundled npm is 11.18.0, and then assertsnpmVersion !== "11.18.0"fail-closed. Installing/upgrading npm in the OIDCpublishjob is explicitly excluded by the threat model (workflow-owned, no checkout of release-tag code, no runtime tooling installs).tests/release-packages.test.tsnow asserts… - 🤝
r1-8disputed — Release workflow now fetches origin anonymously, breaking releases from non-public repositories: No change. Repositorypegma-dev/storage-blobsis public;Authenticate the release sourceandRe-authenticateintentionallygit init --bare+ anonymousfetch https://github.com/${GITHUB_REPOSITORY}.gitbefore checkout so source authentication does not depend onpersist-credentials. A private fork would need credentialed fetch, but that is out of scope for this public repository per the … - ✅
r1-9fixed correctly — Inline publish script duplicates release-packages.mjs with only partial drift protection: Duplication is intentional so the OIDCpublishjob never executesscripts/release-packages.mjsfrom the release tag. Drift is now mitigated by expanded parity tests intests/release-packages.test.ts:73-122: exact package list equality,manifest.schemaVersion === RELEASE_MANIFEST_SCHEMA_VERSION,npmVersion !== "${REVIEWED_NPM.version}", both hashes (hash(manifestBytes, "sha256","hex")/`… - 6 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).
Summary
Validation