Skip to content

fix(codex): prevent stale native sessions from mutating successors - #156940

Closed
galiniliev wants to merge 8 commits into
mainfrom
galiniliev/teamclaw-pr-native-ownership
Closed

galiniliev wants to merge 8 commits into
mainfrom
galiniliev/teamclaw-pr-native-ownership

Conversation

@galiniliev

@galiniliev galiniliev commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Related: #156938

What Problem This Solves

Fixes stale native Codex sessions that could write or retain a successor's thread subscription after session authority changed. A peer's live process could incorrectly satisfy the stale initiator's retention check.

User Impact

Current admitted native work can finish, while stale initiating sources cannot retain a reusable thread using another source's process. Peer work keeps its physical listener until its own process settles; exact old cleanup cannot evict a newer claim. Native steering rejected before enqueue remains available after cancellation instead of being reported as delivered.

No new operator configuration, stored binding format, schema version, retention policy, or permission is introduced. The complete merge-base diff against 1b31d2443e51dccc595b3e7208b8b696df26e222 has no package, lockfile, plugin manifest or SQL schema delta. session-binding-codec.ts preserves the relocated normalization/encoding bytes after whitespace normalization, the stored version-1 envelope, and legacy schema-1/2 importer; migration/session-binding-sidecars.ts and session-binding-orphans.ts still consume that version-1 envelope. These source checks establish compatibility disposition, not full installer/updater or stable-tag upgrade execution; those were not run. Existing binding codec normalization is relocated unchanged; current worker facts add the already-stored predecessor field and compose existing source restrictions.

Why This Change Was Made

The native process owner decides initiating-source custody. The existing physical subscription token/protection owner holds only required cleanup while peer work remains, and publishes no warm claim for the rejected initiator. Session row authority reaches the canonical worker transaction/commit grant and physical request writer; lease and mutation constraints both survive when they originate from distinct session rows. Definitive native ingress rejection clears the steering owner's exact dispatch receipt before retry backoff.

Published candidate: 2099e55d534a8ddba3fa58c5f415418388b049f2. The existing published repairs are reconciled on main 5fe8304fd622a063c650dde26351af93496547d7, preserving current main's asynchronous plugin-state comparisons, request/catalog waiter contracts, and unrelated owner changes. The Gateway admission branch remains separate.

Evidence

  • Registered runCodexAppServerAttempt through the real CodexAppServerClient wire and task-owned sandbox processes: live initiating custody retains; settled initiating custody rejects; peer-only stale custody rejects and has no consumable warm subscription while the peer process and listener remain live. Peer settlement produces one unsubscribe. A protected competing attempt rejects at the canonical active-thread boundary, then a later successor succeeds after exact cleanup without a stale extra unsubscribe. Four cells passed in 20.57 s wrapper wall time (18.90 s Vitest duration).
  • The peer-only cell failed on the original thread-wide predicate: the attempt incorrectly completed instead of rejecting. The source-owned predicate plus existing claim protection repairs the registered effect boundary. The fixture's run, process, and tool IDs now advance per attempt, matching native identity reuse constraints without timers or retries.
  • Physical request authority: 11 tests passed, including pre-write refusal, cancellation/expiry during preparation, and write-then-throw local RPC uncertainty. The server RPC rejection exception applies only to reject(); failLocal() still preserves possible writes.
  • Accepted final review repairs: real plugin-state compound native claim permits both current rows then denies changed peer lineage with unchanged KV value (1,031 ms test); dual-session lease/mutation binding case passes; overload-rejected steering cancellation leaves accepted messages empty and one physical request. These owner selections passed 29 tests in 23.62 s grouped wrapper wall time. Negative controls restored the old single-source refusal and withheld definitive steering cleanup; both regressions failed for their intended reasons before fixed bytes were restored.
  • Existing canonical ordered worker-row tests passed 18 cases, and focused lease settlement cases passed after adapting the fixture to current compare-and-apply completion. Current production/core/extension and owning extension test typechecks passed; targeted lint and line-cap checks passed without baseline or ignore changes.
  • Fresh independent full-diff review is scoped clean through P2 after the real compound-source and overload receipt fixes. Earlier local-RPC and missing-dispatch claims were source-backed disposed using complete owner context and actual-wire negative controls.
  • Personally inspected sibling Codex 2f7d89b1419bf7064346855b0acde23514b1ebc5: thread_processor.rs confirms unsubscribe removes the connection listener rather than terminating a peer process; terminal inventory identifies concrete work. The app-server fixture is a covering protocol boundary harness, not a claim of an authenticated live Codex session.
  • Full local suite/build and broader process/managed-policy file completion were not claimed: host load made broad validation impractical and the optional grouped run was stopped. Required GitHub CI and durable ClawSweeper ratings remain pending on the published head. The historical Windows watcher failure came from an unchanged older-head test; current main owns its later root-loss/fs-safe fixture changes, so this repair does not weaken filesystem error assertions.

The follow-up CI repair removes the retired thread-wide inventory predicate, unused startup/error helpers and type exports, and two synthetic tests that injected custody under a different owner and expected the superseded bypass. The independent reader-release/no-replay contract remains and passed (40.56 s wrapper wall); the registered four-cell source/peer/successor effects remain the primary proof. This cleanup delta has its own fresh scoped-clean review through P2. The earlier 7666583561710730e5131268979af86b8899bae2 ClawSweeper comment reported 4/6 overall, proof and patch; that rating is historical until the current cleanup head receives its own durable review. Its exact dependency CI failure identified these unused paths; no ignore or baseline was added and no job was rerun merely for green.

Exact cleanup-head CI run 36770306683 then required removing the obsolete compact.ts assertion allowance (0 actual assertions versus baseline 1). This exact shrink-only ratchet maintenance adds no allowance or suppression; the owning assertion-safety ratchet passed locally. Cancelled siblings were not passing coverage, and no rerun or empty push was requested.

The next exact CI attempt (36771390993, core lint job 110078863059) found a test-fixture unbound state.withCurrent reference in the async-CAS settlement adaptation. The captured fixture method is now bound to its existing state; all three cleanup/cancellation cells and two sibling settlement cases passed (5 selected, 8 unselected, 12.05 s wrapper, 9.99 s Vitest), exact CI-config typed lint passed, and fresh correction review was scoped-clean through P2. Production behavior and the registered final-effect evidence are unchanged.

Architecture CI on 7f55e678d0faf0fdb98249fe8f48d983996a53e5 (36772579349, job 110082974806) identified the ordered-reader/runtime type import cycle. The unchanged read scope, request and prepared-result types now live with their existing selection/result contracts in session-transcript-worker.types.ts; the ordered/runtime readers and sole Gateway question type consumer all use it directly. No SDK symbol export or runtime authority/FIFO/cleanup algorithm changes. Final production types, scoped typed lint, formatting, type-edge Madge (zero cycles) and all three Knip export scans (zero entries) passed; fresh complete repair-diff review was scoped-clean through P2 (confidence 0.94). Existing registered and ordered-reader behavioral proof remains unchanged; broad suites were not repeated for this type-only cutover.

Native plugin CI on 0e260a61212560279414f3b77f644cb622ebd0c3 (36774149483, bundle jobs 110088213868 and 110088214248) exposed loss of original authority Error identity at outward auth/bounded/registered-attempt boundaries. The existing codexPrewriteRejectionCause owner now restores only definite pre-write causes there; physical typed rejection, possible-write uncertainty and steering ingress receipts remain unchanged. Original auth/bounded assertions failed three cases before the repair, then six selected cases passed (14.96 s wrapper). Physical request/steering 38 and registered generation 7 passed (39.44 s grouped wrapper); original initiating/settled/peer/replacement custody 4 passed (23.29 s wrapper), preserving real peer processes/listener, exact unsubscribe and successor effects.

The unchanged auth requirement/handoff types and internal prepared-type exports now live with their existing auth-types.ts owner. All internal consumers moved; the existing public shared-client export retains its name/shape. Final production types, typed lint, line-cap gate, Madge zero and all three Knip export scans zero passed. Fresh final repair/type-cutover review was scoped-clean through P2 (confidence 0.78). Historical 0e260a6 durable review was overall4/proof5/patch4 with no actionable findings; its failed/cancelled CI does not qualify the replacement head.

Exact 45ce600 extension-lint CI (36778354304, job 110102357508) identified four remaining mechanical leftovers: unused settlement-test helper import, process-fixture shorthand, duplicate compact helper import and obsolete EOF lint directive. Those exact leftovers were removed/merged; exact CI-config scoped lint and diff/format checks passed. No runtime behavior, assertion, cap or ignore changes; registered proof remains unchanged. Its durable 4/5/4 review is historical after this maintenance head.

The actual main conflict was reconciled on that pin, preserving recovery refs/recovery/task_8307b20bc39b/native-pre-conflict. Main test-audit 59b8097d75f retired side-question execution tests and consolidated current owner cases; the deletion/current tests remain authoritative and orphan fixture exports were removed. The removed delta included two timeout diagnostic compositions: generic tool timeout remains covered by the current consolidated case; native diagnostic timeout/finalization remains with current native notification/projector owners. Runtime timeout/finalization algorithms are unchanged; the removed duplicate full composition is not claimed as current proof.

The consolidated timeout fixture originally advanced fake Date/timers before real worker admission, causing SessionSuperseded instead of Timeout. It now awaits actual turn start and tool execution and accelerates only setTimeout/clearTimeout with real Date, retaining TimeoutError/timed_out assertions. The reused pending-client fixture moved unchanged to its existing support owner to meet the existing cap. Final generation/lost-ack/stale-binding/timeout run passed four selected cases in47.52s wrapper (44.59s Vitest); production types, exact CI-config lint, line-cap gate and three Knip scans zero passed. Fresh final fixture review was scoped-clean P2 (confidence0.88). Production authority/error repair is patch-identical outside main test retirement; prior exact91d review4/5/4 is historical until this replacement receives durable review/CI.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 2099e55d534a8ddba3fa58c5f415418388b049f2
  • Maintainer: @galiniliev
  • Repository role: maintain

These security sensitive changes were made:

  • src/agents/harness/native-session/binding-authority.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 30, 2026, 6:25 PM ET / 22:25 UTC (Revision 22).

ClawSweeper review

What this changes

The Codex plugin now checks current session ownership before native requests, binding mutations, and retained-thread cleanup, with regression cases for competing and superseded sessions.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open. Current main still permits the reported thread-wide custody check, and the linked session-ownership issue remains open. The branch has credible final-effect proof and no concrete introduced defect was found in the reviewed authority paths.

Priority: P1
Reviewed head: 2099e55d534a8ddba3fa58c5f415418388b049f2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong production-boundary proof supports a substantial cross-owner repair; exact-head confirmation after conflict resolution remains.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The contributor reports before/after registered-attempt proof using the real Codex client wire and task-owned sandbox processes: stale initiating custody is denied, peer work and its listener survive, and exact cleanup permits a successor. The current head retains those cases, but their post-reconciliation execution remains the separate merge risk above. The binding codec retains the existing version-1 stored contract, so no stored-data model change requires migration proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The contributor reports before/after registered-attempt proof using the real Codex client wire and task-owned sandbox processes: stale initiating custody is denied, peer work and its listener survive, and exact cleanup permits a successor. The current head retains those cases, but their post-reconciliation execution remains the separate merge risk above. The binding codec retains the existing version-1 stored contract, so no stored-data model change requires migration proof.
Evidence reviewed 10 items Current main still has the reported route: Main uses a thread-wide background-process predicate when deciding whether a stale initiating source may retain a subscription.
Current session authority: The introduced authority rereads the expected session lineage in an ordered worker admission and invokes its consumer synchronously under that admission.
Final request effect: The physical client dispatch checks transport and caller authority immediately before writing the request frame; the attempt records whether admission entered the write callback.
Findings None None.
Security None None.

How this fits together

OpenClaw's Codex plugin connects agent turns to a native Codex app-server thread. Session rows and process ownership determine which requests, binding updates, and subscription cleanup may reach that thread.

flowchart LR
  A[Agent turn] --> B[Session row authority]
  B --> C[Codex attempt]
  C --> D[Current lineage check]
  D --> E[Native request writer]
  D --> F[Thread and process custody]
  E --> G[Codex app server]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - The registered stale-source, peer-listener, and successor final-effect cells were last reported before the main conflict was reconciled. The resolved head reports a different focused run, so those four cells still need exact-head confirmation before merge.
  • Complete next step (P2) - Record the registered stale-source, peer-listener, and successor final effects on the reconciled head before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production and test growth production net +1,045 lines; tests and support net +1,784 lines The production growth implements worker-backed authority across the existing owners, while the added tests exercise competing-session effects.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #156938
Summary: The open issue describes stale Codex native requests and cleanup crossing session ownership; this PR is its candidate fix.

Members:

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

Merge-risk options

Maintainer options:

  1. Confirm the resolved head (recommended)
    Run the registered stale, peer, and successor final-effect cases against the reconciled head and record their observed results.

Technical review

Best possible solution:

Keep current session-row and initiating-process custody at each native effect boundary, while preserving peer listeners, exact-claim cleanup, and existing version-1 bindings.

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

Yes. The registered client and sandbox-process fixture rotates lineage during subscription retention and has a reported failing pre-fix peer-only control; I did not rerun it.

Is this the best way to solve the issue?

Yes. The patch moves the decision to current session and process owners at the final effects, while updating both official callers of the private shared session contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0016b17df26c.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: A stale Codex attempt can affect a successor's session ownership and native work.
  • merge-risk: 🚨 session-state: An incorrect retention or cleanup decision could associate a native thread subscription with the wrong session.
  • merge-risk: 🚨 security-boundary: The patch changes where current session authority is enforced before binding mutations and native writes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The contributor reports before/after registered-attempt proof using the real Codex client wire and task-owned sandbox processes: stale initiating custody is denied, peer work and its listener survive, and exact cleanup permits a successor. The current head retains those cases, but their post-reconciliation execution remains the separate merge risk above. The binding codec retains the existing version-1 stored contract, so no stored-data model change requires migration proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The contributor reports before/after registered-attempt proof using the real Codex client wire and task-owned sandbox processes: stale initiating custody is denied, peer work and its listener survive, and exact cleanup permits a successor. The current head retains those cases, but their post-reconciliation execution remains the separate merge risk above. The binding codec retains the existing version-1 stored contract, so no stored-data model change requires migration proof.

Evidence

What I checked:

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the registered four custody cases on the reconciled head.

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 (21 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-25T23:43:34.156Z sha b69ebca :: needs real behavior proof before merge. :: [P1] Require initiating-source custody after row admission fails
  • reviewed 2026-09-30T19:43:13.636Z sha 7666583 :: blocked before merge. :: none
  • reviewed 2026-09-30T20:14:31.381Z sha 5db5915 :: blocked before merge. :: none
  • reviewed 2026-09-30T20:23:09.849Z sha c2a225c :: blocked before merge. :: none
  • reviewed 2026-09-30T20:32:29.738Z sha 7f55e67 :: blocked before merge. :: none
  • reviewed 2026-09-30T20:50:34.352Z sha 0e260a6 :: blocked before merge. :: none
  • reviewed 2026-09-30T21:25:37.191Z sha 45ce600c8c26464024dd26dd1ca36c681a9812e4 :: blocked before merge. :: none
  • reviewed 2026-09-30T22:00:13.159Z sha 91d4b9fa648d85253a34aee0f524f1b36af2ec3a :: blocked before merge. :: none

@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 24, 2026
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Sep 24, 2026
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review exact current head 7f55e678d0faf0fdb98249fe8f48d983996a53e5. The prior reviewed source-custody repair is unchanged; exact CI failures were repaired by shrinking the obsolete assertion allowance and binding the settlement fixture method. Registered final effects, five settlement cases, typed lint and fresh scoped reviews are recorded in the updated body, including complete codec/schema compatibility disposition and unrun installer/updater limits.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 30, 2026
@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review exact current head 0e260a61212560279414f3b77f644cb622ebd0c3. CI identified an ordered-reader/runtime type-edge cycle; unchanged types now live in their existing worker-contract owner, both readers and the sole Gateway type consumer use it, and unused runtime exports are removed. Final Madge zero, production types, typed lint, three Knip scans zero and fresh complete repair-diff review are in the updated body; registered production-boundary custody proof is unchanged.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@galiniliev

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review exact current head 45ce600c8c26464024dd26dd1ca36c681a9812e4. The existing cause owner restores original authority errors only at outward auth/bounded/registered-attempt boundaries; definite no-write receipts and possible-write uncertainty remain unchanged. Original failures and repaired controls, exact peer-retention effects, complete existing auth-type owner cutover, final types/lint/line caps/Madge/Knip and fresh review are recorded in the updated body.

@clawsweeper

clawsweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 30, 2026
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Consolidating this work with #143201 in #164197. The replacement preserves Galin's original commits and contributor credit, incorporates current main's authority and executor changes, and adds physical-client fencing. Validation and review are in progress; this PR will be closed after the replacement lands.

steipete added a commit that referenced this pull request Oct 3, 2026
…164197)

Fence Codex native effects, binding mutations, and subscription cleanup to the initiating session lineage and exact physical client. A replaced session can no longer borrow a peer's process custody or clear a successor binding, including across worker CAS retries and delayed remote-file responses.

Use the existing database workers and authority cohorts, preserve synchronous released SDK contracts and reversible deletion vetoes, and retain main's shared bounded media reader. Regression proof covers physical writes, successor recovery, compaction, cleanup, and API compatibility.

Consolidates #156940 and the independently reimplemented physical-client checks from #143201. Unblocks compound PR2's native-binding authority work; executor settlement remains its required extension.

Co-authored-by: Galin Iliev <[email protected]>
Co-authored-by: KirDE <[email protected]>
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Refreshed, consolidated with #143201, and landed in #164197 (283d5e6). The replacement preserves this PR's original commits and fences native effects to the initiating lineage and physical client through the existing workers. It also preserves released SDK signatures and the reversible native-binding deletion veto.

Thank you @galiniliev. Your original author identity and commits are retained in the replacement branch history; the squash credits your verified GitHub identity because the native landing tool could not link the original commit email. The PR body records the superseded portions, additional repairs, and passing Testbox, compatibility, static, review, and final-head CI evidence. Closing this PR as consolidated; its source branch is preserved.

@steipete steipete closed this Oct 3, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…penclaw#164197)

Fence Codex native effects, binding mutations, and subscription cleanup to the initiating session lineage and exact physical client. A replaced session can no longer borrow a peer's process custody or clear a successor binding, including across worker CAS retries and delayed remote-file responses.

Use the existing database workers and authority cohorts, preserve synchronous released SDK contracts and reversible deletion vetoes, and retain main's shared bounded media reader. Regression proof covers physical writes, successor recovery, compaction, cleanup, and API compatibility.

Consolidates openclaw#156940 and the independently reimplemented physical-client checks from openclaw#143201. Unblocks compound PR2's native-binding authority work; executor settlement remains its required extension.

Co-authored-by: Galin Iliev <[email protected]>
Co-authored-by: KirDE <[email protected]>
@RomneyDa
RomneyDa deleted the galiniliev/teamclaw-pr-native-ownership branch October 22, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: agentsapi extensions: codex gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed 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.

2 participants