Skip to content

Read the Run Log Inside the Digest's Refusal Block - #3558

Merged
ptr727 merged 2 commits into
developfrom
feature/3541-digest-transient-refusal
Oct 28, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/3541-digest-transient-refusal

Conversation

@ptr727

@ptr727 ptr727 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

The digest's COPILOT REFUSED THIS ROUND block said re-requesting repeats the refusal. A transient error refusal contradicts that, since its run log earns one re-request. The RUN LOG READING line saying so printed at the digest's very end, apart from the block.

  • scripts/pr_review_digest.py: render takes a run_log line beside quota and prints it inside the refusal block. The fixed sentence now says the body names the remedy, and any run log line says whether a re-request is owed.
  • scripts/pr_review.py: digest computes the reading before render and passes it in, rather than appending it after.
  • tests/test_pr_review.py: a new case asserts the run log line sits inside the block, before an open thread's line. It covers a transient reading, an unread run log, a logged rate limit, an account quota refusal, and a file-count refusal. All use constructed fixtures.

Verification

  • uvx ruff@latest format --check ., uvx ruff@latest check ., and uvx mypy@latest are clean.
  • The full unittest discover -s tests suite passes, 3073 tests.
  • The new case fails against the unchanged code, where the reading prints after the thread line.
  • The local strict review took two rounds. Round one found the first rewording false for a file-count refusal, fixed in the second commit. Round two found nothing.

Pre-existing findings, not filed

  • scripts/pr_review.py usage text, the refusal= paragraph (about lines 80-82), pre-existing. It says the RUN LOG READING line reads transient wherever the log names a fetch failure. The sent and spent states read possible quota despite one.

Closes on promotion: #3541

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 27, 2026 20:29
The refusal block said re-requesting repeats the refusal, which a transient
error refusal contradicts, since its run log earns one re-request. The block
now says the body and any run log line under it decide that. `digest` computes
the RUN LOG READING line before `render` and passes it in, so it prints inside
the block rather than after the whole digest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rewritten sentence framed every refusal as a re-request question, which
misleads on a file-count refusal whose remedy is splitting. The body again says
which remedy applies, and the run log line says whether a re-request is owed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 28, 2026 03:33
@ptr727

ptr727 commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • 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

Comment @coderabbitai help to get the list of available commands.

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.

🟢 Approval recommended

The review records no active issues or outstanding blockers to approval.

No open issues 🎉

What changed in this PR

This pull request keeps run-log interpretation inside the digest’s COPILOT REFUSED THIS ROUND block, presenting refusal details and applicable re-request guidance together.

Changes:

  • Passes the computed run-log reading into the digest renderer.
  • Renders the reading within the refusal block and updates its explanatory text.
  • Adds coverage for transient, unread, rate-limit, quota, and file-count refusal scenarios.
File Description
tests/​test_pr_review.py Verifies refusal-block ordering and supported run-log scenarios.
scripts/​pr_review.py Computes the run-log reading before rendering and passes it to the renderer.
scripts/​pr_review_digest.py Accepts and renders the run-log reading inside the refusal block.

Review effort: Lite

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.50%. Comparing base (367bba0) to head (5400838).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3558   +/-   ##
========================================
  Coverage    81.50%   81.50%           
========================================
  Files           26       26           
  Lines         9065     9066    +1     
========================================
+ Hits          7388     7389    +1     
  Misses        1677     1677           
Flag Coverage Δ
python-3.13 81.50% <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 merged commit 6225ccc into develop Oct 28, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/3541-digest-transient-refusal branch October 28, 2026 03:46
ptr727 added a commit that referenced this pull request Oct 28, 2026
… AGENTS.md and WORKFLOW.md Sentence Length (#3562)

## Summary

Promotes `develop` to `main`, carrying round 3 of the resync-issue
burndown:

- #3557: the python-codestyle skill, `profiles.md` "Adapt before
propagating", `spec/type-model.md` and `spec/project-types.json` state
the per-directory Python profile rule. The skill names the root-gating
condition.
- #3558: the digest prints the run-log reading inside its Copilot
refusal block. The block's fixed sentence holds for quota, transient,
and file-count refusals.
- #3559: every sentence in `AGENTS.md` is 25 words or fewer, and all but
one in `.github/copilot-instructions.md`. The two remaining
`GOVERNANCE.md` sentences, and their copies, are shortened too.
- #3561: every sentence in `WORKFLOW.md` is 25 words or fewer. Guarantee
IDs, tables, and code are byte-identical.
- #3564: promotion fix for Copilot's two findings on this pull request.
The python-codestyle skill and the `python.profileNote` name the
undeclared-root default.
- #3565: Dependabot bumps `DavidAnson/markdownlint-cli2-action` from
24.2.0 to 25.0.0. It merged into `develop` while this pull request was
open.

The #3559 and #3561 slices continue the #3531 cleanup and do not close
it. Carried `AGENTS.md`, `WORKFLOW.md`, and Copilot-instructions text
changes wording, so each fleet repository's verbatim copy differs from
the hub until its next resync.

Fixes #3541
Fixes #3548
Fixes #3550
Fixes #3552
Fixes #3554

🤖 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