Skip to content

fix(github): recover rejected publication selections - #137734

Merged
steipete merged 4 commits into
mainfrom
codex/stable-review-f22-20260902
Sep 4, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/stable-review-f22-20260902

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What changed

A stale GitHub publisher selection could be rejected before admission, yet Control UI retained the old account and idempotency key. Refresh fetched the new account, but Retry kept sending the rejected selection.

The admission owner now records a typed, invocation-only selection rejection after rereading the exact canonical receipt. An existing or concurrently admitted receipt, a failed lookup, or an uncertain earlier invocation never grants recovery. The RPC forwards only the matching request key; Control UI accepts only the strict detail for its first still-current attempt, clears obsolete choices, and requires Refresh plus another explicit Publish. It never automatically publishes or broadens retries.

Shared, personal, deferred and worker-claim admission reuse the same failure boundary while retaining their receipt and lifecycle ownership. Personal identity preparation reuses one selected-account binding. Repeated receipt-query setup is shared without caching absence.

The c4 integration also resolves the CI Git-owner overlap at its canonical owner: diagnostics and the final exit run after leaving the active exception handler, so cyclic exception metadata cannot trap older Python while it attaches another exception context. Main’s independent process-census improvement is retained. The workflow projection is regenerated from that one owner.

LOC at 8980942c213 against integrated main c4b91f5c705: handwritten production +174/-44 (+130), tests +597/-24 (+573), generated output +32/-6 (+26), docs +2. Publication production is +126, reduced from +134 by the coordinator cleanup. That growth carries the missing receipt-owner-to-wire-to-current-invocation fact; generic identity-error recovery would discard the uncertainty/concurrency distinction. The other +4 handwritten lines repair the reproduced CI Git-owner cyclic-exception diagnostic/exit hang.

Compatibility

One additive optional detail in the existing error envelope; no new RPC, retry loop, protocol-version bump, configuration, authorization policy, SQLite schema, stored representation, migration, request digest, claim, effect or retention change. Older clients retain the generic error. Older-binary reopen was not run because the repair changes a transient response, not persisted data.

Fresh integrated-head verification

These results bind the frozen integration of 8255cae0c5b with main c4b91f5c705. The normal merge commit 8980942c213 was then pushed with an identical Git tree; no reviewed or tested source bytes changed during commit. The effective candidate remains 20 paths. All 16 non-overlapping publication source/test/doc paths are byte-identical to 8255cae0c5b; the CI owner/workflow overlap and incoming generated/test changes are retained in the integrated tree.

  • All 74 canonical CI checkout-owner tests passed on Apple Python 3.9.6, with no skipped cases and unchanged test deadlines. The separate differential control passed 15/15 candidate terminal policies; current main timed out on the two cyclic malformed-metadata cases. That differential probe is not counted as canonical Vitest coverage.
  • The canonical protocol check and 101 workflow YAML checks passed, including the CI-owner generated projection, actionlint, configured Zizmor hook, composite-input and conflict-marker guards.
  • The fresh QA-enabled full source build passed with normal owned-process/TMP cleanup. It is a QA-enabled source checkout build, not a release-package or native-app build.
  • All 13 Chromium/Control UI E2E cases passed. This uses the canonical temporary Vite UI with synthetic Gateway replies; the actual served bundle was observed and hash-bound. It is separate from the real Gateway/dist flow below.
  • Fresh managed Codex P0–P2 review returned no actionable findings across 14 evidence partitions. The completed reports and source/index/dataset preservation check are retained. Review is not substituted for runtime or CI proof.

Fresh c4 real Gateway/dist proof passed, including normal Gateway/browser shutdown, sanitized log export and temporary-state cleanup. In the same Gateway process, session and UI WebSocket, a configured publisher change from synthetic A to B caused exactly one Publish attempt to return the typed, request-key-matched rejection. The publication table remained empty and physical Git files, refs and index were unchanged. Explicit Refresh returned B with Publish enabled; no second Publish or model request occurred. All 51 observed JS/CSS response hashes matched this build. Full source, distribution, dependency and generated-output guards passed before and after. The reviewed commit passed exact-head hosted CI and landed through native preparation/merge; the landed tree was independently checked against its actual main parent.

Retained earlier proof and limits

Original pre-fix reproductions failed 7/14 owner cases and 2/17 controller cases; opposite existing/uncertain-outcome controls already passed. Historical proof on the 8255cae0c5b candidate includes 348 owner/client/sibling tests across 21 files and the expanded 38-stage changed-file gate with 1,105 tests. Those are retained evidence, not claims that the broad gate was rerun on c4. Counts overlap and are not an aggregate unique-test total.

The earlier 15-part managed review returned no actionable findings; its retained completion reports and independent verification remain available, but its original helper terminal stream was unavailable after session resumption and is not claimed as observed. The earlier QA build command exited 0 while its wrapper failed on retained compile-cache cleanup; a separate audited cleanup preserved that failure and verified unchanged source/build bytes. The fresh c4 build above is a distinct successful run, not a retroactive relabeling of that older cleanup failure.

Historical real Gateway + real bundled Control UI V5 passed on the prior candidate, including normal owner shutdown and log export/cleanup. In one Gateway process/session/UI WebSocket, the shared publisher changed from synthetic account A to B. Exactly one actual UI Publish returned the typed rejection for A; the durable request table remained empty and fixture Git bytes/refs/index were unchanged. The UI displayed the reason, unlocked selection, and explicit Refresh returned B with Publish enabled. All 52 requested JS/CSS asset hashes matched that candidate build. No second Publish or model turn ran. That historical V5 run is separate from the fresh c4 result above.

The live Gateway uses synthetic GitHub HTTP responses, not real account credentials or an authenticated GitHub publication. It proves actual Gateway admission, RPC and UI recovery, not a remote GitHub write. Source/build/dependency/tool manifests, process checks and cleanup receipts are retained; sampled process telemetry is not an exhaustive whole-host or network audit.

Real Gateway evidence

Historical V3 recording from the prior candidate: stale A is rejected; explicit Refresh shows B. The fixed left-sidebar privacy crop retains all 127 frames and original timing. V3 behavior assertions passed, but its later log-export/cleanup step failed; the separately recorded historical V5 result above passed completely. This video is not labeled as V5.

stale-publisher-main-pane.webm

The following actual V5 captures show the selected account, visible rejection, and refreshed account. All captures were fully inspected; only synthetic fixture data and public UI text remain.

V5: selected synthetic publisher A

V5: rejection reason and explicit Refresh

V5: refreshed synthetic publisher B

Historical before/after controls

Earlier actual Chromium/Control UI flows used synthetic Gateway replies, not the real Gateway. Before: Refresh returned a new publisher but Retry reused the old selection/key. After: shared and personal paths required a separate explicit Publish with a new key. Reconnect did not transparently replay publication.

Before: stale publisher remains locked

After: refreshed shared publisher

After: refreshed personal publisher

Integration and review disposition

Landed via the native workflow as 44b3e1f82013. CI run 33922100704 completed with 137 successful jobs and four skipped jobs. The required openclaw/ci-gate succeeded at 22:16:36 UTC, including the selected iOS/Watch/screenshot, Windows, Docker, Node and browser lanes.

The latest ClawSweeper review (21:53 UTC, September 4) covers 8980942c213 and has no code/security findings. Its remaining integration/confidence limits were unavailable main-source/media access and still-running CI. Root and independent reviews inspected current-main admission, receipt, UI and transcript boundaries; a fresh three-way merge with main 7697286a566 is conflict-free with the same 20 effective paths. Fresh canonical owner tests, the actual Gateway/UI flow and exact-head CI address the automation and evidence requests. All three current synthetic captures were inspected directly. Production growth remains +130 as justified above.

The Rank-up request for a refreshed, checked integration is satisfied by the resolved/pushed head, clean current three-way result and green exact-head gate. No additional rebase is performed solely for main drift, and no new bot confidence score is substituted for those observations. The fresh bot review contains no actionable defect; native preparation/merge revalidated the actual head and live rules.

The earlier 8255cae0c5b snapshot had passing administrative workflows but no normal CI or required gate while the PR conflicted with main. That is historical status, not the CI state of the new integrated head. Production growth has been recounted and is justified above.

Earlier CI run 33835702660 failed advisory audit, browser UI shard 7, iOS tests and the dependent aggregate. The integrated candidate includes the landed advisory/browser and Swift test prerequisites; local green does not prove the new hosted run. Earlier Chrome bootstrap/fixture lifetime and iOS launch diagnoses remain historical, not claims about the new head.

Provenance and release-note context

Parent-relative patch 4c0588d783c776ed111b8e3e3bf7620a1ab356b4 (#133799; raw parent dbddc382eceaf74dd09d3e5dc5b81de90eace68a) introduced the first-invocation account lock and untyped shared-account rejection. Verified author: Peter Steinberger; committer: GitHub. Merger/automation-trigger identity is not inferred.

Release-note context: Control UI can refresh and explicitly reselect a GitHub publisher after an account mismatch is rejected before admission, without changing the account or request of an uncertain publication.

Landing verification: GitHub reports MERGED; the native outcome is complete, the squash tree matches the exact three-way result, and fetched main contains the landed commit. No release or package publication was performed.

@steipete steipete self-assigned this Sep 4, 2026
@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.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: L maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority 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. 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, 5:53 PM ET / 21:53 UTC.

ClawSweeper review

What this changes

The PR adds a typed pre-admission rejection for stale GitHub publication account selections so Control UI can refresh the account and require a new explicit publish attempt.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open. The reviewed head implements a narrowly scoped stale-selection recovery path with owner-boundary and UI coverage, but this read-only checkout could not load current main source or a valid current test merge, and the required-check rollup is still incomplete.

Priority: P2
Reviewed head: 8980942c21363198bc890bc2b08f764321be862a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch and supplied owner/UI evidence are solid, with current-main integration and exact-head CI still unresolved.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This member-authored PR is exempt from the external-contributor proof gate; its supplied body nevertheless documents a real Gateway plus built-Control-UI scenario, but this reviewer could not retrieve the linked media in the unavailable network environment.
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 supplied body nevertheless documents a real Gateway plus built-Control-UI scenario, but this reviewer could not retrieve the linked media in the unavailable network environment.
Evidence reviewed 6 items Fresh rejection is decided at the admission owner: The introduced helper emits the typed detail only when the final receipt reread establishes that no same-key request exists; a read failure deliberately emits no recovery detail.
The RPC preserves the invocation boundary: The Gateway handler forwards the detail only from the known failure class and only when its idempotency key equals the request parameter.
UI recovery is deliberately narrow: The Control UI clears its attempt only for the first still-current invocation whose strict typed detail contains the same key; retries and malformed details remain locked.
Findings None None.
Security None None.

How this fits together

GitHub publication starts with a Control UI account selection, passes through Gateway admission and a durable receipt boundary, then returns a result to the UI. This change lets the UI distinguish a rejected fresh attempt from an uncertain or already-admitted publication.

flowchart LR
  UI[Control UI selection] --> RPC[Gateway publish request]
  RPC --> Admission[Publication admission]
  Admission --> Receipt[Receipt existence check]
  Admission --> Rejection[Typed fresh-selection rejection]
  Rejection --> Refresh[Refresh account and select again]
  Receipt --> Execute[Git publication execution]
Loading

Before merge

  • Resolve merge risk (P1) - The patch changes the CI checkout-owner diagnostic/exit path and its workflow projection; exact-head CI must validate that automation integration after the current-main merge candidate is refreshed.
  • Resolve merge risk (P1) - Current-main source and a valid current test merge were unavailable in this checkout, so this review cannot establish that the active main integration has no additional conflict or behavioral drift.
  • Complete next step (P2) - Refresh the merge candidate against current main and obtain green required checks for the resulting exact head before merge.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Source +126, Tests +573, Docs +2, Config +8, Other +22. Total +731 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 10 164 38 +126
Tests 6 597 24 +573
Docs 1 2 0 +2
Config 2 20 12 +8
Generated 0 0 0 0
Other 1 22 0 +22
Total 20 805 74 +731

Review metrics

Metric Value Why it matters
Production versus test delta production +130 net; tests +573 net; generated +26 net; docs +2 The positive production growth carries a new receipt-to-RPC-to-UI recovery fact across the admission boundary and should remain justified by the focused owner and UI coverage.

Merge-risk options

Maintainer options:

  1. Refresh and validate the active integration (recommended)
    Regenerate the current merge candidate and let the required exact-head checks validate the CI owner action and its workflow projection before merge.

Technical review

Best possible solution:

Retain the receipt-owner-based typed rejection and strict key-matched UI recovery, then validate the refreshed current-main integration and exact-head required checks before landing.

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

Yes. The source establishes a reproducible stale-account path: admission rejects before a receipt exists, and the pre-fix UI retained the attempt instead of clearing it; this read-only review did not execute the scenario.

Is this the best way to solve the issue?

Unclear for the active main integration. On the reviewed head, the receipt-owner fact plus exact-key UI handling is the best fix because generic identity-error recovery would conflate a fresh rejection with an uncertain admitted request.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review merge-risk labels are merge-risk: 🚨 automation.

Label justifications:

  • P2: This is a bounded recovery fix for a GitHub publication workflow, with no evidence of a system-wide outage.
  • merge-risk: 🚨 automation: The PR directly changes the CI checkout-owner diagnostic and its generated workflow projection, so an integration error could affect CI behavior after merge.
  • 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. Not applicable: This member-authored PR is exempt from the external-contributor proof gate; its supplied body nevertheless documents a real Gateway plus built-Control-UI scenario, but this reviewer could not retrieve the linked media in the unavailable network environment.

Evidence

What I checked:

  • Fresh rejection is decided at the admission owner: The introduced helper emits the typed detail only when the final receipt reread establishes that no same-key request exists; a read failure deliberately emits no recovery detail. (src/gateway/github-publication-failure.ts:30, 8980942c2136)
  • The RPC preserves the invocation boundary: The Gateway handler forwards the detail only from the known failure class and only when its idempotency key equals the request parameter. (src/gateway/server-methods/sessions-github.ts:92, 8980942c2136)
  • UI recovery is deliberately narrow: The Control UI clears its attempt only for the first still-current invocation whose strict typed detail contains the same key; retries and malformed details remain locked. (ui/src/pages/chat/chat-github-publication.ts:213, 8980942c2136)
  • Regression coverage spans receipt and client states: The new admission suite covers local, deferred, worker-claim, concurrent, and personal paths, while UI tests cover correct, stale, missing, extra-field, and retry details. (src/gateway/github-publication-admission.test.ts:77, 8980942c2136)
  • Feature-history routing: The related merged GitHub-publication feature is commit 4c0588d, authored by Peter Steinberger and included in v2026.9.1; the repair’s source-line history is branch-only, so this supports routing rather than an introduction claim. (src/gateway/github-personal-publication.ts:40, 4c0588d783c7)
  • Current-main comparison is unavailable locally: The checkout is blobless and attempts to read fetched main 11a46fa required missing promisor objects; the configured remote was unreachable. Therefore this review does not claim current-main equivalence or a final three-way result. (11a46fa85b47)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the merge candidate against current main and complete the exact-head required-check run.

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 (6 earlier review cycles)
  • reviewed 2026-09-04T01:16:08.129Z sha cd9c0ea :: blocked before merge. :: none
  • reviewed 2026-09-04T01:41:12.327Z sha cd9c0ea :: blocked before merge. :: none
  • reviewed 2026-09-04T04:17:33.515Z sha 4213693 :: blocked before merge. :: none
  • reviewed 2026-09-04T05:24:39.909Z sha 4213693 :: blocked before merge. :: none
  • reviewed 2026-09-04T19:51:11.640Z sha 8255cae :: blocked before merge. :: none
  • reviewed 2026-09-04T20:39:41.942Z sha 8255cae :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 4, 2026
Integrate c4b91f5 while retaining the
publication selection recovery and the complete terminal exception release.
Keep main's scoped live-child census and regenerate its CI projection.

The main-only terminal projection still times out when exception formatting
raises around a cyclic traceback. Retain diagnostic emission outside the
handler as well as the terminal exit; all 74 canonical owner cases now pass.

Validation: managed review (14 clean partitions), canonical protocol check,
QA-enabled full build, 13 publication browser tests, 101 workflow checks,
selected-plugin composition and read-only configured-install Doctor check.

Real Gateway plus built UI: one stale-publisher rejection, explicit Refresh
to the current account, no admitted publication or Git changes; normal owned
shutdown and complete source/runtime/dependency integrity checks passed.
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 4, 2026
@steipete
steipete merged commit 44b3e1f into main Sep 4, 2026
204 of 207 checks passed
@steipete
steipete deleted the codex/stable-review-f22-20260902 branch September 4, 2026 22:31
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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