Skip to content

Fix label sync after review placeholder drift - #323

Merged
RomneyDa merged 1 commit into
mainfrom
dallin/investigate-94547-labels
Jun 18, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
dallin/investigate-94547-labels

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

Validation

  • pnpm run build
  • node --test --test-name-pattern="apply-decisions (syncs labels when first review placeholder advanced issue updated_at|skips advisory labels for failed or stale kept-open reports)" test/clawsweeper.test.ts
  • node --test test/clawsweeper.test.ts
  • pnpm run check

No live labels were changed on openclaw/openclaw#94547 during investigation.

@clawsweeper

clawsweeper Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 6:07 PM ET / 22:07 UTC.

Summary
The PR replaces the kept-open label-sync freshness check with a placeholder-aware predicate and adds an apply-decisions regression test for the referenced label sync scenario.

Reproducibility: yes. for the source path: current main requires exact item.updated_at/comment updated_at equality for kept-open label sync, while the mocked regression shows first-review placeholder drift can advance the issue timestamp slightly. I did not run tests because this review had to keep the checkout read-only.

Review metrics: 2 noteworthy metrics.

  • Changed surface: 2 files, +145/-4. The patch is narrow but touches the live apply path that mutates GitHub labels.
  • Regression tests: 1 apply-decisions scenario added. The new coverage exercises the placeholder-updated_at drift case that current main does not allow.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
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:

  • [P2] Let the pending pnpm check job finish before merge.
  • Watch the first post-merge apply run for unexpected kept-open label churn.

Risk before merge

  • [P1] The change intentionally broadens when apply may mutate labels on kept-open reports; if GitHub timeline filtering misses non-automation activity near the bot placeholder timestamp, labels could sync from a stale review.

Maintainer options:

  1. Land with apply-run monitoring (recommended)
    Merge after CI finishes and watch the next apply run/report for unexpected label churn or changed-since-review skips in kept-open reports.
  2. Ask for dry-run transcript
    Before merge, ask for an apply-decisions dry-run against a copied report using the AGENTS.md temp-dir pattern so reviewers can see the label-sync path without live mutations.

Next step before merge

  • No ClawSweeper repair is needed; the remaining action is normal maintainer review and check completion for an open member-authored PR.

Security
Cleared: No concrete security or supply-chain concern found; the diff changes TypeScript apply logic and tests only, with no dependency, workflow, secret, or package execution changes.

Review details

Best possible solution:

Merge the narrow placeholder-aware freshness predicate once CI is green, preserving conservative close gates and the non-automation activity check for label sync.

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

Yes for the source path: current main requires exact item.updated_at/comment updated_at equality for kept-open label sync, while the mocked regression shows first-review placeholder drift can advance the issue timestamp slightly. I did not run tests because this review had to keep the checkout read-only.

Is this the best way to solve the issue?

Yes, the PR is the narrowest maintainable fix I found: it relaxes only kept-open label sync freshness and keeps close proposal drift gates conservative. A broader drift model is not needed for this specific bug.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P2: This is a normal-priority automation bug fix for ClawSweeper label sync with limited blast radius but real maintainer workflow impact.
  • add merge-risk: 🚨 automation: The diff changes when apply automation may sync GitHub labels after review timestamp drift, which live timeline behavior can affect beyond unit tests.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate is not applicable to this member-authored PR; the body reports local build/test/check validation and no live label mutation.

Label justifications:

  • P2: This is a normal-priority automation bug fix for ClawSweeper label sync with limited blast radius but real maintainer workflow impact.
  • merge-risk: 🚨 automation: The diff changes when apply automation may sync GitHub labels after review timestamp drift, which live timeline behavior can affect beyond unit tests.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate is not applicable to this member-authored PR; the body reports local build/test/check validation and no live label mutation.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully and its apply-lane guidance affected the review: label syncing is an apply mutation, while close/apply drift gates must remain conservative. (AGENTS.md:1, a6ee02e323c1)
  • Current main freshness gate: Current main treats a complete report as current only when stored updated_at still matches or item.updated_at exactly equals the existing review comment timestamp, which can miss first-review placeholder drift by seconds. (src/clawsweeper.ts:16845, a6ee02e323c1)
  • PR freshness change: The PR changes only kept-open label sync freshness: it still requires stored updated_at, keeps exact/no-drift paths, allows a five-minute review-comment timestamp window, and blocks when non-automation activity occurred after the stored snapshot. (src/clawsweeper.ts:16844, 0bf7a452d88b)
  • Regression coverage: The new test models a bot placeholder comment advancing issue updated_at after the stored snapshot and asserts P1, impact, and source-repro labels are synced while labels_synced_at is written. (test/clawsweeper.test.ts:14370, 0bf7a452d88b)
  • Referenced live scenario: The referenced OpenClaw issue has a ClawSweeper review comment proposing triage and impact labels, matching the kind of kept-open advisory label sync this PR targets; the PR body says no live labels were changed during investigation.
  • PR metadata and validation claim: GitHub reports one member-authored commit, two changed files, no review comments, and pending/in-progress CI; the PR body lists build, targeted node tests, full node test, and pnpm check validation. (0bf7a452d88b)

Likely related people:

  • RomneyDa: Authored and merged the recent advisory label review-comment rerender fix in the same apply label/comment path, and merged another nearby src/test review parsing change. (role: recent area contributor; confidence: high; commits: 4e5c4d47c83f, 3f0fdd4c437f; files: src/clawsweeper.ts, test/clawsweeper.test.ts)
  • brokemac79: Commit 5400cbd introduced apply-time advisory issue label sync and its tests/docs, which is the behavior family this PR adjusts. (role: introduced behavior; confidence: medium; commits: 5400cbd5e004; files: src/clawsweeper.ts, test/clawsweeper.test.ts, docs/work-lane.md)
  • steipete: Local blame for the current main apply freshness and label-sync block resolves to the v0.3.0 release-preparation commit, so this is a weak but relevant provenance signal for the current shipped shape. (role: current-line provenance; confidence: low; commits: dc824915bb6c; files: src/clawsweeper.ts)
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: 🐚 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. 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 18, 2026
@RomneyDa
RomneyDa merged commit b75626e into main Jun 18, 2026
10 checks passed
@RomneyDa
RomneyDa deleted the dallin/investigate-94547-labels branch June 18, 2026 22:35
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 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. 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.

1 participant