Skip to content

Report Each Caller's Hub Pin Behind the Newest Release, as Drift Past a 30-Day Bound - #4314

Merged
ptr727 merged 12 commits into
developfrom
burndown/audit-pin-age
Nov 20, 2026
Merged

ptr727 merged 12 commits into
developfrom
burndown/audit-pin-age

Conversation

@ptr727

@ptr727 ptr727 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds the pins.age audit check. It reads each downstream caller workflow's job-level uses: 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.

  • A pin behind the newest release is an ADVISORY, with how many releases behind (Decide Whether the Audit Reports a Caller Pin Behind the Newest Hub Release #4137).
  • A pin a newer release superseded more than 30 days ago is DRIFT (configure.sh Asserts Dependabot Security Updates and Not Version Updates, So a Fleet-Wide Version-Update Outage Reported Clean Everywhere #1418). The age runs from the earliest publish time among the releases newer than the pin, so a pin is never late before a newer release exists.
  • A registry driftNote naming (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.json registers the check with suppression.endsWithType: null, so the driftnote check treats the id as a suppression on every repository.
  • A pin naming no hub release, such as a branch ref, is an ADVISORY saying its age is unread. A caller workflow that does not parse is DRIFT, as other unparsed YAML is, except a baseline workflow whose interface check already reports it. Either keeps a hold from reading stale.
  • An empty API response or a workflow with no inline content is the check's one ERROR, which never discards the repository's other findings.
  • The check runs after the baseline stage and takes a caller workflow the baseline already read from there, so no workflow is fetched twice.
  • RESYNC.md section 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.md names 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-actions updates run daily, and most repositories are audited at main, 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:

  • main prints 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_issue gives it its own ## Advisory section after ## Converge, pointing at RESYNC.md for when a resync acts on one. The issue title's finding count and its clean line leave advisories out.
  • registry.driftnotes does 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", as AUDIT.md's driftNote paragraph says it should.

Size bound

spec/audit.py was at 2984 of its 3000-line ceiling. The check's logic lives in the new spec/audit_pins.py, and spec/audit.py carries only the wiring (2996 lines). tests/test_audit_size.py gives the new module a 500-line ceiling.

Verification

  • tests/test_audit_pins.py covers 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.py pass, as do spec/validate.py, spec/audit.py --selftest, spec/workflow_reuse.py --selftest, ruff, mypy, and the prose gate.
  • A live read-only run of spec/audit.py against two downstream repositories reported each caller pin as an ADVISORY, 12 releases behind, with no drift.

Local review findings declined

  • spec/audit_pins.py pin_findings, one (pins.age) hold covers every pin in the repository rather than the pin it names (introduced, declined). The catalog dependabot.yml groups every github-actions update 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.py check_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, per AUDIT.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.py hub_releases, pagination of git/matching-refs/tags/ (Copilot, declined). The endpoint is not paginated: an unparameterized read returns all 405 hub tags with no Link header, and per_page=10 still returns 405.

  • spec/audit_pins.py hub_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.py hub_pins, consolidation with spec/workflow_reuse.py hub_reach or spec/audit.py job_nodes (introduced, declined). hub_reach is a regex over every uses:, step-level composite actions included, so it answers a different question. Neither module can be imported from audit_pins, since audit imports audit_pins and workflow_reuse imports audit. Hosting one primitive here for workflow_reuse to import would change what its measurement counts, since it reaches step-level actions too.

  • spec/audit.py check_pins_age, building the hub slug with repo_slug() on the registry's hub entry as spec/workflow_reuse.py does (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, and tests/test_audit.py's fixture registry carries none.

  • spec/audit_pins.py version_key, consolidation with scripts/host_gate.py parse_version (introduced, declined). It adds the -suffix handling release tags need, and spec/ imports nothing from scripts/.

Closes on promotion: #1418, #4137

🤖 Generated with Claude Code

ptr727 and others added 4 commits November 19, 2026 18:44
… 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]>
Copilot AI lite review requested due to automatic review settings November 20, 2026 03:04
@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 2ac430886044fcab3b5f3d0211a41c802f0aebf7, the content this pull request carries at that commit against develop, and it recorded 3 findings.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

…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]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread spec/audit_pins.py Resolved
Comment thread spec/audit_pins.py Resolved
Comment thread spec/audit_pins.py Resolved
Comment thread spec/audit.py Resolved
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.23%. Comparing base (b38e084) to head (c9fd0ed).
⚠️ Report is 266 commits behind head on develop.

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     
Flag Coverage Δ
python-3.13 79.23% <100.00%> (-2.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 5cb603ef13307ea023e6769dfd2c0e9c9440f2a1, the content this pull request carries at that commit against develop, and it recorded 0 findings.

ptr727 and others added 2 commits November 19, 2026 19:19
… 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]>
@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head ca1d2f16f04afd99addaeea7dc763c3b3da58bb7, the content this pull request carries at that commit against develop, and it recorded 1 finding.

ptr727 and others added 2 commits November 19, 2026 19:31
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]>
@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head cd4a6b8ac14a6d94aaee7bc9dab63fda7d8f26ff, the content this pull request carries at that commit against develop, and it recorded 2 findings.

@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head c9fd0ed85cb4c168cc141ff5338588f75ea0a7e7, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 138523a into develop Nov 20, 2026
13 checks passed
@ptr727
ptr727 deleted the burndown/audit-pin-age branch November 20, 2026 04:06
ptr727 added a commit that referenced this pull request Nov 20, 2026
…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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants