Skip to content

docs(skills): harden goal-pr-review for concurrent review lanes - #7500

Merged
ll7 merged 1 commit into
mainfrom
docs/goal-pr-review-concurrency-hardening-20260818
Aug 18, 2026
Merged

docs(skills): harden goal-pr-review for concurrent review lanes#7500
ll7 merged 1 commit into
mainfrom
docs/goal-pr-review-concurrency-hardening-20260818

Conversation

@ll7

@ll7 ll7 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Harden the goal-pr-review skill for the situation observed on 2026-08-18: many reviewer lanes plus the autonomous factory acting on the same PR set, a red shared main, decision-required labels that were mostly reducible, and PR bodies whose metadata was reconciled byte-wise but not truth-wise. Docs-only; no runtime behavior changes.

Linked Issues

  • Relates to #7448 (fabricated exact-head SHAs in gate-verdict trailers)
  • Relates to #7491 (merge-ready + stale "not merge-ready" narrative reaching main)
  • Relates to #7482 (shared-main namespace baseline that made unrelated PRs look red)

Stack / Dependency

  • Base dependency: none
  • Required prior PRs: none
  • Stack follow-up issues: none
  • Safe to review independently: yes
  • Review dependency reason, if any: none

What Changed

  • .agents/skills/goal-pr-review/SKILL.md (Codex mirror is a directory symlink; no separate copy):
    • Concurrent Writers section: read-live-before-mutate with an active-writer window; advisory review-claim: <lane> @ <head> until <UTC> marker; content-identical head moves (main refresh only) transfer findings but require re-publishing exact-head carriers after green CI; factory/owner label sweeps are authoritative ("one label away" reporting, no re-apply in-run); successor/superset detection across open PRs on the same issue.
    • Shared-Main Baseline Before Per-PR Diagnosis: run the base-sensitive marker suite on origin/main first; classify matching PR failures as shared_main_blocked; route one bounded repair instead of per-PR "fixes".
    • Decision-Required Triage: author-reserved taxonomy (claim/evidence admission, preregistration authorization, release/settings/secrets, authority expansion vs fail-closed narrowing) vs reducible; new author_decision parking state mapped to AUTHOR_DECISION_REQUIRED; ≤25-line decision-packet format; keep the branch mergeable while parked.
    • Step 4 body check: every 40-hex SHA in the body must resolve and equal live carriers (never prefix-complete); not-ready sentences must be re-narrated before merge-ready.
    • Step 9 + Shared Resource Budget: stop waiting under runner starvation and publish what exists; API-quota guard; no background pollers; worktrees on repo disk / free-space check; detached-HEAD inventory-test gotcha.
    • Output Requirements now include a terminal state, "one label away" detail, packet location, parked/racing writers.
  • CHANGELOG.md: Unreleased/Changed entry.

Why It Matters

Research Result Guidance

  • Target claim / hypothesis / blocker this should affect: NA — workflow docs only
  • Comparator or baseline, if applicable: NA
  • Evidence tier: docs-only
  • Result classification: NA
  • Decision or stop rule, if applicable: NA
  • Parent issue, claim map, registry, context note, or synthesis surface to update: none
  • New research/benchmark/metric/paper-facing analysis tool, if any: NA - support helper (skill contract text)

Domain-Aware Approval

  • Required for this PR: no - docs-only skill contract; no evidence classification or claim surface changed
  • Domains reviewed: NA
  • Status: not required
  • Approver/review source or waiver: NA
  • Validity checklist. Keep these machine-detected labels unchanged:
    • Target claim/hypothesis: NA
    • Comparator or split/evidence validity: NA
    • Fallback/degraded exclusions: NA
    • Claim boundary: NA
    • Implementation integrity vs experimental validity: NA

Falsification / Non-Transfer Check

NA — no empirical claim.

Next Empirical Action

NA.

Validation / Proof

  • uv run python scripts/dev/check_skills.py → Validated 55 skills, typed registry, generated README, and routing tests.
  • uv run pytest tests/dev/test_check_skills.py tests/dev/test_factory_v2_skill_contract.py tests/dev/test_token_efficient_thread_profile_snapshot_command.py -q → 64 passed, 1 skipped.
  • uv run python scripts/tools/sync_ai_config.py --check → 7 symlinks validated.
  • uv run python scripts/dev/check_docs_evidence_integrity.py --files … → 2 changed files passed.
  • uv run pre-commit run --files .agents/skills/goal-pr-review/SKILL.md CHANGELOG.md → passed.

Performance Evidence

NA — docs only.

Risks / Rollout

  • The review-claim marker is advisory until tooling (factory / pr_loop_policy.py) recognizes it; the text says so.
  • author_decision is a documented parking state, not a new pr_loop_policy.py classification; a follow-up could add machine detection of decision-required + packet presence.

Docs / Provenance

  • Skill contract updated in place; CHANGELOG entry added.

Downstream Propagation

NA — not an evidence-producing PR.

Follow-Up Issues

Reviewer Notes

Diff is additive apart from one table row (failed_ci mapping) and the Output Requirements list. Long lines are inside Markdown table rows, matching the existing file style.

Add concurrent-writers contract (active-writer window, advisory
review-claim marker, content-identical head-move rule, label sweeps as
authoritative, successor/superset detection), a shared-main baseline check
before per-PR CI diagnosis (shared_main_blocked), decision-required triage
with an author_decision parking state and bounded decision-packet format,
body narrative/SHA-binding checks ahead of merge-ready, and a shared
resource budget section. Terminal states join the output contract.

Refs #7448, #7491

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (2)
  • review-bot-auto
  • review-bot

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

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5694c124-900e-46a3-97f6-2f4bbe6db731

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

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.

@github-actions

Copy link
Copy Markdown

🔍 PR Contract Check Summary

Overall Status: 🟢 PASSED

Check Status Description
1. Closes-discipline ✅ PASSED Demand Refs #N for epic issues
2. Closure declaration ✅ PASSED Require Closes/Refs for title issues
3. State-refresh-only ✅ PASSED Reject docs/context state updates
4. Evidence hygiene ✅ PASSED Checks markers and provenance fields
5. Evidence writer usage ✅ PASSED Require the shared marked writer path
6. Successor discipline ✅ PASSED Require successor statement on multi-PR issues
7. Worker-lane label ⚪ None Label PRs from cheap worker lane
8. Placeholder docstring ratchet ✅ PASSED Reject NEW TODO/empty docstrings in added diff lines

ℹ️ Info

  • No worker-lane provenance detected.

This check is mechanized. Please resolve any blockers to pass CI.

@ll7

ll7 commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Tooling follow-up for the review-claim / author_decision / narrative checks: #7508. Namespace-count friction seen during this run: #7507.

@ll7

ll7 commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Self-review: exact head ff85bad12d75763ae861c6d6b0e6471902b96036

The change is docs/skill guidance plus a changelog entry. It adds explicit concurrent-writer claims, shared-main baseline handling, author-decision parking, bounded CI/resource guidance, and exact-head output requirements without changing production code, merge execution, scheduler behavior, or benchmark/evidence semantics.

Local proof: scripts/dev/check_skills.py --preflight goal-pr-review passed; Ruff check/format and git diff --check passed. No actionable self-review finding remains. This is author-side review evidence, not an independent approval; the PR base is stale and hosted checks/independent review remain required.

@ll7 ll7 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent exact-head review — ff85bad12d75763ae861c6d6b0e6471902b96036

Reviewed under the maintainer ruling 2026-08-18, see #7506 (closure-lane demotions of
evidence-current PRs reversed; this lane owns the guarded merge path).

Scope verified against the diff, not the body. git diff origin/main...ff85bad --stat is exactly
two files: .agents/skills/goal-pr-review/SKILL.md (+140/-5) and CHANGELOG.md (+10). No runtime
code, no scheduler, benchmark, metric, evidence-admission, claim-ledger, release, settings, or
secrets surface is touched.

Not author-reserved. Against the four hard-stop categories: (a) no claim-status or
evidence-admission change — the file records review workflow only; (b) no preregistration
authorization; (c) no release/tag/settings/secrets/destructive op; (d) not authority expansion —
the new ## Decision-Required Triage section preserves all four author-reserved categories verbatim
and tightens two of them ((b) now excludes packets whose validator hard-requires
domain_approval.status: pending, (d) now requires a provable fail-closed-direction argument with
file:line evidence before a narrowing change counts as reviewable). Every other added section
(Concurrent Writers, Shared-Main Baseline, body narrative/SHA binding ahead of merge-ready,
Shared Resource Budget) adds preconditions to promotion; none removes one. Docs-only, fail-closed
direction.

Body ↔ diff reconciliation. Live title/body describe exactly the shipped delta; the "Validation /
Proof" claims are reproducible (below). Zero 40-hex SHAs in the body, so no unresolvable or
prefix-completed SHA carrier. The phrase "not merge-ready" occurs once, inside the Why It Matters
incident narrative quoting the #7374/#7435 bodies — it is not a self-referential readiness claim, so
the #7448/#7491 re-narration rule is satisfied without a body edit. No reconcile write was needed
(gh_pr_body_rest.py --reconcile would be a no-op).

Validation executed at this head (worktree .worktrees/res-7500-20260818 @ ff85bad12):

  • uv run python scripts/dev/check_skills.pyValidated 55 skills, typed registry, generated README, and routing tests. (reproduces the body claim)
  • uv run python scripts/dev/check_base_sensitive_gates.py --pr 7500 --json{"gate_required": false}ordinary base policy, no base-sensitive file changed.
  • uv run python scripts/dev/check_pr_ci_status.py 7500checks: success | 6 total | success=6 | completed=6 at ff85bad12d75763ae861c6d6b0e6471902b96036 (docs-evidence-integrity, pr-contract-check, pr-body-contracts, promoted-planner-smoke, route-coderabbit, CodeRabbit).

Threads / reviewers. No unresolved actionable review threads; no outstanding explicitly requested
external reviewer. CodeRabbit posted no blocking finding. The prior owner self-review at this same
head is superseded by this independent exact-head review; its caveat ("hosted checks remain
required") is now discharged — all 6 checks are green at this exact SHA.

Confidence: High. Docs-only, deterministic validator green, no runtime surface.

gate-verdict: accepted @ ff85bad
base-policy: ordinary-cas @ ff85bad
pr-metadata: reconciled @ 59fd0eea6af046fec9e85cf84e4af5179c0323f95d381ca4df3afccdadc49f56

@ll7 ll7 added the merge-ready Verified by the PR gate and ready to merge label Aug 18, 2026
@ll7
ll7 merged commit 416d438 into main Aug 18, 2026
7 checks passed
@ll7
ll7 deleted the docs/goal-pr-review-concurrency-hardening-20260818 branch August 18, 2026 09:17
ll7 added a commit that referenced this pull request Aug 18, 2026
…7508) (#7519)

## Summary

Make `scripts/dev/pr_loop_policy.py` machine-recognize the two workflow
markers that PR #7500 introduced to `goal-pr-review` (docs-only): the
advisory `review-claim: <lane> @ <head> until <UTC>` comment marker and
the `author_decision` parking state (`decision-required` label + `###
Decision packet` comment at the live head). PRs parked by either are
classified `active_writer` / `author_decision` with recommended action
`no_action`/stop, distinct from `blocked_preflight`, so reviewer lanes
and the factory stop racing on the same branch.

## Linked Issues

- Closes `#7508`
- Refs `#7500` (defines the marker formats), `#7491` (not-ready-sentinel
half, intentionally NOT implemented here)

## Stack / Dependency

- Base dependency: none
- Required prior PRs: #7500 (merged, defines the marker contract)
- Stack follow-up issues: none
- Safe to review independently: yes
- Review dependency reason, if any: the marker format is defined by
#7500's docs.

## What Changed

- `scripts/dev/pr_loop_policy.py`:
  - `VALID_STATES` gains `active_writer` and `author_decision`.
- New marker parsing: `_REVIEW_CLAIM_RE` (`review-claim: <lane> @ <sha>
until <UTC>`), `_REVIEW_CLAIM_RELEASED_RE` (`review-claim: released @
<sha>`), `_DECISION_PACKET_HEADING_RE` (`### Decision packet`), plus a
`ReviewClaim` dataclass.
- New pure helpers: `_parse_review_claim_marker`,
`_review_claim_released_shas`, `_has_decision_packet_heading`,
`_trusted_marker_comments` (OWNER/MEMBER/COLLABORATOR only, reading both
`comments` and `reviews` bodies), `active_review_claim` (unexpired +
unreleased + head-bound, `now=None` -> `datetime.now(UTC)`),
`has_author_decision_packet` (live-head binding; review-body packets
must name the live head).
- `classify_pr_state` takes an explicit `now` kwarg; draft/error/closed
still return `no_action` first; `active_writer`/`author_decision` are
checked before `blocked_preflight` and the rest of the pipeline
(precedence per issue).
- `recommend_action` maps both new states to `no_action` with named
reasons; flow decision is `stop` for both.
- Module docstring documents the lane-identity limitation (snapshot
cannot distinguish lanes, so any unexpired unreleased trusted marker
parks) and links **#7491 as explicitly out of scope** — no
not-ready-sentinel implementation was added.
- `tests/dev/test_pr_loop_policy.py`: 24 new tests with fixed timestamps
(no monkeypatching): park on unexpired trusted claim, untrusted does not
park, released clears, expiry, `now == until` is expiry, head mismatch,
unparseable timestamp fails closed, claim in review body, parser
round-trips, author_decision with/without label and packet, live vs
stale head, untrusted packet, precedence over `blocked_preflight` and
over ready-to-merge, draft still `no_action`, VALID_STATES contract,
queue-level evaluation.
- `CHANGELOG.md`: Unreleased -> Changed entry.

## Why It Matters

- Added value: the loop tooling now parks PRs with an active
review-claim or author-reserved decision instead of racing the branch,
which was the observed 2026-08-18 failure mode (6 PRs had exact-head
evidence voided by mid-run factory rebases; #7357 and #7347 raced within
minutes).
- Expected impact: workflow reliability only; no
benchmark/planner/evidence semantics change.
- Why this is worth merging now: closes the machine-recognition gap left
by #7500 so the advisory markers become enforceable.

## Research Result Guidance

- Target claim / hypothesis / blocker this should affect: NA -
support/tooling-only; no research claim.
- Comparator or baseline, if applicable: NA
- Evidence tier: NA - support helper.
- Result classification: NA
- Decision or stop rule, if applicable: NA
- Parent issue, claim map, registry, context note, or synthesis surface
to update: NA
- New research/benchmark/metric/paper-facing analysis tool, if any: NA -
support helper.

## Domain-Aware Approval

- Required for this PR: no - workflow/tooling classification change; no
evidence classification, comparison methodology, figure eligibility,
benchmark interpretation, or paper-facing claim change.
- Domains reviewed: NA
- Status: not required
- Approver/review source or waiver: NA
- Validity checklist (machine-detected labels unchanged):
  - Target claim/hypothesis: NA
  - Comparator or split/evidence validity: NA
  - Fallback/degraded exclusions: NA
  - Claim boundary: NA
- Implementation integrity vs experimental validity: implementation
integrity only.

## Falsification / Non-Transfer Check

- Did the mechanism activate? NA
- Did the intervention change command source, selected command,
trajectory, or route progress? NA
- Did the scenario actually contain the targeted failure mode? NA
- Result route: NA
- Follow-up question or issue for weak, negative, or non-transfer
results: NA

## Next Empirical Action

- Rerun needed: no
- Extractor or analysis tool needed: no
- Artifact missing or unavailable: none
- Stop / revise / continue decision: NA
- Proposed child issue or existing follow-up: none

## Validation / Proof

- Commands run (worktree root):
- `uv run pytest tests/dev/test_pr_loop_policy.py -q` — 174 passed (150
pre-existing + 24 new).
- `uv run pytest tests/dev/test_snapshot_pr_queue.py -q` — 55 passed
(companion).
- `uv run ruff check scripts/dev/pr_loop_policy.py
tests/dev/test_pr_loop_policy.py` — clean.
- `uv run ruff format --check scripts/dev/pr_loop_policy.py
tests/dev/test_pr_loop_policy.py` — clean.
- Smoke: real `snapshot_pr_queue --active | pr_loop_policy --stdin
--json` — exit 0, no crash; synthetic snapshot emits `active_writer` and
`author_decision` states via the CLI.
- Evidence that the change works here: 24 focused tests cover the marker
grammar, expiry/release semantics, live-head binding, precedence, and
queue-level behavior with fixed timestamps.
- Benchmarks or smoke tests, if applicable: none (workflow tooling).

## Performance Evidence

- (Not a `perf` change; section deleted per template guidance.)

## Risks / Rollout

- Compatibility risks: additive states and an explicit `now` kwarg
(default preserves current behavior); existing classifications re-tested
(draft still no_action, ready_to_merge precedence preserved).
- Failure modes: unparseable claim timestamps fail closed (documented);
lane identity is not distinguishable in the snapshot, so any unexpired
unreleased trusted marker parks (documented limitation).
- Rollback or fallback plan: revert the single commit; the new states
are purely additive.

## Docs / Provenance

- Updated docs: module docstring in `pr_loop_policy.py` documents the
marker grammar, precedence, lane-identity limitation, and the #7491
out-of-scope boundary; CHANGELOG entry.
- Relevant design or provenance notes: marker grammar comes from the
merged #7500 goal-pr-review docs.
- Any assumptions that need to be preserved: the #7491
not-ready-sentinel half must remain tracked there, not duplicated here.

## Downstream Propagation

- Parent issue updated (yes/no/NA): yes - issue #7508 will be closed by
this PR.
- Claim map / benchmark report updated (yes/no/NA): NA
- Leaderboard / artifact catalog updated (yes/no/NA): NA
- Registry or config index updated (yes/no/NA): NA
- Context index / memory note updated (yes/no/NA): NA
- Follow-up issue opened for deferred propagation (yes/no/NA): no
- Not applicable because: workflow/tooling-only change with no
research-facing downstream surface.

## Follow-Up Issues

- Deferred work: the #7491 not-ready-sentinel machine check (tracked
there).
- Issues opened for follow-up: none.

## Reviewer Notes

- Anything a reviewer should verify closely: the marker regex grammar
matches the #7500 docs exactly (`review-claim: <lane-id> @ <head-sha>
until <UTC>`); precedence of `active_writer`/`author_decision` over
`blocked_preflight`; the live-head binding for author_decision packets.
- Any known limitations: snapshot does not carry lane identity, so the
active-writer check cannot exclude the claiming lane itself; documented
in the module docstring.
- Shared-helper migration: NA - single-file CLI helper change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Verified by the PR gate and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant