Consume the canonical attestation gate instead of carrying a copy of it - #77
Conversation
This repository carried its own 837-line shell scanner and 426-line verifier, duplicated from the same origin as every other package in the fleet. That gate decides whether an artefact may reach the registry, so a false pass is the failure that matters - and the canonical implementation has now had fifteen fail-open constructions found and closed in it, three of them introduced by the fix for an earlier one. A copy frozen at any point in that sequence still admits every construction closed after it, and nothing here would have said so. The scanner is deleted, the verifier becomes a thin launcher over the published pm-ops/attestation export, and the changelog-date verifier's shell script replaces a variable in command position with a named function, because the canonical auditor treats an unresolved variable there as a potential publish path by design. 2269 lines go, 151 arrive. The suite changes shape deliberately. It no longer re-tests the shell model: that suite belongs with the implementation, where a fix reaches every consumer at once. It asserts instead that this repository is still a CONSUMER - no local scanner, the gate importing the package rather than resolving any part of its shell model locally, and the resolved gate still refusing an unattested publish and passing on this repository's own workflows. Identity rather than similarity, because a copy that behaves the same today is exactly what stops behaving the same the next time the canonical implementation is fixed.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideThe PR removes the frozen, duplicated publish-attestation scanner and verifier, upgrades pm-ops, and makes this repository consume the canonical auditor through a thin launcher; tests now protect package lineage and end-to-end fail-closed behavior rather than duplicating the canonical shell-model suite. Sequence diagram for release publish attestation verificationsequenceDiagram
participant Release as Release verification
participant Launcher as Thin launcher
participant Gate as pm-ops/attestation
participant Workflows as Repository publish paths
Release->>Launcher: runIfMain(...)
Launcher->>Gate: verify(repositoryRoot)
Gate->>Workflows: inspect tracked publish invocations
Workflows-->>Gate: publish commands and attestation flags
Gate-->>Launcher: audit result
alt unattested publish found
Launcher->>Release: report failure and exit 1
else every publish is attested
Launcher->>Release: report success
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Greptile SummaryThe PR replaces the repository’s vendored publish-attestation scanner and verifier with the canonical
Confidence Score: 5/5The PR appears safe to merge; the previous test-identity gap is fixed and no new actionable issue remains. The launcher now re-exports the canonical verifier functions by reference, and the consumer tests exercise both rejection and success paths. The only previous Greptile thread is resolved and the current assertions fully address its finding.
|
| Filename | Overview |
|---|---|
| scripts/verify-release-publish-attestation.ts | Replaces the vendored verifier with a thin launcher and direct re-exports from the canonical attestation package. |
| test/verify-release-publish-attestation.test.ts | Refocuses coverage on consumer identity, integration behavior, launcher execution, and shebang classification. |
| scripts/verify-release-changelog-date.sh | Replaces a command-position scalar with a named function while preserving generator fallback order and arguments. |
| package.json | Raises the pm-ops development dependency to the canonical implementation version used by the launcher. |
| package-lock.json | Locks pm-ops 2026.9.7 with its registry URL and integrity digest. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
CI[Release verification command] --> Launcher[Local thin launcher]
Launcher --> Canonical[pm-ops/attestation]
Canonical --> Git[Tracked repository sources]
Canonical --> Result{Every publish attested?}
Result -->|Yes| Pass[Exit successfully]
Result -->|No| Fail[Report failures and exit 1]
Reviews (3): Last reviewed commit: "Correct a wrong claim about which sheban..." | Re-trigger Greptile
The convergence guard did not guard. It asserted that the symbols imported from pm-ops/attestation are functions, and its own comment claimed they were the launcher's functions by reference - but it never compared the two. A launcher that imports the package and then re-exports a local wrapper would have passed, which is exactly the re-fork the test exists to catch. Found by Greptile. Proven not vacuous: replacing the re-export with a local arrow wrapper that still calls through to the package makes the test fail.
…nd reproduce it The launcher docstring said the auditor treats any file whose first two bytes are a shebang as executable shell. Reproduced against the real auditor, that is false: only a shebang naming a shell interpreter makes the body shell input, so #!/usr/bin/env node leaves this file unscanned while #!/bin/bash does not. The same sentence is in all seven repositories carrying this launcher - the error travelled with the copied text. The suite now reproduces all four states rather than asserting any of them. Found by Greptile's unreproduced-claim rule.
|
Merging. Measured result for this repository, with the harness at The vendored scanner is deleted and the gate is now the canonical Two review findings changed the shape of this PR and are worth naming, because both were cases where the guard did not do what it claimed:
Thank you to the reviewers on this wave; both of the above came from review, not from the change's author. |
This repository carried its own 837-line shell scanner and 426-line verifier, duplicated from the same origin as every other package in the fleet. That gate decides whether an artefact may reach the registry, so a false pass is the failure that matters. The canonical implementation (pm-ops/attestation and pm-ops/shell-scan) has had fifteen fail-open constructions closed in it; the vendored copy is frozen and still admits constructions closed after that.
The scanner is deleted, the verifier becomes a thin launcher over the published pm-ops/attestation export, and the changelog-date verifier shell script replaces a variable in command position with a named function (the canonical auditor treats an unresolved
$binin command position as a potential publish path by design — fail closed). 2269 lines removed, 151 added.The suite no longer re-tests the shell model (that suite belongs with the implementation). It asserts this repository is a CONSUMER: no local scanner, the gate importing the package, and the resolved gate still refusing an unattested publish and passing on this repository's own workflows.
Measurement (check.sh)
nonliteral-overwrite,nonliteral-overwrite-cmdsub,bare-brace-scope-escape,subshell-scope-escape,cmdsub-in-command-position,backtick-command-position,unset-after-bind,if-branch-bind,semicolon-same-line-bind,quoted-metachar-value,single-quoted-metachar-value(11 wrong)nonliteral-overwrite,nonliteral-overwrite-cmdsub,quoted-metachar-value,single-quoted-metachar-value(4 wrong)All 4 remaining wrong ids are open in the canonical pm-ops@2026.9.7 itself (verified by reference equality:
verify === directVerifyfrompm-ops/attestation). The corpus was expanded from 30 to 33 cases since the task was written; the 2 additional wrong cases (quoted-metachar-value,single-quoted-metachar-value) are new corpus entries the canonical implementation does not handle yet, same as the known-opennonliteral-overwriteandnonliteral-overwrite-cmdsub.Line counts
Quality gates
npm run checknpm run docstringnpm run coveragenpm run verify:release-publish-attestationnpm testnpm run changelog:checkpm item
https://github.com/unbraind/pm-github/blob/main/.agents/pm/chores/pm-github-u5qc.toon
Summary by Sourcery
Consume the canonical pm-ops attestation gate and remove the repository’s duplicated scanner implementation.
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests:
Chores:
Summary by cubic
Replaces the vendored copy of the publish-attestation gate — an 837-line shell scanner and 426-line verifier — with a thin launcher over the canonical
pm-ops/attestationauditor, bumpingpm-opsto 2026.9.7. The frozen copy admitted fail-open constructions closed upstream; the new gate fails closed on them, and the changelog-date verifier now resolves its generator via a named function so the auditor no longer sees an unresolved$binin command position as a potential publish path.Written for commit 28398ae. Summary will update on new commits.