Skip to content

refactor(codex): deslop Codex plugin sixth pass - #160912

Merged
steipete merged 3 commits into
mainfrom
deslop/l154-codex-sixth-pass
Sep 29, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/l154-codex-sixth-pass

Conversation

@steipete

@steipete steipete commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Remove redundant Codex plugin coordination and projection code left after the earlier five cleanup passes, and fix a connection-health observer that can miss an already-closed client.

User Impact

Remote Codex connections resume reconnecting when the leased client closes before the health observer subscribes. The remaining changes are internal refactoring: app-server protocol usage, openai auth/runtime/catalog routes, native subagent lifecycle and authority, and transcript/tool bytes remain unchanged. No configuration, schema, retention, permission, dependency, or update behavior changes.

Why This Change Was Made

Recent merged subtree history and name-only diffs were read first, including #156297, #157080, #158613, #159225, and #159726. The size-first sweep began with untouched production files over 150 lines, then covered the remaining production owners.

  • Consolidate sandbox, Gateway, and node shell alias assembly within the existing tool builder, retaining route order, exclusions, projections, and node discovery.
  • Remove Tasks-only native recovery inputs and outputs whose sole callers were retired; reuse current-parent/completion-owner predicates and remove redundant receipt and notification forwarding.
  • Share native receipt/assignment binding validation and mutation assembly, while preserving exact authority checks, errors, session generation, and lifecycle filtering.
  • Reuse one warm-binding patch and existing attempt/SDK type owners; consume validated resume-turn shapes directly.
  • Consolidate Computer Use marketplace selection, readiness/status projection, and native reviewer endpoint parsing. Remove duplicate auth forwarding and guards already enforced by their callers.
  • Give stable policy hashing one local owner, preserving serialization, SHA-256 bytes, prefixes, and truncated profile suffixes across all callers.
  • Derive catalog request signatures from their owners, keep the shared snapshot contract in a type-only module, inline the single-use native page adapter, and describe optional bounded metadata fields once.
  • Simplify inventory alias projection, quota-window selection, model-label normalization, transcript attestation and missing-tool bookkeeping without changing values or precedence.
  • Reuse shared conversation lookup/provider normalization, a dependency-free account email predicate, SDK JSON coercion, and diagnostic confirmation types; remove unused configuration carriers and a test-only cache revision accessor.
  • Use the public SDK abortable sleep, keeping connection-health registration lazy, and parse each sandbox socket URL once at its authorization boundary.

BELOW-THRESHOLD-PR-READY. 589 net production LOC removed (595 added, 1,184 deleted), plus 35 added/7 deleted test lines and one removed assertion allowance. The complete size-sorted coverage log includes every hand-authored production file over 200 lines: 196 TypeScript files and the runtime manifest. All smaller production modules, including the two new shared modules, were read.

Fixes Found Along the Way

The connection-health monitor previously waited only for future close notifications. A client could close after acquisition's last check but before the observer registered, leaving the monitor waiting indefinitely. The waiter now consumes the client's recorded close state before subscribing. A regression uses a real in-memory client and fake timers; it fails on the original owner with one acquisition instead of two and passes with the repair.

Validation caught and corrected an eager retry-helper import, an obsolete assertion allowance, a narrowing-losing array filter, and guard-incompatible reader/map rewrites. Original owner code was retained where the rewrite added no sound improvement. Hosted CI also found two new Madge cycles. Moving the unchanged email predicate and request snapshot type below their consumers removes both cycles; runtime and Madge checks now both report zero. No assertion, timeout, or retry policy was weakened.

Evidence

Current candidate ca5e43df0e1d56e631f82997d67b97912eabe2a8, based on 6d644f2780502b3e760e869f4cfa33407e9b7585. The conflict with #160879 was resolved by retaining main's replacement command tests; our displaced hunk only removed an unused argument expectation from a retired test. Production patches were preserved by the rebase (git range-diff), then the two CI cycle fixes were independently reviewed and verified.

Current-head hosted CI is green, including openclaw/ci-gate and the security-sensitive review. The previous head's architecture failure was caused by this PR and was fixed in source; its cancelled sibling jobs are not counted as passing evidence.

All tests, checks, and builds ran through the repository wrapper on Blacksmith Testbox. Final proof used tbx_01m3nptkxabrj21mjvbtha1d7k (lease run); verified source tree 3187d129dd3fb27b243fe1ffe52fc2751bf6d119 matches the candidate tree. Full runtime proof used tbx_01m3njgemzdr0wmkkecx31qpmh on the same refreshed base before the unchanged predicate/type relocation. Both leases are stopped. The wrapper results, rather than the bootstrap Actions conclusion, are the execution evidence.

Remote command Result Wall time
pnpm test:extensions:batch codex 6,360 passed; 11 existing skips 1,526 s
pnpm check:architecture Passed; zero runtime and Madge cycles 203 s
node scripts/check-changed.mjs --base origin/main --head HEAD Passed, including extension/test types, lint, dead exports and guards 590 s
node scripts/run-vitest.mjs — final account/catalog/registration and import selections listed below 203 passed 56 s
pnpm build Passed on final tree 312 s
pnpm plugin-sdk:api:diff --base origin/main --head HEAD Passed; no SDK API changes 131 s

Final selected test paths: extensions/codex/src/command-account.test.ts, extensions/codex/src/commands.test.ts, extensions/codex/src/session-catalog-native-authority.test.ts, extensions/codex/src/session-catalog-request-lifetime.test.ts, extensions/codex/registration-imports.test.ts, src/infra/fs-safe-import-boundary.test.ts, test/plugin-extension-import-boundary.test.ts, test/test-helper-extension-import-boundary.test.ts, and test/scripts/extension-import-boundary-checker.test.ts.

The full suite preceded only the final unchanged-body/type relocation. Final affected tests, architecture, changed-file checks, build and API comparison passed on the exact candidate tree. The new connection-health regression failed on the original owner with one acquisition instead of the expected reconnect, then passed with the fix. Changed-file measurements using pnpm test <file> --maxWorkers=1: connection health 8 tests/38.27 s wall; plugin activation 19/27.83 s; conversation control 18/37.51 s. The new regression uses fake timers and an in-memory native client, with no process/Gateway boot or added real wait. On current-head CI, reported case durations sum to 2.467 s for the 8 connection-health cases, 0.127 s for 19 activation cases, and 2.590 s for 18 conversation-control cases; the new reconnect regression itself reports 0.017 s. The containing health, activation, and conversation jobs took 262, 201, and 193 seconds respectively, including setup and sibling files. Other test changes remove only retired input assertions and a test-only revision accessor.

Independent review completed through P2; the final correction and cycle-fix reviews are scoped-clean. No accepted/actionable findings remain. The observed-turn fallback concern was rejected with current caller/history evidence: #159179 removed its sole supplying readTask caller, and neither remaining history-recovery caller supplies the option. Pre-abort and stdio concerns were verified against retained caller/entry guards.

The latest ClawSweeper source review found no actionable code or security findings and explicitly found no stored-data format or schema change. Its remaining compatibility checklist is a path-classification false positive: migration/apply.ts:130 only drops the unused transient authSource.authPath field; migration/auth.ts:162 still reads credentials through the same SDK owner using codexHome, and model-cache reads are unchanged. computer-use-readiness.ts:101 shares returned status-object construction; retry, repair, and storage operations are unchanged. No schema, stored bytes, transactions, durability, retention, permissions, or upgrade behavior changed. Existing migration/auth and Computer Use tests are included in the passing full Codex batch. The automated checklist still shows blocked; this source-backed assessment rejects that item rather than claiming the bot cleared it.

Lease lifecycle

All leases used Blacksmith Testbox with one active command per lease. tbx_01m3mzres9yzde9xac33z1t3mm expired before proof; stop confirmed it was already stopped. tbx_01m3n44qem7dkfk49fkq5mfs07 failed warmup and stopped automatically. tbx_01m3n4h7qdv3kj8s1p84djagkr supplied the regression negative control and focused tests, then was explicitly stopped. tbx_01m3n8dxq539dfqm6dkzy9qj0v supplied the first full proof and later expired; completed state and stop were reconciled. tbx_01m3nfbf4s5e51sq59ds98zbps supplied the initial final-tree changed checks and was stopped. After conflict refresh, tbx_01m3njgemzdr0wmkkecx31qpmh supplied fresh full proof and was stopped. tbx_01m3nptkxabrj21mjvbtha1d7k supplied the final cycle repair proof and was stopped. No active lease remains.

Expired leases, failed warmup and interrupted snapshot preparation are excluded from passing evidence. No release, live Gateway change, or flaky-test workaround.

Personally inspected sibling Codex Rust contracts

Inspected sibling revision 8f38d5a877da8c5c2c0b5158e72bb5f2290a3157 before implementation:

  • codex-rs/app-server-protocol/src/protocol/common.rs:507-620: request/method ownership and serialization.
  • codex-rs/app-server-protocol/src/protocol/v2/thread.rs:62-180,354-480,1209-1254,1378-1458,1535-1547,1649-1735 and thread_data.rs:204-293: start/resume configuration, native process identity, catalog fields, nullable metadata, and pagination.
  • codex-rs/app-server-protocol/src/protocol/v2/turn.rs:167-334: literal input, turn overrides, steering preconditions, and interruption IDs.
  • codex-rs/app-server-protocol/src/protocol/v2/item.rs:252-380,1432-1486,1544-1679, v2/mcp.rs:755-804,864-895, and codex-rs/protocol/src/dynamic_tools.rs:11-78: native item and tool output shapes, approval and elicitation contracts.
  • codex-rs/core/src/tools/handlers/multi_agents/send_input.rs:45-145, close_agent.rs:65-145, core/src/agent/control/legacy.rs:8-115, core/src/agent/control.rs:661-721, and core/src/context/subagent_notification.rs:21-45: accepted submissions, previous-status close results, awaited shutdown, and classified child-result delivery.
  • codex-rs/app-server-transport/src/transport/mod.rs:231-269, transport/websocket.rs:331-388, and app-server/src/request_processors/environment_processor.rs:16-27: definite pre-enqueue overload rejection, socket lifetime, and environment registration.
  • codex-rs/app-server-protocol/src/protocol/v2/account.rs:18-40,60-106,331-344,608-620,696-704, v2/plugin.rs:128-194,250-263, v2/apps.rs:31-64,175-185, and v2/config.rs:386-405: authentication, sparse usage facts, installed versus catalog metadata, and effective configuration.
  • codex-rs/connectors/src/app_tool_policy.rs:166-230, hooks/src/engine/discovery.rs:775-808, app-server/src/request_processors/config_processor.rs:203-213, and app-server-protocol/src/protocol/v2/model.rs:38-64,119-151,170-182: policy precedence, exact hook fingerprints, configured-provider capabilities, and model projections.
  • codex-rs/protocol/src/protocol.rs:3115-3128,3220-3248, message-history/src/lib.rs:62-66, cli/src/login.rs:443-497, and app-server-protocol/src/protocol/v2/feedback.rs:11-29: native metadata, history records, local login probing, and diagnostics identity.

No new direct @openclaw/* imports or Plugin SDK surface expansion.

Complete size-sorted production coverage

Baseline: 5c30c9afcb5ec0d27085cbecce199ca986e532f5. Every hand-authored production TypeScript file and runtime manifest over 200 baseline lines, sorted by size. All smaller production modules were also read. Generated protocol schema artifacts were preserved unchanged and audited through their protocol/validator owners and sibling Rust definitions.

Base LOC File Status and result
2069 extensions/codex/src/app-server/native-subagent-monitor.ts READ — Reused the existing parent-current predicate and direct-child release function, localized receipt-owner selection, and removed redundant restore aliases; preserved custody releases and post-release map reads.
1450 extensions/codex/src/app-server/shared-client.ts READ Shared and isolated startup have different lease, authentication, generation-drain and cancellation owners; preserve fallback ordering and close settlement. Fifth pass already removed duplicated startup types.
1332 extensions/codex/src/app-server/auth-bridge.ts READ Simplified auth-profile parameter forwarding and inlined the single-use subscription predicate; removed unreachable fourth credential-kind branch after the SDK discriminated union. Prepared handoffs, refresh queues, identity checks and native-home ownership remain unchanged.
1281 extensions/codex/src/app-server/approval-bridge.ts READ Concrete command, network, file and permission grants differ in scope, byte revalidation and relay authority. Preview limits and stable comparison preserve rejection semantics; no equivalent public helper found.
1167 extensions/codex/src/app-server/side-question.ts READ; reuse the attempt owner's option type instead of redeclaring its hook and runtime options. Fork/approval/text-last/cleanup contracts remain distinct from ordinary attempts.
1122 extensions/codex/src/supervision-tools.ts READ — Retained explicit endpoint copying and separate connection fingerprints; the proposed map rewrite added no ownership improvement and conflicted with the repository allocation rule. Legacy endpoint parsing and per-await native authority checks remain necessary.
1065 extensions/codex/src/app-server/client.ts READ. Reused public SDK abortable sleep while preserving cancellation class/cause/write certainty; derive runtime identity from the handshake projection owner; removed an abort check duplicated synchronously by the sole request-attempt caller.
1059 extensions/codex/src/app-server/computer-use.ts READ Consolidated marketplace default-discovery decision, missing/empty MCP status projection, and installation/exposure status creation; remote marketplace identity has one name field. RPC payloads and discovery/installation order are unchanged.
984 extensions/codex/src/app-server/dynamic-tools.ts READ — The shared host invocation already owns execution. Its retained adapter work separately projects registration/quarantine, media delivery, accepted spawn facts, and exact UTF-16 tool-result budgets; merging them would cross real ownership/byte boundaries.
953 extensions/codex/src/app-server/elicitation-bridge.ts READ Hosted apps, configured MCP and Computer Use have different consent and persistence rules. Schema field inference, metadata matching and display sanitization remain distinct contracts.
880 extensions/codex/src/app-server/runtime-artifact.ts READ Retained: bounded byte hashing, filesystem identity checks, launcher attestation and canonical descriptor admission have separate correctness/security contracts; no sound structural deletion remains.
862 extensions/codex/src/app-server/dynamic-tool-build.ts READ — Consolidated sandbox, Gateway, and node shell alias assembly into one pass with shared exec/process/name lookup. Preserved existing alias order, per-route policy/exclusions, Gateway projection capability and guarded ask setting, and awaited node discovery.
846 extensions/codex/openclaw.plugin.json READ — Retained manifest discovery, shipped migration routes, config schema and presentation strings; changing this declarative contract is outside behavior-preserving cleanup.
840 extensions/codex/src/app-server/session-binding.ts READ; remove the unconsumed authority type alias and infer the canonical SDK owner's return type. Retain lease, generation, adoption, and clear distinctions.
824 extensions/codex/src/migration/session-binding-sidecars.ts READ — retained distinct discovery, original-owner revalidation, compare/update, lease and archive phases; their similar checks protect different awaited boundaries.
789 extensions/codex/src/app-server/client-runtime.ts READ. Retained claimed, retained, and releasing transitions: each has distinct generation ownership and post-await restoration/eviction obligations; merging them would hide native subscription custody.
750 extensions/codex/src/app-server/turn-router.ts READ; correlation, prebind buffering, physical closure, receipt observation, and terminal draining carry different ordering contracts; no sound merger found.
746 extensions/codex/src/app-server/protocol.ts READ — Retained typed wire method/response pairs, compatibility fields, and generated-protocol projection types; these express distinct upstream contracts rather than duplicate runtime policy.
745 extensions/codex/src/app-server/event-projector-assistant.ts READ — Raw echoes, typed completion, async delivery, commentary, and selected final answers have different authority and byte rules. Existing scans deliberately differ on trimming, empty answers and echo filtering; no sound single traversal policy found.
738 extensions/codex/src/session-catalog-index.ts READ Retained distinct restore, native hydration, event publication and rollout freshness fences; no interchangeable owner or redundant state found.
736 extensions/codex/src/app-server/compact.ts READ; separate request acceptance, native completion, physical exit, and retained subscription custody must remain explicit.
733 extensions/codex/src/app-server/inference-proxy.ts READ Retained separate HTTP/WS admission and close settlement; shared transport preparation already exists, and further merging would obscure distinct socket lifecycle contracts.
730 extensions/codex/src/app-server/context-engine-projection.ts READ — Fifth pass already unified payload projection; later #159651 owns conversation-text retention. Kept the separate current-request, quoted-history, image-span, and attachment budgeting invariants.
711 extensions/codex/src/app-server/session-binding-record.ts READ; share the identical receipt/assignment read fence and use the existing non-array-record coercer for legacy plugin app IDs. Preserve strict schema and opaque metadata rules.
706 extensions/codex/src/app-server/attempt-startup.ts READ; retry cleanup distinguishes acquisition, reservation, environment, and accepted native subscription ownership. Fifth-pass startup-result removal is already present.
705 extensions/codex/src/app-server/thread-requests.ts READ; common start/resume/fork config already has one owner; feature patches encode distinct supported policy contracts.
703 extensions/codex/src/app-server/run-attempt-tool-setup.ts READ; advertised and executable tool lists have different native catalog and requester-MCP contracts; creator authority is separately fenced.
700 extensions/codex/src/app-server/dynamic-tool-execution.ts READ — Timeout, abort, and settled tool execution have distinct cancellation/cleanup ownership, while question, node, computer and message budgets protect different contracts. No owner-neutral deletion found.
696 extensions/codex/src/app-server/thread-lifecycle-run.ts READ; rotation and transient restrictions have different durable-binding effects; no descriptor abstraction justified.
688 extensions/codex/src/app-server/run-attempt-active-turn.ts READ; native receipt, transcript persistence, steering acceptance, and permission restart each need their current ordered fences.
688 extensions/codex/src/app-server/plugin-thread-config.ts READ Moved stable policy hashing to config-policy-json's canonical fingerprint owner; retained all discovery, activation, admission, and thread-policy precedence.
688 extensions/codex/src/app-server/event-projector-tool-transcript.ts READ — Carry missing call ID/name entries directly instead of copying IDs then re-reading their owning maps with impossible fallback branches. Preserve transcript-before-trajectory order, first-error name precedence, retained-process output, and exactly the same result payloads.
687 extensions/codex/src/app-server/run-attempt-finalize.ts READ; repeated terminal projection deliberately rechecks settlement while awaited transcript writes are pending.
685 extensions/codex/src/app-server/plugin-inventory.ts READ Inlined one-use ownership projection and tool-alias forwarding; compute app-name prefixes once while preserving every writable tool alias and final order.
685 extensions/codex/src/app-server/event-projector.ts READ — Item-start, item-complete, terminal snapshots, and raw responses have different ordering/checkpoint authority; compaction revalidation after each await is required. Kept their explicit sequencing.
684 extensions/codex/src/node-cli-sessions.ts READ — replaced duplicate JSON parsing/record filtering with SDK safeParseJson and asNonArrayRecord; preserved native home checks, command lifetime, JSONL extraction and truncation.
684 extensions/codex/src/conversation-binding-preparation.ts READ — removed duplicate provider normalization and agent-lookup implementations; consume the conversation control owner used by model updates.
678 extensions/codex/src/app-server/rate-limits.ts READ Removed redundant empty-candidate branch and duplicated comparator construction; authoritative availability and latest exhausted-window reset selection remain intact.
675 extensions/codex/src/app-server/native-hook-relay.ts READ — Reused the canonical policy fingerprint owner with identical serializer, SHA-256 and prefix bytes. Retained bounded admission waiters, per-waiter abort cleanup, direct-child generation claims and independently authorized post-yield retention.
674 extensions/codex/src/app-server/scheduled-app-authority.ts READ Reused canonical policy fingerprint owner for stored authority and effective config; retained bounded pagination, exact account/endpoint authority, and current-tool ceilings.
671 extensions/codex/src/app-server/thread-lifecycle-io.ts READ; fifth-pass final-config and binding-policy sharing is complete; start and resume have different rollback ownership.
669 extensions/codex/src/session-catalog-list-operation.ts READ Retained independent local progress, fail-soft node publication and request-release ownership; existing shared host publication already owns delivery.
667 extensions/codex/src/app-server/native-subagent-submission-owner.ts READ — Retained separate accepted receipt, detached observation, promotion, and durable settlement phases; combining them would alter release order or restart protection.
662 extensions/codex/src/app-server/thread-supervision.ts READ — Retained native probe versus durable branch operations and uncertain-write reconciliation; their compensation and failure contracts differ.
657 extensions/codex/src/app-server/run-attempt-prompt.ts READ; input/context range handling preserves different portions of prompt bytes; prompt-only rebuild intentionally retains developer instructions.
654 extensions/codex/src/app-server/run-attempt-resources.ts READ; retained monitor, client, process, route, and subscription claims have distinct teardown lifetimes; no safe common lifetime object found.
654 extensions/codex/src/app-server/native-subagent-model-source.ts READ — Retained source references, execution guards, and admission captures as distinct lifetimes; exact-turn binding and cancellation are required authority boundaries.
639 extensions/codex/src/app-server/inference-routing.ts READ Retained provider-specific capability checks, auth-mode fencing, optional sibling projection, and route custody; similar branches serve different native provider contracts.
637 extensions/codex/src/app-server/run-attempt-connection.ts READ; preparation resolves placement before shell identity and retains generation authority independently of host capability identity.
636 extensions/codex/src/migration/auth.ts READ — removed unused authPath carrier from CodexAuthSource; explicit migration still asks the native credential-storage owner using codexHome.
627 extensions/codex/src/app-server/bounded-turn.ts READ; shared ephemeral collector already owns correlation; private stdio and configured transport isolation are intentionally different.
626 extensions/codex/src/app-server/config-options.ts READ — Retained explicit field-specific configuration precedence and env-variable spellings. Shared local reader candidates duplicated coercion seams and were removed after the repository guard identified them.
617 extensions/codex/src/command-plugins-management.ts READ — retained separate install, authorization, refresh and readiness outcomes; existing shared identity/readiness helpers already own common behavior.
614 extensions/codex/src/migration/plan.ts READ — retained shipped policy repairs and source/destination conflict checks; similar memory and skill flows have different file and collision contracts.
611 extensions/codex/src/app-server/event-projector-tool-progress.ts READ — Bounded streamed output, terminal output, display echoes and raw signatures intentionally differ; diagnostic terminal state also preserves earlier mutating failures. No sound consolidation without new policy flags.
604 extensions/codex/src/app-server/event-projector-events.ts READ — Guardian warning pairing, approval review, native snapshots, and subagent activity have independent payload contracts; existing normalized-item projection is already shared with the subagent observer.
602 extensions/codex/src/migration/source.ts READ — fifth pass already consolidated unavailable plugin projection; remaining inventory, account and source-home rules express distinct migration facts.
586 extensions/codex/src/app-server/sandbox-exec-server/http.ts READ — Retained separate RPC/header completion and process settlement, streaming versus buffered output, redirect validation, and DNS pinning. Cross-language checks protect different boundaries.
571 extensions/codex/src/command-handler-actions.ts READ — removed unused pluginConfig forwarding from model selection; keep different model, fast, permissions, goal and compaction authority boundaries.
570 extensions/codex/src/command-handler-bindings.ts READ — retained exact native subscription transfer and rollback guards; resume, conversation binding and node binding do not share a safe generic mutation path.
565 extensions/codex/src/session-catalog-control.ts READ APPLIED: inlined the single-use generic native-page adapter into index.readNative, retaining read bounds, projection, health settlement and diagnostics.
564 extensions/codex/src/session-catalog-parsing.ts READ APPLIED: fixed optional metadata descriptor list and shared timestamp loop replace repeated validation/projection; nullable name/recency, omission, limits and error labels are retained.
560 extensions/codex/src/app-server/app-inventory-cache.ts READ Removed test-only getRevision and one-use snapshot-stripping wrapper; freshness, targeted merge, in-flight generation, diagnostics, and redaction remain owned here.
544 extensions/codex/src/native-thread-tool.ts READ — retained fork/attach and archive fencing, current-source checks and raw-transcript projection; tool variants have different effect contracts.
540 extensions/codex/harness.ts READ — retained lazy callbacks, shipped V1 isolated completion adapter, V2 authority and recovery; capability methods are runtime entry points, not dead wrappers.
537 extensions/codex/src/conversation-binding.ts READ — migrated shared agent lookup to conversation-control alongside its existing active-turn import; retained independent start/resume subscription settlement.
536 extensions/codex/src/app-server/sandbox-exec-server/filesystem.ts READ — Retained bounded handle reservations, post-await ownership checks, pinned mutation authorization, and recursive copy checks; their ordering prevents cancellation and path races.
532 extensions/codex/src/app-server/sandbox-exec-server.ts READ. Parse accepted socket URLs once at the authorization boundary and pass the parsed URL into node-lease selection. Retained the startup connection discriminant because it preserves backend/fs-bridge narrowing across server startup.
531 extensions/codex/src/session-catalog.ts READ Retained config/home admission, lazy action imports and partial-list scope ownership; mapping filters provider-only fields deliberately.
526 extensions/codex/src/app-server/native-subagent-submission-call.ts READ — Retained opaque steering versus new-turn receipt handling and predecessor resolution; collapsing these would treat accepted input as completed or newly executing work.
522 extensions/codex/src/app-server/thread-lifecycle-warm.ts READ; use one binding patch for persisted and returned warm-thread facts; retain incarnation, native policy, and subscription fences.
518 extensions/codex/src/app-server/native-subagent-model-input.ts READ — Retained sender/receiver revalidation after the native read, provider qualification, and ownership transfer; these guard awaited work rather than revalidate already trusted data.
518 extensions/codex/src/app-server/event-projector-native-tool-lifecycle.ts READ — Native activity/audit, MCP approval correlation, raw web-search terminal facts and retained background commands require distinct state. Standalone side-question use still needs its own notification admission.
516 extensions/codex/src/app-server/sandbox-exec-server/processes.ts READ — Retained distinct spawn, exit, close, remote termination, finalization, and polling lifetimes; output and environment policy already use their canonical SDK owners.
515 extensions/codex/src/app-server/computer-use-service.ts READ Retained: signed outer/client identity checks, staging, concurrent-winner detection and rollback protect different publication races; fifth pass already shared current-status construction.
509 extensions/codex/src/app-server/sandbox-exec-server-node-relay.ts READ. Credential scans protect separate headers, percent-decoding, raw duplicate JSON keys, nested objects, body bounds, and environment channels; no public SDK classifier preserves all these contracts.
504 extensions/codex/src/app-server/request.ts READ — Removed redundant module narration; retained pre-acquisition/per-write guards, total-deadline ownership, retry scope, and isolated process settlement.
500 extensions/codex/src/session-catalog-adoption.ts READ Retained session generation, imported history and pinned source ownership; local continuation single-flight has different scope from native source FIFO.
497 extensions/codex/src/app-server/attempt-context.ts READ; model reports and byte-preserving context rendering use different normalization rules; no broad string helper substitution is equivalent.
491 extensions/codex/src/command-diagnostics.ts READ — retained confirmation, private-route, cooldown and per-target upload authority; similar branches produce intentionally different consent/output contracts.
490 extensions/codex/src/migration/apply.ts READ — stopped constructing unused authPath; retained plugin activation partial outcomes and deferred config-promotion handling.
480 extensions/codex/src/app-server/native-process-authority.ts READ — Inlined the sole-use findCurrentCommand wrapper into ownsCurrentCommand with the same currentness assertion and matching predicate.
467 extensions/codex/src/app-server/transport-process-snapshot.ts READ. Retained full asynchronous process census, selected synchronous procfs identity reads, and isolated cmdline reads: their distinct blocking/deadline and disappearance evidence requirements cannot be merged safely.
460 extensions/codex/src/app-server/thread-lifecycle-preflight.ts READ; fifth-pass binding/final-config owners already serve callers; model source retention and managed policy admission remain necessary.
460 extensions/codex/src/app-server/settled-turn-projection.ts READ — Retained complete current-evidence validation, atomic prior-turn omission, pairing checks, and exact tool-result projection; shorter shared handlers would mix different budgets and byte contracts.
457 extensions/codex/src/command-plugins-readiness.ts READ — retained runtime/account evidence distinctions, bounded app/read batching and authorized-link projection; typed API fields still cross a native transport boundary.
455 extensions/codex/src/command-formatters.ts READ — moved the existing email predicate to a dependency-free command-account-email leaf shared with account labels; rendered text and escaping remain byte-identical.
454 extensions/codex/src/command-diagnostics-support.ts READ — confirmation input derives from the stored confirmation type and projects that record directly, eliminating duplicated field inventories.
446 extensions/codex/src/app-server/startup-binding.ts READ; pinned-descriptor tail reads and backwards multi-chunk token snapshots protect different filesystem and model-budget risks.
437 extensions/codex/src/app-server/run-attempt-turn-request.ts READ; input mapping, turn/start admission, cancellation recovery, and provider acknowledgment have distinct authority boundaries.
436 extensions/codex/src/session-catalog-rollouts.ts READ Retained bounded newest-file heap, safe path scan, sampled JSONL reads and native-authoritative metadata merge; collapsing with immutable snapshot reads would weaken different guarantees.
435 extensions/codex/index.ts READ — retained lazy state adapters and registration callbacks; these defer storage access and capture the active runtime rather than merely forwarding static operations.
432 extensions/codex/src/app-server/config-reviewer-policy.ts READ Unified the duplicated native endpoint URL parser with an explicit expected hostname; malformed-value and trusted-host behavior remains identical.
427 extensions/codex/src/app-server/remote-workspace-media.ts READ. Retained remote fixed argv reader, per-chunk identity verification, native output bounds, aggregate byte admission, and immutable local staging. The media mapping duplication was already removed by #158613.
424 extensions/codex/src/command-rpc.ts READ — retained prepared native authentication, overload-safe resume and response settlement; repeated authority calls guard distinct asynchronous boundaries.
424 extensions/codex/src/app-server/transport-process-containment.ts READ. Ancestry quiescence, destructive-signal revalidation, observed settlement, and failure unwind retain different custody obligations. No sound structural collapse without changing process authority.
423 extensions/codex/src/app-server/event-projector-tool-items.ts READ — Raw transcript output and sanitized progress text deliberately differ; file change summaries, bounded diffs and inert patch recognition are separate contracts rather than duplicate helpers.
420 extensions/codex/src/app-server/inference-dispatch.ts READ Retained metadata authorization, upload replay, raw-byte preservation, and acquired model-release custody; no safe coalescing across those boundaries.
417 extensions/codex/src/app-server/native-subagent-history-recovery.ts READ — Removed the unused observedTurns option, predecessor branch, and assignmentTurnId output left when Tasks retirement deleted their only caller/readers. Kept current native history and pending-turn recovery.
413 extensions/codex/src/app-server/run-attempt-server-requests.ts READ; request kinds intentionally have different progress and fallback rules; dynamic tool execution is already single-claim.
409 extensions/codex/src/app-server/protocol-validators.ts READ Reachable-schema materialization, default application and validation are separate stages; cloning prevents protocol mutation, while passive-turn admission is an independent boundary.
407 extensions/codex/src/app-server/transcript-mirror.ts READ — Removed the single-use async block-reply forwarder; the existing delivery owner invokes the canonical SDK prompt delivery operation with the same captured callback, empty questions, exact intro text and delivery intent.
402 extensions/codex/src/session-catalog-node-continue.ts READ Retained node capability admission, exact home lookup and post-conversation-binding finalization; node history transport differs from local import ownership.
401 extensions/codex/src/command-handler-args.ts READ — retained command tokenizer: SDK splitCommandArgs differs for escaped characters, empty quoted tokens and unclosed arguments; fifth-pass shared thread argument parser remains canonical.
399 extensions/codex/src/app-server/attempt-steering.ts READ; accepted, dispatched, consumed, sealed, and canceled states protect replay and ordering; no state can be collapsed.
394 extensions/codex/src/conversation-control.ts READ — one owner now supplies conversation lookup and provider normalization; removed unused model pluginConfig and fast-mode pluginConfig/agentDir/config inputs.
380 extensions/codex/src/command-handlers.ts READ — removed stale model-selection pluginConfig forwarding; retained named command dispatch and independent native plugin refresh connection ownership.
379 extensions/codex/src/command-account.ts READ — reuse the already-parsed profile tail and shared leaf email predicate instead of parsing and validating it again in a one-use wrapper.
379 extensions/codex/src/app-server/transcript-mirror-write.ts READ — Unified attestation construction before the optional idempotency field. Kept mirror lock, post-await authority checks, hook restoration, metadata ownership, SQLite race handling and publication semantics unchanged.
379 extensions/codex/src/app-server/run-attempt-runtime.ts READ; supervised auth, model ownership, configured MCP, and hosted-search support each have named contracts.
377 extensions/codex/src/session-catalog-diagnostics.ts READ Retained bounded diagnostic tuples, sink isolation and captured lifetime scope; validation protects published diagnostic values.
372 extensions/codex/src/app-server/computer-use-marketplace.ts READ Retained: wrapper ownership, source matching and post-staging generation admission are needed for safe native marketplace replacement; recent native-disable migration stays intact.
364 extensions/codex/src/app-server/upstream-fork-boundary.ts READ; text-only identity, steer refusal, prefix attestation, and canonical source revalidation are necessary to avoid history drift.
364 extensions/codex/src/app-server/transcript-history-projection.ts READ — Fifth pass already consolidated assistant defaults/refusal projection; native-prefix imports and visible local history intentionally have distinct inclusion/bounding order.
364 extensions/codex/src/app-server/canonical-session-fork.ts READ Native history/catalog equality, live subscription custody and uncertain-write rollback require separate assertions after awaited work. Canonical display-prefix copying cannot share imported-fork policy.
363 extensions/codex/src/node-exec-server.runtime.ts READ — retained incremental UTF-8/CRLF framing, readiness admission and descendant-aware cleanup; generic text readers cannot preserve its byte bounds and duplex backpressure.
359 extensions/codex/src/app-server/sandbox-exec-server/fs-policy.ts READ — Retained path specificity, deny ordering, recursive protected descendants, and the intentionally limited glob parser; no interchangeable shared helper has this exact policy.
356 extensions/codex/src/app-server/event-projector-result.ts READ — Already composes one owner per assistant, tool, usage, media and transcript responsibility; terminal snapshots and retained command reconciliation prevent reentrant callbacks from altering the result.
355 extensions/codex/src/migration/native-task-assignments.ts READ — retained shipped Tasks recovery lineage and compare-and-apply import marker; repeated prepareAssignment validates current owner immediately before committing.
352 extensions/codex/src/app-server/native-subagent-parent-owner.ts READ — Preserved fresh parent-resume fix #160608, asynchronous custody capture, owner rotation, and ordered unregister settlement.
343 extensions/codex/src/app-server/native-subagent-close-owner.ts READ — Retained captured assignment targets and runtime-absence confirmation; Codex close results report prior status and cannot establish shutdown alone.
335 extensions/codex/src/session-cli.ts READ — retained terminal sanitation, host cursor ownership and operation-specific response validation; earlier pass already shared CLI option setup.
331 extensions/codex/src/app-server/user-input-bridge.ts READ — Retained per-turn queued prompts, cancellation, secret transcript exclusion, own-property snapshots, and separate MCP elicitation outcomes.
331 extensions/codex/src/app-server/native-subagent-completion-delivery.ts READ — Reused the owner's currentness predicate after delivery and in its catch path; merged identical unregister exits while preserving claim ordering.
326 extensions/codex/src/session-catalog-node-adoption.ts READ Retained native source markers, deterministic adoption keys and replay-safe finalization; local adoption uses a distinct binding-generation contract.
319 extensions/codex/src/app-server/turn-params.ts READ; omission, null clearing, and turn overrides have different upstream meanings; prompt bytes remain unchanged.
319 extensions/codex/src/app-server/thread-lifecycle-adoption.ts READ; manual attachment requires stricter home/catalog checks than ordinary resume; shared teardown observation is already canonical.
315 extensions/codex/src/app-server/plugin-thread-app-admission.ts READ Retained complete-vs-targeted inventory and managed-layer admission distinctions, identity alias conflicts, and thread-scoped reads.
313 extensions/codex/src/app-server/attempt-workspace-context.ts READ; apparent tool-name normalizer duplicate is not equivalent: the other owner additionally applies aliases. Retain simple trim/lowercase semantics.
311 extensions/codex/src/session-catalog-homes.ts READ Retained config-generation discovery cache, explicit home policies and source revalidation; process-home versus agent-home selection is a shipped contract.
310 extensions/codex/src/session-catalog-terminal.ts READ Retained separate fresh-start versus resume arguments, local/node executable resolution and current source admission; command setup has distinct environment requirements.
308 extensions/codex/src/app-server/native-skill-isolation.ts READ Retained: bounded symlink-aware personal-root scan and per-client invalidation guard preserve provenance and avoid disabling plugin/extra-root skills.
305 extensions/codex/src/app-server/transport-websocket.ts READ. Kept correlated 20-second pongs, five-miss policy, activity resets, framing, and backpressure. The public SDK keepalive uses materially different 25-second/no-payload behavior.
304 extensions/codex/src/app-server/config-parsing.ts READ Retained: canonical Zod config schemas and explicit retirement/network-failure diagnostics preserve configuration admission; no duplicate policy owner found.
296 extensions/codex/src/app-server/protocol-control-plane.ts READ DTOs represent different native APIs and optional/null fields; similar installed/listed and app summary shapes have distinct wire contracts.
296 extensions/codex/src/app-server/event-projector-media.ts READ — Rejected replacing its Base64 estimator: local whitespace is SP/TAB/LF/CR, while the SDK estimator ignores every ASCII control <=0x20, changing oversize rejection. Materialization retries and source-delivery aliases are required.
296 extensions/codex/src/app-server/canonical-fork-preparation.ts READ; creation can inspect policy but cannot provision a role-required environment or install plugins; these checks are not ordinary startup duplicates.
295 extensions/codex/src/app-server/shared-client-lifecycle.ts READ — Retained explicit versus anonymous leases, detached entries, startup ownership, and desktop generation retirement; unifying counters would change ownership.
293 extensions/codex/src/app-server/config-security.ts READ — Reused the canonical policy fingerprint for network config and profile-name suffixes without changing serialization or truncation. Retained network-profile admission and allowed-policy precedence.
285 extensions/codex/src/session-catalog-index-state.ts READ Retained bounded durable snapshot admission and asynchronous write drain; malformed persisted state and live observations have different authority.
281 extensions/codex/src/app-server/sandbox-exec-server/sandbox-child.ts READ. Physical exit, pipe closure, backend finalization, and remote interruption settlement are independently observable lifetimes; the apparent duplicate promises are necessary.
275 extensions/codex/src/app-server/plugin-activation.ts READ Retained exact terminal remote-install errors and refresh diagnostics; activation and explicit app refresh are different operator boundaries.
274 extensions/codex/src/app-server/thread-ownership.ts READ; queue holds, subscription retention, exact-client release, and detach rollback protect different owners.
274 extensions/codex/src/app-server/run-attempt-notification-controller.ts READ; receipt-time accounting and awaited projection must remain separate; fifth-pass terminal detection is already shared.
274 extensions/codex/src/app-server/computer-use-readiness.ts READ Shared passed/failed probe-status construction while preserving pre-cleanup success timing, retry count, repair recording, and unsubscribe error precedence.
273 extensions/codex/src/app-server/usage-limit-error.ts READ — Retained distinction between transient HTTP throttling and subscription exhaustion, and client-revision evidence before setting profile cooldown.
272 extensions/codex/src/session-catalog-listing.ts READ Retained shared transcript command dispatch and current/legacy node transcript contracts; node serialization bounds and source-home validation remain required.
271 extensions/codex/src/app-server/managed-binary.ts READ Retained: official launcher/native-target mapping, desktop/package order and fallback identity checks are platform contracts with meaningful managed-binary tests.
269 extensions/codex/src/app-server/upstream-session-fork.ts READ Imported forks verify a retained tail and transfer cleanup to host initialization; canonical forks verify full local provenance. Preserve explicit source/child distinction and uncertain request handling.
268 extensions/codex/src/app-server/session-permission-policy.ts READ; permission tuple clamping deliberately prevents mixed authority fields and widening; no equivalent generic policy helper.
268 extensions/codex/src/app-server/attempt-client-cleanup.ts READ; interrupt acknowledgement is not completion; unsubscribe and retirement have separate observed-outcome contracts.
266 extensions/codex/src/app-server/launch-args.ts READ Retained (untouched-history file read first): tokenization owns native option arity, wrapper prefixes, clap override ordering, and private-launcher isolation; no sound simplification without protocol/launcher risk.
262 extensions/codex/src/app-server/plugin-thread-config-deadline.ts READ Retained monotonic whole-discovery budget and absorbed-timeout evidence; flattening would lose deferred timeout detection.
260 extensions/codex/src/app-server/native-subagent-monitor-types.ts READ — Removed startObserved and assignmentTurnId fields whose sole recovery contract was retired with Tasks.
260 extensions/codex/src/app-server/compact-lifecycle.ts READ; completion, interrupted retirement, and pre-start cancellation must not release the native mutation fence identically.
259 extensions/codex/src/app-server/computer-use-unified.ts READ Retained: signed desktop template materialization, native-disable/tool-policy vetoes and cache binding are recent complete migration contracts.
254 extensions/codex/src/app-server/desktop-generation.ts READ Retained: watcher arm identity, unhealthy backoff, generation dirtying and lifecycle cleanup serve separate races; fifth pass already consolidated runtime state.
253 extensions/codex/src/doctor.ts READ — retained update-finalization severity and selected managed package/desktop distinctions; no safe simplification without changing repair or readiness behavior.
249 extensions/codex/src/app-server/run-attempt-turn-start.ts READ; compact retry and context-engine overflow retry have different admissibility and cleanup requirements.
248 extensions/codex/src/app-server/request-attempt.ts READ Fifth pass already retired multi-waiter state. Written-request retention, deadline observations and definite overload rejection still require independent settlement facts.
246 extensions/codex/src/migration/cli-credentials.ts READ — retained native storage selection, macOS keyring policy, cancellation and reader process cleanup; local auth.json alone is not source authority.
244 extensions/codex/src/app-server/run-attempt-start.ts READ; explicit ownership adoption precedes fallible policy checks and must preserve preparation ordering.
244 extensions/codex/src/app-server/run-attempt-cleanup.ts READ; successful, one-shot, incognito, failed-handoff, and independently retained work each require distinct teardown.
244 extensions/codex/src/app-server/native-subagent-turn-observation.ts READ — Retained wait projection, attention overlays, and execution identity ordering; the existing projection owner already handles tool events.
242 extensions/codex/src/app-server/run-attempt-context.ts READ; context engine maintenance must reread fenced history while prompt and hook carriers remain separate.
240 extensions/codex/src/app-server/run-attempt-turn-state.ts READ; one existing deadline and tool-execution registry already own their state; relay renewal and settlement are distinct.
239 extensions/codex/src/session-upstream-activity.ts READ Retained exact connection fingerprint grouping, active-turn baseline and own-text filtering; fifth-pass removal of the redundant counter is already present.
239 extensions/codex/src/session-catalog-projection.ts READ Retained native-versus-sampled metadata authority, preview reuse and bounded asynchronous projection; no safe owner consolidation beyond existing helpers.
239 extensions/codex/doctor-contract-api.ts READ — retained shipped compatibility transforms and lazy state migration callbacks; artifact must load without starting runtime storage machinery.
238 extensions/codex/src/plugin-marketplace-discovery.ts READ — retained untrusted metadata bounds, supplemental marketplace fallback and ambiguous-source rejection; fifth pass already consolidated marketplace reads.
234 extensions/codex/src/app-server/native-subagent-admission-custody.ts READ — Retained two-phase release ordering and exact parent-turn evidence matching; merging loops would change reentrant ownership visibility.
232 extensions/codex/src/app-server/config-requirements.ts READ Retained: shipped TOML alias normalization, first matching hostname policy and distinct fallback/error semantics require the separate selectors.
231 extensions/codex/src/app-server/plugin-approval-roundtrip.ts READ Derived outcome request params from the existing request owner; retained local abort race because the SDK helper changes rejection shape/precedence.
229 extensions/codex/src/app-server/transport.ts READ. Natural exit, contained closure, forced closure, drain timeout, and durable cleanup remain separate evidence. #159726 already removed redundant catch and exit checks.
227 extensions/codex/src/app-server/dynamic-tool-catalog.ts READ — Descriptor getter faults, reserved names, schema quarantine, and stable namespace order are real plugin/protocol boundaries. Earlier passes already removed redundant catalog forwarding.
226 extensions/codex/src/session-catalog-index-events.ts READ Retained event coalescing, reserved tie ordering and closed-source retry ownership; these protect independent notification/read races.
226 extensions/codex/src/app-server/cyber-failover.ts READ Replay safety, workspace/model cooldown and in-flight probe suppression protect separate facts; no eligibility or routing change is justified.
225 extensions/codex/src/app-server/native-mcp-app.ts READ Retained thread-owned transport, originCallId correlation, connector scope, and UI visibility; effective catalog projection has different metadata and ordering.
224 extensions/codex/src/app-server/transport-process-registration.ts READ. Durable registrations, command fingerprints, startup commit, and exit-ordered deletion preserve orphan ownership. Removing the optional fingerprint path would change durable-data admission.
223 extensions/codex/src/app-server/native-subagent-recovery-coordinator.ts READ — Retained status-revision pinning, deduplicated recovery, and terminal fallback budgets; each prevents a stale read or incomplete history from settling new work.
221 extensions/codex/src/app-server/native-subagent-model-lookup.ts READ — Retained distinct exact-turn, causal-parent, and receiver-execution lookups; their ambiguity and currentness rules differ.
220 extensions/codex/src/conversation-binding-hooks.ts READ — untouched candidate retained because node and app-server branches own different queues/authorities, and each awaited import needs exact binding revalidation.
220 extensions/codex/src/app-server/session-retirement.ts READ; reset, deletion commit/rollback, and generation retirement intentionally preserve different fences.
216 extensions/codex/src/app-server/server-requests.ts READ Handler traversal, remote resolution, one-time execution budgets and retained auth-refresh work have different lifecycle ownership; defaults preserve exact method-specific response bytes.
216 extensions/codex/src/app-server/native-subagent-delivery-receipts.ts READ — Removed the single-caller receipt-selection export and unused structural fields; retained result-byte normalization, predecessor ordering, and ambiguous receipt handling.
215 extensions/codex/src/session-catalog-events.ts READ Retained physical client observation without leases, exact home attribution and resume settings publication; callbacks have deliberately distinct failure boundaries.
215 extensions/codex/src/app-server/run-attempt-lifecycle-controller.ts READ; terminal-tool release depends on deferred JSON-RPC flush; progress emission has separate delivery failure semantics.
214 extensions/codex/src/app-server/native-subagent-notification-routing.ts READ — Retained separate V1/V2 accepted-spawn/input paths and observation-only nested waits; broad dispatch consolidation would erase their different authority evidence.
211 extensions/codex/src/app-server/plugin-metadata-cache.ts READ Retained scoped cache keys, fail-open catalog protection, joined-load recovery, and invalidation generations; query variants have distinct upstream fields.
210 extensions/codex/src/command-handler-scope.ts READ — retained host-session versus conversation-binding authority, with current scope captured only after recovery; wrappers express concrete scope selection.
210 extensions/codex/src/app-server/native-subagent-assignment-inventory.ts READ — Retained serialized durability acknowledgments, distinct execution-admission errors, and recovery custody; queue warning handling must not grant authority.
208 extensions/codex/src/session-catalog-native-page.ts READ Retained shared bounded hydration and foreground overflow paging; budgets and backward/native anchor semantics differ intentionally.
208 extensions/codex/src/command-plugin-config.ts READ — retained shipped curated aliases only where source identity matches; direct key, canonical key and qualified identifier conflicts differ.
206 extensions/codex/src/app-server/native-subagent-notification.ts READ — Inlined the sole contextual-fragment forwarding layer while retaining raw-notification, user-role, aligned metadata, and classified-content checks byte-for-byte.
205 extensions/codex/src/app-server/desktop-generation-fingerprint.ts READ Retained: directory metadata, linked targets, bounded recursive traversal and byte fingerprints each detect independent desktop replacement cases.
203 extensions/codex/src/app-server/event-projector-reasoning.ts READ — Indexed summaries and content stay independent; completed plan/reasoning items can differ from deltas. The remaining small helpers express those distinctions.
201 extensions/codex/src/command-plugins-runtime.ts READ — retained prepared principal comparison and account/updated cancellation; cache identity cannot replace live authorization checks.

Additional small shared modules introduced after the CI cycle check: command-account-email.ts (3 lines) and session-catalog-request-types.ts (27 lines), both READ. They own the unchanged shared predicate and request type without a reverse dependency on their consumers. All consumers were migrated; no forwarding re-export remains.

@clawsweeper

clawsweeper Bot commented Sep 29, 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 P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 29, 2026, 2:21 AM ET / 06:21 UTC (Revision 5).

ClawSweeper review

What this changes

The branch simplifies Codex plugin auth, tools, sessions, catalog, and native subagent code, and makes remote connection monitoring reconnect when a leased client has already closed.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open. Current main and the latest release still miss the close-before-subscription case, and the earlier merged cleanup passes do not contain this distinct repair. The introduced hunks are available for review; no definite patch defect emerged.

Priority: P2
Reviewed head: ca5e43df0e1d56e631f82997d67b97912eabe2a8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A source-backed race regression, broad focused validation, and a net-reducing patch support a good rating, with no definite review finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The Repository State identifies a MEMBER author, so the external-contributor after-fix proof gate does not apply. The production health service and real in-memory client are exercised through a mocked lease with a preclosed client; the PR reports red/green Testbox and passing CI evidence, without claiming a live remote WebSocket trace. The prepared screenshots show a different merged fork-history change. No stored-data format or schema change was found.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The Repository State identifies a MEMBER author, so the external-contributor after-fix proof gate does not apply. The production health service and real in-memory client are exercised through a mocked lease with a preclosed client; the PR reports red/green Testbox and passing CI evidence, without claiming a live remote WebSocket trace. The prepared screenshots show a different merged fork-history change. No stored-data format or schema change was found.
Evidence reviewed 8 items Current main still misses the close: The current-main waiter checks abort but does not inspect a client that closed before handler registration.
Latest-release check: The v2026.9.6 source has the same future-close-only waiter. The tag resolves to release commit eb377ac.
Introduced reconnect guard: The pinned merge-base-to-head patch adds the recorded-close check before subscribing. The client records its close error before notifying close handlers.
Findings None None.
Security None None.

How this fits together

The Codex plugin connects OpenClaw agent turns to a Codex app-server while OpenClaw retains session, tool, and transcript responsibilities. Plugin configuration and client events feed the connection monitor, which either continues using the client or reacquires it.

flowchart LR
  A[Plugin configuration] --> C[Codex connection monitor]
  B[Codex app-server client] --> C
  C --> D{Client closed?}
  D -->|Yes| E[Release lease]
  E --> F[Reconnect client]
  F --> B
  D -->|No| G[Continue agent work]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -589, Tests +28, Other -1. Total -562 across 64 files.

View PR surface stats
Area Files Added Removed Net
Source 60 594 1183 -589
Tests 3 35 7 +28
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 64 629 1191 -562

Review metrics

Metric Value Why it matters
Reconnect regression cost 38.27 s file wall; 0.017 s new CI case The focused race case is cheap to execute; the reported isolated file wall includes setup and transformation.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/codex/src/app-server/computer-use-readiness.ts, migration/backfill/repair: extensions/codex/src/migration/apply.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep the connection monitor’s recorded-close check in its existing owner and land the cleanup through normal exact-head review while preserving native protocol and session-authority contracts.

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

Yes. Current main waits only for future close callbacks, and the focused test closes the client before subscription; this read-only review did not execute the test.

Is this the best way to solve the issue?

Yes. Checking recorded close state at the monitor’s subscription boundary is a narrow repair, and the inspected refactors retain their existing owners and guards.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2aed86671065.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: The patch addresses a bounded remote Codex reconnect race and otherwise simplifies internal plugin code.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The Repository State identifies a MEMBER author, so the external-contributor after-fix proof gate does not apply. The production health service and real in-memory client are exercised through a mocked lease with a preclosed client; the PR reports red/green Testbox and passing CI evidence, without claiming a live remote WebSocket trace. The prepared screenshots show a different merged fork-history change. No stored-data format or schema change was found.

Evidence

What I checked:

Likely related people:

  • Kimiyu-186: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: 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-09-29T03:03:23.176Z sha bd73e140d97c1fd825105f67254e343718d0ef52 :: blocked before merge. :: none
  • reviewed 2026-09-29T03:28:45.761Z sha 84b1c0c :: blocked before merge. :: none
  • reviewed 2026-09-29T04:55:03.344Z sha 84b1c0c :: blocked before merge. :: [P2] Move email validation below the account and formatter modules | [P2] Remove the catalog request and eligibility import cycle
  • reviewed 2026-09-29T05:48:22.826Z sha ca5e43d :: blocked before merge. :: none

Consolidate shell projections, native binding and recovery plumbing, policy fingerprints, catalog adapters, and command/auth forwarding while preserving wire and transcript contracts.

Recover remote connection monitoring when a leased client closes before the health observer subscribes. The regression fails on the original owner and passes with the repair.
Keep the original configuration readers and endpoint-copy loop, preserve JSON-object narrowing without casts, and collect app tool aliases directly into the existing deduplication set. Remove the obsolete assertion allowance after its cast was deleted.
@steipete
steipete force-pushed the deslop/l154-codex-sixth-pass branch from bd73e14 to 84b1c0c Compare September 29, 2026 03:14
@steipete
steipete marked this pull request as ready for review September 29, 2026 03:19
Move the unchanged email predicate and catalog request snapshot type into dependency leaves and migrate all callers. Fix the two Madge cycles found by CI without changing runtime logic or wire contracts.
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 29, 2026
@steipete
steipete merged commit 1ea1552 into main Sep 29, 2026
214 checks passed
@steipete
steipete deleted the deslop/l154-codex-sixth-pass branch September 29, 2026 06:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 30, 2026
* refactor(codex): deslop Codex plugin sixth pass

Consolidate shell projections, native binding and recovery plumbing, policy fingerprints, catalog adapters, and command/auth forwarding while preserving wire and transcript contracts.

Recover remote connection monitoring when a leased client closes before the health observer subscribes. The regression fails on the original owner and passes with the repair.

* refactor(codex): retain typed loops and explicit config readers

Keep the original configuration readers and endpoint-copy loop, preserve JSON-object narrowing without casts, and collect app tool aliases directly into the existing deduplication set. Remove the obsolete assertion allowance after its cast was deleted.

* refactor(codex): keep shared command and catalog contracts acyclic

Move the unchanged email predicate and catalog request snapshot type into dependency leaves and migrate all callers. Fix the two Madge cycles found by CI without changing runtime logic or wire contracts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex P2 Normal backlog priority with limited blast radius. 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