Repository navigation
Refine release preparation and publication - #9
Conversation
|
OpenRouter review posted ( |
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. |
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: full-pr (full-pr)
Mode: initial
Commit: a0c675db6bb8e8854ff6bed00e8c95a68c6119f1
Judge: openai/gpt-5.6-luna
Cost: $0.1878 (lanes $0.1789 + judge $0.0089)
Lanes
meta/muse-spark-1.2: ok (13 finding(s), 77.4s, 107749+10875 tokens (32836 cached), 3 tool round(s), via Meta, $0.14)z-ai/glm-5.3-flash: ok (8 finding(s), 916.2s, 651814+71713 tokens (519580 cached), 14 tool round(s), via OpenInference, $0.0341)
Findings
🟠 Issue 1 — Manifest digest recording lacks strict shell mode
.github/workflows/publish.yml:122 · risk · identified by meta/muse-spark-1.2
Concrete failure: If sha256sum .release/package-manifest.json fails (missing file, permission error, or truncated .release), the step Record the package manifest digest still succeeds, writes an empty or malformed digest= line to $GITHUB_OUTPUT, and the workflow uploads an artifact without a valid digest. The downstream publish job then fails only with a generic package manifest digest does not match rather than failing fast in prepare.
Evidence: prepare job's Record the package manifest digest step is run: echo "digest=$(sha256sum ... | cut -d ' ' -f 1)" >> "${GITHUB_OUTPUT}" with no shell: bash / set -euo pipefail. All other bash steps in the workflow explicitly use set -euo pipefail. publish.yml:122-124 shows this step versus the authenticated steps that do set strict mode.
Checked: Full publish.yml via read_file; workflow tests in tests/publish-workflow.test.ts do not exercise failure of this step. No counter-guard was found.
🔵 Issue 2 — Case normalization mismatch for RELEASE_COMMIT
.github/workflows/publish.yml:53 · nit · identified by meta/muse-spark-1.2
Concrete failure: prepare/publish authenticate steps validate RELEASE_COMMIT with ^[0-9a-fA-F]{40}$ then compare [[ "${tag_commit}" == "${RELEASE_COMMIT,,}" ]] (lower-casing the input). The inline Verify and publish the prepared packages Node script later requires manifest.gitCommit === process.env.RELEASE_COMMIT via timingSafeEqual/equal without lower-casing, and scripts/release-packages.mjs:verifyPreparedManifest uses safeEqual(manifest.gitCommit, expectedReleaseCommit) directly. A caller that supplies an uppercase 40-hex RELEASE_COMMIT (allowed by the workflow regex) passes the git check but fails the Node manifest-commit check with a confusing digest/commit error.
Evidence: publish.yml:53 and publish.yml:188 show the lower-cased comparison; publish.yml:248-251 and scripts/release-packages.mjs:714-718 / 869 show strict equality. Git rev-parse always emits lowercase.
Checked: publish.yml authenticate blocks and Node inline block; scripts/release-packages.mjs validateReleaseTag / verifyPreparedManifest / prepareRelease commit checks. github.sha is normally lowercase so production is unaffected, but the validation contract is contradictory.
🔵 Issue 3 — Duplicate tag-authentication Bash blocks
.github/workflows/publish.yml:29 · nit · identified by meta/muse-spark-1.2
Concrete failure: Identical 30-line Authenticate the release tag Bash is duplicated in prepare and publish. A future edit that updates one block (e.g., regex, allowed_signers handling) and not the other silently desynchronizes the two gates, allowing a tag that passes prepare to fail (or worse, pass with weaker checks) in publish.
Evidence: publish.yml:29-64 and publish.yml:172-210 are verbatim copies except for env. No shared composite action or uses: abstraction.
Checked: Full publish.yml via read_file; tests/publish-workflow.test.ts:11-33 asserts both contain the same strings but cannot prevent drift.
🔵 Issue 4 — Publish inline skips shasum verification
.github/workflows/publish.yml:281 · nit · identified by meta/muse-spark-1.2
Concrete failure: prepare records sha256, integrity (sha512), and shasum (sha1) per tarball and scripts/release-packages.mjs:verifyPreparedManifest verifies all three with safeEqual. The new publish inline Node in publish.yml re-hashes only sha256 and integrity and validates only those two fields plus a sha256/integrity regex, never checking shasum. An attacker or corruption that mutates shasum in the manifest would pass the workflow publish gate while the local verifyPreparedManifest (used by release:publish locally) would reject it, creating divergent acceptance.
Evidence: publish.yml:276-286 computes sha256/integrity only; publish.yml:257-263 validates only sha256/integrity regex; scripts/release-packages.mjs:893-900 verifies sha256+integrity+shasum.
Checked: Both verification paths via read_file.
🟠 Issue 5 — Smoke job trusts artifact without digest verification
.github/workflows/publish.yml:149 · risk · identified by meta/muse-spark-1.2
Concrete failure: smoke downloads scheduler-release-${{ github.run_id }} and runs node to enumerate manifest.packages[].tarball and npm install them without verifying MANIFEST_DIGEST or per-tarball sha256/integrity. If the artifact is tampered between prepare upload and smoke download (e.g., via a compromised third-party action or artifact race), smoke would install and import the tampered tarballs and still succeed, giving false confidence before publish (which does verify) – the smoke signal is not anchored.
Evidence: publish.yml:137-162 smoke steps; publish.yml:238-290 publish verification. No MANIFEST_DIGEST env or hash check in smoke.
Checked: publish.yml smoke job and tests/publish-workflow.test.ts:43-52 which only checks needs/permissions, not integrity.
🟠 Issue 6 — parseTrailingJson fallback can mis-parse lifecycle output
scripts/release-packages.mjs:111 · risk · identified by meta/muse-spark-1.2
Concrete failure: scripts/release-packages.mjs:parseTrailingJson scans backwards for [ and JSON.parses the suffix. If lifecycle output (e.g., a package prepack script) prints a line like [1,2,3] or [build] completed, the last [ may be lifecycle text, not the npm pack --json payload. The function would either throw a misleading did not return valid JSON or, if the lifecycle line happens to be valid JSON, silently return wrong metadata (wrong name/version/files) and later fail with npm pack returned invalid metadata.
Evidence: scripts/release-packages.mjs:111-124 implementation; invoked at prepareRelease:776 for npm pack.
Checked: read_file of scripts/release-packages.mjs; prior code used JSON.parse(result.stdout) directly. Existing tests do not cover lifecycle output containing brackets.
🟠 Issue 7 — readTarEntries ignores tar header checksum and pax extensions
scripts/release-packages.mjs:341 · risk · identified by meta/muse-spark-1.2
Concrete failure: readTarEntries gunzips the entire archive with gunzipSync (potential gzip-bomb memory exhaustion) then walks 512-byte headers without verifying the tar header checksum, without handling GNU long-name (L typeflag) or pax extended headers (x/g). A tarball with an overlong filename encoded via pax/././@PaxHeader would have its package/package.json entry stored under a pax header; validatePackedTarball would then miss package/package.json and fail with packed archive is missing package/package.json even for a legitimate npm pack that uses pax for long paths, or conversely accept a crafted header with invalid size field until Number.parseInt(size,8) truncation.
Evidence: scripts/release-packages.mjs:341-368 loops headers, checks header[156] === 0||48 only, skips other types, never validates checksum at 148-155. validatePackedTarball:369-410 requires exactly package/package.json etc.
Checked: read_file of scripts/release-packages.mjs; npm pack on some platforms emits pax headers for long paths. Tests in tests/release-packages.test.ts:372-388 craft a simple tar -czf without pax.
🔵 Issue 8 — Packed manifest lifecycle hook check is incomplete
scripts/release-packages.mjs:392 · nit · identified by meta/muse-spark-1.2
Concrete failure: validatePackedTarball rejects only preinstall/install/postinstall scripts. An attacker adding "prepublishOnly":"curl evil" or "prepare":"..." or "prepack":"..." to the packed package.json would still pass, and if a consumer installs without --ignore-scripts (outside the workflow's smoke), the hook would execute. While the workflow smoke uses --ignore-scripts, the published tarball is immutable on the registry and the check should block all install-relevant hooks.
Evidence: scripts/release-packages.mjs:392-397 loops for (const lifecycle of ["preinstall","install","postinstall"]).
Checked: read_file of scripts/release-packages.mjs; npm docs list additional hooks (prepublish, prepublishOnly, prepare, etc.).
🔵 Issue 9 — verifyReleaseInventory and publish inline allow directory-traversal tarball names only via later check
scripts/release-packages.mjs:413 · nit · identified by meta/muse-spark-1.2
Concrete failure: verifyReleaseInventory checks entries.map(name).sort() against expectedTarballs sorted, plus entry.isFile()/lstat isFile/not symlink and !name.startsWith("."). The expectedTarballs are derived from basename(packed.filename) in prepareRelease, so a crafted packed.filename containing ../evil.tgz would be basename-stripped correctly, but if validatePackedTarball were bypassed, a manifest with tarball: "../evil.tgz" would be caught only by the dirname(tarball) !== resolve(dirname(manifestPath)) check in verifyPreparedManifest:893. verifyReleaseInventory itself would compare "../evil.tgz" literally and fail with generic inventory message, not a traversal-specific error, and publish inline's resolve(releaseDirectory, record.tarball) would resolve outside .release without an explicit traversal rejection until the readdir equality fails.
Evidence: scripts/release-packages.mjs:413-430 and publish.yml:264-274 and scripts/release-packages.mjs:887-895.
Checked: read_file of both files; attack requires compromised prepareRelease or manual manifest edit, which the workflow publish inline does still catch but with indirect error.
🔵 Issue 10 — RELEASING.md describes OIDC job accurately but omits MANIFEST_DIGEST anchoring detail
docs/RELEASING.md:56 · nit · identified by meta/muse-spark-1.2
Concrete failure: docs/RELEASING.md now correctly states prepare authenticates in a bare repo, smoke installs with lifecycle disabled, and publish verifies manifest/tarball digests from an empty temp directory without Corepack. However it omits that publish also verifies needs.prepare.outputs.manifest_digest (sha256 of package-manifest.json) which is the actual seal between jobs. A reader following only the doc might not realize that artifact replacement that preserves file names but mutates content would be caught by the digest, not just per-file hashes.
Evidence: docs/RELEASING.md:56-68 three-bullet workflow description; publish.yml:20,124,236,244-251 implements manifest_digest.
Checked: read_file of docs/RELEASING.md and publish.yml.
🔵 Issue 11 — Missing re-export for new public helpers in declaration file ordering
scripts/release-packages.d.mts:84 · nit · identified by meta/muse-spark-1.2
Concrete failure: scripts/release-packages.d.mts now declares validatePackedTarball and verifyReleaseInventory, matching scripts/release-packages.mjs. No functional break, but the declaration file orders prepareRelease before the new helpers while the implementation orders validatePackedTarball/verifyReleaseInventory before prepareRelease. Tools that diff declaration vs. implementation order for API docs may flag mismatch, and the declaration does not document that both throw via internal fail() rather than returning Result – callers outside the test suite may expect rejected promise with Error message but receive a thrown string-less error.
Evidence: scripts/release-packages.d.mts:84-93 vs scripts/release-packages.mjs:369-430 ordering.
Checked: Both files via read_file; tests import from .mjs only, so not caught by tests/release-packages.test.ts.
🔵 Issue 12 — Publish workflow test does not verify manifest-digest or shasum enforcement
tests/publish-workflow.test.ts:1 · nit · identified by meta/muse-spark-1.2
Concrete failure: tests/publish-workflow.test.ts asserts authentication occurs before checkout, checkout uses github.sha, smoke separation, include-hidden-files: false, and that manifest_digest flows to MANIFEST_DIGEST, but never asserts that the publish inline actually recomputes sha256/integrity or that shasum is checked, nor that the digest comparison uses timingSafeEqual. A regression that removes the sha256/integrity re-hash in publish.yml would still pass all current workflow tests.
Evidence: tests/publish-workflow.test.ts:18-83 covers structure; tests/release-packages.test.ts:311-398 covers validateReleaseTag/validatePackedTarball/verifyReleaseInventory but not the inline publish script.
Checked: read_file of both test files; no grep match for sha256/integrity in tests/publish-workflow.test.ts.
🔵 Issue 13 — Workflow tag-version regex diverges from isNormalReleaseVersion
scripts/release-packages.mjs:22 · nit · identified by meta/muse-spark-1.2
Concrete failure: Workflow regex ^v(0\.[1-9][0-9]*|[1-9][0-9]*\.[0-9]+)\.[0-9]+$ rejects v0.0.1 and also rejects v1.0.0 variants like v01.0.0 (leading zero). scripts/release-packages.mjs:isNormalReleaseVersion uses STABLE_SEMVER ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$ plus match[1]!=="0"||match[2]!=="0", which accepts v0.1.0 but also accepts v0.10.0 and v1.0.0 with same restrictions but with slightly different error messages. A tag v0.10.0 passes both, but a tag v0.0.2 would be rejected by workflow before prepareRelease ever runs, while validateRepository would also reject it but with a different message (normal releases require version 0.1.0 or later). The two layers are not documented as intentionally divergent, risking confusion during incident triage.
Evidence: publish.yml:38,159 regex vs scripts/release-packages.mjs:22-28 version check.
Checked: Both files via read_file.
🟠 Issue 14 — Smoke job no longer verifies subpath exports of the packed tarballs
.github/workflows/publish.yml:161 · risk · identified by z-ai/glm-5.3-flash
A packed tarball whose declared subpath exports are broken can now ship to npm with every gate passing. The release previously smoke-tested every export specifier: smokeTestTarballs derived the specifier list from each package's exports map via exportSpecifiers and imported every one against the installed tarball. This PR deletes both functions and replaces the smoke test with a workflow step that imports only the two hardcoded root packages (await import("@pegma/scheduler"); await import("@pegma/scheduler-cloudflare");). Concrete failure: a refactor renames a dist file without updating the exports map; validatePackedTarball and verifyPackedFiles still pass because they compare file lists, not export targets, and the smoke job never imports the subpath — consumers get ERR_MODULE_NOT_FOUND for the subpath only after publication.
exportSpecifiers also carried the only object-form exports validation (manifest.exports must be a non-null, non-array object); that check is now gone from the release path entirely.
Proof gap: I did not re-open packages/*/package.json in this pass to confirm the packages declare subpath exports today; if both packages only export ., the regression is latent until a subpath is added.
🟠 Issue 15 — Publish job re-implements manifest validation weaker than verifyPreparedManifest
.github/workflows/publish.yml:262 · risk · identified by z-ai/glm-5.3-flash
A manifest that scripts/release-packages.mjs's own verifyPreparedManifest would reject can pass the publish job, and future script-side hardening will silently never reach the lane that actually publishes. The publish step validates the artifact with an inline copy of the rules that checks only the SHA-256 format, the integrity regex, the tarball filename, and the publish flag. The script's verifyPreparedManifest additionally verifies record.shasum against the tarball, requires record.files to be an array, and resolves each record against RELEASE_PACKAGES[index] (including directory); none of those checks exist in the inline copy. Concrete failure: a manifest with a wrong shasum or an empty/missing files list passes the publish gate today, and any new field check added to verifyPreparedManifest later does not protect the publish lane. There is no test pinning the inline script's rule set, so the two rule sets can drift freely.
🟠 Issue 16 — release:pack invoked without tag flags; manifest.releaseTag population in CI unverified
.github/workflows/publish.yml:103 · risk · identified by z-ai/glm-5.3-flash
Every stable release could fail at the publish job if tag detection in the pack script is gated on the flags this PR removed. The prepare step now runs pnpm run release:pack -- --require-clean --output .release, dropping --require-release-tag --require-main-ancestor --expected-release-commit "${RELEASE_COMMIT}". The bash auth step re-verifies the tag/commit separately, but whether prepareRelease still populates manifest.releaseTag without --require-release-tag is not established by the diff: the publish step requires manifest.releaseTag === RELEASE_TAG and calls manifest.releaseTag.slice(1), so if tag detection is gated on the removed flag, manifest.releaseTag is undefined and every release fails at publish (fail-closed but release-blocking). Additionally, the script-side tag validation (validateReleaseTag, exercised only by the new unit tests) no longer runs in the CI release lane at all.
Proof gap: the releaseTag derivation and option handling inside prepareRelease in scripts/release-packages.mjs were outside the shown hunks, and I could not confirm whether detection is unconditional.
🟠 Issue 17 — Two-package inventory hardcoded in workflow smoke imports, publish script, and docs
.github/workflows/publish.yml:254 · risk · identified by z-ai/glm-5.3-flash
Adding a third package to RELEASE_PACKAGES in scripts/release-packages.mjs breaks or silently weakens the workflow. The package inventory is now duplicated by hand in three places: the smoke job's import eval (@pegma/scheduler, @pegma/scheduler-cloudflare), the publish job's inline const names = ["@pegma/scheduler", "@pegma/scheduler-cloudflare"], and docs/RELEASING.md. Concrete failure: after adding a package, the publish job's names comparison fails every release until the workflow is edited (fail-closed, releases blocked), while the smoke job keeps importing only the two listed packages, so the new package's runtime import is never smoke-tested (fail-open).
🔵 Issue 18 — Smoke heredoc failure swallowed by process substitution masks the real error
.github/workflows/publish.yml:149 · nit · identified by z-ai/glm-5.3-flash
A malformed package-manifest.json produces a misleading failure instead of the manifest error. In the smoke job, mapfile -t tarballs < <(node --input-type=module <<'NODE' ...) reads the tarball list from a process substitution; set -euo pipefail does not propagate a process substitution's exit status, so when the node script throws (invalid JSON), tarballs is left empty, npm install --prefix "${smoke_dir}" ... succeeds as a no-op, and the job later fails with Cannot find module '@pegma/scheduler' from the import eval — sending release debugging down the wrong path instead of surfacing the manifest parse failure.
🔵 Issue 19 — readTarEntries handles only ustar names; GNU longname and PAX path headers ignored
scripts/release-packages.mjs:321 · nit · identified by z-ai/glm-5.3-flash
The tar parser added to scripts/release-packages.mjs supports only the ustar name/prefix split (offsets 0 and 345) and ignores GNU long-name entries (typeflag 'L') and PAX extended headers (typeflag 'x') that carry the real path. An entry whose name cannot be represented in ustar (path too long to split, or names that make npm's tar writer emit PAX records) is stored under a truncated or @LongLink-style name with no detection of the mismatch. Today the practical impact is nil because validatePackedTarball only consumes the three short fixed paths (package/package.json, package/README.md, package/LICENSE); the cost materializes if npm's packing ever switches to PAX output or if future checks are built on this parser — for example, extending it to verify subpath export targets (see the smoke-coverage regression) would silently read wrong names for PAX entries.
🔵 Issue 20 — Tag-format authority duplicated as a bash regex that rejects v0.0.x
.github/workflows/publish.yml:37 · nit · identified by z-ai/glm-5.3-flash
The workflow's bash regex ^v(0\.[1-9][0-9]*|[1-9][0-9]*\.[0-9]+)\.[0-9]+$ is now the only tag validation in the CI lane (the script's --require-release-tag flag was dropped), and it rejects v0.0.x outright while permitting v0.1.0 and v1.0.0. Two costs: a legitimate v0.0.x hotfix release can never publish through this workflow if the project ever needs one, and the format rules now live in two places (this regex and the script's STABLE_SEMVER/validateReleaseTag) that can drift — a tag shape the script accepts could be permanently refused by CI or vice versa.
Proof gap: STABLE_SEMVER and validateReleaseTag definitions in scripts/release-packages.mjs were not re-read in this pass to confirm the exact divergence.
🔵 Issue 21 — Smoke dependency install does not pin the registry unlike the publish lane
.github/workflows/publish.yml:157 · nit · identified by z-ai/glm-5.3-flash
The smoke job's npm install --prefix "${smoke_dir}" ... ${tarballs[@]} resolves the tarballs' transitive dependencies using ambient npm registry configuration, while every other registry touchpoint in this workflow passes an explicit --registry https://registry.npmjs.org/ (the global npm installs, npm view, and npm publish in the publish job). On GitHub-hosted runners the default is npmjs.org, so nothing fails today; the concrete cost is that a future runner-level mirror or npm_config_registry setting would make the smoke lane resolve and test dependencies from a registry the publish lane never consults, silently splitting what got verified from what gets published.
| run: git fetch --no-tags origin main:refs/remotes/origin/main | ||
|
|
||
| - name: Configure approved release signers | ||
| - name: Authenticate the release tag |
There was a problem hiding this comment.
🔵 Duplicate tag-authentication Bash blocks (nit)
Concrete failure: Identical 30-line Authenticate the release tag Bash is duplicated in prepare and publish. A future edit that updates one block (e.g., regex, allowed_signers handling) and not the other silently desynchronizes the two gates, allowing a tag that passes prepare to fail (or worse, pass with weaker checks) in publish.
Evidence: publish.yml:29-64 and publish.yml:172-210 are verbatim copies except for env. No shared composite action or uses: abstraction.
Checked: Full publish.yml via read_file; tests/publish-workflow.test.ts:11-33 asserts both contain the same strings but cannot prevent drift.
There was a problem hiding this comment.
Keeping both checks inline is intentional: prepare must authenticate before checkout, while publish must authenticate without any checkout. Moving this logic into repository files would cross those execution boundaries; structure tests assert the complete checks in both jobs.
| const manifestBytes = await readFile(manifestPath); | ||
| const digest = createHash("sha256").update(manifestBytes).digest("hex"); | ||
| if (!equal(digest, process.env.MANIFEST_DIGEST ?? "")) fail("package manifest digest does not match"); | ||
| const manifest = JSON.parse(manifestBytes.toString("utf8")); |
There was a problem hiding this comment.
🟠 Two-package inventory hardcoded in workflow smoke imports, publish script, and docs (risk)
Adding a third package to RELEASE_PACKAGES in scripts/release-packages.mjs breaks or silently weakens the workflow. The package inventory is now duplicated by hand in three places: the smoke job's import eval (@pegma/scheduler, @pegma/scheduler-cloudflare), the publish job's inline const names = ["@pegma/scheduler", "@pegma/scheduler-cloudflare"], and docs/RELEASING.md. Concrete failure: after adding a package, the publish job's names comparison fails every release until the workflow is edited (fail-closed, releases blocked), while the smoke job keeps importing only the two listed packages, so the new package's runtime import is never smoke-tested (fail-open).
There was a problem hiding this comment.
dbbd90c removes hardcoded smoke imports by consuming the sealed import inventory. The publication job intentionally retains the reviewed two-package allowlist required for this repository; adding a package must update that explicit release boundary and fail closed until reviewed.
| echo "::error::Only stable releases may publish packages" | ||
| exit 1 | ||
| fi | ||
| if [[ ! "${RELEASE_TAG}" =~ ^v(0\.[1-9][0-9]*|[1-9][0-9]*\.[0-9]+)\.[0-9]+$ ]]; then |
There was a problem hiding this comment.
🔵 Tag-format authority duplicated as a bash regex that rejects v0.0.x (nit)
The workflow's bash regex ^v(0\.[1-9][0-9]*|[1-9][0-9]*\.[0-9]+)\.[0-9]+$ is now the only tag validation in the CI lane (the script's --require-release-tag flag was dropped), and it rejects v0.0.x outright while permitting v0.1.0 and v1.0.0. Two costs: a legitimate v0.0.x hotfix release can never publish through this workflow if the project ever needs one, and the format rules now live in two places (this regex and the script's STABLE_SEMVER/validateReleaseTag) that can drift — a tag shape the script accepts could be permanently refused by CI or vice versa.
Proof gap: STABLE_SEMVER and validateReleaseTag definitions in scripts/release-packages.mjs were not re-read in this pass to confirm the exact divergence.
There was a problem hiding this comment.
The normal release lane intentionally rejects the complete 0.0.x bootstrap range, as documented in RELEASING.md and enforced by isNormalReleaseVersion. The workflow expression matches that established release contract.
There was a problem hiding this comment.
OpenRouter pull-request review
Verdict: issues
Scope: latest-commit (commit-range)
Mode: verify
Commit: dbbd90c9a2de18a7a915ff29d4ca257f221bfe9d
Judge: openai/gpt-5.6-luna
Cost: $0.1232 (lanes $0.1230 + judge $0.0001)
Lanes
meta/muse-spark-1.2: ok (0 finding(s), 29.7s, 62825+4237 tokens (3027 cached), 2 tool round(s), via Meta, $0.0932)z-ai/glm-5.3-flash: ok (0 finding(s), 230.0s, 326643+32585 tokens (278016 cached), 8 tool round(s), via Modal, $0.0298)
Round 2 resolution
- ✅
r1-1fixed correctly — Manifest digest recording lacks strict shell mode: Workflow step 'Record the package manifest digest' (publish.yml:108-112) now runs 'set -euo pipefail', captures sha256sum output, validates '^[0-9a-f]{64}$' and writes with printf, so a missing file or truncated .release fails fast instead of writing an empty digest. - ✅
r1-5fixed correctly — Smoke job trusts artifact without digest verification: Smoke job (publish.yml:145-195) now exports MANIFEST_DIGEST, timingSafeEqual-verifies the downloaded package-manifest.json against it, validates manifest.packages and record.imports, and verifies each tarball's sha256 and sha512 integrity before npm install; artifact tampering is detected before install. - ✅
r1-6fixed correctly — parseTrailingJson fallback can mis-parse lifecycle output: scripts/release-packages.mjs replaced backward '[' scan with parseNpmPackJson that only considers markers matching '^\[\r?\n\s*\{' and '\r?\n(?=\[\r?\n\s*\{)', JSON-parses each candidate and requires Array, ignoring stray lifecycle lines like '[1,2,3]' or '[build] completed'. - ✅
r1-7fixed correctly — readTarEntries ignores tar header checksum and pax extensions: readTarEntries now enforces MAX_TARBALL_BYTES/MAX_ARCHIVE_BYTES via gunzipSync maxOutputLength, verifies 512-byte header checksum (verifyTarHeader), validates octal fields via tarOctal, parses pax headers (types 103/120), handles GNU long-name (type 76) and duplicate-entry rejection, so pax-encoded long paths and checksum errors are handled. - ✅
r1-14fixed correctly — Smoke job no longer verifies subpath exports of the packed tarballs: Smoke no longer imports two hardcoded specifiers. Prepare now records 'imports: exportSpecifiers(manifest)' and smoke iterates 'for (record of manifest.packages) for (specifier of record.imports) await import(specifier)', exercising every declared subpath export. - ✅
r1-15fixed correctly — Publish job re-implements manifest validation weaker than verifyPreparedManifest: Publish inline validation (publish.yml:285-331) now mirrors verifyPreparedManifest: checks schemaVersion/gitCommit/releaseTag, hardcoded names/directories, version regex, publish flag, sha256/shasum/integrity regexes, Array.isArray(files) and Array.isArray(imports) with length check, file-inventory exact match, lstat regular-file checks, and timingSafeEqual verification of sha256, sha1 and integri… - 🤝
r1-16disputed — release:pack invoked without tag flags; manifest.releaseTag population in CI unverified: Manifest population does not require the removed flags. prepareRelease reads releaseTag from process.env.RELEASE_TAG (set in workflow env from github.event.release.tag_name) and validateRepository still populates manifest.releaseTag even without --require-release-tag; the flag only adds extra validateReleaseTag checks that the workflow now performs in the bash auth steps. Removed flags do not leav… ⚠️ r1-17fixed incorrectly — Two-package inventory hardcoded in workflow smoke imports, publish script, and docs: Partial fix: smoke is now manifest-driven (imports every record.imports) so adding a package no longer silently weakens smoke. Publish job still hardcodes 'const names = ["@pegma/scheduler","@pegma/scheduler-cloudflare"]' and 'const directories = ["scheduler","scheduler-cloudflare"]' (publish.yml:288/294), duplicating RELEASE_PACKAGES; adding a third package will still fail-closed in publish until…- 13 nit finding(s) from earlier rounds retired (severity floor for follow-up rounds is
risk). - Open findings after this round: 1 (0 bug-severity).
No structured findings from the successful lane(s).
Summary
Validation
CI=1 pnpm run format:checkCI=1 pnpm run checkCI=1 pnpm testCI=1 pnpm run release:checkCI=1 pnpm run release:pack -- --require-clean --output .release