Skip to content

fix(repair): expose bounded reconciliation samples - #1420

Merged
vincentkoc merged 1 commit into
mainfrom
fix/publication-reconcile-observability
Sep 4, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/publication-reconcile-observability

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Related: #1396

What Problem This Solves

Resolves a problem where maintainers could see that publication reconciliation had eligible work, but the repair CLI discarded the Worker's bounded candidate sample and the manual workflow always inspected 100 candidates.

Why This Change Was Made

The repair client now converts at most 20 reconciliation rows into an explicit allowlist and rejects malformed rows without spreading unknown response fields. The manual workflow adds a numeric max_items input with a default of one and forwards it to the existing CLI.

This does not change Worker selection, queue policy, reconciliation mutation behavior, dashboard status, Bay, or publication counts.

User Impact

Maintainers can inspect one exact publication reconciliation candidate before choosing a separately fenced action. Normal review and publication behavior is unchanged.

OpenClaw Bay Impact

OpenClaw Bay is unaffected. This is a private signed repair response and a manual workflow input; no public observer route or Bay projection changes.

Documentation Impact

Reviewed AGENTS.md, CONTRIBUTING.md, and docs/README.md. No documentation change is required because the existing private maintenance workflow remains manual, non-cancelling, and dry-run by default; the workflow UI now exposes its bound directly.

Evidence

  • Head: 0501b18c44ce26f30e218c94dfbc98ae150a65ac (signed)
  • Repair TypeScript build: passed on Node v26.7.0
  • Focused client/workflow tests: 28 passed
  • Worker/client interoperability review: all four reconciliation sample reasons accepted
  • Pre-commit Codex reviews: no actionable regressions
  • Committed-range Codex review: no actionable regressions; 42 focused tests passed
  • git diff --check: passed
  • Production delta: +83 lines; justified by the explicit private response contract and fail-closed one-item operator control
  • Test delta: +103 lines

Real Behavior Proof

  • Claim: a maintainer can dry-run one production reconciliation candidate and receive only the bounded allowlisted sample from the exact PR head.
  • Exercised surface: commit 0501b18c44ce26f30e218c94dfbc98ae150a65ac of the changed repair client, invoked with the workflow's forwarded max_items=1 argument against the production exact-review queue.
  • Scenario: manual dry-run with execute=false, passes=1, and max_items=1.
  • Command and environment: GitHub-hosted Maintain exact review queue run using the repository-managed production URL and signing secret; the proof workflow asserted the checked-out SHA before execution.
  • Observed result: apply=false, changed=0, exactly one sample, and exactly the eight allowlisted fields. The exact item identity is retained privately for the post-merge identity-fenced operator action.
  • Artifact: https://github.com/openclaw/clawsweeper/actions/runs/33867635452
  • Limits: dry-run only; this proves exact-head parsing, bounding, privacy omission, and one-item forwarding. It does not execute reconciliation or supersede any publication.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vincentkoc
vincentkoc marked this pull request as ready for review September 4, 2026 11:14
@vincentkoc
vincentkoc requested a review from a team as a code owner September 4, 2026 11:14
@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 7:28 AM ET / 11:28 UTC.

ClawSweeper review

What this changes

The PR exposes a bounded, allowlisted publication-reconciliation sample in the repair client and adds a one-item default inspection bound to the manual queue-maintenance workflow.

Merge readiness

⛔ Blocked before merge - 1 item remains

This maintainer-authored PR is a coherent, focused repair-workflow improvement. The introduced parser matches the current Worker sample contract, and no blocking correctness or security defect was found.

Priority: P3
Reviewed head: 0501b18c44ce26f30e218c94dfbc98ae150a65ac

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned workflow change with targeted contract coverage and no actionable review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its reviewed body nevertheless documents an exact-head, production-bound dry run with apply=false, one sample, and allowlisted output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its reviewed body nevertheless documents an exact-head, production-bound dry run with apply=false, one sample, and allowlisted output.
Evidence reviewed 6 items Current-main gap: Current main parses reconciliation counters but does not include the Worker's sample in the client result; the PR is therefore not already implemented on main.
Worker response contract: The current queue Worker emits the four allowlisted reason values, the corresponding fields, and caps its sample at 20 rows.
Introduced client validation: The PR adds a 20-row cap, a fixed reason allowlist, strict field parsing, and paired producer-identity validation before returning the sample.
Findings None None.
Security None None.

How this fits together

The repair client translates private exact-review queue Worker responses for operator maintenance commands. The manual workflow supplies bounded dry-run or apply controls to that client and prints reconciliation diagnostics.

flowchart LR
  A[Manual workflow input] --> B[Maintenance command]
  B --> C[Repair client]
  C --> D[Private queue Worker]
  D --> E[Reconciliation response]
  E --> F[Bounded allowlisted sample]
  F --> G[Operator output]
Loading

Before merge

  • Resolve merge risk (P1) - The manual workflow's effective default changes from inspecting up to 100 candidates to one candidate even when execute=true; operators needing broader reconciliation must explicitly select a value from 2 to 100.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Change size production +83, tests +103, 4 files affected The response-contract and workflow change is covered by focused client and workflow tests.
Workflow default 100 candidates → 1 candidate This deliberate manual-operation change affects reconciliation throughput unless an operator selects a higher bound.

Merge-risk options

Maintainer options:

  1. Land the bounded default (recommended)
    Accept the intentional one-candidate default and use the new manual input when a broader 2–100 candidate reconciliation is required.
  2. Retain the legacy broad default
    Adjust the workflow default back to 100 if established operator practice requires execute-mode runs to retain their prior throughput.

Technical review

Best possible solution:

Keep the Worker-defined allowlist and 20-row ceiling, while making the safer one-candidate default explicit for manual maintenance runs.

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

Not applicable: this PR adds repair diagnostics and a manual workflow input rather than addressing a user-reported runtime failure.

Is this the best way to solve the issue?

Yes. The Worker already supplies a bounded sample; parsing only its explicit fields and exposing the existing CLI bound is the narrowest maintainable path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The manual workflow's default reconciliation breadth changes for existing operators.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦞 diamond lobster.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-risk operator-observability and manual-workflow improvement.
  • merge-risk: 🚨 compatibility: The manual workflow's default reconciliation breadth changes for existing operators.
  • merge-risk: 🚨 automation: The PR changes a GitHub Actions dispatch input and the command arguments it forwards.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; its reviewed body nevertheless documents an exact-head, production-bound dry run with apply=false, one sample, and allowlisted output.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (1 earlier review cycle)
  • reviewed 2026-09-04T11:19:45.244Z sha 0501b18 :: blocked before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up moves resolved without changing the reviewed head:

The disposable proof workflow did not execute reconciliation or mutate publication state.

@vincentkoc vincentkoc added proof: sufficient Contributor real behavior proof is sufficient. and removed merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Sep 4, 2026
@vincentkoc
vincentkoc merged commit b4e11e4 into main Sep 4, 2026
31 checks passed
@vincentkoc
vincentkoc deleted the fix/publication-reconcile-observability branch September 4, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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