Skip to content

feat(update): report failed updates with explicit consent - #139704

Merged
fuller-stack-dev merged 11 commits into
openclaw:mainfrom
fuller-stack-dev:codex/update-failure-report-consent
Sep 6, 2026
Merged

fuller-stack-dev merged 11 commits into
openclaw:mainfrom
fuller-stack-dev:codex/update-failure-report-consent

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Related: #135465, #138915

Additional instructions

Keep Allow edits from maintainers enabled for this PR.

What Problem This Solves

Users whose update fails can inspect diagnostics, but cannot directly submit a sanitized issue from Control UI. Diagnosing or retrying an update is not consent to send a report.

Why This Change Was Made

Adds an explicit Report update failure action with a bounded, redacted preview and confirmation. It reuses the shared GitHub issue transport and SQLite receipt owner. Authentication, current authority, the failed run and the reviewed body must still match immediately before issue creation. CLI and Gateway carry the admitted run ID and state selectors together, sharing the same receipt; calls without an admitted run retain their fallback identity.

This is the credited continuation of Jason (Json), @fuller-stack-dev, from #135465 and #138915. Their public branches, private checkpoints and proof remain preserved. Replacements were chosen to work around conflicting preserved/private merge history and the then-unavailable local signer, not required by GitHub. This PR landed through supported server integration and signed linear corrections. The predecessor contract check is complete: #135465 and #138915 are closed as superseded, with their original history, credit, proof, and remaining documentation finding preserved.

User Impact

  • Preview, cancel or confirm a failure report without a terminal command. Existing OpenClaw authentication and authority checks protect diagnostics and use of the signed-in account; they do not restrict who may submit issues on GitHub.
  • Missing or unauthenticated GitHub CLI offers a prefilled browser handoff without attempting issue creation.
  • A created issue URL is reused across CLI and Gateway. A started submission with an ambiguous outcome remains blocked against replay.
  • Retry, diagnosis and reporting remain separate choices. Changed failure facts or a disconnected/revoked session invalidate consent.

Reports exclude credentials, raw chat/logs, private absolute paths and executable recovery commands. Background, JSON and non-interactive runs do not auto-submit.

Evidence

Tested signed head: ad4801ea52d65c4ca3ef2d6c0f0c40b75bf04907. Tree: 08d0f4721222800335f96ad5071753a787c4b251. The signed bridge and server integration preserve the original 7799cc118749157af1bd29965ba97a72bd186ac8 ancestry and Jason's attribution. Exact-head CI run 34021085543 succeeded. Required openclaw/ci-gate passed on this head. Native preparation and head-pinned merge completed successfully. Landed as bf00dc5c98e95005d6032c9c1f90e53e1b31d0fc at 2026-09-06T09:08:00Z, with a verified GitHub signature and Jason's attribution. Native completion.

Final dispatch repair

The authority finding led to a second deterministic red at the actual transport boundary. On integrated 60ab8fee, retirement queued after the prepared callback reached mocked issue creation despite the pending receipt. Two retirement schedules failed, while both live controls passed. The transport now awaits preparation, then invokes the returned synchronous live-authority and receipt-CAS callback immediately before spawning its child. There is no intervening await. Started/ambiguous outcomes still cannot be replayed.

The matching controls pass after repair. Retirement before the synchronous commit produces no child or receipt/artifact residue. When retirement is queued by the pending commit itself, child creation occurs synchronously while authority is still live, before that retirement can run. The 194-test owner cycle covers the real registry, authenticated dispatcher, SQLite, shared transport, default child-process adapter and adjacent updater/finalizer paths. External I/O is mocked, including child creation. This is repository integration proof, not a live GitHub submission. Bounded P0-P2 Autoreview found no further actionable findings. Red log SHA-256: 9d36f908e88617fc116796c63e2d0317cfecf0e0b8c1f7acfd61a1a5b6065f0b. Green owner log: eb12d868e1bf068ad583af7b2ee0ec4138fdb5e86c7e2f7370f227162260e04c.

The seven test mocks use the equivalent (await hooks.beforeIssueCreate?.())?.(); form to stay within the existing line limit without moving tests or removing assertions. All 20 affected tests, core test types and lint pass. The shared config-reader relocation preserves its existing behavior and reduces the exact assertion baseline by one; no exception was added.

Integration and retained proof

  • The final canonical range merges without conflict and preserves the Report transport, receipt, handler and dispatcher bytes. Its Gateway shutdown/context and locale changes pass 94 affected tests on 02054d57, tree e570549f. Log SHA-256: 3d52d8c78a9d0009f656d76f289756705c4741c9c70ecfcd53f99fec21375857.
  • Native local checks use explicit input-based carry-forwards. R284 completes the 46-stage plan with six new passes and 40 qualified prior passes; protocol regeneration and the complete declared-assets check also pass. These are composed local receipts, not a single whole-run or hosted pass. The later canonical integration refreshes only its invalidated stages. Eight integration-invalidated native stages pass with 38 qualified carry-forwards. The server-selected base then passes 185 auth/Report controls, core types and the complete declared-assets check on the exact public tree. Final receipt SHA-256: 86c024f75abc1dba858b260711c59f797541d384dbb4bea12d9d975336a862c5.
  • The admitted CLI run identity and Gateway use the same receipt. Retained 32 CLI and 23 Gateway/shared-receipt controls cover replay, no-run fallback, changed preview, ambiguous no-replay and distinct runs.
  • Four real-SQLite source/API compatibility controls cover absent reads, unchanged schema on first use, the pre-feature notification reader preserving Report rows, and reopen retaining results/fences. Receipt store, sentinel reader/writer, state opener and schema are unchanged; shared helper changes are qualified in the current review disposition. Log SHA-256: 310ee2244576a3bfb75a09d569314a43cb62b3f53b734026a9859bee1091b96f. No installed-package/downgrade execution is claimed.
  • Consent/cancel, bounded redaction, missing or unauthenticated GitHub fallback, connection retirement, stale preview and duplicate submission regressions remain preserved with their original receipts. Earlier failed lint/type/generator/hydration/setup runs remain failures with their dispositions.

The old Doctor public-transcript CI failure remains negative evidence. The actual landed Doctor caller changes are now integrated. Another PR's green does not replace this head's required CI; no heap limit or assertion was weakened and no old-head job was blindly retried.

Scope and incident disclosure

The user's current journey scope supersedes separate per-feature Lab, packaged smoke/restart/delegated reenactment, adapter, environment-admission and custom visual gates. Their work and receipts are preserved as superseded, not passed. Lab owns only the combined atomic-update journey and is not a parent of this Report PR. The user's task-specific exception settles the administrative listed-owner wait; the existing request is not a submitted review or a claim of secops membership. Product authority, consent, substantive findings, exact-head required CI/security and native prepare/merge remain enforced.

Earlier proof accidentally created issue #135424. The coordinator verified it closed and its 331-byte body free of credentials, private paths, raw logs and executable recovery commands. Restricting the caller's PATH did not isolate the already-running Gateway child's transport. This is negative isolation evidence, not a product pass. Subsequent automated proof uses mocked transport. No real test issue creation is authorized.

Remaining documentation finding

The predecessor's P3 remains a documentation follow-up: the recovery introductions in docs/cli/update.md and docs/install/update-troubleshooting.md still imply automatic CLI triage, while the implemented CLI offers explicit Diagnose/Report/Exit selection. This wording was not marked fixed by closing the superseded implementation. The Report action and its consent/authority/receipt contract are present in the landed source.

Continue the Report action from openclaw#135465 and openclaw#138915 while preserving their public histories and Jason (Json)'s contribution. Reuse the canonical GitHub transport and update-run facts, with current owner, attempt and consent checks before submission.
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 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.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 6, 2026 03:57
@fuller-stack-dev
fuller-stack-dev requested a review from a team as a code owner September 6, 2026 03:57
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes size: XL maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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 Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 6, 2026, 4:21 AM ET / 08:21 UTC.

ClawSweeper review

What this changes

Adds CLI and Control UI actions to preview and explicitly confirm sanitized update-failure reports, with GitHub submission, browser fallback, and persistent duplicate protection.

Merge readiness

⛔ Blocked before merge - 4 items remain

This remains useful, maintainer-sponsored work absent from current main. The previous CLI identity, delegated-authority, and final-await findings are addressed in the inspected source; no additional actionable code defect was established.

Priority: P2
Reviewed head: ad4801ea52d65c4ca3ef2d6c0f0c40b75bf04907

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The revisions resolve the established findings and provide substantial integration coverage, but the authority-sensitive final-effect evidence remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Needs real behavior proof before merge: Authority-chain proof required: current Gateway, registry, SQLite, and default-adapter controls cover allowed and retired callers, but mock transport or spawn. They address the code finding without demonstrating after-fix rejection at actual child creation. Historical runtime evidence remains supporting evidence; superseded packaged and visual gates are not reinstated. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Authority-chain proof required: current Gateway, registry, SQLite, and default-adapter controls cover allowed and retired callers, but mock transport or spawn. They address the code finding without demonstrating after-fix rejection at actual child creation. Historical runtime evidence remains supporting evidence; superseded packaged and visual gates are not reinstated. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 10 items Pinned introduced change: Inspected the checkout at the host-verified original head and the pinned merge-base-to-head delta. The supplied test merge is stale and was not used to infer removal of current-main behavior.
Current main still needs the feature: Current main sends interactive update failures directly to triage; it does not offer this report action. Separate tree inspection found the shared GitHub transport but neither new report owner.
Release check: The supplied latest-release revision, v2026.9.2, contains neither new report-owner path. No merged fixing PR establishing equivalent behavior was supplied.
Findings None None.
Security None None.

How this fits together

Update reporting converts recorded update failures into a sanitized preview. After confirmation, the Gateway checks current caller authority and claims a durable receipt before using the host’s GitHub CLI account.

flowchart TD
  A[Recorded update failure] --> B[Sanitized report preview]
  B --> C[Explicit user confirmation]
  C --> D[Current caller and attempt checks]
  D --> E[Durable submission receipt]
  E --> F[GitHub CLI transport]
  F --> G[Issue URL or browser handoff]
  F --> H[Pending outcome blocks replay]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: current Gateway, registry, SQLite, and default-adapter controls cover allowed and retired callers, but mock transport or spawn. They address the code finding without demonstrating after-fix rejection at actual child creation. Historical runtime evidence remains supporting evidence; superseded packaged and visual gates are not reinstated. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The new Gateway action uses the host’s GitHub account; after-fix rejection of non-owner and retired callers has not been demonstrated through actual child creation in the supplied evidence.
  • Complete next step (P2) - Provide redacted after-fix final-effect evidence for authorized, non-owner, and retired callers before merge; preserve the prohibition on creating real test issues.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +3054, Tests +5237, Docs +41, Other +523. Total +8855 across 73 files.

View PR surface stats
Area Files Added Removed Net
Source 41 3143 89 +3054
Tests 27 5381 144 +5237
Docs 2 41 0 +41
Config 0 0 0 0
Generated 0 0 0 0
Other 3 524 1 +523
Total 73 9089 234 +8855

Review metrics

Metric Value Why it matters
Production and regression investment Production net +3,054 lines; tests/support net +5,237; generated native models excluded The stated production growth implements consent, durable submission recovery, and artifact custody while reusing the existing GitHub transport.
New reporting contract 1 RPC, 2 explicit actions, 0 new configuration knobs Preview and submission remain separate protocol operations without enabling background reporting.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/gateway/server-methods/update-report.ts, unknown-data-model-change: packages/gateway-protocol/src/schema/config.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #139704
Summary: The supplied discussion designates this as the active continuation; predecessor closure remains separate from this review.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Complete the scoped authority evidence (recommended)
    Provide allowed, non-owner, and retired-caller observations through the production dispatch and child boundary using an authorized isolated setup that cannot create a real GitHub issue.

Technical review

Best possible solution:

Retain the shared transport and durable receipt design, with an explicit in-product reporting flow whose allowed and revoked-caller behavior is demonstrated at the final process boundary.

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

Not applicable to the feature request. The prior race is addressed in current source and has reported deterministic regression controls; this read-only review did not execute them.

Is this the best way to solve the issue?

Yes, the inspected design extends the existing issue transport and state owner rather than introducing a competing reporting service; final-effect authority evidence remains the merge-readiness gap.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 45213bbddbe8.

Labels

Label justifications:

  • P2: This is a bounded improvement to failed-update reporting, without evidence of an urgent regression caused by the patch.
  • merge-risk: 🚨 security-boundary: The new remote action can publish through the host’s GitHub account, and its final-effect authority evidence still uses mocked transport or child creation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: current Gateway, registry, SQLite, and default-adapter controls cover allowed and retired callers, but mock transport or spawn. They address the code finding without demonstrating after-fix rejection at actual child creation. Historical runtime evidence remains supporting evidence; superseded packaged and visual gates are not reinstated. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Pinned introduced change: Inspected the checkout at the host-verified original head and the pinned merge-base-to-head delta. The supplied test merge is stale and was not used to infer removal of current-main behavior. (ad4801ea52d6)
  • Current main still needs the feature: Current main sends interactive update failures directly to triage; it does not offer this report action. Separate tree inspection found the shared GitHub transport but neither new report owner. (src/cli/update-cli/update-command-triage.ts:80, 45213bbddbe8)
  • Release check: The supplied latest-release revision, v2026.9.2, contains neither new report-owner path. No merged fixing PR establishing equivalent behavior was supplied. (3928bad9badf)
  • Previous final-await finding addressed: The transport awaits preparation, invokes its returned synchronous callback, and immediately calls the default transport, whose Promise executor invokes spawn synchronously. The report callback checks live authority and claims the pending receipt without an intervening await. (src/infra/github-issue.ts:263, ad4801ea52d6)
  • Authority-bearing production path: The new handler permits the owner profile or internal system actor, requires the dispatcher’s current-client guard, checks connection retirement and delegated runtime liveness, and passes that predicate into submission. This introduces access to the host-account GitHub side effect and triggers the authority-chain assessment. (src/gateway/server-methods/update-report.ts:185, ad4801ea52d6)
  • Current final-effect evidence remains mocked: The inspected controls cover live and retired callers at the default adapter boundary, but replace child_process.spawn. Dispatcher integration separately uses mocked GitHub transport. The captured PR body and feat(update): report failed updates with explicit consent #139704 (comment) explicitly describe the 194-test cycle as mocked external I/O, including spawn; log hashes identify receipts but do not expose their contents. Captured context sourceRevision: b5c9672217f4d6fd474203dc506b7d139fccb7a15d94207e546582efe9c0c17e. (src/infra/github-issue.test.ts:453, ad4801ea52d6)

Likely related people:

  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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.

  • Show that a live authorized caller reaches child creation once while a non-owner or retired caller cannot reach it, using an authorized isolated setup without real issue creation.
  • Post redacted terminal output or logs, removing credentials, private addresses, paths, and endpoints; update the PR body for automatic re-review, or ask a maintainer to comment @clawsweeper re-review.

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 (7 earlier review cycles)
  • reviewed 2026-09-06T04:05:46.494Z sha 4e7f8c8 :: needs real behavior proof before merge. :: [P2] Reuse the canonical run ID for CLI report receipts
  • reviewed 2026-09-06T04:26:51.172Z sha ff19c34 :: needs real behavior proof before merge. :: [P2] Reuse the canonical run ID for CLI report receipts
  • reviewed 2026-09-06T04:54:17.276Z sha a7554c5 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T05:05:21.605Z sha 40efda2 :: needs real behavior proof before merge. :: [P1] Revalidate delegated runtime authority before creating the issue
  • reviewed 2026-09-06T06:40:40.868Z sha a98a3b3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T07:05:28.606Z sha 7799cc1 :: needs real behavior proof before merge. :: [P1] [P1] Check live authority after the transport's final await
  • reviewed 2026-09-06T07:19:52.959Z sha 7799cc1 :: needs real behavior proof before merge. :: [P1] [P1] Check live authority after the transport's final await

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@openclaw/openclaw-secops Please review or give concrete owner direction on the dispatcher/authority changes at ff19c341: authenticated-request-dispatch.ts, its server test, and update-report-authority.server.test.ts.

The intended boundary is Gateway-owner/operator-admin access or the internal system path; a non-owner admin is rejected. Report consent ends when its connection retires. After authentication and immediately before issue creation, the handler must revalidate live client authority and the current failed attempt, then claim the pending receipt before transport starts.

These restricted bytes are unchanged by the pending CLI run-identity correction. Mocked/local authority and receipt-replay checks pass, but real final-I/O rejection and exact-candidate receipt-compatibility proof remain outstanding. This request and the existing team review request are not clearance. No real issue creation is used as proof.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

The CLI receipt-identity finding in this review is fixed in a7554c5c.

The admitted run ID and frozen environment now travel together to the existing Report action. No-run calls retain fresh fallback identities. The transport, receipt schema and post-auth/pre-create authority checks are unchanged.

The unmodified production tree failed the admitted identity/state-scope controls. On the published tree, 32 CLI tests and 23 Gateway/shared-receipt tests pass. The latter use the real interactive action and handler with the GitHub adapter mocked: reopening SQLite reuses a created URL only for the same reviewed body, changed previews withhold stale links, ambiguous started submissions do not create again, and a distinct run remains reportable. All 29 selected native structural stages also passed. The PR Evidence has the exact identities, hashes and retained review disposition.

This closes the code finding, not the outstanding merge conditions. Authenticated final-I/O rejection, receipt compatibility, independent source-blind/visual proof, listed-owner involvement and exact-head CI/native landing remain open. Fresh CI is run 34012294567; the unrelated prior inventory failure is preserved, not waived. No real issue was created.

Reconcile the obsolete generated Workboard asset stamp with the common
base solely to permit canonical integration. Regenerate from the combined
source before final publication qualification; this bridge is not land-ready.
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

The delegated-runtime finding in the current review is fixed in signed head a98a3b30, exact tested tree 2b5055cd899a437119a1358ac5bff2df5592b1ca.

The original 40efda23 failed both retired-delegation cases while live/ordinary controls passed. The Report handler now includes the canonical live runtime validator. The bounded review also exposed an authority change after the last awaited attempt check; a synchronous check now sits directly before the existing pending-receipt CAS. Both deterministic reds are green, with real registry/SQLite state and mocked GitHub transport. All 83 affected tests passed. After integration of the upstream request-context refactor, 44 context/kernel/Report-authority tests and core types passed on the exact published tree.

The PR Evidence records the preserved review, failures, stage mappings and hashes. The storage/transport/schema contracts are unchanged, and the four completed real-SQLite compatibility clauses carry forward. They are not packaged-reader proof.

This resolves the reproduced code defects, not the remaining merge gates. Actual authenticated final-I/O rejection, packaged receipt compatibility, source-blind/visual proof, listed-owner involvement and exact-head CI/native preparation are still required. CI run 34016610889 follows this head. No real issue was created by these tests.

@fuller-stack-dev
fuller-stack-dev deleted the codex/update-failure-report-consent branch September 6, 2026 09:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…39704)

* feat(update): report failed updates with explicit consent

Continue the Report action from openclaw#135465 and openclaw#138915 while preserving their public histories and Jason (Json)'s contribution. Reuse the canonical GitHub transport and update-run facts, with current owner, attempt and consent checks before submission.

* fix(update): refresh generated Workboard asset pointers

* fix(update): reuse admitted run identity for failure reports

* fix(update): fence delegated report authority before creation

Reconcile the obsolete generated Workboard asset stamp with the common
base solely to permit canonical integration. Regenerate from the combined
source before final publication qualification; this bridge is not land-ready.

* fix(update): refresh integrated report assets

* test(gateway): include report action in renewed hello

* fix(update): fence report authority at issue creation

* refactor(update): share the pre-finalize config reader
steipete added a commit that referenced this pull request Oct 13, 2026
Share route decoding, attachment retention, gallery preparation, transient
identity encoding, override copying, and extension classification. Remove
duplicate admission/schema mirrors and obsolete supported-browser fallbacks.
Both Lit and Solid paths remain; no rendering change is intended. No config,
protocol, persisted shape, dependency, or public SDK change.

Best-effort tradeoffs accepted

- Malformed internal native requests (#140988): all callers are typed and
  native hosts validate at the effect; their error replaces the renderer mirror.
- Worker replacement during an identity query (#140484): added for synthetic
  autoreview interleavings, not a human incident. Return false; normal worker
  announcements and foreground recovery observe the next active worker.
- Native readiness changing between synchronous checks (#140484/#109719):
  rely on queued events. A broken native event can require another worker event
  or reload; camera readiness retains its existing five-second error deadline.
- Overlapping application-root health reporters (#152638): startup mounts one
  root. Unsupported overlapping roots are last-publication-wins; the actual
  reported health/status feature and native trusted-document checks remain.
- Polling after stop (#139704): its sole owner retires eligibility first.
  Scheduling now uses that owner admission, not a separate read-only generation.
- Resetting an observer without retiring its connection (#116887): no production
  caller does this. Canonical connection epochs remain the sole retirement owner;
  unsupported direct live-scope reset no longer fences an old response separately.
- Upload policy changing during local reads (#158567): decoded/hash work can
  finish. Draft publication and every upload request retain live policy checks.
- Missing supported browser primitives (#105240/#151388/#100024/#102745):
  unsupported runtimes error instead of code-point initials, skipped input yield,
  wall-clock timing, or approximate microtask paint. The human progress-card fix
  in #151386 keeps its browser yield and durable FIFO handoff unchanged.
- URL APIs disappearing after URL creation (#100024/#149330): supported browsers
  keep paired APIs. An unsupported replaced global can throw during cleanup;
  undefined URLs, creation fallback, cancellation and release ordering remain.
- Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK
  still rejects malformed wire blocks before dispatch, proved over real in-memory
  App/AppBridge transport. UI content, authority, confirmation and custody policy
  remain. The introducing PR cites no human incident for the second mirror.

Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30.
Focused owner/sibling tests, targeted types/lint/format, lint-suppression and
independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle
proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery
renderer runs did not reach assertions, while its owning controller suite passed.
steipete added a commit that referenced this pull request Oct 13, 2026
* refactor(apple): simplify old shared and macOS bookkeeping

Replace redundant generations with existing cancellation or actual owner
identity, consolidate parallel fallback/policy paths, and remove test-only
forwarding layers. Preserve authority, FIFO, durable state, resource bounds,
public protocol/config shapes, signing, permissions, and visible rendering.

Reuse canonical session-key normalization for Voice Wake delivery selection:
opaque Signal group IDs remain case-sensitive and main aliases are not added.
Use canonical IP-literal policy for discovery labels and remote CLI validation.

Best-effort tradeoffs accepted

- Palette generation (#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain.
- Link preview generation (#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain.
- Sidebar preview generation (#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain.
- Source-preview producer revision (#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain.
- Mermaid generations (#135470/#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted.
- Camera JPEG UUID (#107879): duplicates exact task cancellation; #107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain.
- Discovery generation (#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate.
- FSEvents generation (#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain.
- Menu generations (#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain.
- Cron generation (#131466/#137502): #138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits.
- WebChat visibility acknowledgement/retry (#113634/#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain.
- WebChat cleanup UUID (#113634/#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle.
- Child-exit polling (#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain.
- Realtime iterator borrowing trap (#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain.
- Receipt projection admission (#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice.
- Recap attribution heuristics (#112188/#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain.
- PortGuardian per-write schema scans (#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain.
- Unread queue counter (#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged.

Review dispositions: the claimed Task compilation failure is disproved by the
selected SDK's Equatable conformance and native builds. Repeated receipt
identity admission is unnecessary at its internal projector because both real
callers retain it immediately before projection. Per-write schema revalidation
was declined under the explicit best-effort policy above.

Proof and scope

Net production reduction: 369 lines (148 added, 517 deleted), excluding tests.
Fresh seven-day census permits all substantive production edits; the only
recent caller change is the unavoidable one-line fallback-to-parse rename.

Shared Swift build passed. Final focused shared tests passed 396 cases in six
suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and
isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all
products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed
(89.60s and 120.87s wall), without signing changes or app launches.

Canonical Apple lint/format checks passed; the initial iOS format failure in
WatchCommands was ours and corrected, with no gate weakened. Lint-suppression
tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0;
the TypeScript graph is unchanged. Native localization stayed at 4476 entries.
The 45 original packaging/elevation timeout cases passed one focused retry
(94.79s wall), with no assertion/budget change and no claim of a diagnosed fix.

Known gaps: seven issues remained in the earlier ChatStreamReplayTests
narration=false package cases; causality/current-main attribution is unproven.
App-hosted macOS tests were not executed on the operator desktop. No hosted CI
or PR was started: the explicit BELOW-500 rule requires a branch-only handoff.

* refactor(ui): consolidate old UI owners and validation

Share route decoding, attachment retention, gallery preparation, transient
identity encoding, override copying, and extension classification. Remove
duplicate admission/schema mirrors and obsolete supported-browser fallbacks.
Both Lit and Solid paths remain; no rendering change is intended. No config,
protocol, persisted shape, dependency, or public SDK change.

Best-effort tradeoffs accepted

- Malformed internal native requests (#140988): all callers are typed and
  native hosts validate at the effect; their error replaces the renderer mirror.
- Worker replacement during an identity query (#140484): added for synthetic
  autoreview interleavings, not a human incident. Return false; normal worker
  announcements and foreground recovery observe the next active worker.
- Native readiness changing between synchronous checks (#140484/#109719):
  rely on queued events. A broken native event can require another worker event
  or reload; camera readiness retains its existing five-second error deadline.
- Overlapping application-root health reporters (#152638): startup mounts one
  root. Unsupported overlapping roots are last-publication-wins; the actual
  reported health/status feature and native trusted-document checks remain.
- Polling after stop (#139704): its sole owner retires eligibility first.
  Scheduling now uses that owner admission, not a separate read-only generation.
- Resetting an observer without retiring its connection (#116887): no production
  caller does this. Canonical connection epochs remain the sole retirement owner;
  unsupported direct live-scope reset no longer fences an old response separately.
- Upload policy changing during local reads (#158567): decoded/hash work can
  finish. Draft publication and every upload request retain live policy checks.
- Missing supported browser primitives (#105240/#151388/#100024/#102745):
  unsupported runtimes error instead of code-point initials, skipped input yield,
  wall-clock timing, or approximate microtask paint. The human progress-card fix
  in #151386 keeps its browser yield and durable FIFO handoff unchanged.
- URL APIs disappearing after URL creation (#100024/#149330): supported browsers
  keep paired APIs. An unsupported replaced global can throw during cleanup;
  undefined URLs, creation fallback, cancellation and release ordering remain.
- Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK
  still rejects malformed wire blocks before dispatch, proved over real in-memory
  App/AppBridge transport. UI content, authority, confirmation and custody policy
  remain. The introducing PR cites no human incident for the second mirror.

Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30.
Focused owner/sibling tests, targeted types/lint/format, lint-suppression and
independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle
proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery
renderer runs did not reach assertions, while its owning controller suite passed.

* refactor(ui): remove obsolete Fetch capability branch

The supported Control UI browser floor includes Fetch. Start attachment
metadata reads directly rather than leaving an unsupported runtime in a
permanent checking state.

Best-effort tradeoffs accepted

- Missing global Fetch: the guard originated in #64104, whose feature report
  cites no human missing-Fetch incident. An unsupported runtime that replaces
  Fetch now reaches the existing rejected-request/unavailable path. Metadata
  validation, auth/tickets, allow POST, cancellation, resource admission,
  expiry and bounded retry remain unchanged. No intended rendering change.

Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment
siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression
checks pass. This cut removes five production lines including formatter
reflow, bringing the lane to 223 net production lines removed.
Fresh independent P0-P2 review is scoped-clean with no actionable findings.

* fix(ui): use global frame scheduling APIs

Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…#170823)

* refactor(apple): simplify old shared and macOS bookkeeping

Replace redundant generations with existing cancellation or actual owner
identity, consolidate parallel fallback/policy paths, and remove test-only
forwarding layers. Preserve authority, FIFO, durable state, resource bounds,
public protocol/config shapes, signing, permissions, and visible rendering.

Reuse canonical session-key normalization for Voice Wake delivery selection:
opaque Signal group IDs remain case-sensitive and main aliases are not added.
Use canonical IP-literal policy for discovery labels and remote CLI validation.

Best-effort tradeoffs accepted

- Palette generation (openclaw#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain.
- Link preview generation (openclaw#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain.
- Sidebar preview generation (openclaw#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain.
- Source-preview producer revision (openclaw#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain.
- Mermaid generations (openclaw#135470/openclaw#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted.
- Camera JPEG UUID (openclaw#107879): duplicates exact task cancellation; openclaw#107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain.
- Discovery generation (openclaw#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate.
- FSEvents generation (openclaw#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain.
- Menu generations (openclaw#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain.
- Cron generation (openclaw#131466/openclaw#137502): openclaw#138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits.
- WebChat visibility acknowledgement/retry (openclaw#113634/openclaw#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain.
- WebChat cleanup UUID (openclaw#113634/openclaw#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle.
- Child-exit polling (openclaw#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain.
- Realtime iterator borrowing trap (openclaw#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain.
- Receipt projection admission (openclaw#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice.
- Recap attribution heuristics (openclaw#112188/openclaw#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain.
- PortGuardian per-write schema scans (openclaw#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain.
- Unread queue counter (openclaw#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged.

Review dispositions: the claimed Task compilation failure is disproved by the
selected SDK's Equatable conformance and native builds. Repeated receipt
identity admission is unnecessary at its internal projector because both real
callers retain it immediately before projection. Per-write schema revalidation
was declined under the explicit best-effort policy above.

Proof and scope

Net production reduction: 369 lines (148 added, 517 deleted), excluding tests.
Fresh seven-day census permits all substantive production edits; the only
recent caller change is the unavoidable one-line fallback-to-parse rename.

Shared Swift build passed. Final focused shared tests passed 396 cases in six
suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and
isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all
products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed
(89.60s and 120.87s wall), without signing changes or app launches.

Canonical Apple lint/format checks passed; the initial iOS format failure in
WatchCommands was ours and corrected, with no gate weakened. Lint-suppression
tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0;
the TypeScript graph is unchanged. Native localization stayed at 4476 entries.
The 45 original packaging/elevation timeout cases passed one focused retry
(94.79s wall), with no assertion/budget change and no claim of a diagnosed fix.

Known gaps: seven issues remained in the earlier ChatStreamReplayTests
narration=false package cases; causality/current-main attribution is unproven.
App-hosted macOS tests were not executed on the operator desktop. No hosted CI
or PR was started: the explicit BELOW-500 rule requires a branch-only handoff.

* refactor(ui): consolidate old UI owners and validation

Share route decoding, attachment retention, gallery preparation, transient
identity encoding, override copying, and extension classification. Remove
duplicate admission/schema mirrors and obsolete supported-browser fallbacks.
Both Lit and Solid paths remain; no rendering change is intended. No config,
protocol, persisted shape, dependency, or public SDK change.

Best-effort tradeoffs accepted

- Malformed internal native requests (openclaw#140988): all callers are typed and
  native hosts validate at the effect; their error replaces the renderer mirror.
- Worker replacement during an identity query (openclaw#140484): added for synthetic
  autoreview interleavings, not a human incident. Return false; normal worker
  announcements and foreground recovery observe the next active worker.
- Native readiness changing between synchronous checks (openclaw#140484/openclaw#109719):
  rely on queued events. A broken native event can require another worker event
  or reload; camera readiness retains its existing five-second error deadline.
- Overlapping application-root health reporters (openclaw#152638): startup mounts one
  root. Unsupported overlapping roots are last-publication-wins; the actual
  reported health/status feature and native trusted-document checks remain.
- Polling after stop (openclaw#139704): its sole owner retires eligibility first.
  Scheduling now uses that owner admission, not a separate read-only generation.
- Resetting an observer without retiring its connection (openclaw#116887): no production
  caller does this. Canonical connection epochs remain the sole retirement owner;
  unsupported direct live-scope reset no longer fences an old response separately.
- Upload policy changing during local reads (openclaw#158567): decoded/hash work can
  finish. Draft publication and every upload request retain live policy checks.
- Missing supported browser primitives (openclaw#105240/openclaw#151388/openclaw#100024/openclaw#102745):
  unsupported runtimes error instead of code-point initials, skipped input yield,
  wall-clock timing, or approximate microtask paint. The human progress-card fix
  in openclaw#151386 keeps its browser yield and durable FIFO handoff unchanged.
- URL APIs disappearing after URL creation (openclaw#100024/openclaw#149330): supported browsers
  keep paired APIs. An unsupported replaced global can throw during cleanup;
  undefined URLs, creation fallback, cancellation and release ordering remain.
- Malformed internal MCP calls bypassing AppBridge (openclaw#161747): may throw. The SDK
  still rejects malformed wire blocks before dispatch, proved over real in-memory
  App/AppBridge transport. UI content, authority, confirmation and custody policy
  remain. The introducing PR cites no human incident for the second mirror.

Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30.
Focused owner/sibling tests, targeted types/lint/format, lint-suppression and
independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle
proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery
renderer runs did not reach assertions, while its owning controller suite passed.

* refactor(ui): remove obsolete Fetch capability branch

The supported Control UI browser floor includes Fetch. Start attachment
metadata reads directly rather than leaving an unsupported runtime in a
permanent checking state.

Best-effort tradeoffs accepted

- Missing global Fetch: the guard originated in openclaw#64104, whose feature report
  cites no human missing-Fetch incident. An unsupported runtime that replaces
  Fetch now reaches the existing rejected-request/unavailable path. Metadata
  validation, auth/tickets, allow POST, cancellation, resource admission,
  expiry and bounded retry remain unchanged. No intended rendering change.

Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment
siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression
checks pass. This cut removes five production lines including formatter
reflow, bringing the lane to 223 net production lines removed.
Fresh independent P0-P2 review is scoped-clean with no actionable findings.

* fix(ui): use global frame scheduling APIs

Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui cli CLI command changes docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: workboard rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant