Skip to content

revert: stale PR-head supersession (#842)#844

Draft
brokemac79 wants to merge 1 commit into
mainfrom
codex/revert-842-stale-head-supersession
Draft

revert: stale PR-head supersession (#842)#844
brokemac79 wants to merge 1 commit into
mainfrom
codex/revert-842-stale-head-supersession

Conversation

@brokemac79

Copy link
Copy Markdown
Contributor

Draft contingency — do not merge

This is a prepared, exact rollback of #842, retained only in case maintainers determine its live-head admission behavior is unsafe in production.

It is based on current main after #843, so it preserves the later dispatch-422 classification fix. It must not be merged merely because it exists.

What it reverts

  • The pre-dispatch live /pulls head comparison for source-head-bound exact-review work.
  • Local stale-head supersession/command refresh, audit identity/reason, and the related durable-schema migration and tests.

Known consequence

Reverting #842 deliberately restores the prior behavior in which an open PR with an obsolete queued head can dispatch and later fail its lease check. Codex branch review reported this as P2; it is intentionally rejected only because this PR is a rollback artifact. A maintainer must reassess that trade-off against concrete production evidence before merging.

Validation

  • node --test test/dashboard-worker.test.ts — 205 passing on the rebased draft.
  • pnpm run build:dashboard — passed.
  • git diff --check origin/main...HEAD — passed.
  • codex review --uncommitted — clean: exact inverse of fix(exact-review): supersede stale PR heads before dispatch #842.
  • codex review --base origin/main — reviewed the current rebased branch; its sole P2 is the intentionally restored stale-head behavior described above.

No queue, target, comment, workflow, Actions, or gate mutation was used to prepare this draft. No changelog or workflow change is included.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 24, 2026, 11:59 PM ET / July 25, 2026, 03:59 UTC.

ClawSweeper review

What this changes

This draft reverses the exact-review queue’s pre-dispatch stale-PR-head supersession and related audit/test coverage while preserving the later dispatch-422 classification fix.

Merge readiness

Blocked until real behavior proof from a real setup is added - 13 items remain

Keep this draft open as a contingency artifact, not a merge candidate. Its stated purpose is to remove a current-main safeguard against dispatching obsolete pull-request heads, and no production evidence or maintainer decision establishes that restoring the prior failure mode is safer.

Priority: P2
Reviewed head: a8bf7e4b4aafdc2d668314bf39b113d2571a1d42
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The rollback is coherent as a prepared contingency, but it intentionally reintroduces a known queue failure mode without real behavior evidence or maintainer-approved operational direction.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports focused tests and build checks, but it provides no after-fix real queue behavior proof showing that reverting the safeguard improves a live or representative setup. Before any merge discussion, provide redacted production or representative-runtime evidence; after updating the PR body, a maintainer can request @clawsweeper re-review if needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports focused tests and build checks, but it provides no after-fix real queue behavior proof showing that reverting the safeguard improves a live or representative setup. Before any merge discussion, provide redacted production or representative-runtime evidence; after updating the PR body, a maintainer can request @clawsweeper re-review if needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Current-main safeguard: The merged stale-head safeguard is present on current main through the merge commit for the earlier PR; this draft deletes its live-head admission behavior and 272 lines of focused regression coverage.
Merged provenance: GitHub context identifies commit 4bfea92 as the merge commit for the stale-head supersession change, merged on 2026-07-25T03:44:44Z before the current-main commit.
Rollback intent: This PR’s body explicitly says it is a draft contingency that must not merge without maintainers reassessing the trade-off; it acknowledges that reverting restores stale queued-head dispatches that can later fail lease validation.
Findings 1 actionable finding [P2] Retain pre-dispatch stale-head supersession
Security None None.

How this fits together

The exact-review queue accepts GitHub events and explicit review commands, checks whether a target remains valid, then dispatches bounded review work. The reverted safeguard compares a queued pull-request head with GitHub’s live head so obsolete work is superseded before it consumes a workflow lease or dispatch attempt.

flowchart LR
  A[GitHub event or review command] --> B[Exact-review queue]
  B --> C[Read live pull-request state]
  C --> D{Queued head matches live head?}
  D -->|Yes| E[Reserve lease and dispatch review]
  D -->|No| F[Supersede or refresh queued work]
  F --> G[Durable audit and queue metrics]
  E --> H[Review workflow result]
Loading

Decision needed

Question Recommendation
Should the exact-review queue retain pre-dispatch stale-head supersession, or is there concrete production evidence that requires a narrowly scoped rollback? Retain the safeguard: Leave this draft unmerged and investigate any observed production regression with a focused follow-up that preserves stale-head suppression.

Why: The patch intentionally trades prevention of obsolete workflow dispatches for an unproven contingency; choosing that operational policy cannot be resolved from tests or the branch alone.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports focused tests and build checks, but it provides no after-fix real queue behavior proof showing that reverting the safeguard improves a live or representative setup. Before any merge discussion, provide redacted production or representative-runtime evidence; after updating the PR body, a maintainer can request @clawsweeper re-review if needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Retain pre-dispatch stale-head supersession (P2) - This rollback removes the live pull-request head comparison that prevents obsolete queued work from reserving a lease and dispatching. As the PR body acknowledges, the obsolete source then fails only later at lease validation after consuming workflow capacity; keep the safeguard unless maintainers approve an evidence-backed replacement.
  • Resolve merge risk (P1) - Merging would deliberately restore admission of queued pull-request work whose source head is obsolete; it can consume dispatch capacity and fail only after lease validation.
  • Resolve merge risk (P1) - The rollback removes durable supersession audit detail and regression coverage, reducing operators’ ability to distinguish a newer source event from a live-head advance.
  • Resolve merge risk (P1) - The stated validation is limited to local tests and build checks; no evidence shows that the current safeguard is unsafe in a real production queue.】【。.
  • Resolve merge risk (P1) - ],.
  • Resolve merge risk (P1) - bestSolution.
  • Resolve merge risk (P1) - _placeholder.
  • Complete next step (P2) - A repository owner must decide whether concrete production evidence warrants restoring the prior stale-head dispatch behavior; this is not a safe automated repair.
  • Improve patch quality - Provide redacted production or representative-runtime evidence that the current live-head safeguard is unsafe.
  • Improve patch quality - Have a repository owner decide the operational trade-off before considering any rollback.
  • Improve patch quality - If a regression is confirmed, replace the broad revert with a focused fix that retains stale-work suppression and auditability.

Findings

  • [P2] Retain pre-dispatch stale-head supersession — dashboard/exact-review-queue.ts:2261
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Rollback scope 2 files affected; 20 added, 441 removed The small draft removes the bulk of a newly merged admission safeguard and its focused regression coverage rather than adding an isolated contingency switch.

Merge-risk options

Maintainer options:

  1. Keep the live-head admission check (recommended)
    Do not merge the rollback without a production incident demonstrating that the current safeguard is unsafe; this preserves compatibility with the current queue semantics.
  2. Replace with evidence-backed adjustment
    If production evidence exposes a real regression, prepare a narrow follow-up that fixes it without re-enabling stale queued-head dispatches or discarding the audit trail.

Technical review

Best possible solution:

Keep the live-head safeguard on current main unless maintainers review concrete production evidence and approve a narrower corrective change that preserves stale-work suppression and auditability.

Do we have a high-confidence way to reproduce the issue?

Yes from source and the linked incident narrative: queue an open pull request with an obsolete source head, then observe that this rollback removes the pre-dispatch live-head comparison. A live production reproduction of a harmful effect is not provided.

Is this the best way to solve the issue?

No. Reverting the safeguard restores a documented stale-work failure mode without evidence that the current implementation causes a worse production problem; a narrow evidence-backed correction would be safer.

Full review comments:

  • [P2] Retain pre-dispatch stale-head supersession — dashboard/exact-review-queue.ts:2261
    This rollback removes the live pull-request head comparison that prevents obsolete queued work from reserving a lease and dispatching. As the PR body acknowledges, the obsolete source then fails only later at lease validation after consuming workflow capacity; keep the safeguard unless maintainers approve an evidence-backed replacement.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against df5ec544d6d6.

Labels

Label changes:

  • add P2: This is a bounded but real exact-review queue regression risk: obsolete pull-request heads can again dispatch and consume attempts before failing.
  • add merge-risk: 🚨 compatibility: The rollback changes current-main queue semantics for queued pull-request revisions and removes the durable migration/audit compatibility path added with the safeguard.
  • add merge-risk: 🚨 availability: Restoring stale-head dispatch can consume bounded workflow leases and retry capacity before the later lease check rejects the obsolete source tuple.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and build checks, but it provides no after-fix real queue behavior proof showing that reverting the safeguard improves a live or representative setup. Before any merge discussion, provide redacted production or representative-runtime evidence; after updating the PR body, a maintainer can request @clawsweeper re-review if needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a bounded but real exact-review queue regression risk: obsolete pull-request heads can again dispatch and consume attempts before failing.
  • merge-risk: 🚨 compatibility: The rollback changes current-main queue semantics for queued pull-request revisions and removes the durable migration/audit compatibility path added with the safeguard.
  • merge-risk: 🚨 availability: Restoring stale-head dispatch can consume bounded workflow leases and retry capacity before the later lease check rejects the obsolete source tuple.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and build checks, but it provides no after-fix real queue behavior proof showing that reverting the safeguard improves a live or representative setup. Before any merge discussion, provide redacted production or representative-runtime evidence; after updating the PR body, a maintainer can request @clawsweeper re-review if needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main safeguard: The merged stale-head safeguard is present on current main through the merge commit for the earlier PR; this draft deletes its live-head admission behavior and 272 lines of focused regression coverage. (dashboard/exact-review-queue.ts:2243, df5ec544d6d6)
  • Merged provenance: GitHub context identifies commit 4bfea92 as the merge commit for the stale-head supersession change, merged on 2026-07-25T03:44:44Z before the current-main commit. (dashboard/exact-review-queue.ts:1034, 4bfea9218576)
  • Rollback intent: This PR’s body explicitly says it is a draft contingency that must not merge without maintainers reassessing the trade-off; it acknowledges that reverting restores stale queued-head dispatches that can later fail lease validation. (dashboard/exact-review-queue.ts:2261, a8bf7e4b4aaf)
  • Preserved adjacent fix: Current main includes the later dispatch-422 classification repair at df5ec54, and this draft is intentionally based on that state rather than reverting it. (dashboard/exact-review-queue.ts:2243, df5ec544d6d6)

Likely related people:

  • brokemac79: The same contributor authored the merged stale-head supersession change and the immediately following dispatch-422 repair affecting this exact-review admission path. (role: introduced the current safeguard and recent area contributor; confidence: high; commits: 4bfea9218576, df5ec544d6d6; files: dashboard/exact-review-queue.ts, test/dashboard-worker.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant