Skip to content

Derive public PR status labels from report state#285

Open
TurboTheTurtle wants to merge 1 commit into
openclaw:mainfrom
TurboTheTurtle:codex/clawsweeper-280-status-label
Open

Derive public PR status labels from report state#285
TurboTheTurtle wants to merge 1 commit into
openclaw:mainfrom
TurboTheTurtle:codex/clawsweeper-280-status-label

Conversation

@TurboTheTurtle

Copy link
Copy Markdown

Fixes #280.

Summary

  • derive public PR status labels from the report content before falling back to stale frontmatter labels
  • use that derived status for label changes, transition reasons, and justifications
  • add a regression test for stale waiting-on-author labels moving to ready for maintainer look

Validation

  • pnpm run build && node --test test/clawsweeper.test.ts --test-name-pattern 'public PR review details derive ready status instead of preserving stale waiting label|ClawSweeper PR status labels use one current workflow status'\n- pnpm run build:all\n- pnpm run lint\n- pnpm run format:check -- src/clawsweeper.ts test/clawsweeper.test.ts\n- pnpm run check

@clawsweeper

clawsweeper Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 13, 2026, 2:08 PM ET / 18:08 UTC.

Summary
The branch derives public PR status labels from report content for desired labels, transition reasons, and justifications, and adds a regression test for stale waiting-on-author labels becoming ready for maintainer review.

Reproducibility: yes. Source inspection shows current main's public-rendering paths read PR status from stale frontmatter labels, while the linked issue reports the latest durable verdict should move the PR to ready-for-maintainer review.

Review metrics: 2 noteworthy metrics.

  • Files changed: 2 files affected. The diff is limited to the label-rendering implementation and one regression test.
  • Status-label renderer call sites: 3 call sites changed. Desired labels, transition reasons, and public justifications now share the derived PR status source.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] This changes ClawSweeper-owned public status label automation; a misclassification would make the bot add, remove, or justify the wrong public status label, even though the diff is narrow and now has terminal renderer proof.

Maintainer options:

  1. Merge With Label-Sync Awareness (recommended)
    If required checks are acceptable, maintainers can merge this narrow status-label change while owning the public label-sync behavior change.
  2. Request A Targeted Replay
    Maintainers can ask for a dry-run or targeted replay against a stale waiting-on-author report if they want more confidence before changing label automation.

Next step before merge

  • No automated repair lane is needed because I found no blocking code finding; this PR is ready for normal maintainer review and merge gating.

Security
Cleared: The diff only changes TypeScript label-rendering logic and unit coverage; it does not alter dependencies, workflows, permissions, secrets, or external code execution.

Review details

Best possible solution:

Merge the narrow derived-status fix after normal maintainer review and required checks, preserving the existing live apply path that passes context-derived status into the renderer.

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

Yes. Source inspection shows current main's public-rendering paths read PR status from stale frontmatter labels, while the linked issue reports the latest durable verdict should move the PR to ready-for-maintainer review.

Is this the best way to solve the issue?

Yes. Reusing the existing report-state classifier before falling back to stored labels is a narrow fix that avoids adding a parallel status policy.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The contributor posted terminal output showing the patched stale waiting-on-author fixture renders ready-for-maintainer-look and removes the waiting label.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The contributor posted terminal output showing the patched stale waiting-on-author fixture renders ready-for-maintainer-look and removes the waiting label.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The PR fixes a real but bounded ClawSweeper public-label automation bug.
  • merge-risk: 🚨 automation: The diff changes status-label derivation used by ClawSweeper label sync and public review comments.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The contributor posted terminal output showing the patched stale waiting-on-author fixture renders ready-for-maintainer-look and removes the waiting label.
  • proof: sufficient: Contributor real behavior proof is sufficient. The contributor posted terminal output showing the patched stale waiting-on-author fixture renders ready-for-maintainer-look and removes the waiting label.
Evidence reviewed

What I checked:

  • current main stale-label path: Current main still reads public PR status from stored frontmatter labels in the desired-label, transition-reason, and public label-justification paths, so a stale status label can be preserved after report body state changes. (src/clawsweeper.ts:12544, f398bbc24221)
  • existing report-state classifier: The existing classifier derives PR status from proof, findings, security review, correctness, automerge label state, re-review requests, and author activity, which is the narrower source this PR reuses for public rendering. (src/clawsweeper.ts:9150, f398bbc24221)
  • PR implementation: The diff adds prStatusLabelKindFromPublicReport and switches the three public-rendering status call sites to derive current status before falling back to frontmatter labels. (src/clawsweeper.ts:8110, 4969bbd013c3)
  • regression coverage: The added test builds a stale waiting-on-author PR report with sufficient terminal proof and expects the rendered label details to add ready-for-maintainer-look and remove waiting-on-author. (test/clawsweeper.test.ts:4736, 4969bbd013c3)
  • real behavior proof: The contributor posted terminal output showing the focused test passing and the PR-head renderer output adding status: 👀 ready for maintainer look while removing status: ⏳ waiting on author. (4969bbd013c3)
  • linked issue context: The linked report at Fix stale waiting-on-author label after maintainer-review verdict #280 describes the same stale waiting-on-author label after a maintainer-review verdict and expects mutually exclusive labels derived from the latest durable verdict.

Likely related people:

  • Peter Steinberger: Blame for the PR status labels, report-label fallback, classifier, public rendering call sites, and existing tests points to the same implementation commit, and recent history shows continued work in src/clawsweeper.ts and test/clawsweeper.test.ts. (role: current status-label implementation introducer and recent area contributor; confidence: high; commits: 9209fa90cb3c, 214bb5474d07, 499e86783b2a; files: src/clawsweeper.ts, test/clawsweeper.test.ts)
  • Momo: A recent merged workflow-status publishing fix touched ClawSweeper automation status code and tests near the same label/status surface. (role: recent adjacent automation-status contributor; confidence: medium; commits: 429a73be116e; files: src/clawsweeper.ts, test/clawsweeper.test.ts, .github/workflows/sweep.yml)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jun 13, 2026
@TurboTheTurtle

Copy link
Copy Markdown
Author

Added a focused real render check for the stale waiting-label case.

$ pnpm run build && node --test --test-name-pattern "public PR review details derive ready status instead of preserving stale waiting label" test/clawsweeper.test.ts
✔ public PR review details derive ready status instead of preserving stale waiting label (6.43125ms)
ℹ tests 1
ℹ pass 1

The same PR-head renderer output for the stale status: ⏳ waiting on author fixture now includes:

- add `status: 👀 ready for maintainer look`: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Terminal proof covers the changed behavior.
- remove `status: ⏳ waiting on author`: Current PR status label is `status: 👀 ready for maintainer look`.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix stale waiting-on-author label after maintainer-review verdict

1 participant