Skip to content

refactor(state): simplify private reader and error transport - #169754

Merged
steipete merged 2 commits into
mainfrom
deslop/p15-state-pr3-20261012
Oct 12, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/p15-state-pr3-20261012

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Related: #168947

What Problem This Solves

Private state readers maintain duplicate command snapshots, error identity declarations, retained-operation adaptation and identity fallback checks despite having one typed in-process owner.

User Impact

No normal user-visible behavior, configuration, stored format, SQLite durability, retention or permissions change. Queue snapshot isolation, live authority, native cleanup settlement and error recovery metadata remain intact. Rare unsupported internal inputs and simultaneous cleanup failures have the explicit best-effort treatment below.

Why This Change Was Made

Capture commands with one deep clone, use the existing retained-operation mapper, infer error identities from their producer, and retain private error payloads in a WeakMap. Reuse the existing receipt and schema-fact readers instead of repeating their checks.

This is the third and final authorized state simplification pass: 337 net production lines removed (67 added / 404 deleted), plus 2 net test lines removed, across 10 files. The originally reviewed cut removed 596 production lines; main's #169648 independently landed the overlapping parser/predicate removals while this PR waited. The conflict-only rebase does not count them twice. Measurement excludes tests, fixtures, test support, generated code and declarations.

Best-effort tradeoffs accepted

The original cut's private graph-parser and dead-predicate removals below are already on main through #169648; this PR retains main's encoder privacy/scalar guard, single name/message capture and version check. The remaining diff adds no schema or public-contract change.

Proof gap accepted (coordinator)

The cancellation exception below records the original head's proof gap. GitHub subsequently reported a real conflict with main's overlapping #169648, so the standing conflict-only authority was used to publish signed head 9bed8637423a97534be94605e28b3aefc1181fc5. Historical CI is not represented as CI for that repaired head. Its new hosted attempt is terminal, with both failed Node jobs independently reproduced on clean main below. No CI rerun or unchanged repush was requested.

The coordinator explicitly accepted the unrun fail-fast cancellation coverage at reviewed head 4755f085f518de70c7167b6c1076cf7b0ef17aeb: Testbox queued and was stopped; the shared Mac is saturated. Missing coverage includes the remaining Node shard plans (93 missing plans plus the unresolved small-27 selection), complete checks-ui (1/1) and seven checks-ui-e2e shards, the declaration/SDK/UI tails of build-artifacts, unfinished lint/test-type graphs, and extension package compilation. The extension-lint placeholder job never materialized executable steps. None is claimed passing.

Focused/local proof covers all changed test files (78/78), retained reader/error/authority/ownership/profile/cleanup siblings, production types and 28 affected core test graphs, changed-file lint/format, cycles, suppression checks, and five fully covered static jobs. The requested one-time full changed-file check is recorded separately below.

Four inherited red jobs were independently reproduced on clean main 830b3ea72dab162ae689f850448ff62073b0b590: suppression inventory (checks-node-compact-small-2, corrected on main in 64f11ced232); rewind SQL count (checks-node-changed-compact-large-2-1); both detached-context admission assertions (checks-node-changed-compact-large-14-1); stale actor-version expectation (checks-node-changed-compact-small-13, corrected on main in 0655ff941f8). The CI gate is downstream. Their owners/tests are untouched here. The coordinator authorized the exact-head native admin exception with these failures and gaps named, not relabelled green. Hourly main CI is the broad-proof backstop; any resulting red main is fixed forward. No CI rerun, unchanged repush, or speculative rebase is requested.

Evidence

Repaired-head CI 38239731304, attempt 1, is terminal. It tested merge 1850024a8bfdd4dc979e577c835ae3e99a3fdd15, ordered parents main 3e3a9a87e58be5b8d291d7bf448e1b7e8f7ba947 and exact head 9bed8637423a97534be94605e28b3aefc1181fc5. All 147 observed head check runs are terminal. This CI attempt has 83 jobs: 56 success, 3 failure, 24 conditional skips, and no cancelled CI jobs. The failed roots are checks-node-changed-compact-large-24-1 / 114779653617 (five client-create-authority.test.ts cases stop at “User profile catalog is not ready”) and checks-node-changed-compact-small-19 / 114779653632 (six server.sessions-send-resume.test.ts cases: three unchanged 120-second timeouts and three admission-result assertions). Both independently reproduce on clean main as detailed below. openclaw/ci-gate / 114784212080 is downstream. No failure is presumed inherited merely because its test file is untouched. Three cancelled non-CI automation checks carry no product-suite passing claim.

The first current-main replay reached no assertions: the restored Phase E reports caller still imported isSteerConfirmationRewrite, renamed by 5a1cd1abf11 to the existing canonical transcriptRewritePreservesAdmission owner. Its compiled-subprocess build refused that missing export. Another owner independently published the identical compatible caller cutover in main 37064938ac97bc56e6723305f8f6eb4eafe20505; our attempted main push was rejected without a write, and the duplicate local commit was dropped. The unchanged memory-report tests pass 3/3 (344.80s), production types, focused lint and suppressions pass, and independent review is scoped-clean for that caller-only fix. No backend, factory, registry, expiry, federation machinery or tests were deleted or shrunk. The setup failure is not a Talk-failure reproduction.

Clean published main 37064938ac97bc56e6723305f8f6eb4eafe20505 independently reproduces all five Talk cases with the same “User profile catalog is not ready” signature (321.87s wrapper). The Talk helper lacks the resident-catalog prerequisite after main's #169799 role-policy cutover; its tests/helper and determining catalog/authorization owners are byte-identical between CI baseline, tested merge and reproduced main. A separate main replay reproduces all six resume failures: three unchanged120s preparation timeouts, cancelled-successor admission mismatch and explicit/automatic “Session communication state changed before admission” mismatches (794.15s Vitest; wrapper result retained in evidence). The test and communication-authority owner are also unchanged across all three trees. Thus both current root jobs are inherited; the failed gate is downstream. Hosted classification was unknown because no scheduled-main job matched; these actual reproductions establish attribution. An initial broad main replay was interrupted after unrelated passing cases and is partial proof only. Test-name selection narrows diagnosis without changing committed tests, assertion order or deadlines.

Conflict-only integration: GitHub reported CONFLICTING at the original published head 4755f085f518de70c7167b6c1076cf7b0ef17aeb. The signed repaired head is 9bed8637423a97534be94605e28b3aefc1181fc5, based on main d2154d5b8f622a4788f7c63f3c706056008f4923. Main's privacy checks and version check are preserved. The repaired production candidate passed all 149 focused tests across eight files (874.84s wrapper), both cycle checks (zero cycles), and lint-suppressions (3/3, 84.87s). The final replayed commit only renames a test-local variable; its production removals were already on main. Fresh P2 review raised two concerns that source inspection disproves: failedHealth declares no callback input and its sole production caller passes only the command type; the GitHub selector already returns an empty map when its table/column is absent. Neither finding was accepted, and that review's engine verdict is not described as scoped-clean.

Final-head lint and formatting pass across all ten files (zero warnings/errors). The first rebased production typecheck could not resolve new-main dependencies pg and @resvg/resvg-js. After a frozen install in a separate task-owned exact-head checkout, production types plus the state-logging and infrastructure test graphs all pass (exit 0). This resolved the missing-dependency diagnostics without a source change. The primary install was not reconciled.

The coordinator-requested one-time original-head run completed 239 passing tests and two unchanged 120-second ownership timeouts: “refuses unauthorized Doctor admission before staging a public snapshot” and “allows read-only access without the external marker” (2032.23s wrapper). They remain unresolved, not proven pure host-load failures or inherited regressions, and no passing replay is claimed to fix them. The one-time full changed-file check passed its initial guards, 18-file format, production types and 12 core test graphs before its orphaned owner was stopped ahead of the necessary conflict rebase (exit 143, partial proof). No full changed-check pass is claimed. The older proof below is historical evidence for the original cut, not current-head CI.

Local focused proof covers reader snapshots/queueing/settlement, worker error round trips/redaction/unknown outcomes, validation receipts and worker admission, ownership inspection, profile identities, native snapshot cleanup, session mutation boundaries and the shared retained-operation mapper. The previously failing worker-admission and ownership files pass together after integrating the already-landed main fix 21a1699fbce: 53 tests, 143.66s Vitest / 217.73s wrapper. The other 13 focused files passed unchanged.

The new encoder privacy regression fails on the original encoder with private metadata escaped encoder and passes on the candidate. Independent P2 reviews of both the substantive cut and final cleanup are scoped-clean. Runtime and static import graphs both have zero cycles; final exact-head lint-suppression tests pass 3/3 (67.79s wrapper). The two changed test files pass --maxWorkers=1: 78 tests, 164.65s Vitest / 206.52s wall, dominated by transform/setup rather than test bodies. Production typechecking and all 28 affected core test type graphs pass. The changed-check run then identified three unused predicates; those are removed, and all three dead-export scans pass. Final cleanup-focused error/redaction tests pass; final lint and format pass across all 18 changed files. Native schema-version, media helper, sidecar loader, webhook body-order and both pairing-auth guards pass. The broad local database-first scan was stopped after roughly ten minutes without a result; no complete check:changed pass is claimed.

Exact-head CI 38222788391 tested merge 035938943b5de15a757e2b2bfd47690ca99abe5c onto ccb7b5f7e5de8e0e6c3bd20030c902d2134e9a15. The fresh exact-head check census is fully terminal. The originating failure is checks-node-compact-small-2: the type-suppression inventory expected 18 entries and received 19 from untouched scripts/lib/managed-cleanup-handoff.mts. It reproduces on clean main 830b3ea72da; main corrected that inventory in 64f11ced232. The failed openclaw/ci-gate is its downstream aggregate.

Three cancelled jobs logged additional failures, all reproduced independently on clean main 830b3ea72da, with none of the failing owners/tests changed by this PR: checks-node-changed-compact-large-2-1 / sessions-rewind.test.ts / “returns editor text for rewind and a new key for fork” (one expected upstream-link read, two observed); checks-node-changed-compact-large-14-1 / worker-turn-detached-context.test.ts / “rejects a missing or removed canonical user admission” at after-snapshot and model-resolution (two failures); and checks-node-changed-compact-small-13 / attempt-transcript-lifecycle-prepare.test.ts / “uses a stale-version postimage once without replaying a durable append (incognito=false)” (actor version changed before command admission). Passing replays are not claimed to fix any failure.

Main subsequently corrected the obsolete stale-actor expectation in 0655ff941f8; this PR does not claim that repair. Fail-fast cancelled 59 jobs; their missing coverage is not counted as passing. Five static jobs now have complete coverage through archived successful steps and local ratchet/Kysely/source-contract completion. The final source-contract tail passed SQLite transaction boundary (263.52s), transcript-reader boundary (4.60s), and session-schema baseline (1.03s), on the exact CI merge with physically owned dependencies and isolated state. There are 32 archived successful Node plans; the first two missing Gateway plans and one serial warm-cache investigation exhausted unchanged native silence budgets without assertion totals under shared-host saturation. A local UI replay completed 65 tests in five files before being explicitly interrupted; no whole UI shard pass is claimed. Native artifact building passed runtime compilation, 96 plugin distributions, bootstrap imports, 54 native module loads and post-build processing, then refused a borrowed compiler outside the proof checkout. A standard Blacksmith Testbox cancellation-recovery request reported a queue and was stopped under the immediate-allocation policy; it produced no remote test proof. The coordinator explicitly accepted the remaining Node, UI, declaration and static gaps for this exact-head landing, with hourly main CI as backstop. No CI rerun, unchanged repush, or branch update has been requested.

An earlier ownership/Doctor attempt timed out and produced cascading fixture-handle failures. Subsequent full ownership replays passed on clean main and on the original candidate, but the requested one-time run above again timed out in Doctor and read-only ownership. No fix or inherited-regression claim is made. No test timeouts, retries, skips, suppressions or retained-behavior assertions were weakened. Test/build payloads used isolated HOME, OpenClaw and XDG directories; no operator-state inspection or recovery was performed.

Largest-first provenance coverage

The lane ledger covers lifecycle, validation cache, lease, admission, worker owner, async lifecycle, reader transport, state lease/heartbeat, profiles, credential/consent publication and registry listing. Large retained mechanisms have concrete provenance: #166867 restart admission, #111678/#138693 deletion safety, #152341 idle WAL release, #157273 Doctor recursion, #167662 writer/reader deadlocks, #153508/#154477 revoked authority, #134970 personal credentials, #168094 unknown write outcomes, #158595 consent at push effects, and #169249/#166860 registry publication failures. Their authority and settlement machinery is retained.

The standalone session memory backend (Phase E, #169124/#169227/#169327, restored after #169621) is an explicit maintainer-decided KEEP. Its implementation, factory branch, registry, expiry, federation machinery and tests are untouched.

The private payload cutover includes only the caller DTOs/signatures needed to replace unknown holes. The two generic resource adapters explicitly document the matching SQLite encoder; no broad native transport generic framework or fake validation predicate was added.

@clawsweeper

clawsweeper Bot commented Oct 12, 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.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: 9bed8637423a97534be94605e28b3aefc1181fc5

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XL labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates private state-reader command capture, cleanup adaptation, error typing, payload retention, and schema checks.

Example: A state query fails and forced worker retirement also fails.

  • Before: The error aggregate additionally reconstructs the native-cleanup diagnostic.
  • After: The query and retirement failures remain visible, while failed cleanup retains custody without the extra nested diagnostic.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused simplification with supporting owner tests and no concrete finding; supplied evidence does not demonstrate the changed path through a shipped entry point.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored internal refactor is outside the ordinary contributor proof gate; reported owner and native tests support validation, while inspected navigation images do not exercise the changed state-reader path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: Maintainer-approved removal of duplicate private infrastructure reduces maintenance cost without adding public capabilities or configuration.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-directed simplification has distinct remaining value, and inspection found no actionable introduced defect.

Priority: P3
Reviewed head: 9bed8637423a97534be94605e28b3aefc1181fc5

Before merge

  • Complete next step - Classify the current catalog-readiness and session-resume failures using an independent base reproduction or head-versus-revert comparison, then repair any diff-caused failure or document the applicable landing exception.

Findings

None.

Agent review details

How this fits together

Gateway callers submit captured state-read commands to retained SQLite workers and receive results or typed errors after cleanup settlement.

flowchart TD
  A[Gateway callers] --> B[Captured read command]
  B --> C[Snapshot and admission owners]
  C --> D[SQLite read worker]
  D --> E[Result and error hydration]
  D --> F[Retained cleanup owner]
  F --> E
  E --> A
Loading

Technical review

Best possible solution:

Land the private-owner simplification after current CI failures are attributed and the enforced landing gate is satisfied.

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

This is an authorized refactor rather than a reported product bug; source inspection verified the affected contracts without executing target code.

Is this the best way to solve the issue?

The change uses existing owners, preserves authority and retirement checks, and documents its accepted diagnostic tradeoff.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 37064938ac97.

Provenance checked

  • Command capture and stream options changes intended behavior with a stated reason (e6b3039: Capture variable inputs before asynchronous preparation while retaining bounded worker admission; later streaming work enforced an exclusive consumer.)
  • Reader cleanup adaptation and diagnostics changes intended behavior with a stated reason (9c93bc3: Retain snapshot and native cleanup custody through worker failures; the PR preserves custody and explicitly accepts removing extra simultaneous-failure diagnostics.)
  • Private error payload retention and identity types keeps the original intent (3ec01ce: Hydrate shared broker failures using each receiving caller's constructors without rewriting cached rejection objects.)
  • Agent validation receipt reuse keeps the original intent (50d26ab: Reuse native validation through worker transfers while preserving identity and revocation decisions.)
  • GitHub identity schema checks keeps the original intent (1b66d30: Resolve current verified human identity and consent without initializing missing storage.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction and current-main comparison: The introduced diff contains the remaining reader and error-transport simplification; fetched main retains the original behavior in all ten touched paths. (9bed8637423a)
  • Accepted direction and diagnostic tradeoff: The fully retrieved PR body records maintainer-authorized simplification and explicitly accepts dropping simultaneous-failure diagnostic decoration while preserving cleanup ownership. (src/state/openclaw-state-read-worker.ts:333, 9bed8637423a)
  • Canonical release settlement: The existing retained-operation mapper captures asynchronous context, services the original operation, propagates rejection, and removes the task only after successful release. (packages/worker-runtime/src/retained-operation.ts:54, 9bed8637423a)
  • Missing-table behavior remains: The GitHub identity selector returns an empty map when canonical_login is absent; the shared column helper also handles an absent table, preserving the removed outer checks. (src/state/user-profile-github-identity.ts:51, 9bed8637423a)
  • Caller-local error identity preserved: The process-global WeakMap retains private payloads across module reloads, and hydration still constructs each caller's errors independently, preserving the contract established by fix(sqlite): preserve worker error identity for each caller #146741. (src/state/openclaw-state-worker-error.ts:205, 9bed8637423a)
  • Current-head CI failures: Annotations confirm five catalog-readiness failures in client-create-authority.test.ts and six failures in server.sessions-send-resume.test.ts, comprising admission assertions and timeouts; the CI gate fails downstream. No independent base reproduction establishes their attribution. (9bed8637423a)

Likely related people:

  • Peter Steinberger: Raw commit e6b3039 adds src/state/openclaw-state-read-worker.ts:150 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e6b30393d3b3; files: src/state/openclaw-state-read-worker.ts)

PR surface

Source -337, Tests -2. Total -339 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 67 404 -337
Tests 2 33 35 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 100 439 -339

Review metrics

Metric Value Why it matters
Production versus test LOC Production +67/-404; tests +33/-35 The reduction removes duplicate private mechanisms while retaining their canonical owners.

Labels

Label changes:

  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P3: Internal maintenance with no intended normal user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (6 earlier review cycles)
  • reviewed 2026-10-12T08:25:29.241Z sha 4755f08 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T08:41:31.982Z sha 4755f08 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T09:16:10.507Z sha 4755f08 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-12T09:53:25.461Z sha 4755f08 :: needs changes before merge. :: none
  • reviewed 2026-10-12T10:16:40.840Z sha 4755f08 :: needs changes before merge. :: none
  • reviewed 2026-10-12T11:07:06.517Z sha 9bed863 :: needs maintainer review before merge. :: none

Reviewed October 12, 2026, 7:26 AM ET / 11:26 UTC (Revision 7).

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@steipete
steipete force-pushed the deslop/p15-state-pr3-20261012 branch from 4755f08 to 9bed863 Compare October 12, 2026 10:59
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed agents Agent runtime and tooling size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@steipete

steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head landing evidence for 9bed8637423a97534be94605e28b3aefc1181fc5.

CI 38239731304, attempt 1, tested merge 1850024a8bfdd4dc979e577c835ae3e99a3fdd15, with ordered parents baseline main 3e3a9a87e58be5b8d291d7bf448e1b7e8f7ba947 and this exact PR head. All83 CI jobs are terminal:56 success,3 failure,24 conditional skips, zero cancelled CI jobs. Security-fast, build artifacts, source contracts, types, lint and selected UI proof succeeded. The final complete head census has165 checks, with only three new non-CI metadata automation checks running after the body/comment update (auto-response, PR context and evidence, dispatch). Three older cancelled non-CI automation checks are not product-suite proof. No CI run was requested by these metadata writes.

Every failed job is accounted for:

Job Observed failure Independent main reproduction
checks-node-changed-compact-large-24-1 / 114779653617 Five client-create-authority.test.ts cases: changed missing/idless entry; foreign profile role/display after publication; owner role after preparation. All throw “User profile catalog is not ready.” Clean published main 37064938ac97bc56e6723305f8f6eb4eafe20505, same five cases/signature. The Talk helper lacks the resident-catalog prerequisite after main's #169799 role-policy cutover. Tests/helper and determining catalog/authorization owners are byte-identical between baseline, tested merge and reproduced main.
checks-node-changed-compact-small-19 / 114779653632 Six server.sessions-send-resume.test.ts cases: revoked-parent, aborted-successor and revoked-parent-after-stop preparation waits time out at unchanged 120s; cancelled-successor and explicit/automatic write-only resume return error rather than accepted. The latter two report “Session communication state changed before admission.” The same six failures/signatures on clean published main 37064938ac9; test and communication-authority owner are unchanged. No deadline, retry, skip, assertion or authority check was weakened.
openclaw/ci-gate / 114784212080 Downstream aggregate. Gate log names the failed Node family; it introduces no independent assertion.

The hosted failure-classification table called both roots unknown, because scheduled main had no matching job. The independent main reproductions above, not that table or merely untouched filenames, establish inheritance. The original broad two-file replay was interrupted after passing unrelated cases and is partial proof, not a pass. Test-name selection then narrowed attribution to the eleven failed cases with their order, assertions and deadlines unchanged; it adds no committed test skips.

Proof gap accepted (coordinator)

The coordinator accepted the original head 4755f085f518de70c7167b6c1076cf7b0ef17aeb's unrun fail-fast coverage after Testbox queued/stopped and the shared Mac saturated. Historical CI38222788391 had59 cancelled jobs. Missing proof comprised remaining Node plans, complete UI/browser shards, declaration/SDK/UI build tails and unfinished static graphs. Four inherited roots independently reproduced on clean main 830b3ea72dab162ae689f850448ff62073b0b590: suppression inventory (expected18/received19, fixed64f11ced232), rewind SQL count (expected1/received2), both detached-context admission assertions, and stale actor-version expectation (fixed0655ff941f8). Those original failures and gaps are historical, not current-head qualification. Hourly main CI is the broad backstop; red main is fixed forward. The current head was published solely because GitHub reported a real conflict with overlapping main #169648, not to obtain green.

The requested one-time original-head local run completed239 passing tests and two unchanged120s ownership timeouts: “refuses unauthorized Doctor admission before staging a public snapshot” and “allows read-only access without the external marker” (2032.23s wrapper). They remain unresolved, not proven pure host load, inherited or fixed by passing replays. The full changed check passed initial guards,18-file format, production types and12core test graphs before its verified orphaned owner was stopped for required conflict repair, exit143. No full changed-check pass is claimed.

Current production candidate proof: 149/149 focused tests across eight files,874.84s wrapper; exact9bed production/state-logging/infra type graphs pass after an isolated frozen install; final ten-file lint/format pass with zero warnings/errors; runtime/static cycles0/0; suppressions3/3,84.87s. Fresh P2 review had two concerns declined against source: failedHealth supports no callback input, and the canonical GitHub selector already handles absent storage. This review is not described as scoped-clean; earlier scoped-clean reviews remain historical.

The restored PhaseE caller's stale import initially blocked main replay setup. Another owner independently published the identical compatible cutover in main 37064938ac9; our stale-info main push was rejected without a write and its duplicate local commit dropped. Unchanged memory-report tests pass3/3,344.80s, with production types/lint/suppressions and independent scoped-clean review. The standalone backend, factory, registry, expiry, federation machinery and tests remain intact.

Test/build payloads used task-owned HOME/OpenClaw/XDG/temp paths. No real operator-state inspection or recovery occurred. No task-owned remote lease remains. No CI rerun, unchanged repush, timeout/retry/skip/suppression change was used.

Remaining production delta: +67/-404 =337 lines removed, plus2 net test lines removed across10files. The original596-line cut overlapped removals independently landed in #169648; these are not counted twice. Native admin admission stays pinned to exact9bed and retains the individual inherited-failure evidence above.

@steipete

Copy link
Copy Markdown
Contributor Author

Landing via the inherited-red admin exception at exact head 9bed863.

  • checks-node-changed-compact-large-24-1 (five Talk catalog failures) and checks-node-changed-compact-small-19 (six resume failures) were reproduced on clean main; this PR does not touch those areas.
  • openclaw/ci-gate failed only because of those two shards.
  • The failed auto-response and PR context runs were superseded by later successful runs on body edits.
  • Focused proof on this head: 149 tests, types, lint/format, cycles, and suppressions passed.
  • The native scripts/pr admin admission failed three times on GitHub check-suite HTTP 502 errors before merge intent, so this merge is submitted directly with the same exact-head pin.

@steipete
steipete merged commit 22e89d9 into main Oct 12, 2026
165 of 172 checks passed
@steipete
steipete deleted the deslop/p15-state-pr3-20261012 branch October 12, 2026 12:11
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…w#169754)

* refactor(state): simplify private reader and error transport

* refactor(state): retire unused private error predicates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant