Skip to content

Report a Stale pullRequestCheck: false and Correct AUDIT.md Section 6 - #4423

Merged
ptr727 merged 6 commits into
developfrom
burndown/audit-stale-pr-check
Nov 24, 2026
Merged

ptr727 merged 6 commits into
developfrom
burndown/audit-stale-pr-check

Conversation

@ptr727

@ptr727 ptr727 commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • spec/audit.py's rulesets.payload check now reports a registry pullRequestCheck: false as drift once it has outlived its reason (Detect a Stale pullRequestCheck: false in the Registry #3908). That is where every branch whose committed repo-config/ payload requires the pull request status check carries a .github/workflows/test-pull-request.yml posting that check on every pull request into the branch. Each workflow is read at its branch's head commit.
    • No finding where a gated branch lacks the workflow, posts the check under another name, or has no pull_request trigger.
    • No finding where the trigger can skip a pull request into the branch: a branches / branches-ignore filter excluding it, any negated branches pattern, a paths / paths-ignore filter, or a types list missing opened, synchronize, or reopened.
    • A reusable-workflow uses: job does not count, since GitHub posts its check as <caller> / <callee job>.
    • An operational repository reads main alone, since its develop ruleset requires no check.
    • The job-name reading is shared with the interface contract check through a new job_names helper, so both read a ruleset-bound name the same way, WORKFLOW.md D1.5's pull_request-only expression included.
    • job_names skips uses: call jobs, so the interface contract check no longer accepts a reusable-workflow call job carrying the check name as posting it. That is a pre-existing defect the local pass raised in this file, fixed here. Such a job now draws that check's existing "names the ruleset-bound check neither as a literal job name nor through the pull_request-only expression" finding.
  • spec/audit.py stays under its 3000-line ceiling (tests/test_audit_size.py), which is a design constraint rather than a number to raise. That is why lines in driftnote_findings, check_interface, check_branch_drift, check_settings_general, and check_rulesets_payload moved. Their six-line finding appends are folded into one-line forms, purely as a reshaping. Every finding's text and severity is unchanged. The full suite passes over the existing finding assertions. Running the base and head driftnote_findings and check_interface on the same constructed fixtures gives identical output.
  • spec/checks.json's rulesets.payload description now names the stale-field finding the check reports.
  • AUDIT.md section 4's branch-model bullet documents the new finding.
  • AUDIT.md section 6, the Two canonical units carry 21 defects a whole-unit read found, none of them new #1493 items still open on develop:
    • Item 6: the bullet still passes the model, since OPERATIONS.md and RESYNC.md both require passing it. It now says to pass the value the registry workflowModel names, and that the command does not cross-check it, so a wrong one checks the other model's develop ruleset and can still report a match.
    • Item 7: the bullet now says configure.sh finds the registry entry by repository name alone, so <owner> must be the registry owner.
    • Items 1, 2, 3, 4, 8, 9, 10, and 11 were checked against develop and are already fixed there, so nothing changes for them. Item 5, the heading rename, is its own change and is left out, as is the issue's GOVERNANCE.md "Hub-Hosted Tooling" half.

Tests

  • tests/test_audit_helpers.py StalePullRequestCheckCase, on constructed fixtures:
    • a stale false with both branches posting gives one finding;
    • a false with either branch lacking the workflow gives none;
    • a false with a check posted under another name gives none;
    • true or an absent field gives none and reads no branch;
    • an operational repository reads main only;
    • the pull_request-only expression counts as posting;
    • each skipping trigger above gives none, while a branches list naming both branches, or a types superset of the defaults, gives the finding;
    • a uses: job named for the check gives none, and draws the interface contract check's naming finding;
    • Run.branch_workflow reads each branch at its own head SHA and answers None for an absent branch or file;
    • check_rulesets_payload reports the stale field, reading each branch at its own head.
  • spec/validate.py passes, and so do the spec and audit test modules and the full suite.

Introduced findings left after the local pass edit budget, and their outcomes

  • AUDIT.md:103, introduced, an unfollowable instruction. "Pass the model the target's registry workflowModel names" named nothing for an entry without workflowModel, which takes defaults.workflowModel instead. Fixed in this pull request's review loop: the sentence now names the entry's workflowModel or else defaults.workflowModel.
  • spec/audit.py:1262, introduced, design. The new trigger and job-name readers fit under the size ceiling by compacting unrelated finding sites, rather than by moving pure workflow readers into a sibling module such as spec/audit_contract.py. Declined. The run's coordinator accepted the compaction as a pure reshaping, and the finding text is unchanged. Moving the readers needs a spec/ file outside this change's claim. The ceiling holds at 2999 of 3000, so nothing fails today.
  • AUDIT.md:87, introduced, a doc stating a looser rule than the code. Section 4 said the field stays where the trigger "can skip some pull request", where posts_check keeps it for any negated branches pattern and any paths filter. Fixed: section 4 now names each kept shape.
  • spec/audit.py:2301, introduced, a test gap. Nothing tested that check_rulesets_payload wires in the stale check with each branch's head read. Fixed: test_the_rulesets_check_reports_it_from_each_branch_head.

Closes on promotion: #3908

🤖 Generated with Claude Code

ptr727 and others added 4 commits November 24, 2026 03:16
The rulesets check now reports a registry pullRequestCheck: false as drift
once every branch whose committed payload requires the pull request status
check carries a test-pull-request.yml posting it on a pull request into that
branch. A missing workflow, a trigger skipping the branch, or a check posted
under another name keeps the field. The job-name reading is shared with the
interface contract check.

AUDIT.md section 4 documents the finding. Section 6 drops the instruction to
pass the workflow model by hand, which overrode the registry unchecked, and
states that configure.sh finds the entry by repository name alone.

spec/audit.py stays under its size ceiling by folding repeated finding
appends into one-line forms with unchanged text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rulesets.payload description now names the stale pullRequestCheck: false
finding the check reports beside its ruleset diff.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
posts_check now reads a pull_request trigger with a paths or paths-ignore
filter, or types missing opened, synchronize, or reopened, as not posting on
every pull request. A reusable-workflow call job posts its check under a
composed name, so it no longer counts. The branch read reuses
read_baseline_file.

AUDIT.md section 6 keeps passing the model, as OPERATIONS.md and RESYNC.md
require, and warns that configure.sh does not cross-check it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A uses: job posts its check under a composed name, so job_names now skips
it for the interface contract check as well as the stale-field check.
Run.branch_workflow gains a test of its per-branch head read and its
absent-branch and absent-file answers. AUDIT.md and spec/checks.json name
every trigger filter that keeps the field.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 24, 2026 11:44
@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

An entry without workflowModel takes defaults.workflowModel, so the
instruction now names that fallback.

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 two active documentation and maintainability findings: the model fallback is not documented, and workflow parsing helpers remain in the monolithic audit module.

2 open issues
What changed in this PR

This pull request extends the audit to detect obsolete pullRequestCheck: false registry entries when all gated branches already post the required pull request check, and clarifies the related audit guidance.

Changes:

  • Add branch-aware workflow inspection, trigger filtering, and reusable-workflow handling for stale pull-request checks.
  • Add constructed-fixture coverage for valid, skipped, missing, and incorrectly named workflows.
  • Update audit metadata and clarify AUDIT.md configuration-validation instructions.
File Description
tests/​test_audit_helpers.py Adds constructed-fixture tests covering stale-field detection, workflow triggers, branch-specific reads, reusable workflows, and operational repositories.
spec/​checks.json Documents the expanded rulesets.payload check and its stale pull-request check finding.
spec/​audit.py Adds branch-aware workflow readers and stale pullRequestCheck detection while sharing job-name parsing with interface validation.
AUDIT.md Documents stale-check detection and clarifies ruleset validation instructions.

Review effort: Lite

Comment thread AUDIT.md Resolved
Comment thread spec/audit.py Resolved
check_rulesets_payload gains a test that it reports the stale field from
each branch's head. AUDIT.md section 4 names each trigger shape that keeps
the field, matching what posts_check reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

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

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.30159% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.62%. Comparing base (b38e084) to head (505ff20).
⚠️ Report is 340 commits behind head on develop.

Files with missing lines Patch % Lines
spec/audit.py 87.30% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4423      +/-   ##
===========================================
- Coverage    81.60%   79.62%   -1.99%     
===========================================
  Files           26       47      +21     
  Lines         9070    16268    +7198     
===========================================
+ Hits          7402    12954    +5552     
- Misses        1668     3314    +1646     
Flag Coverage Δ
python-3.13 79.62% <87.30%> (-1.99%) ⬇️

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 merged commit 902d931 into develop Nov 24, 2026
13 of 14 checks passed
@ptr727
ptr727 deleted the burndown/audit-stale-pr-check branch November 24, 2026 12:14
ptr727 added a commit that referenced this pull request Nov 24, 2026
…lts, Secret Sync Fields, and Audit Account Fixes (#4428)

Promotes the 28 pull requests that landed on develop since the last
promotion (#4388), from the away-mode backlog burndown run.

- #4391: Drop the false XML comment suppression claim from the .NET
conventions.
- #4390: Blank quotations after a heredoc label on its opening line in
the paste-safe rule.
- #4392: Carry attention lists, cut lists, and opt-in billing in the
`backlog_metrics.py` JSON.
- #4393: Gate `configure.sh apply`'s interaction limit on a committed
bot verification record.
- #4394: Make the gh and node report note say a one-line vendor source
is configured.
- #4395: Add ShellCheck and shfmt lint tasks to the VS Code task
snippets.
- #4396: Count a CodeRabbit clean pass on the head in the digest's
`other_reviewed`.
- #4401: Date the line-ending intentRefs by the skill and trim advisory
restatements.
- #4399: Share one any-level heading region primitive between
`heading_body` and `extract_anchored`.
- #4398: Name the hub pull requests a standup lands through, and add
HACS first-run guidance.
- #4404: Add a PowerShell section to CODESTYLE.md and narrow the shell
rule.
- #4405: Close AUDIT.md section 10's convergence loop and fix three
skill pointers.
- #4409: Route CODESTYLE.md's General section to the language skills
(part of #1153, which stays open).
- #4410: Detect a C# test project by its own text rather than its file
name.
- #4411: Drop the unruled "working gate is not drift" sentence from
CODESTYLE.md.
- #4412: Track the newest upstream line of each pinned host tool.
- #4413: Correct AUDIT.md section 0's account of what the audit checks.
- #4416: Add a required coverage shield class to the README audit.
- #4414: Tie drive-pr's merge to its authorization and align the pass
moments.
- #4417: Pass over a second SIGTERM in `pr_review.py` so an interrupt
prints one line.
- #4418: Point the report-path placeholder at AUDIT.md section 8.
- #4419: Correct the audit account copies outside AUDIT.md section 0.
- #4422: Drop the archived DevKitCIoT from the rollout checklists.
- #4423: Report a stale `pullRequestCheck: false` and correct AUDIT.md
section 6.
- #4424: Add a `prune` subcommand to retire orphaned canonical review
passes.
- #4425: Drop the archived DevKitCIoT from the reusable-workflows
checklists and fix a normalization docstring.
- #4427: Store secret sync metadata in item fields, not 1Password tags.
- #4426: Declare and apply the Actions workflow token defaults through
`configure.sh` (the `configure.sh` part of #1783, which stays open).

## Owed by the maintainer

- #4412: A live run of the new host-tool line tracker. Scheduled runs
start only once this reaches `main`, and a `workflow_dispatch` would
prove it sooner.
- #4426: A fleet `configure.sh apply` for the workflow token defaults,
after the per-repository read the 2026-11-01 answer requires. Please
also confirm the new `--lower-workflow-token` option, which a `write`
repository needs for the apply to lower its default.
- #4427: Run `python3 scripts/secrets_sync.py selftest`, then the
cleanup script in that pull request's body (`move_sync_tags.py`, dry run
first, then `--apply`). Until that runs, every un-migrated secret item
refuses to sync.
- #4393: The pilot's first interaction limit is set by hand in its
settings and its bots verified there. The verification record is
committed afterwards through a hub pull request, and only then does
`apply` set the limit fleet-wide.
- A fleet resync is owed, because carried text changed: AGENTS.md,
GOVERNANCE.md, CODESTYLE.md, and several skills.

Fixes #4387
Fixes #4383
Fixes #4284
Fixes #1095
Fixes #4299
Fixes #4370
Fixes #4364
Fixes #4173
Fixes #4064
Fixes #3536
Fixes #3929
Fixes #3808
Fixes #3812
Fixes #3810
Fixes #4320
Fixes #4232
Fixes #1748
Fixes #1607
Fixes #1270
Fixes #1170
Fixes #3692
Fixes #4415
Fixes #3908
Fixes #1648
Fixes #4276

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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