Visitar URL original
Read a Copilot Billing-Failure Notice as a Refusal by ptr727 · Pull Request #4180 · ptr727/ProjectTemplate · GitHub
Skip to content

Read a Copilot Billing-Failure Notice as a Refusal - #4180

Merged
ptr727 merged 2 commits into
developfrom
burndown/copilot-billing-refusal
Nov 13, 2026
Merged

ptr727 merged 2 commits into
developfrom
burndown/copilot-billing-refusal

Conversation

@ptr727

@ptr727 ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

A Copilot review whose whole body is a GitHub job-start notice naming a billing failure read as a review round. It covered the head (review_on_head=yes, coverage=none), counted toward the round cap, held the head as shapes=HELD, and on an earlier head left a shapes=NOTED part that merge refused on until acknowledged.

It now reads as a refusal: it covers nothing, spends no round, and owes no acknowledgment. It reads as a refusal of no named kind, refusal=YES, and wait exits 41 as REVIEW_IS_A_REFUSAL, which goes to the maintainer. It is deliberately not the quota kind. Every status line and remedy that kind drives describes a quota that resets on its own, and a failed payment or a spending limit never does.

  • scripts/reviewers/copilot.json: add the refusal opening job was not started. No new refusal kind and no new remedy line.
  • tests/test_pr_review_copilot.py: the adapter reads a constructed notice as a refusal with no notes.
  • tests/test_pr_review.py: the gate reads it as refusal=YES, not a round on the head, no shapes=HELD, no round toward the cap, wait exiting 41 as REVIEW_IS_A_REFUSAL, and no shapes=NOTED on an earlier head.

Both new tests fail on develop without the vocabulary change. The fixtures are constructed text, not a copied notice.

Local review findings, declined

  • scripts/pr_review.py:1902-1906 and scripts/README.md:237, introduced. The REVIEW_IS_A_REFUSAL line says no further review follows the refusal and that re-requesting the head clears nothing. Once the maintainer fixes the billing, a re-request does clear it, and only wait --ignore-quota-signal sends one. Declined. The maintainer's direction on #1071 calls a distinct remedy line naming the billing settings optional on top of reading the notice as a refusal. The line also stays true for as long as the billing failure stands, and the refusal already goes to the maintainer, who alone clears it. A billing-specific remedy line would need scripts/README.md, which Add secrets_sync.py to Sync Secret Files With 1Password Through op #4165 holds, and room under scripts/pr_review.py's 2200-line ceiling, which it sits 2 lines under.

Test plan

  • python -m unittest test_pr_review_copilot test_pr_review from tests/, with tests/requirements.txt: 656 tests pass.
  • Pre-commit hook: ruff format, ruff check, mypy, and the prose gate pass.

Closes on promotion: #1071

🤖 Generated with Claude Code

ptr727 and others added 2 commits November 13, 2026 12:57
A job-start notice naming a failed payment or a spending limit, posted as a
Copilot review, read as a round: it covered the head, counted toward the
round cap, and held the head or noted an earlier one for an acknowledgment.
It now reads as a quota refusal, covering nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quota reading's status line and its documented remedy describe a
quota that resets on its own, which a failed payment or a spending
limit never does. As a generic refusal the notice still covers nothing
and spends no round, and goes to the maintainer, who alone clears it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 13, 2026 21:05
@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a25ac13 and e2690de.

Files selected for processing: 3

  • scripts/reviewers/copilot.json
  • tests/test_pr_review.py
  • tests/test_pr_review_copilot.py
  • 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

An active nit remains for the ungrammatical docstring at tests/test_pr_review_copilot.py:139, which should be rephrased for clarity.

1 open issue
What changed in this PR

This PR updates Copilot review parsing so GitHub Actions billing-failure notices are treated as refusals that cover no code, consume no review round, and create no acknowledgment obligation.

Changes:

  • Adds job was not started to Copilot refusal detection.
  • Adds adapter coverage for billing-failure notices.
  • Adds gate coverage for refusal status, round accounting, and acknowledgment behavior.
File Description
tests/​test_pr_review.py Adds end-to-end coverage for billing-failure refusal status, round accounting, wait behavior, and prior-head handling.
tests/​test_pr_review_copilot.py Adds adapter coverage verifying billing-failure notices are classified as unknown refusals with no coverage or notes.
scripts/​reviewers/​copilot.json Recognizes billing-failure job notices as Copilot refusals.

Review effort: Lite

Comment thread tests/test_pr_review_copilot.py Resolved
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4180      +/-   ##
===========================================
- Coverage    81.60%   76.71%   -4.89%     
===========================================
  Files           26       41      +15     
  Lines         9070    14317    +5247     
===========================================
+ Hits          7402    10984    +3582     
- Misses        1668     3333    +1665     
Flag Coverage Δ
python-3.13 76.71% <ø> (-4.89%) ⬇️

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

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

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 cb15c14 into develop Nov 13, 2026
14 checks passed
@ptr727
ptr727 deleted the burndown/copilot-billing-refusal branch November 13, 2026 21:22
ptr727 added a commit that referenced this pull request Nov 13, 2026
… Rules (#4189)

## Summary

Promotes the backlog-burndown rounds and changes from other hub sessions
from `develop` to `main`.

- Hooks and the prose gate: #4132, #4134, #4136, #4145, #4152, #4184.
The Husky hook reads its path list once and diffs a merge against
`MERGE_HEAD`. Interrupts re-raise their signal, a Markdown code span
reads as quoted data, and the gate picks a commit's diff base and
recognizes a conflicted promotion's branch cut from `main`.
- Procedures and carried rules: #4133, #4139, #4141, #4149, #4166,
#4177, #4179, #4183, #4185. Resync, audit and check-this-repo procedure
gaps, code style and shell interrupt rules, review-loop gaps across four
skills, the context and delegation section of `AGENTS.md`, question
rules in governance, the promotion line in pull request bodies,
closing-keyword behavior on promotion, and the history-rewrite premise.
- Review and cleanup tooling: #4138, #4148, #4154, #4156, #4157, #4163,
#4164, #4168, #4174, #4180. Cleanliness reads, parked handoffs, the
backlog report's JSON output, exact inline script pins, trusted inputs,
env-file includes, the bounded review wait, side-reviewer matching, and
a Copilot billing-failure notice read as a refusal.
- Workflow and runbook contract: #4153, #4155, #4169, #4171, #4178,
#4182. The runtime-secrets check, a registry entry and spec references,
the Copilot runbook pointers, credential-free checkout steps, and the
deploy-key and runner wording.
- From other hub sessions: #4159 (a repository's own .NET line under a
fleet default), #4161 (the 1Password CLI as an optional host tool),
#4162 (Codex's Windows installer and one managed opencode copy). These
carry no promotion line.

#4182 carries no promotion line by design, and #4175 holds the split-out
part of #4057's scope. Both #1448 and #4175 stay open.

Fixes #1071
Fixes #1154
Fixes #1391
Fixes #1471
Fixes #1594
Fixes #1620
Fixes #1627
Fixes #1650
Fixes #1801
Fixes #2853
Fixes #3620
Fixes #3668
Fixes #3697
Fixes #3766
Fixes #3787
Fixes #3837
Fixes #3840
Fixes #3842
Fixes #3844
Fixes #3865
Fixes #3882
Fixes #3890
Fixes #3894
Fixes #3912
Fixes #3916
Fixes #3954
Fixes #4014
Fixes #4015
Fixes #4016
Fixes #4043
Fixes #4050
Fixes #4057
Fixes #4058
Fixes #4062
Fixes #4084
Fixes #4097
Fixes #4098
Fixes #4099
Fixes #4104
Fixes #4108
Fixes #4114
Fixes #4115
Fixes #4117
Fixes #4118
Fixes #4119
Fixes #4121
Fixes #4122
Fixes #4123
Fixes #4131
Fixes #4135
Fixes #4140
Fixes #4142
Fixes #4143
Fixes #4144
Fixes #4151

🤖 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