Skip to content

improve(backup): omit Codex diagnostics from restart checkpoints - #190823

Merged
roboclaw-bot merged 10 commits into
mainfrom
openclaw/native-codex-companion-20261102
Nov 5, 2026
Merged

roboclaw-bot merged 10 commits into
mainfrom
openclaw/native-codex-companion-20261102

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Current-head CI repair — 2026-11-05

Head e1829e4211e124ff7f8d6dc606344ec8edd3077e preserves the cache/backup/renderer work below and repairs a stream-follow coalescing defect discovered while investigating the Activity CI assertion. This section supersedes earlier current-head status summaries; historical failures remain evidence, not passing results.

  • Original CI: run 41975853878 finished with 56 successful and 24 skipped jobs; Activity UI E2E3/7 and the aggregate gate failed. The original landscape assertion observed a 208px bottom gap. The final classifier labels it new (matching main job passed, scope not compared); it is not reclassified as inherited or a renderer crash.
  • Owner defect: another content update can replace a pending animation frame after a delayed native scroll changes the live bottom-distance flag. The replacement then loses the already-admitted follow. Keep that decision alongside the existing frame ID across coalescing; preserve enabled/identity checks, native scrollback behavior and disposal. No new listener, timer, threshold, dependency, layout or public option.
  • Proof: extending the existing helper case with one coalesced update fails on the original source (expected one scroll, got zero), then passes with the repair. Helper plus Update-view consumers: 12/12 pass, 3.069s wrapper. Strengthened real Chromium Activity suite: 4/4 pass across phone, tablet, landscape and desktop, 19.791s wrapper. A separate 4x CPU-throttled diagnostic also passes all four cases, 25.299s wrapper, including initial following before the test manually scrolls. Browsers exit normally.
  • Limits: the first native diagnostic trace observed initial following stall before any user scroll; the old test's manual initial scroll masked it. A subsequent strengthened pre-fix browser attempt passed, so no deterministic browser red/green or exact reproduction of the CI interleaving is claimed. The deterministic owner regression and caller tests prove the repaired coalescing contract; fresh CI must establish the former shard result. The original historical renderer-crash cause remains unknown.
  • Cost/gates: one net production line and two lines added to existing tests; no new cases or fixture framework. Exact two-line allocation, shared scalar unchanged. Official test-line gate passes 6,479,702 / 6,479,702. Targeted supported typecheck, lint, formatting and whitespace pass. The first direct tsgo lookup was unavailable before compilation; the supported repository wrapper completed successfully.
  • Review: complete local autoreview of this four-file delta plus full Activity/Update callers: scoped-clean P0–P2, no findings. Previous Diamond review covers the prior head, not this repair. Fresh exact-head CI and overall Platinum+ remain required before merge. No CI rerun or gate waiver.

Co-authored-by: galiniliev [email protected]


What Problem This Solves

Local-companion restart checkpoints unnecessarily capture Codex’s changing diagnostic SQLite log database and its companions.

User Impact

Local-companion capture omits only the activated Codex plugin’s managed agent-home logs_2.sqlite and -wal/-shm/-journal. Full backups and unrelated same-name files remain unchanged. Codex state, credentials, session rollouts, and other databases remain preserved. Omitted diagnostic history is not recovered; Codex recreates the log store.

Why This Change Was Made

Keep vendor policy in Codex manifest backupResources and add an optional generic local-companion profile selector to the existing planner. No global filename exclusion, extra policy owner, schema/version change, or template-exclusion option is introduced. Native backup safety and source-preservation behavior remain intact.

The native contract was inspected in Codex 8f73cde: codex-rs/state/src/sqlite.rs:29,59-65,146-148,297-310 separates logs from durable databases and recreates missing stores with WAL; codex-rs/state/src/runtime/logs.rs:3-57 records bounded diagnostic/feedback history. OpenClaw’s managed-home owner is extensions/codex/src/app-server/auth-start-options.ts:7-42. Custom external Codex/sqlite homes are intentionally not inferred.

Evidence

  • Standalone head: 379cf56d5cca739bb94ce6678e46847c2edf48fa, directly parented by baseline 4221b02f6e4a08ab0d73646f7e3eb4834f6c8914. Mechanically separated from 1346e4f6f80911f634b77a212aead087089e1143; no dependency on template-option commit 84f84f4e818851746b93a78e0a29bcf5b652bc8d. Eleven files have byte-identical added/deleted lines; the remaining archive-create call only expands the baseline formatting to pass localCompanion.
  • Fresh standalone proof: node scripts/run-vitest.mjs src/infra/backup-local-companion.test.ts src/plugins/manifest-backup-resources.test.ts src/commands/backup-resource-inventory.test.ts --maxWorkers=1 with a unique filesystem cache: 27 passed, three files, 44.74s including compiler preparation. Companion create/verify/restore test 237ms (runner 7.67s); plugin declaration runner 3.04s; inventory runner 1.14s. CI seconds unavailable.
  • Real archive creation, verification, and restore preserve diagnostic source bytes, state/auth/rollout bytes, a similarly named sibling, unrelated same-name database, client credentials, and PostgreSQL anchors while omitting declared diagnostics. Full-archive resource selection retains the diagnostics.
  • Targeted run-tsgo passed for all eight changed TypeScript files and their import closure; run-oxlint passed all eight; formatter check passed eight TypeScript files and two docs; both docs passed MDX validation; Codex manifest JSON parsed and formatter stdin output was byte-identical; git diff --check passed.
  • Reused original red proof: the same companion regression reached real restore and failed because logs_2.sqlite existed instead of returning ENOENT. Reused broader original lane proof: 73 passed, 1 Windows-only skipped, 131.44s. These are original reviewed-lane results, not new-head broad-suite results.
  • Reused canonical autoreview: P0–P3, complete original local candidate against 4221b02f6e4a08ab0d73646f7e3eb4834f6c8914, scoped-clean with no actionable findings. That review included both independent original changes; this separation changes only context and removes the unrelated template change, so no substantive re-review was required. No claim of a new standalone autoreview run.
  • Simplify: one profile conditional in the existing resource planner; no new vendor code in core or duplicate exclusion owner. Production TypeScript +34/-6, manifest +24, tests +72/-3, docs +13, allocation +2. The 69-line test allocation covers one archive/restore regression and independent metadata-profile admission/deduplication contracts.
  • Earlier harness proof used a PostgreSQL discovery fixture. The additional exact-head compiled-CLI proof below uses real PostgreSQL and actual plugin discovery. No real-agent inference, upgrade, Windows or PostgreSQL-disconnection scenario is claimed.

Main integration and refreshed validation

Integrated official main 2777468d26e5f21455b67591a045a40c770aee13 with an ordinary merge, preserving the original Codex head 379cf56d5cca739bb94ce6678e46847c2edf48fa. New head: c5a610763a84ad8e11f42af69e0a7422febb0796.

The two conflicts were additive option forwarding in backup-shared.ts and backup-create.ts. Both localCompanion and excludeWorktreeTemplates remain supported together. Registered template selection still belongs to the native registry, and exclusion precedence still belongs to the existing resource planner. No new policy owner, schema, version, or configuration option was introduced by this integration.

Fresh proof on the exact committed tree:

  • 32 tests passed across four files: combined companion/template archive creation, verification and restore; compiled CLI template/full backup behavior; native resource inventory; manifest admission and deduplication. Runner wall time 71.00s, including worker preparation; shard wall times 29.62s / 1.17s / 3.26s. The existing template CLI case took 5.411s, and the companion case 0.246s. CI seconds for this head are not yet available.
  • Real lower-level planning discovers activated Codex metadata and registered templates together, omits both regenerable resources, and retains nested agent/credential owners. The archive-level test drives both options through real traversal/verification/restore and checks original source bytes. Its PostgreSQL discovery remains the existing explicit synthetic boundary; it is not fresh live-PostgreSQL proof.
  • Two existing cases were extended, with no extra test case or product boot. A separate 36-line allocation accounts exactly for this composition regression coverage; the original 69-line allocation and shared baseline remain unchanged.
  • Targeted commands and infra typecheck leaves, lint, formatting, test-line ratchet, and git diff --check passed.
  • Fresh independent P0–P3 review of the complete candidate against the pinned main base completed scoped-clean, with no actionable findings. The committed tree exactly matches the reviewed tree.

Prior runtime proof remains correctly scoped

The real compiled-CLI/PostgreSQL 17.11 run remains evidence for original head 379cf56d5cca739bb94ce6678e46847c2edf48fa: all eight CLI invocations passed; ordinary full archives retained all four diagnostics, companion archives omitted them, and companion restore preserved durable Codex content, local credential data, and PostgreSQL anchor identity. This was not relabeled as a new-head execution.

The Codex manifest, manifest parser, activated-plugin discovery, PostgreSQL discovery adapter, archive verifier entrypoint, and restore module are byte-unchanged from that run. Incoming main adds template registry/resource plumbing and a template manifest option, plus an equivalent manifest-path expression and a remote-namespace error import relocation. This is not a claim that the whole runtime dependency closure is identical. Fresh combined tests cover the changed option/planning and archive/manifest surfaces. Existing runtime-proof limits remain: synthetic Codex payloads, no live Codex conversation or restored Gateway activation, and no separately severed-PostgreSQL test.

Credits

Requested by @galiniliev; adapted from the release-branch work with native OpenClaw owners. All commits retain Galin’s co-author credit.

Additional runtime evidence

Exact candidate 379cf56d5cca739bb94ce6678e46847c2edf48fa: compiled CLI plus real PostgreSQL 17.11 completed eight CLI invocations, all exit 0, including Doctor, native database port, ordinary full backup, local-companion create, verification, and staged restore. Actual activated Codex manifest discovery omitted logs_2.sqlite and its WAL/SHM/journal companions from the companion archive; the ordinary full archive retained all four.

Restoration preserved Codex state, synthetic credentials and rollout bytes, a similarly named backup and an unrelated same-name file. PostgreSQL anchor/store/namespace, metadata and sentinel data were preserved. One E2E passed; fixture lint passed. Task containers and snapshot were positively confirmed absent. No production change.

Limits: synthetic Codex payloads, not a live Codex conversation. Shared PostgreSQL state was populated; other portable families were selected but unused. Full archive was inspected/verified, not restored. No restored Gateway activation or separately disconnected-PostgreSQL verification.

Captured CLI output

Actual output with only fixture paths redacted; omitted fields marked.

— backup create --local-companion --verify (exit 0)

  "localCompanion": true,
  "verified": true,
... (other fields omitted)
    {
      "kind": "plugin resource",
      "sourcePath": "<state-fixture>/agents/main/agent/codex-home/logs_2.sqlite",
      "displayPath": "$OPENCLAW_HOME/.openclaw/agents/main/agent/codex-home/logs_2.sqlite",
      "reason": "regenerable"
    },
    {
      "kind": "plugin resource",
      "sourcePath": "<state-fixture>/agents/main/agent/codex-home/logs_2.sqlite-journal",
      "displayPath": "$OPENCLAW_HOME/.openclaw/agents/main/agent/codex-home/logs_2.sqlite-journal",
      "reason": "regenerable"
    },
    {
      "kind": "plugin resource",
      "sourcePath": "<state-fixture>/agents/main/agent/codex-home/logs_2.sqlite-shm",
      "displayPath": "$OPENCLAW_HOME/.openclaw/agents/main/agent/codex-home/logs_2.sqlite-shm",
      "reason": "regenerable"
    },
    {
      "kind": "plugin resource",
      "sourcePath": "<state-fixture>/agents/main/agent/codex-home/logs_2.sqlite-wal",
      "displayPath": "$OPENCLAW_HOME/.openclaw/agents/main/agent/codex-home/logs_2.sqlite-wal",
      "reason": "regenerable"
    },

Investigated UI CI failure and bounded replay

The original UI E2E failure remains unresolved: Chromium reported keyboard.press: Target crashed in new-session-page.responsive-welcome.e2e.test.ts:165, “keeps phone setup compact with 2 agents.” The job displayed 5/7, but its recorded command executed shard 5/6 with four workers. Its executed merge was acc670a76cf53736398652c6314380472de9427a (main parent 419d0c53118045c5a48e80c6743454f2726c67fd, this PR head c5a610763a84ad8e11f42af69e0a7422febb0796). Retained original artifacts contained only progress metadata, not a renderer crash dump. Zero recorded cgroup OOM events do not identify another cause.

After the earlier four-file Node 26 replay passed, a bounded full historical-shard diagnostic replay on November 3 used Node 24.22.1, pinned pnpm 12.15.0 / Vitest 5.0.5 / Playwright 1.64.1 / Chromium 156.0.8078.4, four actual CPUs, and the native sequencer's exact 138 original project/file members from 834 include patterns. Historical application/test inputs and assertions were preserved; a reviewed task-only context-lifecycle/CDP observer overlay was added.

  • 138 files and 537 tests passed, zero unhandled errors, 467.59s. The former failing two-agent case passed in 5.665s; all seven responsive-welcome cases passed.
  • Verified replay source tree: 65e183652ffd319ad7802d6958ce8166384d87b7; transport carrier: b9442fbd081b934b18bd72e90813a9abb3f5ea9f. These identify the instrumented historical merge, not a new PR commit.
  • The observer armed before application execution, recorded 1,602 target-created and 1,602 target-destroyed events, and recorded zero renderer-crash events. No crash status/error code exists to infer. The flush barrier completed; observer and browser exited 0; the journal closed.
  • Test, payload and wrapper exits were 0. Artifacts were downloaded and hash-verified before exact lease teardown; final remote settlement is complete. The backing Actions run's cancellation is normal one-shot Testbox cleanup, not the test result.
  • Retained private evidence archive SHA-256: 10ab66b6143954501e591e132a9a11017963561203e8dab0780145b73c6ae2e9; 40-file evidence manifest SHA-256: ba49cfb5ecfc3fc9448ee1b38be8dd4fac5818a5fc4e64ad420e7647b15097fe.

Interpretation: the original renderer failure was not reproduced, not fixed or classified as infrastructure/inherited. Original cache contents, concurrent interleaving, cgroup scope and the diagnostic overlay differ. This replay does not replace current-head PR CI or clear its failed gate. No product repair, CI rerun, weakened assertion, timeout extension or repeated replay is claimed.

Native renderer diagnostics — requested follow-up

Diagnostic commit: 28909ec0e209c8242d14e6b225ae6de3ff82a39c, parent c5a610763a84ad8e11f42af69e0a7422febb0796, with Galin’s co-author credit.

The original renderer crash still has no attributable native cause. This follow-up adds the missing evidence for a future occurrence; it does not claim to repair that crash or authorize rerunning its old CI job.

The existing invocation-owned shared Chromium setup now arms one browser-level Target.targetCrashed observer before lending its endpoint to tests. It captures at most 32 timestamp/target/status/error-code records through the existing failure-*/failure.public.json artifact upload path, with a numeric overflow count. It includes no page URLs, titles, content, or connection endpoints. Artifact publication happens when the native event arrives, without evaluating the dead page, retrying a test, or relaunching Chromium. Existing browser ownership closes the observer.

Focused evidence

  • Real Chromium through the actual global setup: native termination capture, target-ID match, public-data exclusions, surviving sibling-page evaluation, and normal shared-browser shutdown passed. A subsequent connection to the closed endpoint was rejected.
  • The identical native capture oracle against the original c5a61076 setup failed because the crash-artifact directory was absent, after the real native crash event and normal browser shutdown. This is the red/green diagnostic contract, not reproduction of the historical CI failure.
  • Captured fixed-run output (only the private artifact path omitted):
[ui-e2e] Chromium target crashed {"at":"2026-11-04T13:13:27.211Z","targetId":"FBF65150C2DC91F0833EC8C251DAB271","status":"crashed","errorCode":133}
NATIVE_CRASH_CAPTURE_PASS {"kind":"chromium-target-crashes","crashes":[{"at":"2026-11-04T13:13:27.211Z","targetId":"FBF65150C2DC91F0833EC8C251DAB271","status":"crashed","errorCode":133}],"dropped":0}
[ui-e2e] Chromium exited (code=0, signal=null)
SHARED_BROWSER_SHUTDOWN_PASS
  • Targeted TypeScript, lint, formatting and whitespace checks passed.
  • The existing shared-browser regression adds 30 justified lines with a matching separate allocation, retaining prior assertions, cleanup ownership and deadlines. The crash trigger waits for the actual page-crash event, closes that target and settles its raw CDP command, which otherwise can remain pending. The one-shot nested projects disable persistent filesystem module caching: installed Vitest's server cache reader returns a Buffer where Vite's source-map reader requires text. No dependency bytes or repository-wide cache settings changed.
  • Final canonical autoreview of the complete local diagnostic delta against c5a61076 completed scoped-clean P0–P2, with no actionable findings, including crash-command settlement and the scoped cache setting. It is a code review, not another runtime execution; unchanged context was unavailable in that final bundle. The earlier independent full-source review separately covered the setup, artifact-directory owner, regression and allocation with no consequential findings. Local ClawSweeper was unavailable because its checkout held unrelated changes; this uses the documented autoreview-plus-hosted-review route.
  • The complete shared-browser regression passes after the fixture-only cache correction: 1 test passed, pinned-Bun test time 5.766s, runner wall time 7.00s; supported Node control 1 passed, test time 13.790s, runner wall time 17.93s. The generated projects exercise the real shared setup, native renderer crash, private-data exclusion, sibling survival, custom launch options, next-project reuse and eventual shutdown. Command: node scripts/run-vitest.mjs --config <focused-node-config> ui/src/test-helpers/control-ui-e2e-browser-lifetime.test.ts --maxWorkers=1 (Node control also sets OPENCLAW_VITEST_RUNTIME=node). The focused config selects the existing test with isolated forks and unchanged test/hook deadlines. The earlier cache startup failures and outer-budget interruptions remain historical failed/incomplete attempts, not passes. New-head broad CI is still required; historical renderer cause remains unknown.
  • Simplification: the invocation's existing browser owner also owns the single diagnostic connection; publication reuses the existing artifact-directory/upload owner. No new runtime manager, retry, page-content capture or CI workflow. Incremental setup delta +73/-3; regression +30/-0.

Approved Vitest cache repair

The cache-enabled UI startup failure is separate from the historical renderer crash. Vitest 5.0.5's server module runner read a cached source file as a Buffer and supplied it as Vite's code; stack/source-map processing calls code.charCodeAt and requires text. The approved one-line repair uses readFile(result.tmp, "utf-8") in the existing dependency patch. pnpm's patch workflow regenerated the patch and lockfile binding without dependency-version changes. Its generated lockfile also normalizes existing optional metadata for escape-string-regexp 4.0.0.

The temporary --no-fsModuleCache workaround is removed. The existing native shared-browser regression now explicitly enables filesystem caching. No assertions, crash trigger, cleanup owner, browser flags or deadlines were weakened, and the exact test-line allocation shrinks by two lines.

  • Before repair, the cache-enabled regression fails at startup with TypeError: code.charCodeAt is not a function, exit 1; owned Chromium closes normally.
  • After repair, pinned Bun passes the complete regression: 1/1, 2.37s runner. Supported Node with explicit cache enabled passes 1/1, 2.09s runner. This covers the actual global setup, native renderer crash artifact/privacy, sibling survival, custom launch, next-project reuse and shutdown.
  • Targeted typecheck, lint, formatter and approved package-patch guard pass. The patch guard uses the repository's tsx preload; a preliminary bare-Node invocation failed module-alias resolution before the guard ran.
  • Fresh canonical isolated autoreview on the cache delta: scoped-clean P0–P2, zero findings, exit 0. The reviewer inspected the change with the real global setup and native shutdown helper as context; test execution and generated hash verification are parent-owned evidence. Local ClawSweeper remains unavailable because its checkout contains unrelated work.

The original renderer-crash cause remains unknown. Existing earlier runs retain their original scope and outcome; these results prove the separately reproduced cached-source startup fix.

Integrated CI repairs and smaller manifest coverage

Local integrated candidate 42a360417abfa023ff1d47f841c2a6f998b7ba86 (tree 9d9fcc1f7ef9488c2b9e13148adf2ded0a790d0e) combines reviewed cache repair 64e1fd4ba682999793b1ceff77863dc47a8b236f with main 77c263b9fa112ce0e1657f6cbf56016092cd1077, without merge conflicts. Main includes the attributed UI permission-fixture repair in #192822. The commit tree matches the reviewed candidate, and Galin’s credit is preserved.

Fresh integrated checks:

  • The three previously failing UI unit modules pass 38/38; Vitest 19.17s.
  • Complete shared-browser resource-ownership module passes 15/15; Vitest 75.73s, wrapper 87.13s. Its new-main clipboard scheduling case is retained.
  • Manifest consolidation plus companion archive/database and inventory privacy checks pass 27/27 across four files and three runner configurations; wrapper 99.73s, including a 75.784s cold worker build. The manifest module is 23/23, 3.12s Vitest. This is not a full-archive CLI or Gateway-authentication run.
  • Targeted manifest typecheck, lint, formatting and final source review pass. Canonical isolated autoreview of the complete main-relative candidate is scoped-clean P0–P2, zero findings, exit0. The reviewer assessed supplied source/execution evidence, not an independent execution.

The standalone profile-identity test is folded into existing activated-owner and disabled-plugin cases. Enabled expectations retain identical-path unprofiled and companion-only resources plus duplicate filtering; disabled expectations retain the original durable non-database resource and both regenerable profile variants, while requiring database-only output. Invalid-profile and profile-limited-durable rejection rows stay intact. This removes one case, one fixture tree, two inventory resolutions and three formatted test lines; the corresponding allocation shrinks 69→66. No new helper or production seam is introduced. Existing archive/verify/restore, source preservation, vendor scoping, and both planner/sealed-inventory privacy cases remain.

The independent seven-line shared inventory cleanup landed as #192946, commit d755a99495e79c0b98ae1ad612511889097b259f, with green exact-head CI and Platinum review. It preserves all 15 ownership cases and changes no scalar ceiling or allocations.

Supporting-cleanup integration and validation

Intermediate published candidate: b99bcba5cb7260d0c72df7bd895ff907f699f4a0, tree ed15c27e1bfa28604ee676c0a649a74364adea2f, an ordinary conflict-free merge of reviewed candidate 42a360417abfa023ff1d47f841c2a6f998b7ba86 with the actual supporting-cleanup landing d755a99495e79c0b98ae1ad612511889097b259f. Galin's co-author credit is preserved.

All 18 substantive candidate files, including the Vitest UTF-8 patch, renderer observer, native crash regression, backup implementation, manifest consolidation and allocations, are byte-identical to the prior independently reviewed candidate. The only changed candidate files are the lockfile and the shared ownership test: the lock preserves the same approved Vitest patch binding while integrating upstream dependency changes; the ownership test preserves the reviewed five-line fake-browser repair while incorporating upstream file membership and the landed seven-line simplification. The existing complete P0–P2 scoped-clean local review is reused for this mechanically integrated patch, not presented as a new review run.

Fresh checks on this exact committed tree, after a successful frozen install:

  • Cache-enabled real Chromium lifetime regression: 1/1 passed, wrapper 5.171s. Native crash artifact/privacy, sibling survival, shared/custom launches, next-project reuse and shutdown remain covered.
  • Complete shared-browser resource-ownership suite: 15/15 passed, wrapper 20.143s.
  • Companion archive/verify/restore, inventory privacy and manifest admission/consolidation: 26/26 passed across three files and three native configurations, wrapper 54.945s, including 35.911s worker preparation. Manifest cases: 23/23. This rerun also covers the incoming main filesystem dependency update; it is not a new compiled-CLI/PostgreSQL or Gateway-authentication claim.
  • Focused ownership typecheck, type-aware lint, formatting and PR-relative whitespace checks passed. A preliminary whole-integration whitespace check encountered unchanged context lines in main's Matrix dependency patch; the PR-relative diff is clean.

Initial inherited failure before upstream reconciliation. The official staged check against exact landed main d755a994 reports:

Test lines: 6479393; ceiling: 6479276; over by: 117; net delta: +135.

This PR adds 135 real test lines and exactly 135 allocation credit. Subtracting those unchanged amounts gives the integrated main baseline 6,479,258 / 6,479,141, already 117 over. A first-parent audit from the earlier 77c263b9 base reconciles the original seven-line deficit plus 110 net uncredited lines from subsequent main changes, including this supporting cleanup's seven-line reduction. No allocation inflation, shared ceiling increase, CI rerun or inherited-failure waiver is claimed. Fresh current-head CI and overall Platinum-or-higher review are still required before landing.

The original Chromium renderer-crash cause remains unknown; the new diagnostics and separately reproduced cache fix do not relabel that historical failure.

Earlier upstream reconciliation (retained failure evidence)

Previous published head: 420101e4b518f2e64e4573c56e79e36c8405ed7e, tree 86eb9a3637b4773df028170e85126d9bcea4a5a0. This ordinary merge integrates main f21943152ad460bc2df25c3a518a8d999f087b93, including the independently approved +93 baseline reconciliation #193183 and the CI guard-fixture import repair #193170. These are canonical upstream changes; this PR introduces no additional shared-baseline change relative to its integrated main base.

Every one of this PR's 20 changed-file blobs is identical to the validated b99bcba5 candidate. The preceding 42 passing focused tests, type/lint/format results and patch-equivalent independent review remain correctly attributed to that candidate; no extra browser or archive rerun was needed for the upstream metadata/test-fixture integration. Galin's credit is preserved, and the final PR-relative whitespace check passes.

The exact staged test-line check against this new main base still fails, now by 23 inherited lines:

Test lines: 6479393; ceiling: 6479370; over by: 23; net delta: +135.

This PR's 135 added lines remain fully allocated. The integrated main baseline is therefore 6,479,258 / 6,479,235. The +93 upstream reconciliation reduced the earlier deficit; it did not account for every subsequent main addition. No extra credit, checker suppression, CI retry or merge waiver is requested or claimed. Fresh exact-head CI and overall Platinum-or-higher review must pass before landing. The intermediate b99bcba5 publication and its CI are superseded by this actual named-gate repair, not relabeled as final-head proof.

Current head: inherited budget deficit resolved

Current head: 7e82b8fe578c64306ba3e05c9565e80d7a665427, tree dd6857ceee5328a63a76362c085bb50c9e88091f. This conflict-free merge incorporates official main 94bea34ae991963c705f279728c9b879fbc3f3b6, including the landed reconciliation in #188338. The integration addresses the named failing test-line gate; it is not a refresh solely because main advanced. This PR introduces no shared-baseline change relative to that canonical main base, and all three existing allocations remain unchanged. Galin's co-author credit is preserved.

The preceding head 420101e4 received overall/proof/patch Diamond (5/6), no findings. Its actual CI baseline-ratchet job 127066007141 failed only the test-line check: 6,479,390 / 6,479,370, over by 20, net delta +135. CI used base 26b76ecd, whose intervening three-line reduction explains the difference from the earlier local 23-line deficit. All three UI unit shards and all six instantiated UI E2E shards passed on that head. The failed run and its original diagnostics are retained; it is not relabeled as successful new-head CI.

All 20 PR-relative file blobs, including the approved Vitest patch, lockfile, browser observer/regression, backup owners, manifest tests, and allocations, are byte-identical to reviewed 420101e4. Dependency manifests are unchanged. Existing scoped-clean independent source review and targeted type/lint/format evidence are reused with their original attribution; no new local review or static-check execution is claimed. The incoming main worker-fixture import-closure change was inspected, and its compiled worker artifacts were rebuilt for the checks below.

Fresh checks on the exact committed tree:

  • Official staged test-line check against exact main 94bea34a: PASS — Test lines OK: 6479700; ceiling: 6479700; slack: 0. The 135 own added lines remain fully allocated. Main alone is 6,479,565 / 6,479,565; inherited debt is cleared at this pin.
  • Cache-enabled real Chromium lifetime regression: 1/1 passed, wrapper 3.455s. Native crash capture/privacy, sibling survival and owner shutdown remain covered.
  • Companion archive/verify/restore, inventory privacy and manifest profile admission: 26/26 passed, wrapper 52.789s, including 35.044s worker preparation. No new compiled-CLI/PostgreSQL or restored Gateway proof is claimed.
  • Updated package-root import-closure/parity/packaging tooling: 3/3 passed, wrapper 2.262s.
  • PR-relative whitespace check passed with only Git's space-before-tab diagnostic excluded for the required unified-diff context prefixes inside the unchanged generated Vitest patch. The initial unadjusted diagnostic is retained; the patch itself was not reformatted or altered.

30 focused tests passed. Fresh exact-head CI and overall Platinum-or-higher hosted review remain required before landing. No CI rerun, gate waiver, allocation inflation, or additional test removal was used. The original Chromium renderer-crash cause remains unknown.

Current-head CI follow-up — 2026-11-05 06:05 UTC

Head 7e82b8fe578c64306ba3e05c9565e80d7a665427 received a Diamond (5/6) hosted review with no findings. The exact-head baseline-ratchet job now passes. CI is not green: UI E2E shard 3/7 reports one failure among 578 cases: activity-auto-follow.e2e.test.ts:89, landscape 932 × 430, expected bottom gap <2 pixels but observed 208 after appending four activity entries. The other 577 cases passed.

The original public failure artifact records an assertion failure, connected browser/Gateway, successful route readiness and renderer read, no crash/close/disconnect, and no retained browser errors. Chromium exited normally with code 0. This is not evidence of a renderer crash or a recurrence of the cached-source decoding failure.

One bounded, unmodified local reproduction at this exact head ran the existing four Activity viewport cases in declaration order:

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/activity-auto-follow.e2e.test.ts
4/4 passed; wrapper exit 0; 23.553 seconds; Chromium exit 0

This did not reproduce the original 143-file/concurrent CI shard and does not prove a repair or baseline attribution. The actual CI synthetic merge was 04f360cf1355d8373c4a09060277fd5cfcde6441, based on 57382781c4c0620e672644f2a187163f79ec67db; its two additional upstream commits change macOS signing and Gateway test helpers, not the Activity implementation, test, or browser harness. Inspection of the scroll owner and its callers has not established the failure cause. No assertions, deadlines, retries, source files, or dependency settings were changed. The original failure remains unresolved; remaining CI jobs must finish and green exact-head CI is still required before landing.

Keep full archives and durable native data unchanged through profile-scoped plugin resource metadata.

Co-authored-by: galiniliev <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 2, 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 commands Command implementations extensions: codex size: S labels Nov 2, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 2, 2026 03:19
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR omits managed Codex diagnostics from restart checkpoints and adds Chromium crash diagnostics, a Vitest cache repair, and stream-follow coalescing.

Example: Run openclaw backup create --local-companion --verify with the Codex plugin activated.

  • Before: The checkpoint includes agents/main/agent/codex-home/logs_2.sqlite and its SQLite companions.
  • After: The checkpoint omits those diagnostic files while preserving Codex state, credentials, and rollouts; ordinary full backups retain them.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong production-entry-point backup evidence, focused native browser coverage, and no actionable findings; exact-head broad CI is still pending.
Proof confidence 🦞 diamond lobster (5/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied compiled CLI/PostgreSQL output covers diagnostic omission and durable restore preservation, native Chromium output covers crash capture and shutdown, and the latest coalescing repair has owner red/green plus four-viewport browser coverage without claiming deterministic browser reproduction.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Local restart checkpoints unnecessarily retain changing Codex diagnostic history, while UI CI lacks native crash details and coalesced updates can lose stream following.
Reason: The maintainer-authored direction has clear value and uses existing ownership boundaries; the diagnostic-history tradeoff is explicit and ordinary backups remain available.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: the changes reuse existing owners, preserve ordinary backups, and introduce no actionable correctness or security finding.

Priority: P3
Reviewed head: e1829e4211e124ff7f8d6dc606344ec8edd3077e

Before merge

None.

Findings

None.

Agent review details

How this fits together

Backup creation combines configured ownership and activated plugin metadata into one resource plan consumed by database discovery and archive traversal; the supporting UI changes sit in the existing stream-follow and shared-browser owners.

flowchart TD
  A[Backup CLI options] --> C[Backup resource planner]
  B[Activated plugin manifests] --> C
  C --> D[Database discovery and archive traversal]
  D --> E[Verified checkpoint]
  F[Activity and Update views] --> G[Stream follow owner]
  H[Shared Chromium owner] --> I[Public crash artifact]
Loading

Technical review

Best possible solution:

Retain the profile-scoped manifest policy and focused repairs in their existing owners, then complete normal landing gates.

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

Source inspection confirms the original checkpoint selection and coalescing failure path; supplied evidence includes owner-level red/green, but does not claim deterministic reproduction of the original CI interleaving.

Is this the best way to solve the issue?

The smallest complete approach is the existing planner's profile conditional, plugin-owned filenames, UTF-8 decoding at the cache reader, and retention of the pending frame's follow decision.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the merge-base-to-head diff and separately inspected the latest coalescing delta against the previously reviewed head; the latter adds no listener, timer, threshold, or public option. (ui/src/lib/reactive/stream-auto-follow.ts:20, e1829e4211e1)
  • One backup policy owner: The existing planner applies profile-limited exclusions only for local companions, retains containment and nested durable-owner precedence, and receives the option through both planning boundaries. (src/commands/backup-resource-inventory.ts:176, e1829e4211e1)
  • Authoritative diagnostic-store contract: The PR relies on Codex's storage contract, establishing the dependency-review boundary. Personally inspected the sibling source and fetched the exact cited revision through GitHub: logs_2.sqlite is separate from durable stores, missing databases are created with WAL, and log history is bounded. The cited historical blobs were unavailable locally. (codex-rs/state/src/sqlite.rs:297, 8f73cdee456b)
  • Behavior evidence and accepted tradeoff: The maintainer-authored body records compiled CLI/PostgreSQL 17.11 capture, verification, and staged restore, including diagnostic omission, ordinary-backup retention, and durable-byte preservation; it explicitly accepts losing checkpointed diagnostic history and credits @galiniliev. (extensions/codex/openclaw.plugin.json:23, 379cf56d5cca)
  • Diagnostic privacy and lifecycle: The invocation-owned observer captures bounded timestamp, target ID, status, and error-code records through the existing failure-artifact uploader; it excludes URLs, titles, content, and browser endpoints and closes through existing browser ownership. (test/vitest/vitest.ui-e2e.global-setup.ts:92, e1829e4211e1)
  • Current main still needs the changes: Fetched main retains the original Codex declarations and stream-follow implementation; the central checkpoint exclusion and coalescing repair are not implemented there. (extensions/codex/openclaw.plugin.json:7, f593ed11afc5)

Likely related people:

  • Peter Steinberger: Raw commit 2f17d11 adds src/commands/backup-resource-inventory.ts:145 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2f17d11e9018; files: src/commands/backup-resource-inventory.ts)
  • RoboClaw: Raw commit d9627ec adds src/commands/backup-resource-inventory.ts:132 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d9627ecb437b; files: src/commands/backup-resource-inventory.ts)

PR surface

Source +48, Tests +207, Docs +13, Other +17. Total +285 across 24 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 59 11 +48
Tests 8 237 30 +207
Docs 2 13 0 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 6 27 10 +17
Total 24 336 51 +285

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Public manifest extension 1 optional profile field; 0 new CLI flags The additive local-companion selector preserves unprofiled declarations and ordinary full-backup selection.

Labels

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P3: The central change improves restart-checkpoint selection without blocking ordinary backup or recovery workflows.
  • merge-risk: 🚨 compatibility: This PR extends the public backupResources manifest contract and intentionally changes companion archive contents; the maintainer-authored direction accepts diagnostic-history omission, with full-backup and durable-data controls.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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-11-02T03:36:10.790Z sha 379cf56 :: needs changes before merge. :: [P3] Remove private agent-session boilerplate from the public description
  • reviewed 2026-11-02T06:32:46.109Z sha 379cf56 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-02T09:48:07.580Z sha c5a6107 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-04T13:33:29.247Z sha 28909ec :: needs maintainer review before merge. :: none
  • reviewed 2026-11-05T05:23:17.870Z sha 420101e :: needs maintainer review before merge. :: none
  • reviewed 2026-11-05T05:50:24.658Z sha 7e82b8f :: needs maintainer review before merge. :: none

Reviewed November 5, 2026, 1:35 AM ET / 06:35 UTC (Revision 7).

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 2, 2026
Merge official main 2777468
without rewriting the existing Codex companion commits. Keep both
localCompanion and excludeWorktreeTemplates through the native planner.

Extend two existing cases to prove combined exclusions and preservation
of nested durable owners; allocate exactly 36 additional test lines.
Focused tests: 32 passed. Targeted types, lint, format, test-line ratchet
and fresh independent P0-P3 review passed.

Co-authored-by: galiniliev <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes and removed size: S labels Nov 2, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Nov 4, 2026
roboclaw-bot and others added 3 commits November 4, 2026 15:41
Keep the existing discovery-only Chromium fixture aligned with the shared browser observer. Preserve all ownership and cleanup assertions; allocate its five added test lines.

Co-authored-by: galiniliev <[email protected]>
Keep filesystem caching enabled for the native shared-browser regression.

Co-authored-by: galiniliev <[email protected]>
Integrate main 77c263b for the attributed UI fixture failures. Preserve the reviewed Vitest UTF-8 cache repair and fold the profile-identity case into existing owner coverage, removing one test and three lines with matching allocation shrink.

Co-authored-by: galiniliev <[email protected]>
Merge the verified #192946 landing and current native test ownership. Preserve the independently reviewed cache repair and manifest consolidation. Focused browser, ownership, archive and manifest checks pass; inherited 117-line main budget debt remains explicitly recorded, with no ceiling or allocation inflation.

Co-authored-by: galiniliev <[email protected]>
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: e1829e4211e124ff7f8d6dc606344ec8edd3077e
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These dependency graph changes were made:

Carefully review these changes before merging.

Integrate the landed canonical #193183 baseline reconciliation and #193170 guard-fixture repair for the named inherited CI blockers. Candidate feature, cache, browser and backup blobs remain byte-identical to the validated b99bcba tree; preserve the exact remaining ratchet outcome without a local baseline edit or gate waiver.

Co-authored-by: galiniliev <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Nov 5, 2026
Integrate main 94bea34 to resolve the inherited test-line gate failure through the canonical #188338 reconciliation. Preserve all 20 reviewed renderer, cache, and backup candidate blobs.

Co-authored-by: galiniliev <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Current head: 7e82b8fe578c64306ba3e05c9565e80d7a665427. The landed upstream #188338 reconciliation clears the inherited test-budget deficit: the official exact-base check now passes at 6,479,700 / 6,479,700. All 20 previously reviewed PR-relative blobs are unchanged. Fresh cache-enabled Chromium, archive/manifest/inventory, and updated worker-fixture tooling checks pass (30 tests). The PR body records exact provenance, reused evidence, and the preserved prior CI failure. Please assess this head; fresh CI remains a separate landing gate.

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Keep the admitted follow decision with its pending animation frame so a delayed native scroll cannot cancel following when another update replaces that frame. Extend the existing owner and Activity browser tests without adding cases.

Co-authored-by: galiniliev <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Nov 5, 2026
@roboclaw-bot
roboclaw-bot merged commit aca02bc into main Nov 5, 2026
157 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/native-codex-companion-20261102 branch November 5, 2026 07:05
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

roboclaw-bot added a commit that referenced this pull request Nov 5, 2026
Resolve the pnpm-lock.yaml conflict with main fcac166: main changed
only the vitest patch hash (#190823). The lock was regenerated natively
with pnpm 12.15.0; it adds no new package identities.

Co-authored-by: steipete <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
…nclaw#190823)

* fix(backup): omit Codex diagnostic logs from local companions

Keep full archives and durable native data unchanged through profile-scoped plugin resource metadata.

Co-authored-by: galiniliev <[email protected]>

* test(ui): retain native renderer crash diagnostics

Capture bounded Target.targetCrashed metadata through the shared browser owner and existing public failure artifacts. Exercise native crash capture, privacy, surviving clients and shutdown. Keep temporary nested-project transforms uncached to avoid the installed Vitest Buffer source-map error.

Co-authored-by: galiniliev <[email protected]>

* test(ui): support crash observer in ownership fixture

Keep the existing discovery-only Chromium fixture aligned with the shared browser observer. Preserve all ownership and cleanup assertions; allocate its five added test lines.

Co-authored-by: galiniliev <[email protected]>

* fix(test): decode cached Vitest source as UTF-8

Keep filesystem caching enabled for the native shared-browser regression.

Co-authored-by: galiniliev <[email protected]>

* fix(ui): retain stream following across coalesced updates

Keep the admitted follow decision with its pending animation frame so a delayed native scroll cannot cancel following when another update replaces that frame. Extend the existing owner and Activity browser tests without adding cases.

Co-authored-by: galiniliev <[email protected]>

---------

Co-authored-by: galiniliev <[email protected]>
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 cli CLI command changes commands Command implementations dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: codex merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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