Skip to content

refactor(codex): consolidate internal lifecycle and adapter paths - #166575

Merged
steipete merged 2 commits into
mainfrom
deslop/d11-codex-extension-20261007
Oct 7, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/d11-codex-extension-20261007

Conversation

@steipete

@steipete steipete commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Codex plugin repeats equivalent startup, command, approval, catalog, and projection work across private feature paths, making those paths harder to maintain consistently.

User Impact

Internal refactor only. Features, user-visible text, configuration keys, CLI flags, native protocol fields, persisted shapes, and public SDK exports stay unchanged. No migration or operator action is required. The migration-file edits make no SQLite schema, column, stored-data shape, or migration-version changes; the existing decoders, active-lease checks, conditional updates, and persisted-result comparisons remain.

Why This Change Was Made

Consolidates shared work inside its existing owners while keeping the real lifecycle differences explicit. Startup phases reuse prepared client facts without moving authority checks or fresh reads across awaits. Native child input handling captures its existing registry once instead of forwarding the same context through six methods. Command, approval, inventory, and migration adapters share parsing and projection code; process settlement derives from the authoritative process set.

The file-by-file pass covered 482 production files. This removes 1,423 net production lines from extensions/codex/src (tests, fixtures, test support, generated files, and declarations excluded). Test changes only adapt retired private inputs/imports; existing assertions are unchanged. Two assertion-ratchet entries shrink from one to zero after the corresponding assertions were removed. The environment-name scanner budget shrinks from 464 to 455 because computer-use now derives the same existing environment keys from option names. No lint suppression, timeout, retry, skip, or budget was added.

Evidence

  • Exact-head hosted CI: run 37644026148, attempt 2 completed successfully for 9f91653c9f93c82b591a9cb16fbafb4bdde03bf0: 54 jobs passed, 26 normal workflow skips. The CI, dependency-review, and applicable security-review commit statuses all passed. GitHub server errors briefly blocked publication; a verified close/reopen recovered missing CI attachment. The superseded preflight and cancelled jobs are covered by the completed same-head replacement run, not treated as passing proof themselves.
  • Full Codex directory and lint-suppression guard on the original candidate: 5,359 tests passed across 11 shards, with 11 existing skips, in 1,104.24 seconds. The complete changed-file gate and 296 focused tests also passed on Testbox before main advanced.
  • Current head 9f91653c9f93c82b591a9cb16fbafb4bdde03bf0: production and test typechecks passed; runtime and Madge cycles are 0; all 3 lint-suppression tests passed. Independent review found no actionable P0–P2 findings; the final rebase preserves both reviewed lane patches unchanged. The earlier combined candidate also passed 19 startup-registration, inference-proxy, and lint-suppression tests in 406.21 seconds.
  • Initial CI found a package-target compatibility error from Promise.withResolvers. The fix restores the original explicit Promise construction, without changing the package's library target or dependencies. Local package-artifact preparation exceeded its existing 300-second deadline; hosted package-boundary validation remains required.
  • CI also exposed a startup fixture failure reproduced on unchanged main. That fixture now returns the valid native skills/list envelope, repaired separately on main in 329b2d52c3b. The same three cases went from two failures to all passing, with every assertion, case, ordering, and timeout retained. This main repair is not part of the PR diff.
  • A later CI run exposed the same malformed skills/list success envelope in the separate startup-retry fixture. Unchanged main reproduced the missing-data error in two cases; its contention case hit an initialization timeout first. The fixture-only correction landed separately on main in 9bdad160d806. All 12 existing retry cases then passed in 431.69 seconds, with assertions and timeouts unchanged. All five fail-fast-cancelled jobs passed on the unchanged-head rerun. This main repair is not part of the PR diff.
  • Two local Mac runs of run-attempt-thread-cleanup.test.ts had run-budget/readiness failures (3/17, then 2/17 with different wait failures). Those remain disclosed, not claimed fixed or waived as inherited CI failures. The reset and deadline owners match main; no timeout, retry, skip, or weaker assertion was added. Exact-head hosted CI is required before merge.
  • On the current head, the first local Mac startup-retry run had 7 deadline-related failures and 5 passes (471.71 seconds in Vitest; 519.05 seconds for the combined retry/lint command). It reported no malformed skills-list response. The deadline owners match main, and the fixture helper differs only by the reviewed auth-parameter grouping. Process inspection found no older overlapping lane test; host load averaged 81 on 16 CPUs. This supports investigating host pressure but does not prove the cause. A same-order replay had 4 deadline-related failures and 8 passes (424.76 seconds in Vitest; 494.56 seconds for the combined command), with the lint guard again passing. No source, assertion, timeout, retry, skip, or concurrency setting was changed. These local failures are not claimed fixed or waived as inherited CI failures.
  • Clean AWS proof on the exact current source SHA and tree: 12 startup-retry tests and 3 lint guards passed in 69.07 seconds. Source verification and the test subprocess completed successfully. The wrapper initially exited 7 after a broker receipt error (HTTP 500); native receipt recovery subsequently returned the signed execution receipt with exit code 0 and an untruncated retained log. Native inspection confirmed the lease released and cleanup complete. This does not replace hosted CI or claim the Mac timing issue fixed.
  • Hosted CI initially failed the unchanged resident catalog CPU budget: the absent-title scan measured 5.18 ms/page against the existing 2 ms limit on a 2-CPU AMD runner. The identical catalog code previously measured 1.79 ms/page on a 4-CPU Intel runner. A focused comparison on one local host passed on both current main (f98d079cb9d3, 0.98 ms/page) and this candidate (1.05 ms/page). The failing miss path does not execute the refactored live-field getters; scan/order code is unchanged. This supports host sensitivity but does not prove a root cause or a fix. The full failed shard subsequently passed on this unchanged head through the standard failed-jobs rerun. No source, threshold, assertion, worker setting, or retry setting changed, and this replay is not claimed as a fix. No inherited-failure waiver is claimed.
  • Native-thread schema deep and serialized equality passed. Migration edits retain the same stored shapes, decoders, live-lease checks, conditional writes, and result comparisons. This is isolated contract proof, not a live-provider run. No new test cases or intentional CI workload were added.
Native contract inspection

Personally inspected the corresponding Rust source at public Codex revision 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157. Native calls and response shapes are preserved:

@clawsweeper

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

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 7, 2026
@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 7, 2026, 11:34 AM ET / 15:34 UTC (Revision 5).

ClawSweeper review

What this changes

The Codex plugin consolidates private startup, approval, command, catalog, migration, and process-cleanup paths while preserving their existing interfaces.

Warning

SQLite table change

This PR modifies persisted SQLite tables in extensions/codex/src/migration/apply.ts, extensions/codex/src/migration/session-binding-sidecars.ts, extensions/codex/src/migration/source.ts. Prefer a design that avoids changing persisted SQLite tables. Migration or upgrade compatibility proof is recorded, but maintainers should still confirm that the schema change is necessary.

Merge readiness

⛔ Blocked before merge - 1 item remains

The refactor remains useful and has no identified blocking correctness defect. The previous generic compatibility blocker is unsupported by the inspected changes: existing configuration, stored formats, and authorization checks are preserved.

Priority: P3
Reviewed head: 9f91653c9f93c82b591a9cb16fbafb4bdde03bf0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful private consolidation with substantial reported validation and no identified blocking defect; routine exact-head CI remains the landing gate.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified repository-admin author is exempt from ordinary external-contributor runtime proof. Supplied checks are supplemental rather than live-provider evidence; inspected authority edits preserve existing decisions and effect-boundary checks. Stored-format compatibility is supported by equivalent migration logic with unchanged schemas and serialized shapes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified repository-admin author is exempt from ordinary external-contributor runtime proof. Supplied checks are supplemental rather than live-provider evidence; inspected authority edits preserve existing decisions and effect-boundary checks. Stored-format compatibility is supported by equivalent migration logic with unchanged schemas and serialized shapes.
Evidence reviewed 8 items Pinned introduction and merge result: Inspected the merge-base-to-head introduced diff. Raw test-merge records confirm main 7a8e5a1 followed by the exact reviewed head; its result retains meaningful private consolidation beyond current main.
Configuration compatibility: Computer Use derives the same environment names from existing option names and retains override/config/environment precedence, timeout fallbacks, boolean defaults, and returned configuration fields. Execution-policy consolidation delegates to the existing resolver, which preserves explicit security/ask combinations. No concrete new-default or upgrade trigger supports the previous review's generic blocker.
Existing-state compatibility: Migration refactoring preserves existing decoders, fingerprint normalization, active-lease rejection, conditional updates, persisted-result comparisons, and registration checks. Introduced migration edits do not change schema versions, columns, stored binding shapes, or authentication profile modes; this is a verified no-new-migration case by source comparison.
Findings None None.
Security None None.

How this fits together

The Codex plugin translates OpenClaw agent turns and conversation controls into native Codex app-server requests. It returns projected replies, tool results, approvals, and session state to OpenClaw.

flowchart LR
  A[Agent turns and commands] --> B[Codex plugin]
  C[Configuration and session state] --> B
  B --> D[Current ownership checks]
  D --> E[Native Codex app server]
  E --> F[Reply and event projection]
  F --> G[OpenClaw conversations]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/codex/src/migration/apply.ts, migration/backfill/repair: extensions/codex/src/migration/auth.ts, migration/backfill/repair: extensions/codex/src/migration/plan.ts, migration/backfill/repair: extensions/codex/src/migration/session-binding-sidecars.ts, migration/backfill/repair: extensions/codex/src/migration/source-files.ts, migration/backfill/repair: extensions/codex/src/migration/source.ts, and 4 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Keep shared behavior within the existing private owners while preserving native protocol, configuration, persisted-state, and final-effect authorization contracts.

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

Not applicable: this PR addresses duplicated private implementation rather than reporting a new runtime defect; no introduced failing path was established.

Is this the best way to solve the issue?

Yes. Consolidating equivalent operations within their existing owners is appropriate, and the inspected changes preserve the relevant contracts without adding a competing implementation.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is internal consolidation with no identified user-facing regression or new product surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from ordinary external-contributor runtime proof. Supplied checks are supplemental rather than live-provider evidence; inspected authority edits preserve existing decisions and effect-boundary checks. Stored-format compatibility is supported by equivalent migration logic with unchanged schemas and serialized shapes.

Evidence

What I checked:

  • Pinned introduction and merge result: Inspected the merge-base-to-head introduced diff. Raw test-merge records confirm main 7a8e5a1 followed by the exact reviewed head; its result retains meaningful private consolidation beyond current main. (c186f6710933)
  • Configuration compatibility: Computer Use derives the same environment names from existing option names and retains override/config/environment precedence, timeout fallbacks, boolean defaults, and returned configuration fields. Execution-policy consolidation delegates to the existing resolver, which preserves explicit security/ask combinations. No concrete new-default or upgrade trigger supports the previous review's generic blocker. (extensions/codex/src/app-server/config-options.ts:395, 9f91653c9f93)
  • Existing-state compatibility: Migration refactoring preserves existing decoders, fingerprint normalization, active-lease rejection, conditional updates, persisted-result comparisons, and registration checks. Introduced migration edits do not change schema versions, columns, stored binding shapes, or authentication profile modes; this is a verified no-new-migration case by source comparison. (extensions/codex/src/migration/session-binding-sidecars.ts:456, 9f91653c9f93)
  • Authority remains at existing boundaries: Prepared startup options remain subject to current-session and legacy admission checks. Native model input still re-resolves its sender after preparation and rejects settled, cancelled, or replaced owners before admission. Process settlement now derives from membership in the same authoritative process set; no changed principal entitlement or extended authority lifetime was identified. (extensions/codex/src/app-server/native-subagent-model-input.ts:327, 9f91653c9f93)
  • Native dependency contract inspected: The changed thread requests, approval adapters, and sandbox executor directly depend on Codex's native protocol, making dependency inspection applicable. Personally inspected the sibling source's thread-resume fields, skills/list response, elicitation types, and exec request carrier at a956835d020762cb2b570053af06f643a11c0ecc. GitHub independently verified that revision belongs to openai/codex; the PR body cites a different inspection revision, whose local object was unavailable. (codex-rs/app-server-protocol/src/protocol/v2/thread.rs:354, a956835d0207)
  • Validation evidence and limits: The captured PR body reports 5,359 passing tests on the original candidate, current-head production/test typechecks, zero cycles, and three passing lint-suppression tests. It also explicitly discloses unresolved local Mac deadline/readiness failures and does not claim those failures are fixed or waived. These are contributor-reported supplemental checks; this read-only review did not execute target code. The introduced diff passes git diff --check. (9f91653c9f93)

Likely related people:

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

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-10-07T12:01:21.881Z sha 5ac34deed82bc71d3dc4457117dea0bd509a0351 :: blocked before merge. :: none
  • reviewed 2026-10-07T13:15:49.712Z sha 4df80f2 :: blocked before merge. :: none
  • reviewed 2026-10-07T14:26:27.667Z sha 195bd04 :: blocked before merge. :: none
  • reviewed 2026-10-07T15:28:36.135Z sha 9f91653 :: blocked before merge. :: none

@steipete
steipete force-pushed the deslop/d11-codex-extension-20261007 branch from 5ac34de to 4df80f2 Compare October 7, 2026 13:05
@steipete
steipete marked this pull request as ready for review October 7, 2026 13:08
@steipete
steipete force-pushed the deslop/d11-codex-extension-20261007 branch from 4df80f2 to 195bd04 Compare October 7, 2026 14:18
@steipete
steipete force-pushed the deslop/d11-codex-extension-20261007 branch from 195bd04 to 9f91653 Compare October 7, 2026 15:20
@steipete steipete closed this Oct 7, 2026
@steipete steipete reopened this Oct 7, 2026
@steipete
steipete merged commit 947b358 into main Oct 7, 2026
265 of 314 checks passed
@steipete
steipete deleted the deslop/d11-codex-extension-20261007 branch October 7, 2026 16:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
…enclaw#166575)

* refactor(codex): consolidate internal lifecycle and adapter paths

* fix(codex): preserve promise compatibility in package builds
steipete added a commit that referenced this pull request Oct 15, 2026
* refactor(gateway): simplify diagnostic state and internal metadata paths

Consolidate worker catalog loading and remove duplicate internal copies,
metadata reconstruction, cleanup, and speculative diagnostic ordering machinery.
Keep authentication, live effect authority, persisted shapes, shutdown write
settlement, bounded caches, and terminal admission/spawn limits.

Best-effort tradeoffs accepted

Provenance below identifies synthetic/speculative introduction evidence, not a
linked human actual-use incident. Security, durability and real resource limits
remain independently protected.

- Health publication generations (#116681, synthetic overlap reproduction):
  overlapping passive/probe samples now publish in completion order; next refresh
  replaces stale diagnostics. Separate probe work and public/admin audiences stay.
- Observer request generations (#112958, structured-review race): an A-B-A model
  change during one in-flight digest can accept that digest; cancellation, current
  session/model checks and disclosure authorization remain.
- GitHub target early registry invalidation (#167189, synthetic invalidation test):
  discovery may be stale for its existing 15-second TTL; publication verifies Git
  afresh and cached reads still check current connection/source authority.
- Automation badge build epochs (#104730, structured review): latest completed
  service start supplies display facts; scheduling and stale-owner unregister stay.
- Terminal victim claim/release protocol (#116101, synthetic autoreview
  interleavings): reserve pooled free+idle capacity instead, then select the actual
  unviewed idle victim at registration. Newly viewed victims survive; a replacement
  without an eligible victim fails and kills its backend. Both hard limits remain.
- Launch JSON snapshot/revalidation (#123033, synthetic caller mutation): trust the
  tunnel-owned prepared descriptor; a caller violating ownership can mutate it.
  Negotiated options still use a shallow copy and node input validation remains.
- Worker catalog output copies (#142095, schema mirrors) and display settings
  clone: trust closed-schema-validated, documented process-stable metadata and
  internally owned settings. A future provider violating that contract can mutate
  cosmetic metadata or miss notifications until a later row/config refresh or
  restart; live allocation validation remains.
- Artifact descriptor freezing/refreezing (#163446, immutable-result assertion):
  readonly types govern internal consumers; an internal type-contract violation
  can mutate shared metadata. Archive verification and worker-close ordering stay.
- Post-fetch CI summary reread (#160108, synthetic identity review): exact selected
  head diagnostics may finish while the PR summary refreshes; UI selected-head
  matching, upstream identity and live disclosure/credential checks remain.
- Startup-log generation switching (#141736/#126627, synthetic supersession behind
  startup admission): a queued boot log may describe boot rather than replacement
  facts. Plugin attachment, trust enforcement and service ownership stay current.
- Hook replay promise/object identity checks (#139155): private writers cannot
  replace or prune pending/active entries. If a future writer breaks that invariant,
  completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay.
- Boxed-primitive JSON coercion probes (#158572, synthetic boxed-value cases):
  ordinary tool payloads retain measured early budget rejection. Exotic boxed
  strings may serialize before rejection by the unchanged final exact byte cap;
  native JSON owns their coercion instead of custom per-value probes.

Model detail reads use the exact configured inventory already built in the same
synchronous request frame instead of resolving agent membership a second time
(#114388/#159177). Syntax, authentication, read scope and exact membership stay.
GitHub publication keeps its covering finally release instead of releasing twice.
The attempted prepared-workspace cache substitution was dropped: ordinary late
ACK publications can hide live authority while durable staged facts still exist.

Phase E standalone session memory and its tests are untouched.

BELOW-500 lane packet for coordinator bundling; no standalone PR.
Net production LOC: 217 removed (109 added / 326 removed, 20 files).
Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus
largest-first owner sweeps exhausted sound candidates; rejected cuts stay out.

Local proof

- Full core production types and all four Gateway test-type graphs passed.
- Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward.
- Changed-file format, diff checks, targeted production/test lint passed after
  correcting the terminal selector to toSorted. No new suppression.
- Lint-suppressions: 3 tests passed on the settled source.
- Startup post-attach owner: 88 tests passed in the final isolated run.
- Focused runs reported passing terminal lifecycle/eviction/detach, health,
  hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron,
  chat state, observers, real models HTTP e2e, publication database/provisioning/
  availability and GitHub read/target-discovery cases. The aggregate selections
  were intentionally stopped, so this is not a full-suite pass claim.
- Independent review completed. Two final findings were declined with source
  evidence: the retained unconditional finally releases the sole publication
  acquisition, and closed metadata schemas still reject unknown properties.

Proof gaps

- server.hooks.test.ts / handles auth, wake, and agent flows timed out at
  120000ms during Gateway startup (207133ms reported elapsed). Its requests have
  no idempotency key and bypass the removed replay checks, but no conclusive
  head-vs-main attribution was established. Later successful Gateway startups
  are not a claimed repair. No retry, timeout increase, skip, or weaker assertion.
- Expanded local selections were stopped rather than running more unchanged
  guest/integration variants on the loaded host. Bundle CI remains broad proof.
- Full check-changed was stopped during the broad SQLite inventory. Preceding
  conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and
  reproduced on the untouched base index. No budget was changed. This is base
  evidence, not current-main CI attribution.
- No qualified before/after timing comparison or performance claim. No hosted
  PR CI exists for this branch-only lane packet.

* refactor(gateway): consolidate MCP schemas and Talk target ownership

Use Node's maintained deep comparator for MCP JSON schemas and remove defensive
throwing-getter readers plus their synthetic-only fixture. Keep schema input
validation, advertised-schema invocation membership, normalization, top-level
copies and the equal-schema warning/deduplication behavior from human issue #98437.

Inline Talk's sole-caller storage resolver and forwarding assertion adapter.
All four callers still assert the exact prepared target at the original effect.
Trust Rastermill's dimension fitting instead of rechecking encoder output; retain
input limits and the byte-limit check/error. Drop the optional initial metadata
catch-up event version fence; retain actual model readiness and runtime authority.

Best-effort tradeoffs accepted

- Throwing in-process tool metadata getters/spread (#88410, 705bdce): the
  introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not
  a live client report. A broken plugin getter now fails the request clearly
  rather than silently omitting that tool. Security and schema shape checks stay.
- Exotic non-JSON schema objects: the custom comparator from #103171 now uses
  isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including
  insertion order, stays; symbol-bearing or exotic JS objects may warn differently.
  Preserve the real issue #98437 warning reduction and process-lifetime dedupe.
- Encoder output dimension recheck (#169449, 8db1c35): the introducing cutover
  explicitly made Rastermill own fitting, confirmed in its implementation. A
  future encoder contract bug can produce an oversized-dimension image; repair
  that owner rather than validate its output again in Gateway. Input/byte bounds stay.
- Initial chat metadata catch-up versions (#123433, f3db7fe): synthetic
  restart/Testbox provenance without a linked human incident. Overlapping initial
  catch-up and model invalidation can briefly mark display availability and cause
  an optional refresh warning; the next publication converges. Current model
  readiness, runtime authority/failure handling and write settlement stay.

Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC.
Phase E standalone memory backend, machinery and tests are untouched.
Same branch, no conflict/rebase, no PR at the below-500 ending threshold.

Provenance

#88410
#103171
#98437
#169449
#123433
#169622

Proof

- Fresh full core production types, targeted core type-aware lint, formatter and
  diff checks passed. Changed-check classification completed.
- Fresh runtime cycles: 0; Madge cycles: 0; no new component.
- Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk
  voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged.
  Loaded-host wall time: 1711.09s including cold preparation; no before/after
  performance claim.
- Independent review completed scoped-clean P0-P2; no actionable findings.
- Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall:
  union/prototype properties, malformed/boolean variants, literal constraints,
  real HTTP equal-schema warning dedupe, and orientation-aware resized delivery.
  The name filter left 96 unrelated cases unrun; no test skips were added.
- Initial root-config lint failed before linting while unrelated plugin SDK
  declarations timed out at 300000ms. Correct source-backed core-config routing
  passed without skipping preparation or increasing any timeout.

Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup
without conclusive head-vs-main attribution; a later successful startup is not a
claimed repair. Earlier expanded local selections and full check-changed were
stopped under load. The earlier env-var budget failure reproduced on its untouched
base, not current-main CI. No timeout increase, retry, skip, assertion weakening,
or baseline change was used. Full Gateway/integration proof belongs to bundle CI.

No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage,
provenance, rejected candidates and proof are retained in .local/y06-ledger.md.

* refactor(codex): simplify transport and catalog bookkeeping

Remove malformed JSON reconstruction and its continuation-only bookkeeping,
redundant config copies, post-write rereads and duplicate internal checks.
Reuse the existing final-config hook builder. Preserve valid JSON framing,
external input validation, redaction, live effect authority, resource bounds,
normal concurrent sessions, persisted shapes and write settlement.

Best-effort tradeoffs accepted

- Raw LF inside JSON strings is no longer reconstructed. Direct commit
  6fd35f6 and follow-ups #101221,
  #151399 and #162559 use synthetic malformed frames, not a cited human
  incident. Such frames warn/drop; later valid frames continue. A missing
  RPC reply can reach the existing request timeout. This also removes the
  recovery-only pending-route and per-request row-budget snapshots.
- Unsupported in-place mutation of published config/start objects may become
  visible to a request. Ordinary reload replaces the config object. #162912
  fixed human heap-OOM #162802 by sharing clones; removing copying preserves
  that allocation protection without another snapshot cache.
- A node finalization commit followed by a rejected promise now surfaces the
  error. #106927's lost-receipt path was synthetic, with no cited human
  incident. The durable binding stays installed; next Continue retries the
  same deterministic session. Same-session/home/harness write checks stay.
- Invalid numeric waiter facts from a trusted internal producer are no longer
  discarded by redundant diagnostics validation. #149616 supplied synthetic
  correlation proof, not a human incident. Egress string allowlists and all
  resource bounds remain; catalog results are unaffected.
- An unsupported offline writer changing a row immediately after successful
  CAS/ownership recording is no longer caught by another reread. #168479,
  #166575 and #170511 supplied synthetic migration machinery, not a cited
  competing-writer human report. CAS conflicts, initial/post-register checks,
  leases and retained-sidecar recovery stay. Next migration reconciles it.
- An impossible-on-wire cyclic/BigInt tool value now throws rather than
  silently omitting output. #70966/#107680 cite no human serialization
  incident; protocol payloads are JSON values and local records use those
  values/primitives. Network validation remains at the transport boundary.
- Already-validated binding hashes are not parsed again after normalization
  (#164197/283d5e6fe37). Initial persisted-input validation and the human
  fingerprint-overflow fix #104503 remain intact.
- The bootstrap decision no longer accepts a duplicate projection input
  (a4c2e7f): its only production caller already puts the same projection
  into expectedBinding, whose canonical comparator checks it. No separate
  recoverable scenario or public reason contract is lost.

Sibling Codex source contract inspected:
codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses
serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes.
codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and
v2/mcp.rs:208-224 define JSON MCP results and string errors.

Net production reduction: 249 lines (+97/-346), excluding tests, fixtures,
test support, generated files and declarations. Phase E memory is untouched.
Detailed scope/provenance coverage remains in the requested .local/y12 ledgers.

Proof so far: independent P0-P2 review scoped-clean, targeted source-graph
typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and
git diff --check pass. Post-review edits only remove an unused test import
and mechanically migrate one remaining decoder spy without weakening its
assertion. Focused tests, canonical typed lint and static cycles remain
pending; this is not an all-green or merged claim. Package SDK declaration
preparation timed out under load and the selector dry-run exited SIGILL.

Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still
describes incomplete-frame recovery. Replace that description with malformed
frames producing a redacted diagnostic and being dropped while subsequent
valid frames continue normally.

* refactor(codex): remove duplicate approval and projection machinery

Use the standard deep comparator at the existing approval rewrite-denial
boundary, trust the typed host approval result, reuse collected assistant
fallbacks and prepared catalog connection options, remove redundant internal
metadata copies and normalized agent-directory fallback, and inline the sole
account-usage registrar while retaining lazy loading and administrator scope.
Forward optional release arguments once without changing ownership/settlement.

The first focused run exposed cursor retargeting after cache removal. Retain
the existing regression test and carry the resident's captured requestOptions
to every hydration page. Published config can be edited in place; the original
commit's blanket immutable-config description was too strong. No cloning or
global snapshot cache is restored.

Best-effort tradeoffs accepted

- A typed host approval result with a getter/proxy decision can now throw or
  be read normally, rather than receive descriptor inspection. #70751 added
  synthetic defenses, not a cited human incident. The production host returns
  authenticated Gateway JSON. Null-unavailable, cancellation and two-phase
  decision settlement remain unchanged.
- Non-JSON hook replacements may be conservatively denied by deep comparison
  rather than canonical JSON text. #82496 protects a real rewrite-denial
  boundary, which remains; the private recursive serializer is not a contract.
- Internal cached session metadata is returned without defensive cloning.
  #134660 introduced the copies without a metadata-mutation human incident;
  #164197 moved them unchanged. The sole parser only reads metadata and still
  clones exposed tool input schemas. A future mutating internal consumer must
  own its copy instead of requiring every read to clone the full object.
- The agent directory no longer has a second fallback after connection setup
  already resolved it (#120366, owner split #151753). Invalid hand-constructed
  internal runtime objects are unsupported; production always supplies it.

Catalog hydration retains source.assertCurrent before using captured connection
options: WebSocket start options may contain credentials. Source authority is
not an accepted best-effort tradeoff. Opaque cursors still stay with their
selected home's prepared connection options.

Exact sibling Codex contract personally inspected at
8f38d5a877da8c5c2c0b5158e72bb5f2290a3157:
codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every
outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only
adds the LF delimiter, and :87-93 writes those serialized bytes directly.
transport/websocket.rs:313-320 sends the same serializer result unchanged.
This confirms the earlier malformed raw-LF reconstruction removal; external
JSON parsing, warn/drop diagnostics and subsequent valid frames remain.

Branch total: 330 net production LOC removed (+125/-455), excluding tests,
fixtures, test support, generated files and declarations. Phase E memory,
inactive foundations, public contracts, live authority, resource limits and
write settlement remain untouched. Detailed requested coverage/provenance is
in the task-local y12 ledgers.

Proof: the 30-suite focused run passed 533 cases and failed one unchanged
native-hook fallback case at its existing five-second execution budget. A
failed-case-only replay hit the same deadline (95s case wall time under load).
No main-side test replay establishes attribution; do not call it main-red or
claim fully green focused proof. Retained cursor regression passed 9/9;
lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics
all reproduce on independently installed pinned main 7878a57 with matching
unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof.

Independent final-input review's only finding incorrectly requires a boolean
third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares
the options object, and isolated Node 26.5 confirms skipPrototype:true behavior.
Reject that finding on source/runtime evidence, not with a cast or suppression.
Earlier full-candidate review's sole index-only cursor finding was resolved by
staging the repair. No remaining accepted actionable finding.

Canonical Madge and SDK-artifact lint preparation remain unproven after prior
load-limited attempts; changed-selector preparation failed with native SIGILL.
Runtime value cycles are zero. The only new import edge is a Node builtin;
account registration contracts index-to-registrar-to-runtime to index-to-runtime.

Final-source catalog proof: 25/25 pass, including obsolete-source list/pin
rejection and cursor affinity. Final targeted source-backed typecheck exits0,
including the exact comparison call questioned by review. Format and diff
checks pass. No public SDK export, schema, protocol, dependency, permission,
durability or retention change. Below500 branch-only handoff; no PR or merge.

* docs: align Codex framing and worktree cache behavior

* fix: preserve MCP schema filtering and release assertions

Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts.
steipete added a commit that referenced this pull request Oct 15, 2026
* test(ui): migrate message and pane fixtures to Solid

* test(ui): mount queue and prediction fixtures with Solid

* test(ui): provide application context to native chat goal fixtures

* test(ui): report packaged Workboard startup failures

* refactor: deslop gateway and Codex extension (wave-5 bundle D) (#173092)

* refactor(gateway): simplify diagnostic state and internal metadata paths

Consolidate worker catalog loading and remove duplicate internal copies,
metadata reconstruction, cleanup, and speculative diagnostic ordering machinery.
Keep authentication, live effect authority, persisted shapes, shutdown write
settlement, bounded caches, and terminal admission/spawn limits.

Best-effort tradeoffs accepted

Provenance below identifies synthetic/speculative introduction evidence, not a
linked human actual-use incident. Security, durability and real resource limits
remain independently protected.

- Health publication generations (#116681, synthetic overlap reproduction):
  overlapping passive/probe samples now publish in completion order; next refresh
  replaces stale diagnostics. Separate probe work and public/admin audiences stay.
- Observer request generations (#112958, structured-review race): an A-B-A model
  change during one in-flight digest can accept that digest; cancellation, current
  session/model checks and disclosure authorization remain.
- GitHub target early registry invalidation (#167189, synthetic invalidation test):
  discovery may be stale for its existing 15-second TTL; publication verifies Git
  afresh and cached reads still check current connection/source authority.
- Automation badge build epochs (#104730, structured review): latest completed
  service start supplies display facts; scheduling and stale-owner unregister stay.
- Terminal victim claim/release protocol (#116101, synthetic autoreview
  interleavings): reserve pooled free+idle capacity instead, then select the actual
  unviewed idle victim at registration. Newly viewed victims survive; a replacement
  without an eligible victim fails and kills its backend. Both hard limits remain.
- Launch JSON snapshot/revalidation (#123033, synthetic caller mutation): trust the
  tunnel-owned prepared descriptor; a caller violating ownership can mutate it.
  Negotiated options still use a shallow copy and node input validation remains.
- Worker catalog output copies (#142095, schema mirrors) and display settings
  clone: trust closed-schema-validated, documented process-stable metadata and
  internally owned settings. A future provider violating that contract can mutate
  cosmetic metadata or miss notifications until a later row/config refresh or
  restart; live allocation validation remains.
- Artifact descriptor freezing/refreezing (#163446, immutable-result assertion):
  readonly types govern internal consumers; an internal type-contract violation
  can mutate shared metadata. Archive verification and worker-close ordering stay.
- Post-fetch CI summary reread (#160108, synthetic identity review): exact selected
  head diagnostics may finish while the PR summary refreshes; UI selected-head
  matching, upstream identity and live disclosure/credential checks remain.
- Startup-log generation switching (#141736/#126627, synthetic supersession behind
  startup admission): a queued boot log may describe boot rather than replacement
  facts. Plugin attachment, trust enforcement and service ownership stay current.
- Hook replay promise/object identity checks (#139155): private writers cannot
  replace or prune pending/active entries. If a future writer breaks that invariant,
  completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay.
- Boxed-primitive JSON coercion probes (#158572, synthetic boxed-value cases):
  ordinary tool payloads retain measured early budget rejection. Exotic boxed
  strings may serialize before rejection by the unchanged final exact byte cap;
  native JSON owns their coercion instead of custom per-value probes.

Model detail reads use the exact configured inventory already built in the same
synchronous request frame instead of resolving agent membership a second time
(#114388/#159177). Syntax, authentication, read scope and exact membership stay.
GitHub publication keeps its covering finally release instead of releasing twice.
The attempted prepared-workspace cache substitution was dropped: ordinary late
ACK publications can hide live authority while durable staged facts still exist.

Phase E standalone session memory and its tests are untouched.

BELOW-500 lane packet for coordinator bundling; no standalone PR.
Net production LOC: 217 removed (109 added / 326 removed, 20 files).
Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus
largest-first owner sweeps exhausted sound candidates; rejected cuts stay out.

Local proof

- Full core production types and all four Gateway test-type graphs passed.
- Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward.
- Changed-file format, diff checks, targeted production/test lint passed after
  correcting the terminal selector to toSorted. No new suppression.
- Lint-suppressions: 3 tests passed on the settled source.
- Startup post-attach owner: 88 tests passed in the final isolated run.
- Focused runs reported passing terminal lifecycle/eviction/detach, health,
  hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron,
  chat state, observers, real models HTTP e2e, publication database/provisioning/
  availability and GitHub read/target-discovery cases. The aggregate selections
  were intentionally stopped, so this is not a full-suite pass claim.
- Independent review completed. Two final findings were declined with source
  evidence: the retained unconditional finally releases the sole publication
  acquisition, and closed metadata schemas still reject unknown properties.

Proof gaps

- server.hooks.test.ts / handles auth, wake, and agent flows timed out at
  120000ms during Gateway startup (207133ms reported elapsed). Its requests have
  no idempotency key and bypass the removed replay checks, but no conclusive
  head-vs-main attribution was established. Later successful Gateway startups
  are not a claimed repair. No retry, timeout increase, skip, or weaker assertion.
- Expanded local selections were stopped rather than running more unchanged
  guest/integration variants on the loaded host. Bundle CI remains broad proof.
- Full check-changed was stopped during the broad SQLite inventory. Preceding
  conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and
  reproduced on the untouched base index. No budget was changed. This is base
  evidence, not current-main CI attribution.
- No qualified before/after timing comparison or performance claim. No hosted
  PR CI exists for this branch-only lane packet.

* refactor(gateway): consolidate MCP schemas and Talk target ownership

Use Node's maintained deep comparator for MCP JSON schemas and remove defensive
throwing-getter readers plus their synthetic-only fixture. Keep schema input
validation, advertised-schema invocation membership, normalization, top-level
copies and the equal-schema warning/deduplication behavior from human issue #98437.

Inline Talk's sole-caller storage resolver and forwarding assertion adapter.
All four callers still assert the exact prepared target at the original effect.
Trust Rastermill's dimension fitting instead of rechecking encoder output; retain
input limits and the byte-limit check/error. Drop the optional initial metadata
catch-up event version fence; retain actual model readiness and runtime authority.

Best-effort tradeoffs accepted

- Throwing in-process tool metadata getters/spread (#88410, 705bdce): the
  introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not
  a live client report. A broken plugin getter now fails the request clearly
  rather than silently omitting that tool. Security and schema shape checks stay.
- Exotic non-JSON schema objects: the custom comparator from #103171 now uses
  isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including
  insertion order, stays; symbol-bearing or exotic JS objects may warn differently.
  Preserve the real issue #98437 warning reduction and process-lifetime dedupe.
- Encoder output dimension recheck (#169449, 8db1c35): the introducing cutover
  explicitly made Rastermill own fitting, confirmed in its implementation. A
  future encoder contract bug can produce an oversized-dimension image; repair
  that owner rather than validate its output again in Gateway. Input/byte bounds stay.
- Initial chat metadata catch-up versions (#123433, f3db7fe): synthetic
  restart/Testbox provenance without a linked human incident. Overlapping initial
  catch-up and model invalidation can briefly mark display availability and cause
  an optional refresh warning; the next publication converges. Current model
  readiness, runtime authority/failure handling and write settlement stay.

Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC.
Phase E standalone memory backend, machinery and tests are untouched.
Same branch, no conflict/rebase, no PR at the below-500 ending threshold.

Provenance

#88410
#103171
#98437
#169449
#123433
#169622

Proof

- Fresh full core production types, targeted core type-aware lint, formatter and
  diff checks passed. Changed-check classification completed.
- Fresh runtime cycles: 0; Madge cycles: 0; no new component.
- Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk
  voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged.
  Loaded-host wall time: 1711.09s including cold preparation; no before/after
  performance claim.
- Independent review completed scoped-clean P0-P2; no actionable findings.
- Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall:
  union/prototype properties, malformed/boolean variants, literal constraints,
  real HTTP equal-schema warning dedupe, and orientation-aware resized delivery.
  The name filter left 96 unrelated cases unrun; no test skips were added.
- Initial root-config lint failed before linting while unrelated plugin SDK
  declarations timed out at 300000ms. Correct source-backed core-config routing
  passed without skipping preparation or increasing any timeout.

Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup
without conclusive head-vs-main attribution; a later successful startup is not a
claimed repair. Earlier expanded local selections and full check-changed were
stopped under load. The earlier env-var budget failure reproduced on its untouched
base, not current-main CI. No timeout increase, retry, skip, assertion weakening,
or baseline change was used. Full Gateway/integration proof belongs to bundle CI.

No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage,
provenance, rejected candidates and proof are retained in .local/y06-ledger.md.

* refactor(codex): simplify transport and catalog bookkeeping

Remove malformed JSON reconstruction and its continuation-only bookkeeping,
redundant config copies, post-write rereads and duplicate internal checks.
Reuse the existing final-config hook builder. Preserve valid JSON framing,
external input validation, redaction, live effect authority, resource bounds,
normal concurrent sessions, persisted shapes and write settlement.

Best-effort tradeoffs accepted

- Raw LF inside JSON strings is no longer reconstructed. Direct commit
  6fd35f6 and follow-ups #101221,
  #151399 and #162559 use synthetic malformed frames, not a cited human
  incident. Such frames warn/drop; later valid frames continue. A missing
  RPC reply can reach the existing request timeout. This also removes the
  recovery-only pending-route and per-request row-budget snapshots.
- Unsupported in-place mutation of published config/start objects may become
  visible to a request. Ordinary reload replaces the config object. #162912
  fixed human heap-OOM #162802 by sharing clones; removing copying preserves
  that allocation protection without another snapshot cache.
- A node finalization commit followed by a rejected promise now surfaces the
  error. #106927's lost-receipt path was synthetic, with no cited human
  incident. The durable binding stays installed; next Continue retries the
  same deterministic session. Same-session/home/harness write checks stay.
- Invalid numeric waiter facts from a trusted internal producer are no longer
  discarded by redundant diagnostics validation. #149616 supplied synthetic
  correlation proof, not a human incident. Egress string allowlists and all
  resource bounds remain; catalog results are unaffected.
- An unsupported offline writer changing a row immediately after successful
  CAS/ownership recording is no longer caught by another reread. #168479,
  #166575 and #170511 supplied synthetic migration machinery, not a cited
  competing-writer human report. CAS conflicts, initial/post-register checks,
  leases and retained-sidecar recovery stay. Next migration reconciles it.
- An impossible-on-wire cyclic/BigInt tool value now throws rather than
  silently omitting output. #70966/#107680 cite no human serialization
  incident; protocol payloads are JSON values and local records use those
  values/primitives. Network validation remains at the transport boundary.
- Already-validated binding hashes are not parsed again after normalization
  (#164197/283d5e6fe37). Initial persisted-input validation and the human
  fingerprint-overflow fix #104503 remain intact.
- The bootstrap decision no longer accepts a duplicate projection input
  (a4c2e7f): its only production caller already puts the same projection
  into expectedBinding, whose canonical comparator checks it. No separate
  recoverable scenario or public reason contract is lost.

Sibling Codex source contract inspected:
codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses
serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes.
codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and
v2/mcp.rs:208-224 define JSON MCP results and string errors.

Net production reduction: 249 lines (+97/-346), excluding tests, fixtures,
test support, generated files and declarations. Phase E memory is untouched.
Detailed scope/provenance coverage remains in the requested .local/y12 ledgers.

Proof so far: independent P0-P2 review scoped-clean, targeted source-graph
typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and
git diff --check pass. Post-review edits only remove an unused test import
and mechanically migrate one remaining decoder spy without weakening its
assertion. Focused tests, canonical typed lint and static cycles remain
pending; this is not an all-green or merged claim. Package SDK declaration
preparation timed out under load and the selector dry-run exited SIGILL.

Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still
describes incomplete-frame recovery. Replace that description with malformed
frames producing a redacted diagnostic and being dropped while subsequent
valid frames continue normally.

* refactor(codex): remove duplicate approval and projection machinery

Use the standard deep comparator at the existing approval rewrite-denial
boundary, trust the typed host approval result, reuse collected assistant
fallbacks and prepared catalog connection options, remove redundant internal
metadata copies and normalized agent-directory fallback, and inline the sole
account-usage registrar while retaining lazy loading and administrator scope.
Forward optional release arguments once without changing ownership/settlement.

The first focused run exposed cursor retargeting after cache removal. Retain
the existing regression test and carry the resident's captured requestOptions
to every hydration page. Published config can be edited in place; the original
commit's blanket immutable-config description was too strong. No cloning or
global snapshot cache is restored.

Best-effort tradeoffs accepted

- A typed host approval result with a getter/proxy decision can now throw or
  be read normally, rather than receive descriptor inspection. #70751 added
  synthetic defenses, not a cited human incident. The production host returns
  authenticated Gateway JSON. Null-unavailable, cancellation and two-phase
  decision settlement remain unchanged.
- Non-JSON hook replacements may be conservatively denied by deep comparison
  rather than canonical JSON text. #82496 protects a real rewrite-denial
  boundary, which remains; the private recursive serializer is not a contract.
- Internal cached session metadata is returned without defensive cloning.
  #134660 introduced the copies without a metadata-mutation human incident;
  #164197 moved them unchanged. The sole parser only reads metadata and still
  clones exposed tool input schemas. A future mutating internal consumer must
  own its copy instead of requiring every read to clone the full object.
- The agent directory no longer has a second fallback after connection setup
  already resolved it (#120366, owner split #151753). Invalid hand-constructed
  internal runtime objects are unsupported; production always supplies it.

Catalog hydration retains source.assertCurrent before using captured connection
options: WebSocket start options may contain credentials. Source authority is
not an accepted best-effort tradeoff. Opaque cursors still stay with their
selected home's prepared connection options.

Exact sibling Codex contract personally inspected at
8f38d5a877da8c5c2c0b5158e72bb5f2290a3157:
codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every
outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only
adds the LF delimiter, and :87-93 writes those serialized bytes directly.
transport/websocket.rs:313-320 sends the same serializer result unchanged.
This confirms the earlier malformed raw-LF reconstruction removal; external
JSON parsing, warn/drop diagnostics and subsequent valid frames remain.

Branch total: 330 net production LOC removed (+125/-455), excluding tests,
fixtures, test support, generated files and declarations. Phase E memory,
inactive foundations, public contracts, live authority, resource limits and
write settlement remain untouched. Detailed requested coverage/provenance is
in the task-local y12 ledgers.

Proof: the 30-suite focused run passed 533 cases and failed one unchanged
native-hook fallback case at its existing five-second execution budget. A
failed-case-only replay hit the same deadline (95s case wall time under load).
No main-side test replay establishes attribution; do not call it main-red or
claim fully green focused proof. Retained cursor regression passed 9/9;
lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics
all reproduce on independently installed pinned main 7878a57 with matching
unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof.

Independent final-input review's only finding incorrectly requires a boolean
third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares
the options object, and isolated Node 26.5 confirms skipPrototype:true behavior.
Reject that finding on source/runtime evidence, not with a cast or suppression.
Earlier full-candidate review's sole index-only cursor finding was resolved by
staging the repair. No remaining accepted actionable finding.

Canonical Madge and SDK-artifact lint preparation remain unproven after prior
load-limited attempts; changed-selector preparation failed with native SIGILL.
Runtime value cycles are zero. The only new import edge is a Node builtin;
account registration contracts index-to-registrar-to-runtime to index-to-runtime.

Final-source catalog proof: 25/25 pass, including obsolete-source list/pin
rejection and cursor affinity. Final targeted source-backed typecheck exits0,
including the exact comparison call questioned by review. Format and diff
checks pass. No public SDK export, schema, protocol, dependency, permission,
durability or retention change. Below500 branch-only handoff; no PR or merge.

* docs: align Codex framing and worktree cache behavior

* fix: preserve MCP schema filtering and release assertions

Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts.

* fix: remote model catalogs stop refreshing on newer modalities (#173038)

* fix: keep remote model catalogs refreshing across releases

Project both hosted formats to released input modalities and isolate malformed remote model rows. Preserve strict generator validation and transport sanitization. Fixes #173027.

* test: cover catalog row isolation through refresh and publication

Narrow dynamically loaded parser functions for script typechecking. Update integration expectations to preserve valid rows instead of rejecting entire downloads, as required by #173027.

* fix: retain the last catalog when no valid model rows survive

* fix: preserve standalone pricing-only v1 catalogs

* fix: omit catalog models with no supported input modalities

* fix: preserve catalog publication gates after modality filtering

* fix: omit empty inputs produced by catalog hydration

* perf(models): preserve catalog sanitizer entry compaction

* test(gateway,media,secrets,browser,agents,otel): remove low-value tests (batch d123) (#173141)

* test(gateway): deslop x4070 tests

* test(media-understanding): deslop x4071 tests

* test(secrets): deslop x4072 tests

* test(browser): deslop x4074 tests

* test(agents): deslop x4073 tests

* test(diagnostics-otel): deslop x4077 tests

* test: retain distinct session and credential rollback coverage
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…law#173092)

* refactor(gateway): simplify diagnostic state and internal metadata paths

Consolidate worker catalog loading and remove duplicate internal copies,
metadata reconstruction, cleanup, and speculative diagnostic ordering machinery.
Keep authentication, live effect authority, persisted shapes, shutdown write
settlement, bounded caches, and terminal admission/spawn limits.

Best-effort tradeoffs accepted

Provenance below identifies synthetic/speculative introduction evidence, not a
linked human actual-use incident. Security, durability and real resource limits
remain independently protected.

- Health publication generations (openclaw#116681, synthetic overlap reproduction):
  overlapping passive/probe samples now publish in completion order; next refresh
  replaces stale diagnostics. Separate probe work and public/admin audiences stay.
- Observer request generations (openclaw#112958, structured-review race): an A-B-A model
  change during one in-flight digest can accept that digest; cancellation, current
  session/model checks and disclosure authorization remain.
- GitHub target early registry invalidation (openclaw#167189, synthetic invalidation test):
  discovery may be stale for its existing 15-second TTL; publication verifies Git
  afresh and cached reads still check current connection/source authority.
- Automation badge build epochs (openclaw#104730, structured review): latest completed
  service start supplies display facts; scheduling and stale-owner unregister stay.
- Terminal victim claim/release protocol (openclaw#116101, synthetic autoreview
  interleavings): reserve pooled free+idle capacity instead, then select the actual
  unviewed idle victim at registration. Newly viewed victims survive; a replacement
  without an eligible victim fails and kills its backend. Both hard limits remain.
- Launch JSON snapshot/revalidation (openclaw#123033, synthetic caller mutation): trust the
  tunnel-owned prepared descriptor; a caller violating ownership can mutate it.
  Negotiated options still use a shallow copy and node input validation remains.
- Worker catalog output copies (openclaw#142095, schema mirrors) and display settings
  clone: trust closed-schema-validated, documented process-stable metadata and
  internally owned settings. A future provider violating that contract can mutate
  cosmetic metadata or miss notifications until a later row/config refresh or
  restart; live allocation validation remains.
- Artifact descriptor freezing/refreezing (openclaw#163446, immutable-result assertion):
  readonly types govern internal consumers; an internal type-contract violation
  can mutate shared metadata. Archive verification and worker-close ordering stay.
- Post-fetch CI summary reread (openclaw#160108, synthetic identity review): exact selected
  head diagnostics may finish while the PR summary refreshes; UI selected-head
  matching, upstream identity and live disclosure/credential checks remain.
- Startup-log generation switching (openclaw#141736/openclaw#126627, synthetic supersession behind
  startup admission): a queued boot log may describe boot rather than replacement
  facts. Plugin attachment, trust enforcement and service ownership stay current.
- Hook replay promise/object identity checks (openclaw#139155): private writers cannot
  replace or prune pending/active entries. If a future writer breaks that invariant,
  completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay.
- Boxed-primitive JSON coercion probes (openclaw#158572, synthetic boxed-value cases):
  ordinary tool payloads retain measured early budget rejection. Exotic boxed
  strings may serialize before rejection by the unchanged final exact byte cap;
  native JSON owns their coercion instead of custom per-value probes.

Model detail reads use the exact configured inventory already built in the same
synchronous request frame instead of resolving agent membership a second time
(openclaw#114388/openclaw#159177). Syntax, authentication, read scope and exact membership stay.
GitHub publication keeps its covering finally release instead of releasing twice.
The attempted prepared-workspace cache substitution was dropped: ordinary late
ACK publications can hide live authority while durable staged facts still exist.

Phase E standalone session memory and its tests are untouched.

BELOW-500 lane packet for coordinator bundling; no standalone PR.
Net production LOC: 217 removed (109 added / 326 removed, 20 files).
Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus
largest-first owner sweeps exhausted sound candidates; rejected cuts stay out.

Local proof

- Full core production types and all four Gateway test-type graphs passed.
- Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward.
- Changed-file format, diff checks, targeted production/test lint passed after
  correcting the terminal selector to toSorted. No new suppression.
- Lint-suppressions: 3 tests passed on the settled source.
- Startup post-attach owner: 88 tests passed in the final isolated run.
- Focused runs reported passing terminal lifecycle/eviction/detach, health,
  hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron,
  chat state, observers, real models HTTP e2e, publication database/provisioning/
  availability and GitHub read/target-discovery cases. The aggregate selections
  were intentionally stopped, so this is not a full-suite pass claim.
- Independent review completed. Two final findings were declined with source
  evidence: the retained unconditional finally releases the sole publication
  acquisition, and closed metadata schemas still reject unknown properties.

Proof gaps

- server.hooks.test.ts / handles auth, wake, and agent flows timed out at
  120000ms during Gateway startup (207133ms reported elapsed). Its requests have
  no idempotency key and bypass the removed replay checks, but no conclusive
  head-vs-main attribution was established. Later successful Gateway startups
  are not a claimed repair. No retry, timeout increase, skip, or weaker assertion.
- Expanded local selections were stopped rather than running more unchanged
  guest/integration variants on the loaded host. Bundle CI remains broad proof.
- Full check-changed was stopped during the broad SQLite inventory. Preceding
  conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and
  reproduced on the untouched base index. No budget was changed. This is base
  evidence, not current-main CI attribution.
- No qualified before/after timing comparison or performance claim. No hosted
  PR CI exists for this branch-only lane packet.

* refactor(gateway): consolidate MCP schemas and Talk target ownership

Use Node's maintained deep comparator for MCP JSON schemas and remove defensive
throwing-getter readers plus their synthetic-only fixture. Keep schema input
validation, advertised-schema invocation membership, normalization, top-level
copies and the equal-schema warning/deduplication behavior from human issue openclaw#98437.

Inline Talk's sole-caller storage resolver and forwarding assertion adapter.
All four callers still assert the exact prepared target at the original effect.
Trust Rastermill's dimension fitting instead of rechecking encoder output; retain
input limits and the byte-limit check/error. Drop the optional initial metadata
catch-up event version fence; retain actual model readiness and runtime authority.

Best-effort tradeoffs accepted

- Throwing in-process tool metadata getters/spread (openclaw#88410, ad9acf4): the
  introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not
  a live client report. A broken plugin getter now fails the request clearly
  rather than silently omitting that tool. Security and schema shape checks stay.
- Exotic non-JSON schema objects: the custom comparator from openclaw#103171 now uses
  isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including
  insertion order, stays; symbol-bearing or exotic JS objects may warn differently.
  Preserve the real issue openclaw#98437 warning reduction and process-lifetime dedupe.
- Encoder output dimension recheck (openclaw#169449, ce6a64f): the introducing cutover
  explicitly made Rastermill own fitting, confirmed in its implementation. A
  future encoder contract bug can produce an oversized-dimension image; repair
  that owner rather than validate its output again in Gateway. Input/byte bounds stay.
- Initial chat metadata catch-up versions (openclaw#123433, 1ae5f94): synthetic
  restart/Testbox provenance without a linked human incident. Overlapping initial
  catch-up and model invalidation can briefly mark display availability and cause
  an optional refresh warning; the next publication converges. Current model
  readiness, runtime authority/failure handling and write settlement stay.

Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC.
Phase E standalone memory backend, machinery and tests are untouched.
Same branch, no conflict/rebase, no PR at the below-500 ending threshold.

Provenance

openclaw#88410
openclaw#103171
openclaw#98437
openclaw#169449
openclaw#123433
openclaw#169622

Proof

- Fresh full core production types, targeted core type-aware lint, formatter and
  diff checks passed. Changed-check classification completed.
- Fresh runtime cycles: 0; Madge cycles: 0; no new component.
- Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk
  voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged.
  Loaded-host wall time: 1711.09s including cold preparation; no before/after
  performance claim.
- Independent review completed scoped-clean P0-P2; no actionable findings.
- Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall:
  union/prototype properties, malformed/boolean variants, literal constraints,
  real HTTP equal-schema warning dedupe, and orientation-aware resized delivery.
  The name filter left 96 unrelated cases unrun; no test skips were added.
- Initial root-config lint failed before linting while unrelated plugin SDK
  declarations timed out at 300000ms. Correct source-backed core-config routing
  passed without skipping preparation or increasing any timeout.

Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup
without conclusive head-vs-main attribution; a later successful startup is not a
claimed repair. Earlier expanded local selections and full check-changed were
stopped under load. The earlier env-var budget failure reproduced on its untouched
base, not current-main CI. No timeout increase, retry, skip, assertion weakening,
or baseline change was used. Full Gateway/integration proof belongs to bundle CI.

No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage,
provenance, rejected candidates and proof are retained in .local/y06-ledger.md.

* refactor(codex): simplify transport and catalog bookkeeping

Remove malformed JSON reconstruction and its continuation-only bookkeeping,
redundant config copies, post-write rereads and duplicate internal checks.
Reuse the existing final-config hook builder. Preserve valid JSON framing,
external input validation, redaction, live effect authority, resource bounds,
normal concurrent sessions, persisted shapes and write settlement.

Best-effort tradeoffs accepted

- Raw LF inside JSON strings is no longer reconstructed. Direct commit
  67de049 and follow-ups openclaw#101221,
  openclaw#151399 and openclaw#162559 use synthetic malformed frames, not a cited human
  incident. Such frames warn/drop; later valid frames continue. A missing
  RPC reply can reach the existing request timeout. This also removes the
  recovery-only pending-route and per-request row-budget snapshots.
- Unsupported in-place mutation of published config/start objects may become
  visible to a request. Ordinary reload replaces the config object. openclaw#162912
  fixed human heap-OOM openclaw#162802 by sharing clones; removing copying preserves
  that allocation protection without another snapshot cache.
- A node finalization commit followed by a rejected promise now surfaces the
  error. openclaw#106927's lost-receipt path was synthetic, with no cited human
  incident. The durable binding stays installed; next Continue retries the
  same deterministic session. Same-session/home/harness write checks stay.
- Invalid numeric waiter facts from a trusted internal producer are no longer
  discarded by redundant diagnostics validation. openclaw#149616 supplied synthetic
  correlation proof, not a human incident. Egress string allowlists and all
  resource bounds remain; catalog results are unaffected.
- An unsupported offline writer changing a row immediately after successful
  CAS/ownership recording is no longer caught by another reread. openclaw#168479,
  openclaw#166575 and openclaw#170511 supplied synthetic migration machinery, not a cited
  competing-writer human report. CAS conflicts, initial/post-register checks,
  leases and retained-sidecar recovery stay. Next migration reconciles it.
- An impossible-on-wire cyclic/BigInt tool value now throws rather than
  silently omitting output. openclaw#70966/openclaw#107680 cite no human serialization
  incident; protocol payloads are JSON values and local records use those
  values/primitives. Network validation remains at the transport boundary.
- Already-validated binding hashes are not parsed again after normalization
  (openclaw#164197/ffd07590546). Initial persisted-input validation and the human
  fingerprint-overflow fix openclaw#104503 remain intact.
- The bootstrap decision no longer accepts a duplicate projection input
  (21b8ae5): its only production caller already puts the same projection
  into expectedBinding, whose canonical comparator checks it. No separate
  recoverable scenario or public reason contract is lost.

Sibling Codex source contract inspected:
codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses
serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes.
codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and
v2/mcp.rs:208-224 define JSON MCP results and string errors.

Net production reduction: 249 lines (+97/-346), excluding tests, fixtures,
test support, generated files and declarations. Phase E memory is untouched.
Detailed scope/provenance coverage remains in the requested .local/y12 ledgers.

Proof so far: independent P0-P2 review scoped-clean, targeted source-graph
typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and
git diff --check pass. Post-review edits only remove an unused test import
and mechanically migrate one remaining decoder spy without weakening its
assertion. Focused tests, canonical typed lint and static cycles remain
pending; this is not an all-green or merged claim. Package SDK declaration
preparation timed out under load and the selector dry-run exited SIGILL.

Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still
describes incomplete-frame recovery. Replace that description with malformed
frames producing a redacted diagnostic and being dropped while subsequent
valid frames continue normally.

* refactor(codex): remove duplicate approval and projection machinery

Use the standard deep comparator at the existing approval rewrite-denial
boundary, trust the typed host approval result, reuse collected assistant
fallbacks and prepared catalog connection options, remove redundant internal
metadata copies and normalized agent-directory fallback, and inline the sole
account-usage registrar while retaining lazy loading and administrator scope.
Forward optional release arguments once without changing ownership/settlement.

The first focused run exposed cursor retargeting after cache removal. Retain
the existing regression test and carry the resident's captured requestOptions
to every hydration page. Published config can be edited in place; the original
commit's blanket immutable-config description was too strong. No cloning or
global snapshot cache is restored.

Best-effort tradeoffs accepted

- A typed host approval result with a getter/proxy decision can now throw or
  be read normally, rather than receive descriptor inspection. openclaw#70751 added
  synthetic defenses, not a cited human incident. The production host returns
  authenticated Gateway JSON. Null-unavailable, cancellation and two-phase
  decision settlement remain unchanged.
- Non-JSON hook replacements may be conservatively denied by deep comparison
  rather than canonical JSON text. openclaw#82496 protects a real rewrite-denial
  boundary, which remains; the private recursive serializer is not a contract.
- Internal cached session metadata is returned without defensive cloning.
  openclaw#134660 introduced the copies without a metadata-mutation human incident;
  openclaw#164197 moved them unchanged. The sole parser only reads metadata and still
  clones exposed tool input schemas. A future mutating internal consumer must
  own its copy instead of requiring every read to clone the full object.
- The agent directory no longer has a second fallback after connection setup
  already resolved it (openclaw#120366, owner split openclaw#151753). Invalid hand-constructed
  internal runtime objects are unsupported; production always supplies it.

Catalog hydration retains source.assertCurrent before using captured connection
options: WebSocket start options may contain credentials. Source authority is
not an accepted best-effort tradeoff. Opaque cursors still stay with their
selected home's prepared connection options.

Exact sibling Codex contract personally inspected at
8f38d5a877da8c5c2c0b5158e72bb5f2290a3157:
codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every
outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only
adds the LF delimiter, and :87-93 writes those serialized bytes directly.
transport/websocket.rs:313-320 sends the same serializer result unchanged.
This confirms the earlier malformed raw-LF reconstruction removal; external
JSON parsing, warn/drop diagnostics and subsequent valid frames remain.

Branch total: 330 net production LOC removed (+125/-455), excluding tests,
fixtures, test support, generated files and declarations. Phase E memory,
inactive foundations, public contracts, live authority, resource limits and
write settlement remain untouched. Detailed requested coverage/provenance is
in the task-local y12 ledgers.

Proof: the 30-suite focused run passed 533 cases and failed one unchanged
native-hook fallback case at its existing five-second execution budget. A
failed-case-only replay hit the same deadline (95s case wall time under load).
No main-side test replay establishes attribution; do not call it main-red or
claim fully green focused proof. Retained cursor regression passed 9/9;
lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics
all reproduce on independently installed pinned main 377d73b with matching
unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof.

Independent final-input review's only finding incorrectly requires a boolean
third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares
the options object, and isolated Node 26.5 confirms skipPrototype:true behavior.
Reject that finding on source/runtime evidence, not with a cast or suppression.
Earlier full-candidate review's sole index-only cursor finding was resolved by
staging the repair. No remaining accepted actionable finding.

Canonical Madge and SDK-artifact lint preparation remain unproven after prior
load-limited attempts; changed-selector preparation failed with native SIGILL.
Runtime value cycles are zero. The only new import edge is a Node builtin;
account registration contracts index-to-registrar-to-runtime to index-to-runtime.

Final-source catalog proof: 25/25 pass, including obsolete-source list/pin
rejection and cursor affinity. Final targeted source-backed typecheck exits0,
including the exact comparison call questioned by review. Format and diff
checks pass. No public SDK export, schema, protocol, dependency, permission,
durability or retention change. Below500 branch-only handoff; no PR or merge.

* docs: align Codex framing and worktree cache behavior

* fix: preserve MCP schema filtering and release assertions

Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
* test(ui): migrate message and pane fixtures to Solid

* test(ui): mount queue and prediction fixtures with Solid

* test(ui): provide application context to native chat goal fixtures

* test(ui): report packaged Workboard startup failures

* refactor: deslop gateway and Codex extension (wave-5 bundle D) (openclaw#173092)

* refactor(gateway): simplify diagnostic state and internal metadata paths

Consolidate worker catalog loading and remove duplicate internal copies,
metadata reconstruction, cleanup, and speculative diagnostic ordering machinery.
Keep authentication, live effect authority, persisted shapes, shutdown write
settlement, bounded caches, and terminal admission/spawn limits.

Best-effort tradeoffs accepted

Provenance below identifies synthetic/speculative introduction evidence, not a
linked human actual-use incident. Security, durability and real resource limits
remain independently protected.

- Health publication generations (openclaw#116681, synthetic overlap reproduction):
  overlapping passive/probe samples now publish in completion order; next refresh
  replaces stale diagnostics. Separate probe work and public/admin audiences stay.
- Observer request generations (openclaw#112958, structured-review race): an A-B-A model
  change during one in-flight digest can accept that digest; cancellation, current
  session/model checks and disclosure authorization remain.
- GitHub target early registry invalidation (openclaw#167189, synthetic invalidation test):
  discovery may be stale for its existing 15-second TTL; publication verifies Git
  afresh and cached reads still check current connection/source authority.
- Automation badge build epochs (openclaw#104730, structured review): latest completed
  service start supplies display facts; scheduling and stale-owner unregister stay.
- Terminal victim claim/release protocol (openclaw#116101, synthetic autoreview
  interleavings): reserve pooled free+idle capacity instead, then select the actual
  unviewed idle victim at registration. Newly viewed victims survive; a replacement
  without an eligible victim fails and kills its backend. Both hard limits remain.
- Launch JSON snapshot/revalidation (openclaw#123033, synthetic caller mutation): trust the
  tunnel-owned prepared descriptor; a caller violating ownership can mutate it.
  Negotiated options still use a shallow copy and node input validation remains.
- Worker catalog output copies (openclaw#142095, schema mirrors) and display settings
  clone: trust closed-schema-validated, documented process-stable metadata and
  internally owned settings. A future provider violating that contract can mutate
  cosmetic metadata or miss notifications until a later row/config refresh or
  restart; live allocation validation remains.
- Artifact descriptor freezing/refreezing (openclaw#163446, immutable-result assertion):
  readonly types govern internal consumers; an internal type-contract violation
  can mutate shared metadata. Archive verification and worker-close ordering stay.
- Post-fetch CI summary reread (openclaw#160108, synthetic identity review): exact selected
  head diagnostics may finish while the PR summary refreshes; UI selected-head
  matching, upstream identity and live disclosure/credential checks remain.
- Startup-log generation switching (openclaw#141736/openclaw#126627, synthetic supersession behind
  startup admission): a queued boot log may describe boot rather than replacement
  facts. Plugin attachment, trust enforcement and service ownership stay current.
- Hook replay promise/object identity checks (openclaw#139155): private writers cannot
  replace or prune pending/active entries. If a future writer breaks that invariant,
  completion may overwrite it; current idempotency, terminal TTL/LRU and auth stay.
- Boxed-primitive JSON coercion probes (openclaw#158572, synthetic boxed-value cases):
  ordinary tool payloads retain measured early budget rejection. Exotic boxed
  strings may serialize before rejection by the unchanged final exact byte cap;
  native JSON owns their coercion instead of custom per-value probes.

Model detail reads use the exact configured inventory already built in the same
synchronous request frame instead of resolving agent membership a second time
(openclaw#114388/openclaw#159177). Syntax, authentication, read scope and exact membership stay.
GitHub publication keeps its covering finally release instead of releasing twice.
The attempted prepared-workspace cache substitution was dropped: ordinary late
ACK publications can hide live authority while durable staged facts still exist.

Phase E standalone session memory and its tests are untouched.

BELOW-500 lane packet for coordinator bundling; no standalone PR.
Net production LOC: 217 removed (109 added / 326 removed, 20 files).
Net test LOC: 114 removed. Three-day and fourteen-day history inspection plus
largest-first owner sweeps exhausted sound candidates; rejected cuts stay out.

Local proof

- Full core production types and all four Gateway test-type graphs passed.
- Runtime value cycles: 0. Madge cycles: 0; no import edge added afterward.
- Changed-file format, diff checks, targeted production/test lint passed after
  correcting the terminal selector to toSorted. No new suppression.
- Lint-suppressions: 3 tests passed on the settled source.
- Startup post-attach owner: 88 tests passed in the final isolated run.
- Focused runs reported passing terminal lifecycle/eviction/detach, health,
  hook fanout, catalog/launch/validation/bootstrap, PR details, automation/cron,
  chat state, observers, real models HTTP e2e, publication database/provisioning/
  availability and GitHub read/target-discovery cases. The aggregate selections
  were intentionally stopped, so this is not a full-suite pass claim.
- Independent review completed. Two final findings were declined with source
  evidence: the retained unconditional finally releases the sole publication
  acquisition, and closed metadata schemas still reject unknown properties.

Proof gaps

- server.hooks.test.ts / handles auth, wake, and agent flows timed out at
  120000ms during Gateway startup (207133ms reported elapsed). Its requests have
  no idempotency key and bypass the removed replay checks, but no conclusive
  head-vs-main attribution was established. Later successful Gateway startups
  are not a claimed repair. No retry, timeout increase, skip, or weaker assertion.
- Expanded local selections were stopped rather than running more unchanged
  guest/integration variants on the loaded host. Bundle CI remains broad proof.
- Full check-changed was stopped during the broad SQLite inventory. Preceding
  conflict/line/assertion ratchets passed; env-var budget 455 vs 454 failed and
  reproduced on the untouched base index. No budget was changed. This is base
  evidence, not current-main CI attribution.
- No qualified before/after timing comparison or performance claim. No hosted
  PR CI exists for this branch-only lane packet.

* refactor(gateway): consolidate MCP schemas and Talk target ownership

Use Node's maintained deep comparator for MCP JSON schemas and remove defensive
throwing-getter readers plus their synthetic-only fixture. Keep schema input
validation, advertised-schema invocation membership, normalization, top-level
copies and the equal-schema warning/deduplication behavior from human issue openclaw#98437.

Inline Talk's sole-caller storage resolver and forwarding assertion adapter.
All four callers still assert the exact prepared target at the original effect.
Trust Rastermill's dimension fitting instead of rechecking encoder output; retain
input limits and the byte-limit check/error. Drop the optional initial metadata
catch-up event version fence; retain actual model readiness and runtime authority.

Best-effort tradeoffs accepted

- Throwing in-process tool metadata getters/spread (openclaw#88410, ad9acf4): the
  introducing PR explicitly used synthetic fuzzplugin/mockplugin fixtures, not
  a live client report. A broken plugin getter now fails the request clearly
  rather than silently omitting that tool. Security and schema shape checks stay.
- Exotic non-JSON schema objects: the custom comparator from openclaw#103171 now uses
  isDeepStrictEqual with skipPrototype. Valid JSON schema equivalence, including
  insertion order, stays; symbol-bearing or exotic JS objects may warn differently.
  Preserve the real issue openclaw#98437 warning reduction and process-lifetime dedupe.
- Encoder output dimension recheck (openclaw#169449, ce6a64f): the introducing cutover
  explicitly made Rastermill own fitting, confirmed in its implementation. A
  future encoder contract bug can produce an oversized-dimension image; repair
  that owner rather than validate its output again in Gateway. Input/byte bounds stay.
- Initial chat metadata catch-up versions (openclaw#123433, 1ae5f94): synthetic
  restart/Testbox provenance without a linked human incident. Overlapping initial
  catch-up and model invalidation can briefly mark display availability and cause
  an optional refresh warning; the next publication converges. Current model
  readiness, runtime authority/failure handling and write settlement stay.

Second-pass production reduction: 127 LOC; cumulative lane reduction: 344 LOC.
Phase E standalone memory backend, machinery and tests are untouched.
Same branch, no conflict/rebase, no PR at the below-500 ending threshold.

Provenance

openclaw#88410
openclaw#103171
openclaw#98437
openclaw#169449
openclaw#123433
openclaw#169622

Proof

- Fresh full core production types, targeted core type-aware lint, formatter and
  diff checks passed. Changed-check classification completed.
- Fresh runtime cycles: 0; Madge cycles: 0; no new component.
- Fresh four-file selection passed 70 tests across lint-suppressions (3), Talk
  voice (20), chat metadata (20) and Talk target (27); all kept tests unchanged.
  Loaded-host wall time: 1711.09s including cold preparation; no before/after
  performance claim.
- Independent review completed scoped-clean P0-P2; no actionable findings.
- Final MCP schema/image selection passed all 5 chosen cases in 269.92s wall:
  union/prototype properties, malformed/boolean variants, literal constraints,
  real HTTP equal-schema warning dedupe, and orientation-aware resized delivery.
  The name filter left 96 unrelated cases unrun; no test skips were added.
- Initial root-config lint failed before linting while unrelated plugin SDK
  declarations timed out at 300000ms. Correct source-backed core-config routing
  passed without skipping preparation or increasing any timeout.

Earlier packet gaps remain: server.hooks.test.ts timed out during Gateway startup
without conclusive head-vs-main attribution; a later successful startup is not a
claimed repair. Earlier expanded local selections and full check-changed were
stopped under load. The earlier env-var budget failure reproduced on its untouched
base, not current-main CI. No timeout increase, retry, skip, assertion weakening,
or baseline change was used. Full Gateway/integration proof belongs to bundle CI.

No standalone PR or hosted CI for this below-500 lane packet. Detailed coverage,
provenance, rejected candidates and proof are retained in .local/y06-ledger.md.

* refactor(codex): simplify transport and catalog bookkeeping

Remove malformed JSON reconstruction and its continuation-only bookkeeping,
redundant config copies, post-write rereads and duplicate internal checks.
Reuse the existing final-config hook builder. Preserve valid JSON framing,
external input validation, redaction, live effect authority, resource bounds,
normal concurrent sessions, persisted shapes and write settlement.

Best-effort tradeoffs accepted

- Raw LF inside JSON strings is no longer reconstructed. Direct commit
  67de049 and follow-ups openclaw#101221,
  openclaw#151399 and openclaw#162559 use synthetic malformed frames, not a cited human
  incident. Such frames warn/drop; later valid frames continue. A missing
  RPC reply can reach the existing request timeout. This also removes the
  recovery-only pending-route and per-request row-budget snapshots.
- Unsupported in-place mutation of published config/start objects may become
  visible to a request. Ordinary reload replaces the config object. openclaw#162912
  fixed human heap-OOM openclaw#162802 by sharing clones; removing copying preserves
  that allocation protection without another snapshot cache.
- A node finalization commit followed by a rejected promise now surfaces the
  error. openclaw#106927's lost-receipt path was synthetic, with no cited human
  incident. The durable binding stays installed; next Continue retries the
  same deterministic session. Same-session/home/harness write checks stay.
- Invalid numeric waiter facts from a trusted internal producer are no longer
  discarded by redundant diagnostics validation. openclaw#149616 supplied synthetic
  correlation proof, not a human incident. Egress string allowlists and all
  resource bounds remain; catalog results are unaffected.
- An unsupported offline writer changing a row immediately after successful
  CAS/ownership recording is no longer caught by another reread. openclaw#168479,
  openclaw#166575 and openclaw#170511 supplied synthetic migration machinery, not a cited
  competing-writer human report. CAS conflicts, initial/post-register checks,
  leases and retained-sidecar recovery stay. Next migration reconciles it.
- An impossible-on-wire cyclic/BigInt tool value now throws rather than
  silently omitting output. openclaw#70966/openclaw#107680 cite no human serialization
  incident; protocol payloads are JSON values and local records use those
  values/primitives. Network validation remains at the transport boundary.
- Already-validated binding hashes are not parsed again after normalization
  (openclaw#164197/ffd07590546). Initial persisted-input validation and the human
  fingerprint-overflow fix openclaw#104503 remain intact.
- The bootstrap decision no longer accepts a duplicate projection input
  (21b8ae5): its only production caller already puts the same projection
  into expectedBinding, whose canonical comparator checks it. No separate
  recoverable scenario or public reason contract is lost.

Sibling Codex source contract inspected:
codex-rs/app-server-transport/src/transport/mod.rs:272-284 uses
serde_json::to_string; transport/stdio.rs:82-96 writes those serialized bytes.
codex-rs/app-server-protocol/src/protocol/v2/item.rs:333-352 and
v2/mcp.rs:208-224 define JSON MCP results and string errors.

Net production reduction: 249 lines (+97/-346), excluding tests, fixtures,
test support, generated files and declarations. Phase E memory is untouched.
Detailed scope/provenance coverage remains in the requested .local/y12 ledgers.

Proof so far: independent P0-P2 review scoped-clean, targeted source-graph
typecheck exit 0, runtime value cycles 0, lint-suppressions 3/3, oxfmt and
git diff --check pass. Post-review edits only remove an unused test import
and mechanically migrate one remaining decoder spy without weakening its
assertion. Focused tests, canonical typed lint and static cycles remain
pending; this is not an all-green or merged claim. Package SDK declaration
preparation timed out under load and the selector dry-run exited SIGILL.

Out-of-lane coordinator follow-up: docs/plugins/codex-harness.md:67-69 still
describes incomplete-frame recovery. Replace that description with malformed
frames producing a redacted diagnostic and being dropped while subsequent
valid frames continue normally.

* refactor(codex): remove duplicate approval and projection machinery

Use the standard deep comparator at the existing approval rewrite-denial
boundary, trust the typed host approval result, reuse collected assistant
fallbacks and prepared catalog connection options, remove redundant internal
metadata copies and normalized agent-directory fallback, and inline the sole
account-usage registrar while retaining lazy loading and administrator scope.
Forward optional release arguments once without changing ownership/settlement.

The first focused run exposed cursor retargeting after cache removal. Retain
the existing regression test and carry the resident's captured requestOptions
to every hydration page. Published config can be edited in place; the original
commit's blanket immutable-config description was too strong. No cloning or
global snapshot cache is restored.

Best-effort tradeoffs accepted

- A typed host approval result with a getter/proxy decision can now throw or
  be read normally, rather than receive descriptor inspection. openclaw#70751 added
  synthetic defenses, not a cited human incident. The production host returns
  authenticated Gateway JSON. Null-unavailable, cancellation and two-phase
  decision settlement remain unchanged.
- Non-JSON hook replacements may be conservatively denied by deep comparison
  rather than canonical JSON text. openclaw#82496 protects a real rewrite-denial
  boundary, which remains; the private recursive serializer is not a contract.
- Internal cached session metadata is returned without defensive cloning.
  openclaw#134660 introduced the copies without a metadata-mutation human incident;
  openclaw#164197 moved them unchanged. The sole parser only reads metadata and still
  clones exposed tool input schemas. A future mutating internal consumer must
  own its copy instead of requiring every read to clone the full object.
- The agent directory no longer has a second fallback after connection setup
  already resolved it (openclaw#120366, owner split openclaw#151753). Invalid hand-constructed
  internal runtime objects are unsupported; production always supplies it.

Catalog hydration retains source.assertCurrent before using captured connection
options: WebSocket start options may contain credentials. Source authority is
not an accepted best-effort tradeoff. Opaque cursors still stay with their
selected home's prepared connection options.

Exact sibling Codex contract personally inspected at
8f38d5a877da8c5c2c0b5158e72bb5f2290a3157:
codex-rs/app-server-transport/src/transport/mod.rs:272-282 serializes every
outgoing message with serde_json::to_string. transport/stdio.rs:136-143 only
adds the LF delimiter, and :87-93 writes those serialized bytes directly.
transport/websocket.rs:313-320 sends the same serializer result unchanged.
This confirms the earlier malformed raw-LF reconstruction removal; external
JSON parsing, warn/drop diagnostics and subsequent valid frames remain.

Branch total: 330 net production LOC removed (+125/-455), excluding tests,
fixtures, test support, generated files and declarations. Phase E memory,
inactive foundations, public contracts, live authority, resource limits and
write settlement remain untouched. Detailed requested coverage/provenance is
in the task-local y12 ledgers.

Proof: the 30-suite focused run passed 533 cases and failed one unchanged
native-hook fallback case at its existing five-second execution budget. A
failed-case-only replay hit the same deadline (95s case wall time under load).
No main-side test replay establishes attribution; do not call it main-red or
claim fully green focused proof. Retained cursor regression passed 9/9;
lint-suppressions passed 3/3. Expanded lint's 20 SDK-resolution diagnostics
all reproduce on independently installed pinned main 377d73b with matching
unprepared SDK artifacts (0 introduced, 0 unknown); this is not main CI proof.

Independent final-input review's only finding incorrectly requires a boolean
third deep-comparison argument. Pinned @types/node 26.6.4 explicitly declares
the options object, and isolated Node 26.5 confirms skipPrototype:true behavior.
Reject that finding on source/runtime evidence, not with a cast or suppression.
Earlier full-candidate review's sole index-only cursor finding was resolved by
staging the repair. No remaining accepted actionable finding.

Canonical Madge and SDK-artifact lint preparation remain unproven after prior
load-limited attempts; changed-selector preparation failed with native SIGILL.
Runtime value cycles are zero. The only new import edge is a Node builtin;
account registration contracts index-to-registrar-to-runtime to index-to-runtime.

Final-source catalog proof: 25/25 pass, including obsolete-source list/pin
rejection and cursor affinity. Final targeted source-backed typecheck exits0,
including the exact comparison call questioned by review. Format and diff
checks pass. No public SDK export, schema, protocol, dependency, permission,
durability or retention change. Below500 branch-only handoff; no PR or merge.

* docs: align Codex framing and worktree cache behavior

* fix: preserve MCP schema filtering and release assertions

Retain filtering of unreadable parameter schemas before MCP automation authority capture. Align three Codex sibling assertions with forwarded optional release arguments while preserving their target, count, and lifecycle contracts.

* fix: remote model catalogs stop refreshing on newer modalities (openclaw#173038)

* fix: keep remote model catalogs refreshing across releases

Project both hosted formats to released input modalities and isolate malformed remote model rows. Preserve strict generator validation and transport sanitization. Fixes openclaw#173027.

* test: cover catalog row isolation through refresh and publication

Narrow dynamically loaded parser functions for script typechecking. Update integration expectations to preserve valid rows instead of rejecting entire downloads, as required by openclaw#173027.

* fix: retain the last catalog when no valid model rows survive

* fix: preserve standalone pricing-only v1 catalogs

* fix: omit catalog models with no supported input modalities

* fix: preserve catalog publication gates after modality filtering

* fix: omit empty inputs produced by catalog hydration

* perf(models): preserve catalog sanitizer entry compaction

* test(gateway,media,secrets,browser,agents,otel): remove low-value tests (batch d123) (openclaw#173141)

* test(gateway): deslop x4070 tests

* test(media-understanding): deslop x4071 tests

* test(secrets): deslop x4072 tests

* test(browser): deslop x4074 tests

* test(agents): deslop x4073 tests

* test(diagnostics-otel): deslop x4077 tests

* test: retain distinct session and credential rollback coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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