Skip to content

fix(workflow): publish hot-intake review comments - #1189

Merged
brokemac79 merged 2 commits into
mainfrom
codex/csw-132-investigation
Aug 17, 2026
Merged

fix(workflow): publish hot-intake review comments#1189
brokemac79 merged 2 commits into
mainfrom
codex/csw-132-investigation

Conversation

@brokemac79

@brokemac79 brokemac79 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route broad hot-intake review results through the existing selected-comment publication path
  • keep the background comment-sync route exclusive to non-hot broad work
  • add a production-shaped routing and publication regression covering hot intake, explicit items, repository dispatch, scheduled/background producers, and replay idempotency

Problem

The broad workflow_dispatch hot-intake path has no item_number or item_numbers input. After its review artifacts were committed, Dispatch background review comment sync excluded hot intake while Sync selected review comments required an explicit item or a non-target repository dispatch. Both terminal-comment routes therefore evaluated false.

This was observed on openclaw/openclaw#125204: intake and the model/artifact run completed, but the broad hot workflow skipped both comment-sync steps. Its valid start lease then delayed the exact worker until expiry; the terminal response was eventually published roughly 38 minutes after issue creation.

Implementation

Sync selected review comments now also selects needs.plan.outputs.hot_intake == 'true'. It reuses the existing target-write token, sync implementation, canonical state publication, action ledger, fencing, retry, and idempotency behavior. No queue, lease, credential, or publication implementation changes are introduced.

The regression asserts exactly one terminal sync route for:

  • broad workflow-dispatch hot intake
  • normal broad workflow dispatch
  • explicit item and item-list dispatches
  • hot and normal target repository dispatches
  • exact-item repository dispatch
  • scheduled background review

It also executes the real apply-decisions --sync-comments-only boundary twice against controlled GitHub state: the first pass publishes the final ClawSweeper comment and the replay is a no-op. Existing lease/fencing and immutable-ledger suites remain unchanged and pass.

Validation

  • pnpm run build:all
  • focused Node test: review publication routes hot intake once without changing other producers
  • node --test --test-concurrency=1 test/sweep-workflow.test.ts — 121/121 passed on Linux
  • focused apply-label lease/fencing suite — 4/4 passed
  • focused action-ledger idempotency suite — 2/2 passed
  • pnpm exec oxfmt --check .github/workflows/sweep.yml test/sweep-workflow.test.ts
  • YAML parse of .github/workflows/sweep.yml
  • actionlint v1.7.12, pinned release archive SHA-256 and repository config
  • git diff --check origin/main...HEAD

Real Behavior Proof

Claim: A no-item broad hot-intake run selects the synchronous terminal-comment route exactly once; it does not select the background route. Other producer routes retain their prior ownership.

Exercised surface: exact committed .github/workflows/sweep.yml, its parsed GitHub Actions conditions, the real selected apply-decisions --sync-comments-only publication boundary, and the existing lease/fencing/idempotency suites.

Scenario/fixture: the routing matrix evaluates production event/input shapes for hot and normal workflow dispatch, explicit items, target and exact repository dispatch, and schedule. A controlled openclaw/openclaw#125204-shaped record begins with a stale bot comment; the selected sync runs twice through the real apply entry point against a stateful gh boundary.

Command/environment: AWS Crabbox Linux (c7a.8xlarge), provider aws, run run_89cc583b9849, lease cbx_c29a3f86d9f1, exact head 4c4deccf2a6beff08c7d5f1478ea1fc2ac0f5b0c, base 69adf7592803cc1440162b049fbf572be66fdd12. Both changed files were SHA-256 checked against their committed blobs before execution.

Observed result: before: broad hot intake selected=false, background=false; after: selected=true, background=false. The first real apply pass performed one final-comment mutation; the replay performed none, leaving exactly one terminal ClawSweeper comment. All 121 workflow tests, four lease/fencing tests, two ledger idempotency tests, formatting, YAML parse, pinned actionlint, and exact-content checks passed.

Artifact/trace: Crabbox run run_89cc583b9849, lease cbx_c29a3f86d9f1; terminal proof line: CSW-132 Linux hot-intake publication boundary proof: PASS.

Live GitHub Actions proof: With Martin's explicit authorization, one bounded real workflow_dispatch ran on this PR branch and exact head: run 32035557210. Inputs were hot_intake=true, target_repo=openclaw/slacrawl, batch_size=2, shard_count=1, no item_number or item_numbers, and apply_existing=false / apply_after_review=false. The planner selected only openclaw/slacrawl#152, reported planned count 1 below its effective capacity 44, and therefore skipped continuation. Its model review completed, artifact publication succeeded, Dispatch background review comment sync was skipped, and the fixed Sync selected review comments succeeded. The real apply-decisions --sync-comments-only result was exactly review_comment_synced: 1; it updated the existing durable ClawSweeper comment on #152 at 2026-08-17T13:35:41Z. No close/apply operation ran, no issue-implementation candidate existed, and the optional live-proof dispatcher found no enabled proof request.

Limits: The live proof deliberately used a single public PR outside openclaw/openclaw to avoid the enabled issue-implementation producer. It proves the actual GitHub Actions condition, branch-loaded workflow, target token, canonical record path, callback, and final comment publication once. The deterministic matrix supplies the replay/no-double-publish guarantee. The optional pr-behavior-proof skill named by workspace policy was unavailable in this session, so its contract is reproduced explicitly here.

Current review infrastructure status: The current-head @clawsweeper re-review command was accepted after this proof, but its normal comment-router run failed before a verdict when GitHub returned HTTP 503 to its authenticated gh api user check. A direct authenticated API check from the operator host reproduced the same 503, while the PR remains CLEAN at the exact head above. This is an infrastructure-only review blocker, not a patch finding. No duplicate review command, manual workflow rerun, queue action, deployment, or production control change will be made; the next step is the normal current-head/current-body re-review after GitHub API recovery.

Reviews

  • dirty Codex review: clean after the production-shaped apply/replay regression was added
  • committed Codex review against exact base 69adf7592803cc1440162b049fbf572be66fdd12: clean; confirmed the selected route, mutually exclusive background route, and replay idempotency
  • local ClawSweeper committed-range review: decision=keep_open, confidence=high, action=kept_open; no GitHub mutation

Risks and rollout

Risk is limited to broad hot-intake result publication. A successful hot run can now perform the same bounded selected-comment sync already used by exact/explicit producers. The matrix guards against double publication and unintended changes to target, exact, scheduled, and normal broad routes.

Rollback is a one-line revert removing the hot-intake disjunct from the selected-sync condition. No state migration or queue repair is required.

This PR changes a GitHub Actions workflow and therefore requires maintainer credentials with workflow scope to update. It does not address the separate OpenClaw Bay projection timeout/fail-closed behavior or the durable-lifecycle over-cap condition.

Related

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 17, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P1 Urgent regression or broken agent/channel workflow affecting real users now. 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. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 9:56 AM ET / 13:56 UTC.

ClawSweeper review

What this changes

The PR routes broad hot-intake sweeps through the existing selected review-comment publisher and adds routing and replay-idempotency coverage.

Regression provenance

Possible regression — probable (reproduction; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Current main still lacks the hot-intake publication guard; this PR supplies the narrow repair with strong exact-head proof and no actionable patch finding.

Priority: P1
Reviewed head: 4c4deccf2a6beff08c7d5f1478ea1fc2ac0f5b0c

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The patch is narrow, source-consistent, and backed by live publication proof plus focused replay coverage.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): An exact-head live Actions run shows one durable comment sync, and the controlled replay trace shows no second publication.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): An exact-head live Actions run shows one durable comment sync, and the controlled replay trace shows no second publication.
Evidence reviewed 5 items PR workflow change: The selected-comment step adds the hot-intake planner output to its eligibility guard, while the background route still requires non-hot intake.
Regression coverage: The added test covers workflow, target-dispatch, exact-dispatch, and schedule routing, then exercises the existing comment-sync boundary twice to prove one publication across replay.
Current-main comparison: Current main's selected-comment condition has no hot-intake disjunct, so the central repair is not already implemented.
Findings None None.
Security None None.

How this fits together

The sweep workflow reviews items, writes canonical records, then selects a terminal route to publish durable GitHub review comments. This change connects hot-intake output to the selected-comment route while retaining the background route for non-hot work.

flowchart LR
  A[Hot-intake dispatch] --> B[Planner]
  B --> C[Review artifacts]
  C --> D[Canonical review records]
  D --> E{Terminal publication route}
  E --> F[Selected comment sync]
  E --> G[Background comment sync]
  F --> H[Durable GitHub comment]
  G --> H
Loading

Before merge

  • Resolve merge risk (P1) - A future planner-contract change could unintentionally broaden selected comment sync; the route matrix and exact-head live proof reduce this automation risk.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Changed surface 2 files; workflow +1/-1, tests +255/-1 A one-condition production change is backed by multi-producer routing and replay coverage.

Merge-risk options

Maintainer options:

  1. Merge with route safeguards (recommended)
    Keep the existing routing regression and live publication evidence so hot intake selects only the synchronous publisher.

Technical review

Best possible solution:

Land the narrow guard with its route matrix and retain focused publication proof when the hot-intake planner contract changes.

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

Yes—source shows a no-item broad hot intake was excluded from both terminal-comment routes, and the PR provides an exact-head route/publication proof.

Is this the best way to solve the issue?

Yes—the patch reuses the existing selected-comment publisher, fencing, and idempotency behavior rather than introducing parallel publication.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: The defect can suppress or substantially delay a terminal review comment after successful hot-intake work.
  • merge-risk: 🚨 automation: The patch changes a credentialed GitHub Actions condition that selects comment publication.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): An exact-head live Actions run shows one durable comment sync, and the controlled replay trace shows no second publication.
  • proof: sufficient: Contributor real behavior proof is sufficient. An exact-head live Actions run shows one durable comment sync, and the controlled replay trace shows no second publication.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: The locally available proof-base metadata identifies Peter Steinberger; shallow/grafted history prevents reliable workflow-area ownership attribution. (role: base-revision author; confidence: low; commits: 69adf7592803; files: .github/workflows/sweep.yml)

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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-08-17T11:43:31.571Z sha fe30367 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-17T11:47:20.674Z sha fe30367 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-17T12:30:31.577Z sha 4c4decc :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-17T13:42:00.015Z sha 4c4decc :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T13:47:01.981Z sha 4c4decc :: needs maintainer review before merge. :: none

@brokemac79
brokemac79 force-pushed the codex/csw-132-investigation branch from fe30367 to 4c4decc Compare August 17, 2026 12:27
@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@brokemac79

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

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. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 17, 2026
@brokemac79
brokemac79 marked this pull request as ready for review August 17, 2026 14:01
@brokemac79
brokemac79 requested a review from a team as a code owner August 17, 2026 14:01
@brokemac79
brokemac79 merged commit 378050e into main Aug 17, 2026
45 of 46 checks passed
@brokemac79
brokemac79 deleted the codex/csw-132-investigation branch August 17, 2026 14:01
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. P1 Urgent regression or broken agent/channel workflow affecting real users now. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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