Repository navigation
Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Day Bound - #4314
Conversation
… a 30-Day Bound Add the pins.age audit check in a new spec/audit_pins.py module, since spec/audit.py sits at its size ceiling. It reads each caller workflow's job-level pin on a hub reusable workflow, resolves it to a hub release, and counts the stable releases published after it. A pin behind the newest release is an ADVISORY, a new finding kind that is rendered in its own issue section and counted as neither open work nor a failure. A pin a newer release superseded more than 30 days ago is DRIFT. A registry driftNote naming (pins.age) holds such a pin back and reports it as an ADVISORY, and the note is stale once no pin is past the bound. RESYNC.md section 5 now points at the check in place of the hand comparison it described. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Count Order the hub's releases by version rather than publish time, since a re-run can publish an older version after a newer one. Keep a held pin's driftNote from reading stale while any pin's age is unread. Count no ADVISORY in the convergence issue's title, its clean line, or the sweep's clean line, and point the issue's Advisory section at RESYNC.md for when a resync acts on one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The generated convergence issue now has an advisory group, and a driftNote naming (pins.age) is a suppression with its own staleness rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ne Reads A hold recorded the day a regression ships no longer reads stale for the 30 days before its pin goes late, since a hold is stale only once no pin is behind the newest release. The check runs after the baseline stage and takes a workflow it already read from there. An advisory counts as an open finding again for the pending-marker check, so a note describing a held pin is not told the audit is clean. RESYNC.md leaves a held pin where it is, and the Advisory section no longer claims each one clears on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Caution Review failedThe pull request is closed.
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. |
…ver Counted Pin advisories follow nearly every hub release, so counting them as open findings told a stale pending-marker note on an otherwise clean repository to look for a finding it never meant. The module docstring now says what the kind is, reported and never counted, since a resync does act on a pin advisory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Approval is blocked by active correctness issues: the audit contradicts its remediation guidance, omits pagination for tag refs, and can misclassify unread workflows or failed API responses as clean or advisory results.
4 open issues
What changed in this PR
Adds the pins.age audit check to compare downstream hub reusable-workflow pins with published releases, reporting recent lag as advisory and older lag as drift with support for intentional registry holds.
Changes:
- Adds pin parsing, release and tag resolution, version ordering, age classification, suppression handling, and API error reporting.
- Integrates advisory findings into audit execution, issue rendering, clean-status logic, and drift-note processing.
- Updates resync and audit documentation and adds comprehensive tests with a size ceiling for the new module.
| File | Description |
|---|---|
| tests/test_audit_size.py | Adds a size ceiling for the new pin-audit module. |
| tests/test_audit_pins.py | Tests pin parsing, release ordering, severities, holds, pagination, errors, and audit wiring. |
| spec/checks.json | Registers the pins.age repository check and its suppression behavior. |
| spec/audit.py | Wires the new check into audits and adds advisory-aware issue and status rendering. |
| spec/audit_pins.py | Implements hub pin discovery, release and tag lookup, age classification, and hold handling. |
| RESYNC.md | Documents how resync handles advisory, drift, and held pin findings. |
| AUDIT.md | Documents advisory findings and (pins.age) drift-note behavior. |
Review effort: Lite
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4314 +/- ##
===========================================
- Coverage 81.60% 79.23% -2.38%
===========================================
Files 26 44 +18
Lines 9070 15865 +6795
===========================================
+ Hits 7402 12570 +5168
- Misses 1668 3295 +1627
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
… Error An empty response body from the releases or tag-ref read, and a workflow the contents API returns no inline text for, now raise into the check's single ERROR rather than reading as no release or as a file with no pins. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A workflow that does not parse is an ADVISORY saying its pins are unread, and it keeps a (pins.age) hold from reading stale, since only the four interface workflows have another check to report the parse failure. The module docstring states the hold's staleness rule as the code applies it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
The audit reports other YAML it cannot parse as drift, and a caller workflow outside the interface baseline has no other check to say it went unread, so an advisory left such a repository reading clean. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A baseline workflow that does not parse is already DRIFT under its interface check, so pins.age only marks its pins unread, which still keeps a hold from reading stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
@coderabbitai review |
|
/review |
Action not completed
|
…d, and Hub Pin Drift (#4315) ## Summary Promotes `develop` to `main`. It carries these changes: - [#4303](#4303) orders the STANDUP.md seed push, carry commits, and secret hand-over. - [#4304](#4304) forbids state-changing probes and routes observed secrets to revocation. - [#4305](#4305) routes SIGINT and SIGTERM through one handler, bounds the child wait, and states two stop paths. - [#4306](#4306) holds `pr_review.py merge` for a hosted review not registered yet. - [#4309](#4309) reads the branch before the tree so an empty root commit resolves its secrets. - [#4310](#4310) watches the merge bot's auto-merge and re-arms a disable GitHub makes. - [#4311](#4311) counts untracked files in the dirty stamp and states the session tree bound. - [#4314](#4314) reports each caller's hub pin behind the newest release as drift past a 30-day bound. Related issues #4308, #4312, and #4313 stay open. Fixes #1418 Fixes #4137 Fixes #4063 Fixes #4147 Fixes #2598 Fixes #4128 Fixes #4240 Fixes #4229 Fixes #3806 Fixes #4146 Fixes #4100 Fixes #4218 Fixes #4223 Fixes #4228 Fixes #4224 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Repository audits now report outdated reusable-workflow pins as advisories or drift, with advisory findings kept separate from blocking issues. * Merge automation can retry enabling auto-merge after the base branch settles; unsupported target branches and refused merges are reported as failures. * Pull-request checks now account for a brief hosted-review registration window before reporting checks as pending. * **Bug Fixes** * Empty repositories and empty root commits are handled correctly when resolving repository secrets. * Long-running tools improve cleanup and signal handling when interrupted. * **Documentation** * Updated guidance for repository setup, review handling, workflow automation, and safe verification practices. <!-- end of auto-generated comment: release notes by coderabbit.ai -->


Summary
Adds the
pins.ageaudit check. It reads each downstream caller workflow's job-leveluses:pin on a hub reusable workflow (<owner>/<hub>/.github/workflows/*.yml@<ref>), resolves the pin to a hub release by tag name or by the tag's commit, and counts the stable releases whose version is newer. Releases are ordered by version rather than publish time, since a re-run can publish an older version after a newer one.(pins.age)holds a pin back on purpose. The pin then reports as an ADVISORY, and the note is reported stale once every pin's age reads and no pin is behind the newest release. So a hold can be recorded the day a regression ships, before its pin goes late.spec/checks.jsonregisters the check withsuppression.endsWithType: null, so the driftnote check treats the id as a suppression on every repository.RESYNC.mdsection 5 replaces the hand comparison with a pointer to the check. A resync bumps a pin found behind or naming no hub release, and leaves a held pin where it is.AUDIT.mdnames the new advisory group of the generated issue and the(pins.age)hold among the suppression notes.One check, two severities
#1418 and #4137 measure the same thing, a caller pin against the hub's releases, and differ only in when it matters. #4137 kept its finding advisory because a pin trailing a release that shipped hours ago is normal while Dependabot catches up. That is exactly the case #1418's time bound exempts. So one check reads the pins and releases once and reports each pin once. Within the bound it is the advisory #4137 asked for, and past the bound it is the drift #1418 asked for. Two checks would read the same data twice and report a late pin twice, once as each.
The bound is 30 days, measured from the supersede time. Dependabot's
github-actionsupdates run daily, and most repositories are audited atmain, so a healthy pin can trail by a promotion cycle. 30 days stays quiet through that and still flags the multi-week outage #1418 describes.The ADVISORY finding kind
The audit had DEFECT, LETTER, DRIFT, and ERROR. #4137 asked for a report that is not drift, so this adds ADVISORY:
mainprints it like any other kind. It never counts toward the exit status, and a repository whose only findings are advisories still prints as clean.render_issuegives it its own## Advisorysection after## Converge, pointing atRESYNC.mdfor when a resync acts on one. The issue title's finding count and its clean line leave advisories out.registry.driftnotesdoes not count it as an open finding, so a stale pending-marker note on a repository whose only findings are advisories reads as "the audit is clean", asAUDIT.md's driftNote paragraph says it should.Size bound
spec/audit.pywas at 2984 of its 3000-line ceiling. The check's logic lives in the newspec/audit_pins.py, andspec/audit.pycarries only the wiring (2996 lines).tests/test_audit_size.pygives the new module a 500-line ceiling.Verification
tests/test_audit_pins.pycovers pin parsing, both severities, the hold and its staleness, prereleases, version ordering, release pagination, drafts, an annotated tag, a failed read, an unread tree, and the audit wiring, with every API read stubbed.python -m unittest discover -s tests -p "test_audit*.py"and-p test_spec_validate.pypass, as dospec/validate.py,spec/audit.py --selftest,spec/workflow_reuse.py --selftest, ruff, mypy, and the prose gate.spec/audit.pyagainst two downstream repositories reported each caller pin as an ADVISORY, 12 releases behind, with no drift.Local review findings declined
spec/audit_pins.pypin_findings, one(pins.age)hold covers every pin in the repository rather than the pin it names (introduced, declined). The catalogdependabot.ymlgroups everygithub-actionsupdate into one pull request, and the fleet pins every hub task at one commit, so a repository's hub pins move together. A second pin cannot stall while the held one moves. A resync reads which pin is held from the note itself.spec/audit.pycheck_registry_driftnotes, a held pin's note using a pending-marker word such as "behind" reads as "the audit is clean" (introduced, declined). That is how every suppression note is read, perAUDIT.md's driftNote paragraph ("The pending-marker check above still reads each of them"). Counting advisories as open instead would let near-constant pin advisories mask every stale note on a clean repository. A hold note names its reason without a marker word, such as "Held at for a regression (pins.age)".spec/audit_pins.pyhub_releases, pagination ofgit/matching-refs/tags/(Copilot, declined). The endpoint is not paginated: an unparameterized read returns all 405 hub tags with noLinkheader, andper_page=10still returns 405.spec/audit_pins.pyhub_releases, a possible 1000-entry cap on the releases list endpoint (introduced, declined). The hub has 405 releases over 5 pages today, and a pin on a release past any cap is still reported, as an advisory saying its age is unread, rather than dropped.spec/audit_pins.pyhub_pins, consolidation withspec/workflow_reuse.pyhub_reachorspec/audit.pyjob_nodes(introduced, declined).hub_reachis a regex over everyuses:, step-level composite actions included, so it answers a different question. Neither module can be imported fromaudit_pins, sinceauditimportsaudit_pinsandworkflow_reuseimportsaudit. Hosting one primitive here forworkflow_reuseto import would change what its measurement counts, since it reaches step-level actions too.spec/audit.pycheck_pins_age, building the hub slug withrepo_slug()on the registry's hub entry asspec/workflow_reuse.pydoes (introduced, declined). For every cataloged repository the result is the same slug, since the membership check holds each one to the registry owner. The lookup would also need the hub's entry in every spec the audit runs with, andtests/test_audit.py's fixture registry carries none.spec/audit_pins.pyversion_key, consolidation withscripts/host_gate.pyparse_version(introduced, declined). It adds the-suffixhandling release tags need, andspec/imports nothing fromscripts/.Closes on promotion: #1418, #4137
🤖 Generated with Claude Code