Repository navigation
Conversation
… Merge-Base Prose Gate (#4298) Three small hygiene fixes. - The `BLE001` suppression in `catalog/snippets/hub_fetch_run.py` now carries a same-line reason. - `CODESTYLE.md` "Interrupts in Shell" names `uv pip install` as a launcher that runs in the foreground when it builds. The generated skill trees are regenerated. - `OPERATIONS.md` and `scripts/README.md` document the diff-scoped prose gate against the merge base, so a run reads only the branch's own change. Closes #4220 Closes #4252 Closes #4221 Verification: unit tests, `spec/validate.py`, `build_dist.py --check`, the prose gate against the merge base, and ruff on the changed Python all pass locally. A local strict review found two wording nits, both fixed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…ate Runs' Git Env (#4297) Closes #4294 Two edges of the retired-path checks. - The tracking-wiring test's final `spec/validate.py` run inherited the caller's git location variables, so a hook-set `GIT_DIR` made the child list the caller's files instead of the scratch tree's. It now runs under `without_git_location()`, as do the six sibling scratch-tree runs of the same script in that file. A recording test plants `GIT_DIR` and asserts the child's env lacks it. - `retired_path_errors` and `dropped_carry_errors` gave one reason for a tree-covered path, true only for a tree target. A path under a tree source now takes its own reason, and only where the hub tracks it. That is the case where `check_hubonly_carried` skips the past-hub-version comparison. An untracked source path is no longer refused, since the audit compares it with history there. Declined finding (Copilot, and the local review): the validator's tracked set is the checkout's, while the audit reads the hub's main. The audit runs from a main checkout, where the retire row and the file's deletion arrive in one promotion, so no window exists there. A mixed-ref run from develop affects every ledger row alike and is not introduced here. Local review recorded at digest 28ea97c6d3f0 with no findings on the last round; earlier rounds' findings are fixed in the branch. 🤖 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 * **Bug Fixes** * Validation now distinguishes tracked paths covered by a tree’s source from paths carried at its target, providing more specific guidance when a path is dropped. * The validator now rejects retiring paths carried at a tree target or tracked under a tree source, while untracked source paths can still be retired. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 5.5 <[email protected]>
|
Warning Review limit reachedYou'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 34 minutes. View limit details
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. |
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed validator changes, regression coverage, diagnostics, and documentation updates contain no identified actionable issues.
No open issues 🎉
What changed in this PR
This pull request promotes develop to main with validator isolation, retired-path diagnostic fixes, and hub documentation hygiene updates.
Changes:
- Isolates validation subprocesses from inherited Git location variables and adds regression coverage.
- Distinguishes tracked tree-source paths from tree-target paths when validating retirement decisions.
- Updates merge-base prose-gate guidance,
uv pip installinterruption guidance, BLE001 rationale, and generated skills.
No actionable findings were identified.
| File | Description |
|---|---|
| tests/test_spec_validate.py | Adds coverage for Git-environment isolation and retired-path reasoning. |
| spec/validate.py | Refines validation diagnostics for tree targets, tracked tree sources, and untracked sources. |
| scripts/README.md | Documents merge-base-scoped prose-gate usage. |
| OPERATIONS.md | Updates operational prose-gate instructions and their scope. |
| CODESTYLE.md | Documents uv pip install as a foreground launcher when builds can outlive uv. |
| catalog/snippets/hub_fetch_run.py | Adds the required rationale to the broad exception suppression. |
| .github/skills/shell-codestyle/SKILL.md | Regenerates the distributed shell-codestyle guidance. |
| .claude-plugin/fleet-skills/skills/shell-codestyle/SKILL.md | Regenerates the Claude shell-codestyle skill. |
| .claude-plugin/fleet-skills/.source-digests/shell-codestyle | Updates the generated shell-codestyle source digest. |
| .agents/skills/shell-codestyle/SKILL.md | Updates the canonical shell-codestyle skill guidance. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4300 +/- ##
=======================================
Coverage 79.02% 79.03%
=======================================
Files 42 42
Lines 15625 15631 +6
=======================================
+ Hits 12348 12354 +6
Misses 3277 3277
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
## Summary `pr_review.py merge` could land a pull request in the gap after a hosted reviewer was asked and before its check registered. Until the check registers the rollup holds nothing of the review, so a head whose other checks have passed reads ready. This adds the registration grace the maintainer chose on #3814 and refined on #3806: option 1, anchored on the head's push, its last check settling, and its newest review ask, with G = 90s. - **Settle stamp.** `check_nodes` now records when each check settled. For a CheckRun that is `completedAt`, which the held query now reads. For a StatusContext it is `createdAt` once the context is no longer pending. - **The grace.** `pr_review_hold.hosted_grace` anchors on the latest of three things: the head's push (its earliest suite or check), its last non-hosted check settling, and its newest trusted review ask (`@coderabbitai review`, `@coderabbitai full review`, or `/review` from an owner, member, or collaborator). It runs `HOSTED_GRACE` = 90 seconds from that anchor. - A hosted reviewer's own check, Copilot's included, is left out of the settling, so a finished review never restarts the window. - The grace ends early once a CodeRabbit or Qodo check that did not conclude `SKIPPED` and that began at or after the newest ask is on the head. From then on, that check's existing hold decides. A check older than the ask answered an earlier request, so a re-ask still waits for its own check. A `SKIPPED` check is CodeRabbit's "automatic reviews are disabled" placeholder, which every head here carries about 10s after the push. - **wait.** On an attested head, the held poll judges the grace only after `wait` sends its after-checks asks. Where it sent one, it reads the pull request again, because the ask moves the anchor. The `CHECKS_PENDING` line adds `(registration grace until: <time>)`. A `wait` that returns `0` with no hosted check on the head prints a note. The note says either that the grace released the merge without a hosted check, or, on a head no local pass covers, that the grace still holds and `merge` refuses until it ends. - **merge.** The fresh read's `unmet` refuses an open grace as `CHECKS_PENDING`, on a line of its own that names when the grace ends. This is separate from the "a hosted review of the head is running" line. - **Layout.** `pr_review.py` was at 2198 of its 2200-line ceiling, `pr_review_checks.py` at 449 of 450, and `pr_review_side.py` at 347 of 350. So the grace, its note, and the `CHECKS_PENDING` line builder (with `_unmet_note`) live in a new pure reader, `scripts/pr_review_hold.py`, which has a 200-line ceiling. - The pure helpers `side_command`, `side_asks`, `head_arrived`, and `hosted_check` moved there from `pr_review_side.py`, which imports them back. - The new module is listed among the readers in the import contract test. - No ceiling was raised. - **Accepted trade-off.** The grace is judged apart from `held_checks_open`'s stuck-check read. So on an attested head, a `BLOCKED` merge with a required check stuck reports `30` for at most the grace's 90 seconds before `44`. `scripts/README.md` says so in the `wait` paragraph and on the `44` exit row. ## Measurement Read-only reads of the 150 most recently updated merged pull requests in this repository (#4038 to #4300): - CodeRabbit posts a `SKIPPED` "Review skipped: automatic reviews are disabled" check on every head, about 10s after the push (p90 30s). Its check for an actual review appears only after an ask. 89 heads carried such a run: 26 finished, 50 rate limited (an instant neutral), and 13 cancelled. Qodo posts no check in this repository. - **Ask to registration:** 10 to 33s across all 89 asked runs, mostly 12 to 17s. - **Later of push and last non-hosted check settling, to registration:** 3 to 146s on 86 heads (p50 91s, p90 133s). The other 3 were 278s, 1566s, and 1963s, where a later `wait` sent the ask minutes after the checks settled. That is why the anchor includes the ask. - **The failure, measured:** 7 merges landed 1 to 6s before CodeRabbit's run registered (#4280, #4281, #4244, #4130, #4129, #4105, #4109). Each run was then cancelled with "Pull request is closed", and each merge came 10 to 20s after the ask. - **Chosen value:** `HOSTED_GRACE` = 90s, about 2.7 times the largest measured delay from ask to registration. On a head nobody asks a hosted reviewer to review, the fixed cost is 90s after the checks settle. ## Verification - `python -m unittest discover -s tests`: see the CI run. Locally, `tests/test_pr_*.py` (979 tests) and `tests/test_backlog*.py` pass, the size ceiling test included. - New cases in `TestRegistrationGrace` cover: - the anchor's three sources, with an untrusted ask and a hosted conclusion moving nothing; - a `SKIPPED` check versus any other hosted conclusion; - a StatusContext's settle stamp; - the open and released notes; - the `CHECKS_PENDING` line; - `merge`'s separate refusal line. - `TestCli` cases cover the hold and its release on a held head, and the extra read after a sent ask, which happens only when an ask was sent. Three existing `wait` fixtures now date their head past the grace. - ruff format, ruff check, mypy, and the prose gate are clean. The full `unittest discover -s tests` run passed locally on the first commit (4559 tests). ## Local review There were three recorded `local-strict-review` passes. The first raised seven findings and the second raised two, and both rounds' fixes are in this branch. The third raised none. The declined findings are these: - **Grace ignores the review policy** (`introduced`, declined). On #3814 the maintainer chose a grace that reads no reviewer configuration, with its fixed, bounded delay accepted. A policy can also understate a reviewer that is installed, and reading it would then drop the hold. - **`ASK_BODIES` repeats `pr_review_policy.COMMANDS`** (`introduced`, declined). `pr_review_policy` imports `subprocess`, which the reader contract test forbids a pure reader to load. - **`stamp()` repeats the formatter in `secrets_sync.py`** (`introduced`, declined). The same reader contract rules that import out. - **Skill drift** (`introduced`, reported to the backlog-burndown orchestrator, outside this pull request's files). Two skills still describe the old refusal: - `.agents/skills/pr-review-conduct/SKILL.md` "Merge Gate" item 2 names only a running hosted check as a `CHECKS_PENDING` refusal. - `.agents/skills/drive-pr/SKILL.md` step 4 `next=redrive` says a `CHECKS_PENDING` refusal clears by `gh pr checks --watch`, which returns at once for a grace refusal. The refusal line itself now names the time to run `merge` again. Closes on promotion: #3806 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Promotes
developtomain. It carries these changes:BLE001reason, theuv pip installlauncher, and the merge-base prose gate.Closes #4294
Closes #4220
Closes #4252
Closes #4221
🤖 Generated with Claude Code