Skip to content

Read the Merge-Bot Subscription From the Trigger and Sharpen Grace Rules - #4332

Merged
ptr727 merged 3 commits into
developfrom
promo-4330-review-fixes
Nov 22, 2026
Merged

ptr727 merged 3 commits into
developfrom
promo-4330-review-fixes

Conversation

@ptr727

@ptr727 ptr727 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes three findings CodeRabbit raised on the develop -> main promotion #4330.

  • Merge-bot contract. The auto_merge_disabled token was read against the whole file's code view, so a job named for the event type passed without a subscription. A new requireTokensOn contract key reads the on: mapping alone. The merge-bot unit uses it, and a regression case names the token in a job name with no matching type.
  • pr-review-conduct. The registration grace's settling anchor now says a hosted reviewer's own check never counts, matching hosted_grace.
  • drive-pr. The redrive bullet now runs the watch first, then waits out the grace end the refusal named, and treats a rerun that still refuses on a grace as the blocked-merge report.

Two other promotion findings are answered on their threads: the prose-gate shebang template (declined) and the copilot-instructions restatement (declined, as on #4324).

Local review

Two passes ran. Edits stopped after the second round.

The second pass raised one introduced finding on the drive-pr wait. A later commit fixed it, and a third pass over the current content found nothing.

Closes on promotion: none

🤖 Generated with Claude Code

ptr727 and others added 2 commits November 21, 2026 16:31
…e Rules

The merge-bot contract read auto_merge_disabled against the whole file's
code view, so a job named for the event type satisfied it without a
subscription. A new requireTokensOn contract key reads the on: mapping
alone, and the merge-bot unit uses it. A regression case names the token
in a job name with no matching type.

pr-review-conduct now says a hosted reviewer's own check never counts as
the settling that anchors the registration grace, matching hosted_grace.
drive-pr says a rerun that refuses on a later-opened grace is the bound
reached and is reported as waiting on that named end.

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

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

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
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

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

The wait logic can retry merge before a restarted 90-second grace period expires, causing a premature blocked-merge path.

1 open issue
What changed in this PR

This pull request strengthens workflow contract auditing and clarifies hosted-review grace handling and merge redrive guidance across the fleet's review skills.

Changes:

  • Adds requireTokensOn to the contract schema, validator, audit engine, and merge-bot tests.
  • Clarifies hosted-reviewer grace anchors and updates redrive sequencing.
  • Synchronizes authored and generated skill copies and source digests.
File Description
tests/​test_audit_helpers.py Tests trigger-scoped token validation and merge-bot job-name regression behavior.
spec/​validate.py Validates the new requireTokensOn contract key and its value type.
spec/​files.schema.json Defines the requireTokensOn property in the contract schema.
spec/​files.json Applies trigger-scoped token validation to the merge-bot workflow.
spec/​audit.py Extracts the workflow on: mapping for contract checks.
spec/​audit_contract.py Implements trigger-scoped required-token validation and updates related documentation.
.github/​skills/​pr-review-conduct/​SKILL.md Updates generated Copilot guidance for hosted-reviewer grace anchors.
.github/​skills/​drive-pr/​SKILL.md Updates generated Copilot guidance for grace refusal redrives.
.claude-plugin/​fleet-skills/​skills/​pr-review-conduct/​SKILL.md Updates the generated Claude review-conduct skill distribution.
.claude-plugin/​fleet-skills/​skills/​drive-pr/​SKILL.md Updates the generated Claude drive-pr skill distribution.
.claude-plugin/​fleet-skills/​.source-digests/​pr-review-conduct Updates the generated review-conduct skill source digest.
.claude-plugin/​fleet-skills/​.source-digests/​drive-pr Updates the generated drive-pr skill source digest.
.agents/​skills/​pr-review-conduct/​SKILL.md Clarifies that hosted reviewer checks do not settle registration grace.
.agents/​skills/​drive-pr/​SKILL.md Updates canonical guidance for watching checks and redriving grace refusals.

Review effort: Lite

Comment thread .agents/skills/drive-pr/SKILL.md Resolved
@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.14%. Comparing base (81fbb96) to head (f778cca).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4332   +/-   ##
========================================
  Coverage    79.14%   79.14%           
========================================
  Files           45       45           
  Lines        15918    15920    +2     
========================================
+ Hits         12598    12600    +2     
  Misses        3320     3320           
Flag Coverage Δ
python-3.13 79.14% <100.00%> (+<0.01%) ⬆️

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 22, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Action not completed

Head commit changed.

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.

The drive-pr redrive bullet waited only for the grace end the refusal
named, but the watch can settle a check and restart the grace past it.
It now waits for the later of that end and 90 seconds after the watch
returned.

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

ptr727 commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit b9bb7db into develop Nov 22, 2026
14 checks passed
@ptr727
ptr727 deleted the promo-4330-review-fixes branch November 22, 2026 01:11
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