Skip to content

feat: use selected GitHub identities on workers and approved nodes - #157500

Closed
galiniliev wants to merge 65 commits into
mainfrom
galiniliev/teamclaw-github-proxy-binding
Closed

galiniliev wants to merge 65 commits into
mainfrom
galiniliev/teamclaw-github-proxy-binding

Conversation

@galiniliev

@galiniliev galiniliev commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Cloud workers and approved Codex nodes need stock gh and HTTPS git to use the same selected GitHub execution identity as Gateway agents, including during long turns.

User Impact

Workers and supported paired nodes use the effective System GitHub account or explicit agent override through a private execution profile, including sessions without a repository. Personal setup stays in Settings, and personal-publication credentials are not used as an execution fallback.

Trust and upgrade implications: this is trusted-host bearer-token delegation, not credential isolation. Node administrators or same-user processes can copy the selected token and use its existing GitHub permissions, potentially beyond the current repository or initiating user's permissions. Closing a turn stops delivery and removes the execution profile; it does not revoke a copied token at GitHub. Refresh-capable nodes are required; older nodes must update and reconnect. Unavailable configured managed credentials refuse the whole turn instead of falling back to native credentials.

Owner decision remains pending: SDK/security acceptance of that trust-boundary expansion and the upgrade/refusal behavior has not been recorded. Installed-old-node transition and unavailable-account Settings recovery also remain disclosed proof gaps.

Why This Change Was Made

Reuse the existing identity selector and OAuth refresh owner, deliver same-account rotations through authenticated worker heartbeats or private node messages, and preserve live authority checks, process shutdown, write settlement, workspace reconciliation, and cleanup. Credential-only sessions receive no checkout metadata or publication authority.

Evidence

Current rebase and CI — 2026-10-13

Published head: 8c5e405, rebased onto main cc39780. All 53 original feature commits remain ancestors. The authored integration merge is preserved; later fixes were replayed or absorbed by newer main APIs. Main’s placement retry and delivery-recovery fixes remain intact. Retained publication/session ownership and async policy APIs coexist with renewable selected-account grants and credential-only sessions.

Local proof: 216 distinct focused cases passed across scoped runs: binding 50, identity 20, publication/actor 27, tool policy 19, and execution/launcher/startup/repository-result 100. Affected fixture cases were corrected and rerun; unchanged passing cases were reused, not represented as one aggregate green run. Final binding-file run with --maxWorkers=1: 50/50, 48.92s wall; publication/actor pair: 27/27, 31.68s wall. Production types, scoped typed lint, SDK export sync, formatting and whitespace checks passed within their selected scope. Final scoped reviews had no actionable P0–P2 finding. These checks did not cover all CI type/lint/format scopes; per-file CI cost was not isolated.

Exact-head CI failed. Run 38417922200, attempt 1, completed 2026-10-13 15:44:37 UTC. Independent terminal readback verified 181 unique jobs across 2 pages: 148 success, 15 failure, 18 skipped; none pending. Every job matched this SHA/run/attempt. That is 14 underlying failed jobs plus the downstream aggregate gate, not 15 independent defects.

Observed failures:

  • Baseline mock-export policy: seven factories in worker-github-binding.test-support.ts fail the export-preservation/isolation rule.
  • Docs/changed-file formatting: worker-turn-launcher.claim-recovery.test.ts. Hosted lint: duplicate helper imports in worker-github-binding.test.ts and a floating promise in server-plugins.test.ts.
  • Test types: publication and binding fixtures omit required updatedAt; the memory fixture uses activeWriterRunId on Partial.
  • Plugin test and another type stripe: createSyntheticPluginRuntimeClient is undefined in server-plugins.test.ts:1493.
  • OpenAI realtime routing: two tests fail with “Auth profile credential writes require an admitted worker.”
  • Four test jobs time out: session compaction read-errors, Telegram message-tool settlement (120s), durable Move-result recovery (120s), and node-worker launch wire (240s).
  • Restart handoff: expected a captured seal to be defined, but it was undefined.

Failures are not fully attributed to PR versus main; none are dismissed as flaky. The PR remains OPEN, MERGEABLE, BLOCKED, at the same head. The green-CI landing condition is unmet. Automated dependency/security statuses succeeded, but separate SDK/security owner acceptance remains unrecorded. No rerun, repair push, merge, or auto-merge was submitted after this result.

Previous head 54318a7 failed CI 38200616430 (134 success, 24 failure, 17 skipped); that is historical, not current-head evidence.

Previous requested rebase and resumed push — 2026-10-10

Previous published head: 5be2347170d569bfb279b587a25f85f17b54b8b7, rebased onto main 19ac119 and pushed with the exact predecessor lease 27ada72. All 53 original non-merge feature commits remain ancestors; the four subsequent maintenance/incognito/GHE/user-alignment commits replayed patch-identically. The recreated integration merge preserves its original author/date and contributor trailer.

Conflicts were resolved by retaining the PR's GitHub profile setup and renewal alongside main's pinned Codex binary selection (preferInstalled: false). SDK package exclusions and declaration aliases were regenerated through their owner, retaining both main's Codex-version entry and the worker GitHub entry. Comparing the final candidate with the original-head/new-main merge oracle leaves only those four reviewed conflict-resolution paths. Latest observed main 01e1892 has a clean merge preview (tree f9fd937c063e514e043ed0f700e34c05e3764a68); it was not needlessly integrated a second time.

Current validation: frozen dependency admission passed; production types passed (14.21s), SDK declaration generation emitted 12,465 files, scoped Codex typed lint passed with zero warnings/errors, SDK registration checks and formatting/whitespace checks passed. Independent integration review reported no P0–P2 findings, with disclosed partial-context limitations. Earlier feature proof remains historical, not new-head test evidence.

Incomplete validation: both attempted focused test runs were interrupted by SIGTERM during compiled-subprocess preparation (exit 143), before case results. Neither is reported as a pass. Prior aggregate size/environment-count/test-graph limitations and the SDK/security owner decision remain recorded below. New-head GitHub workflows have started; CI is pending, not green. This push does not merge or enable auto-merge.

Previous bot and signed-in user alignment — 2026-10-10

Previous published head: 27ada72. Compared the complete credential/user path with main 07a870b. This is a scoped consolidation, not a new authentication mechanism or an approval of the larger node trust-boundary change.

  • Initial checkout and renewable worker/node execution now use one selected-account projection: existing shared selector, unchanged bot token from GH_TOKEN, verified account login, selected host, branch, and configured author. GHE uses that same path and the existing variables; duplicate projection code is removed. Renewable remote normalization now matches main’s initial-checkout normalization.
  • The bot account and signed-in person stay separate, as on main. The person remains in the existing admitted operator/caller context for permissions and attribution; their GitHub login never replaces the bot’s verified execution login. Personal My GitHub credentials stay in the explicitly selected publication broker. No new GHE user/token environment variables or personal-token fallback.
  • 50 worker-binding tests passed in 20.33s using node scripts/run-vitest.mjs src/gateway/worker-environments/worker-github-binding.test.ts --maxWorkers=1. The extended existing table proves github.com, ghe.com and self-hosted GHE binding parity, plus public/GHE signed-in-user revocation outside ambient caller context. 41 unchanged harness-authority tests also passed (initial combined command 48.84s). These are synthetic boundary tests, not live Enterprise sign-in tests; hosted per-file CI seconds remain unavailable.
  • Production types passed (13.58s), two-file typed lint passed (zero warnings/errors), formatting/whitespace passed, independent P0–P2 review scoped-clean. Production delta 51 added / 57 removed; test delta 62 added / 14 removed. No new SDK exports or credential store.
  • Changed-check delta now passes its line-cap gate but still stops at the previously recorded environment-count budget (456 vs 455). Broader prior-head size and test-graph limitations remain recorded below. Main merge preview reports four conflicts outside this three-file alignment; no full rebase is claimed. No current-head CI run or merge has been submitted manually, and no clean exact-head CI is claimed. SDK/security owner acceptance remains outstanding.

Previous GHE credential parity — 2026-10-10 evening

Previous published head: 7401d3c. Main inspected at 3e44be0 already uses the selected bot token with its existing permissions, not a reduced per-session credential. This update applies that same contract to GHE without adding credential variables or a second identity mechanism.

  • The private launcher reads the admitted host from the selected profile, using existing GH_HOST and GH_CONFIG_DIR. It supplies GH_TOKEN and GH_ENTERPRISE_TOKEN privately, clears both GITHUB_* fallback variables, and forwards those same variables to Docker/Podman. Public managed profiles stay pinned to github.com.
  • Two Enterprise launch cases reproduced the defect before repair and passed afterward, including exact token rotation and refusal when only a github.com credential remains. No native/wrong-host fallback was introduced; existing freshness/authority checks are preserved.
  • 111 distinct passing cases across seven files, combined from each file's final scoped result: worker binding 16, exec identity 7, private exec 19, credential reader 9, source launch 2, managed identity 20, container backend 38. Six PowerShell cases skipped because pwsh is unavailable. Container proof uses a synthetic engine process, not a live daemon; no live GHE service or native Windows claim.
  • Production types passed (10.45s), scoped typed lint passed (12 files, zero warnings/errors), and formatting/whitespace checks passed (13 files). Independent P0–P2 delta review was scoped-clean; the subsequent production change only renamed a shadowing local variable.
  • Test commands used the repository's node scripts/run-vitest.mjs … --maxWorkers=1 wrapper. Wall times: 22.74s initial batch (existing ambient Git-author fixture failure), 17.14s next batch (old one-key managed-env assertion), 11.91s final two-suite batch (58 passed). Both fixture defects were corrected without weakening production checks. Individual-file command wall times and hosted CI seconds were not measured for this update.
  • Remaining gates: the actual changed-check aggregate still fails the recorded node-registry/recovery line caps. Changed test-type graph admission stops at ui-e2e 722 roots versus 720; no bypass or new full test-type pass is claimed. GitHub currently reports conflicts with main; no clean CI run is attached to this head at the last observation. Prior-head CI below remains historical. Existing SDK/security owner acceptance remains unrecorded, and this base-branch comparison is not that acceptance. No merge or auto-merge was submitted.

Previous requested rebase — 2026-10-10 afternoon

Previous published head: 0a34988. CI run 38063042988, attempt 1, completed with failure at 15:31:24 UTC. Full paginated inventory: 176 unique jobs — 153 successful, 17 skipped, 6 failed; none running/cancelled within this CI run. Five root test jobs failed; the sixth is the aggregate gate.

Root failure Observed result
Compiled-worker lifetime test/scripts/vitest-worker-artifacts.test.ts: one uncertain-output case fails compiler join / managed cleanup ownership; cleanup also reports retained resources.
Agents API steering extensions/agentsapi/agentsapi-attempt.test.ts: three steering/retry cases expect failed but receive ok.
Memory reindex backoff extensions/memory-core/src/memory/manager-search-reindex-backoff.test.ts: force=false/true cases expect one call, receive zero.
Delivery custody src/agents/command/delivery.custody.integration.test.ts: newer receipt expected after yielded marker planning, received undefined.
Placement session evidence src/gateway/server-worker-placement-session-evidence.test.ts: expected unknown/current/absent, received unknown/unknown/unknown.

These are eight failing cases, not an attribution to main, the PR, or flakiness. Root logs were fetched once; no reruns or speculative fixes were submitted. The previous CLI-catalog/plugin-status/sidebar failures are not among this run's failures.

All five root checkout logs bind 15eaa57b0ba96ac8f470a3e906167c28acd1ddad, with verified ordered parents 696e825 and 0a34988. The tree matches the pre-push preview. Both CI-gate surfaces failed; successful automatic dependency/security statuses do not resolve R1. At 15:34:12 UTC, the separate shared-kit iOS scan remained active and a PR-context/evidence check was cancelled; neither is represented as passed.

Exact-head ClawSweeper review, reviewed 15:29:08 UTC, published 15:30:10 UTC, receiver 38063217488/1, reports zero code findings but remains needs-human / blocked / security hold. CI is not clean, so Galin's conditional landing instruction does not authorize a merge; none was attempted. Exact predecessor lease and remote ref/PR readback verified; current main 696e825 gives a clean merge preview (tree d873f4d048c7f252cc89f6d85d50920eadff4f6a).

Rebased onto main 251b99b, including the landed CLI-catalog, plugin-status and nested-sidebar test fixes. All three formerly failing test files are byte-identical to this selected main revision. The 53 original non-merge commits are preserved; the later canonical placement-assertion commit is replayed patch-identically.

Conflict resolution preserves main's incognito session metadata and node-event source preparation alongside the PR's admitted physical-store, credential-only, OAuth-expiry and node-feature publication contracts. A retained-callback integration defect was reproduced and repaired: credential-grant callbacks outside their admission async context must retain the original incognito actor, not rediscover host session state or adopt a successor. The canonical metadata reader is captured before yielding and reused for read/current/worktree checks. Its small captured-source adapter is extracted into a coherent sibling module to keep the availability owner within its line cap. No incognito activation, storage policy, public capability, credential permission or deadline changed.

Proof: initial six-file integration run 152/152 passed, 85.05 s wall. The new real-actor grant regression then failed all four cases on the pre-fix source for the intended outside-binding host-session read (40.10 s wall); repaired cases pass (35.87 s wall, case times 0.761/0.715/1.424/1.410 s). These exercise actual grant/profile notifications, rotation/acknowledgment, harmless label publication, writer/lifecycle changes, and actor closure with same-path replacement for credential-only and worktree-backed grants. The existing binding suite now uses the existing parallel host-database test pool because ephemeral admission requires its real host owner; no fake main-thread guard, new serial pool, timeout increase or test oracle weakening was introduced. An earlier thread-only fixture admission failure is not counted as RED proof. Complete binding/availability siblings 61/61 and test-routing checks 44/44 pass; command wall 73.27 s. On the final extracted source, full binding/availability plus real GitHub-options/guest authority suites pass 120/120 across five files, 132.21 s wall / 129.17 s Vitest. The normal complete core-test type command passes all 27 graphs, 570.11 s wall, and scoped typed lint passes with 0 warnings/errors (six source/test files in 18.36 s wall plus the routing module in 0.528 s). Format and authored diff checks pass.

Fresh full-candidate two-pass and scoped retained-source P0–P2 reviews report no actionable findings. Separate production typecheck passes (19.72 s wall). The current hosted verdict is recorded above. Per-case hosted timing for the added regressions has not been extracted; the reported case seconds are measured local runtime. Older runs below are not substituted.

Known validation limits: the required exact-base changed gate still reports the two existing over-cap growth findings (node-registry 1223→1224; delivery-queue-recovery 1140→1143). The repaired availability owner adds no line-cap violation. The aggregate also reports an environment-name budget mismatch (456 names versus 455); canonical source collection finds exactly the same 456 names in selected main and this candidate. The changed-test graph admission reports ui-e2e 722 roots over 720; the UI test inventory and graph configuration are unchanged from selected main. No budgets, baselines, guards or CI identity were overridden. These aggregate failures remain disclosed independently of narrower passing proof.

Landing condition: Galin requested landing only if new CI is clean. Existing SDK/security acceptance of the documented token-delegation and refusal contract remains unrecorded; installed-old-node/update/reconnect and unavailable-account Settings recovery remain disclosed proof gaps. No merge has been submitted.

Earlier October 10 placement-assertion repair and failed CI

Earlier rebase completion — 2026-10-10 morning

Previous published head: 784d090. The requested rebase below is retained; this follow-up changes only the two placement test suites omitted from the canonical error migration (+23/-7, no production changes).

Known pending/committed inventory conflicts now assert the canonical SQLite session-mutation conflict class. Released reads, invalidated/indeterminate publications, database closure and session-specific authority refusals retain their distinct, non-retryable contracts. Existing initializer tests still prove the exact session-maintenance label and stale-write recovery; no guard, assertion deadline or retry policy is relaxed.

Red/green proof: the unmodified published predecessor reproduced all 11 failures (31 passing) in the two full suites, 169.54 s wall / 162.79 s Vitest. The corrected suites plus the unchanged 17-case startup-maintenance sibling pass 59/59, 103.97 s wall / 100.08 s Vitest, with --maxWorkers=1. Fresh independent P0–P2 review is scoped-clean. The actual two-file changed-check pipeline passes (238.90 s wall), including its owner-selected gateway-other type graph, all selected ratchets/dead-export scans, formatting and typed lint (zero warnings/errors). This is correction-delta proof, not whole-PR strict line-cap success; the two existing full-PR size findings remain.

The commit was pushed with an exact predecessor lease; current main 6866e21 passed a read-only merge preview. It was not integrated merely for freshness. Contributor credit and the original rebase history are preserved.

Previous CI: failed. Run 38027432747, attempt 1, completed at 05:37:07 UTC: 149 successful, 17 skipped and 4 failed jobs (170 unique jobs, pages 100+70; no pending/cancelled CI jobs). Three root jobs failed; the fourth is the aggregate gate:

  • CLI model-catalog output: one case expects the running-Gateway catalog-refresh guidance sentence, which is absent from stdout.
  • Plugin status: two cases fail with params.diagnostics is not iterable at discovery-availability.ts:179.
  • UI sidebar E2E: two spawned-session cases expect no Move to group menu item and observe one.

The prior 11 placement-message mismatches are no longer among this run's failures; the direct 59-case red/green proof above establishes the correction. Passing per-file hosted counts/timings have not been independently extracted. No cause or pre-existence is asserted for the three remaining failure families, and no unrelated repair or unchanged CI rerun was submitted.

All three root checkout logs identify ed438f45f35b4040bbc4f0c4af30a5211b7b35b7, with verified ordered parents main 6866e21 and this PR head. Its tree 4b1a2a0a74100316fadbf3957ede520765aefdc9 matches the pre-push preview; stale REST base metadata is not used as the executed-source binding.

Both CI-gate surfaces failed. Security-fast and baseline ratchets passed. The separate shared-kit iOS scan completed successfully at 05:42:55 UTC. At 05:44:17 UTC, all 246 exact-head check instances were terminal: 194 success, 4 failure, 47 skipped, 1 neutral. Skipped scopes are not passing coverage. ClawSweeper's exact-head review, reviewed 05:40:07 UTC and published 05:41:04 UTC by receiver 38027835592/1, explicitly resolves the previous placement finding and reports zero code findings, but remains needs-human / blocked, security hold.

Outstanding: R1 SDK/security acceptance, installed-old-node/Settings recovery proof and the two strict full-PR line-cap findings remain. The requested rebase, push, scoped integration correction and CI observation are complete. No merge or auto-merge was submitted; unfinished work remains preserved.

Requested October 10 rebase and first failed CI

Requested main rebase — 2026-10-10

Previous published head: c954ff2, rebased onto main 9c9b2bb. The topology-preserving rebase retains all 53 original non-merge commit SHAs, author metadata, contributor trailers and prior manual resolutions. Reviewed tree: 3fbb7710c1dbcc326c08588730a07df5b9a6d981. Later main d0b4640 passed a read-only merge preview immediately before publication; it was not integrated merely for freshness.

Integration repair: main 22bca7d retired the old preservation-conflict class. Local compiled-worker preparation caught the stale imports before publication. The placement producer and its test now use the canonical SQLite session-mutation conflict with the exact session-maintenance operation label expected by reply initialization. Known conflicts still reprepare without committing the stale candidate; released, indeterminate and lost-source observations remain terminal. No retired alias, broader recovery catch, new retry loop or relaxed authority check was added.

The identity-test conflict retains the PR-specific App-key scrubbing and saved-host credential-refresh contracts while accepting the other upstream test removals. Main’s OAuth exchange, placement-publication receipt and node/worker cleanup changes are incorporated without changing their ownership.

Boundary proof: the real SQLite maintenance interleavings pass, preserving the protected session, refusing stale writes and allowing a fresh preparation; negative controls still reject lost custody. Identity/OAuth and node-connection checks also pass: 98 cases across four files, 122.42 s wall. The current Codex history file passes 44/44, 117.58 s wall / 114.76 s Vitest; the two former incognito timeout cases take 8.445 s / 19.208 s with their 120-second deadlines unchanged. Main affd282 supplies the batched-fixture repair; this PR adds no duplicate correction.

The unchanged native-conversation browser suite passes 6/6 in the supported rootless, network-none runner (338.62 s wrapper / 42.68 s Vitest; former header/navigation case 2.834 s). Its CI-artifact/SDK declaration/UI build passed and container absence was verified. This isolated pass does not establish the cause of the prior CI layout timeout. The earlier worker-connection group passed 34 cases before the maintenance migration and is retained as that narrower evidence, not counted again.

A fresh two-pass independent P0–P2 review of the corrected candidate and canonical recovery receiver found no actionable issue. The initial review was stopped after the compile defect was established; no verdict is claimed for that superseded attempt. Production types and all 27 core-test type graphs pass (67.88 s / 952.48 s); seven-file typed lint reports zero warnings/errors, and formatting plus exact-base whitespace checks pass. These successes do not replace the separate strict line-cap failure below.

Limits: exact-base strict line-cap checks still fail for node-registry.ts (1223→1224) and delivery-queue-recovery.ts (1140→1143), both above 700. No suppression, baseline change or waiver. SDK/security R1 acceptance and installed-old-node/Settings recovery proof remain outstanding; no new physical-node, external-account or Windows-native deployment proof is claimed.

Previous CI: failed. Run 38024550703, attempt 1, completed with 151 successful, 17 skipped and 5 failed jobs (173 unique jobs, all settled). Four root test jobs failed; the fifth is the aggregate:

Accepted integration finding: the 11 placement assertion failures are explained by this rebase’s error-type migration; the two sibling suites were missed. The follow-up documented above completes that migration, retaining the canonical production error and separate released/indeterminate/session authority checks. No production guard or deadline was weakened. Other failures are not attributed to the PR or main by this observation.

The separate shared OpenClawKit dead-code intersection also failed on two test-only reconnect-backoff helper symbols. At 05:07:03 UTC, all 240 exact-head check instances were terminal: 192 success, 6 failure, 41 skipped and 1 neutral. Both CI-gate surfaces failed. Security-fast and baseline ratchets passed; skipped generated-doc/standalone platform/Critical Quality scopes are not passing coverage.

Executed merge b5adb7a6b0f38a7bec86e65b842c418ed7e9f4b0 has verified parents d0b4640 and this exact PR head; its tree matches the pre-publication preview. The latest exact-head ClawSweeper review (revision 81, 04:46:07 UTC) is needs-human/blocked with the typed-assertion P2 finding and the separate security hold. R1 acceptance and the installed-old-node/Settings proof gaps remain outstanding. No unchanged CI rerun or merge was submitted.

Previous October 9 afternoon rebase and failed CI

Previous requested main rebase — 2026-10-09 16:44 UTC

Prior head: 92b0ce0, rebased onto main c647ce7 at @galiniliev’s request. All 53 original non-merge commit SHAs, authored merge resolutions, author metadata and contributor trailers are retained. The resolved tree is ad2875d55c1c1cf3923011118b14c6c52b5d2e22. Later main 7f47fad passed a read-only merge preview; it was not integrated merely for freshness.

Conflict resolution: keep main’s os.platform() permission-policy boundary and matching Windows fixture instead of the earlier process.platform shim. Retain the PR’s selected-host environment, all four cleared ambient token variables, refresh authority, canonical SDK/helper exports, Slack cancellation/close settlement and original 10-second/5-second limits. No security assertion, timeout or production ownership guard was weakened. Main’s Windows lifecycle repairs a201d8d and fec7f69, together with their follow-ups, are incorporated; no duplicate fix was added.

Current proof: 143 distinct tests pass across seven files. Worker GitHub binding/runtime and node-host checks passed 67 cases in 58.42 s. The three previously failing Windows lifecycle, hook-admission and reply-authority files passed 41 cases in 198.67 s. The requester-wake E2E file passed all 35 cases, including the startup-inspection recovery case, in the canonical rootless network-none runner (302.82 s wrapper / 84.69 s Vitest), with container absence confirmed. These are current local replays, not claims of old CI causality or current hosted success. The isolated runner prepared qaRuntime and declaration artifacts; no new full-build claim is made.

Full-candidate independent P0–P2 AutoReview completed both passes with no actionable findings. The host and first implicit-config E2E preparation were refused by the managed-artifact safety fence before tests; specifying the existing E2E config selected the isolated runner’s supported prebuild path. No fence bypass, source workaround or deadline change was used.

Production types and all 27 core-test type graphs pass (10.49 s / 262.19 s). Three-file typed lint reports zero warnings/errors; formatting and exact-base whitespace checks pass. The strict line-cap result below remains a separate failure, not a green aggregate claim.

Limits: strict exact-base line-cap checks still report node-registry.ts (1223→1224) and delivery-queue-recovery.ts (1140→1143), both above 700. No baseline change, suppression or waiver. SDK/security R1 acceptance and installed-old-node/Settings recovery proof remain outstanding. No merge or auto-merge requested.

Prior CI: failed. Run 37963503099, attempt 1, completed with 153 successful, 17 skipped and 3 failed jobs (173 unique jobs, reconciled over two pages; none pending or cancelled in this CI workflow). Two root test jobs failed; the third is the aggregate gate:

  • Control UI E2E shard 7/9: native-conversation navigation/Dashboard handoff failed while polling the native header bounding box at ui/src/e2e/native-conversation.e2e.test.ts:242.
  • Extensions bundle 2: two Codex mirrored-session-history incognito cases reached the 120-second test deadline: retaining item_limit capture diagnostics and projecting native evidence within its budget. Recorded case durations were 168.642 s and 168.144 s; no narrower stalled operation is established.

Both root checkout logs identify d701bd5a39a445d268e3ce0efee25f29229a11db, with verified parents main 7f47fad and PR head 92b0ce0. Its tree matches the pre-publication merge preview. These are observed failure boundaries, not established PR/main causality or flakiness.

Both CI-gate surfaces failed. Baseline ratchets and security-fast passed; production-dependency and changed-workflow audits were skipped. The separate Shared OpenClawKit iOS scan was still running at the 17:24:39 UTC snapshot, outside the completed CI workflow. Exact-head ClawSweeper revision 78 (17:14:02 UTC) remains needs-human / blocked, security hold, with no discrete code finding. R1 acceptance and the disclosed installed-old-node/Settings recovery proof remain unrecorded.

The requested rebase, push and CI observation are complete. No CI rerun, timeout/assertion weakening, additional repair or merge was attempted. The four previous failing files passed the current local replays above; that does not substitute for hosted per-file proof.

Previous October 9 rebase and failed CI

Previous main rebase — 2026-10-09 04:07 UTC

Prior head: f259173, rebased onto main 59309cc at @galiniliev’s request. The topology-preserving rebase retains all 53 original non-merge commits, authored merge resolutions, author metadata and contributor credit. Main 48e0271 subsequently passed a read-only merge preview; it was not integrated merely for freshness.

The previously interrupted candidate is preserved. Main’s canonical GitHub environment helper and automatic-maintenance policy are retained alongside managed credential scrubbing/refresh, the SDK export, and the native fixture’s exact-object capability binding. Slack retains cancellation and child-close settlement with its original 10-second subprocess and 5-second echo bounds, TLS/CONNECT checks and exact echo assertion. The Windows ACL-policy fixture now completes its real host-platform profile write before simulating the ACL branch; this is not Windows-native execution proof. No production authorization guard was weakened.

Current local proof: 133 distinct cases across eight files pass, covering worker GitHub binding, projected placement, Bash/identity handling, node services and actual pinned Codex 0.160 native execution. Production types, all 27 core test-type graphs, extension-test types, scoped typed lint, formatting and PR-relative whitespace checks pass. The full build passes (269.71 seconds wall). The native/worker group passed 61 cases in 98.16 seconds and node services passed 19 in 11.09 seconds; local times are not hosted CI proof.

Review: full-candidate AutoReview completed in two passes. Its one P2 claim that caller authority was dropped is rejected with inspected common-owner/dispatch wiring and the unchanged passing caller-revocation test: the callback is retained by the duplex owner and consumed before dispatch. No unresolved actionable code finding remains from that review; this is not a claim that its raw result was clean or that R1 was accepted.

Limits: exact-base strict line-cap checks still fail for node-registry.ts (1223→1224) and delivery-queue-recovery.ts (1140→1143), both over the 700-line cap. The former github-tool-identity.ts size finding no longer applies after main’s helper extraction. The build reports advisory startup JS/CSS size warnings (JS 365.2 KiB versus 364.7 KiB); no causal attribution or waiver is claimed. One Bash fixture required clearing only inherited Git author/committer name/email variables so its own author fixture applied. No credential fallback or test assertion was relaxed.

Prior CI: failed. Run 37884859347, attempt 1, finished with 150 successful, 17 skipped and 5 failed jobs (172 unique jobs; none cancelled or pending). Four root test jobs failed; the fifth failure is the aggregate gate:

All four root-job checkout logs identify 4bef92df755543715fd8ea342c663a3ecb91cbbb, whose verified parents are main 48e0271 and this exact PR head. Its tree matches the pre-push merge preview. REST run-base metadata was stale. These are observed failure boundaries; no main/PR causality or flakiness conclusion is claimed.

Both CI-gate surfaces failed. Baseline ratchets and security-fast passed; production-dependency and changed-workflow audits were skipped, not passing audit proof. All other exact-head checks had settled at the 04:54:46 UTC read. The exact-head ClawSweeper assessment (04:49:26 UTC) remains needs-human / blocked with a security hold and no new discrete code finding. R1 SDK/security acceptance and installed-old-node/Settings recovery proof remain outstanding.

The requested rebase, push and CI check are complete. No CI rerun, additional repair, merge or auto-merge was initiated. Prior-head failures below are historical, not this head’s result.

Previous menu-timeout investigation and failed CI

Previous menu-timeout investigation — 2026-10-08

Prior head: 7d9f008. Exact-head CI run 37767948291, attempt 1, failed: 151 successful, 18 skipped, 4 failed jobs (173 total, none pending/cancelled). Three root jobs contain four failed cases: worker workspace wire (240-second timeout), native cancellation authority (registration owner changed during preparation; persistence not committed), Telegram menus (120-second timeout), and Telegram emoji discovery (120-second timeout). The fourth job is the aggregate gate. Executed merge 84ec2af has base d1d8b11 and this PR head. Menu markers stop at gateway-start (11 ms), before the listening callback: startup is now localized, but its inner preparation/spawn cause remains unknown. The other timeouts are not assigned the same cause. Exact-head ClawSweeper revision 75 remains needs-human/blocked; no new R1 acceptance. The PR now reports a main conflict. No CI success, merge or auto-merge is claimed.

Diagnostic-only change: the Telegram command-menu Gateway test now emits finite, sanitized phase markers for startup, readiness, observed menus, assertions, shutdown and server close. Its 120-second deadline, 30-second menu poll, five accounts, localization/pressure/retry assertions and cleanup are unchanged. No timer heartbeats or timeout expansion. The prior timeout’s cause is not established or claimed fixed.

The unchanged exact-source case passed locally in 60.851 s. A diagnostic replay measured Gateway readiness at 64.870 s, assertions complete at 65.039 s, and cleanup complete at 66.018 s. Startup dominates that local observation; it does not prove the CI timeout occurred there. These isolated replays use Node 26 rather than CI’s Node 24.19; no exact CI-environment equivalence is claimed.

Necessary conflict integration: main independently fixed the catalog getter-count fixture in 839ad94. Integrated main 83421e1 to resolve the resulting conflict, retaining both main’s two-lookups/one-native-check coverage and the PR’s stronger separate-response-owner/no-discovery assertions. Fresh bounded integration review found no P0–P2 issue in selected GitHub identity, native execution, catalog or QA mock interactions. Later main d1d8b11 clean-merges; it was not integrated for freshness.

Final composed-tree proof: the menu test and all three native-hook pressure cases pass together in the canonical rootless, network-isolated mock-provider runner: 4/4, no skips; 475.66 s wrapper / 271.03 s Vitest, with container absence confirmed. Menu case 52.217 s. Local catalog, actual native executor and node-relay authority regressions pass 67/67 across three files, 74.78 s wall. Production, extension-test and root-E2E types, two-file typed lint, formatting and diff checks pass. The one-file diagnostic delta also has a clean independent P0–P2 review. Earlier strict aggregate size failures remain recorded; no full-PR strict-green claim or waiver.

SDK/security R1 acceptance and the disclosed installed-old-node/Settings recovery proof gaps remain outstanding. Green CI alone will not waive them. Current per-file CI timings are pending; local timings are not hosted proof.

Previous catalog/diagnostic repair and failed CI

Previous CI repair and diagnostics — 2026-10-08

Prior head: f131d6c. Exact-head CI run 37762782910, attempt 1, failed: 151 successful, 18 skipped and 2 failed jobs (171 total; no pending/cancelled jobs in this CI run). The sole root is Telegram command-menu Gateway proof: “registers pressure-prioritized Telegram menus through a real Gateway” reached its 120-second per-test deadline (case 120.100 s; invocation 150.33 s); the second failure is the aggregate. No narrower stalled operation is established. Actual checkout 6adda04 has base 245b7f6 and this PR head. No CI success, merge or auto-merge is claimed. The unchanged case passes in a local isolated replay (60.851 s case), which is not a fix or baseline attribution.

  • Catalog assertion repaired: main's published-catalog change uses the same getter for native-login demand and the later response acquisition. The old once-only spy assertion reproduced locally. The repaired real-dispatch fixture proves one native check, one materialization of the separate response owner, correct scope, and no full catalog load or expiry renewal. Production catalog behavior is unchanged.
  • Watchdog failures remain under diagnosis: Slack now reports bounded child import/socket/cleanup phases and parent CONNECT observations; native-hook pressure reports finite fixture phases even when test console output is silent. No timer heartbeats, timeout increases, TLS bypasses, new skips, or weakened assertions. These diagnostics are not claimed fixes for the historical stalls.
  • Recorded merge conflict resolved: main's outbound refactor conflicted with recovery imports. Integrated main de2b8ae, retaining the shared attempt-count owner and the PR's active-producer prefilter. Fresh bounded integration review found no P0–P2 issues. Later main 245b7f6 clean-merges; it was not integrated just for freshness.

Proof: the three-file repair passed independent P0–P2 review and all selected changed checks. Catalog/native-login/projection siblings passed 14 cases, 30.58 s wall; Slack passed 5 cases on Node 24.19.0, 18.73 s wall, with the trusted echo child completing in 2.110 s (most time in owner imports). The isolated native-hook fixture passed 3/3, no skips, 524.56 s wrapper / 262.14 s Vitest before the subsequent main integration; phase logs show Gateway setup dominated. This pass does not establish why CI stalled.

After conflict integration: 103 cases across eight files passed—42 outbound/catalog in 70.77 s wall, then 61 worker-maintenance/session-maintenance/provider-discovery in 117.87 s. The unchanged Telegram model-button flow passed again in the canonical rootless, network-isolated mock-provider runner: 1/1, 276.60 s wrapper / 55.08 s Vitest; case 12.289 s. Container removal was verified. An earlier focused invocation was interrupted by a Gateway restart during preparation (exit 143); it is not counted as product-failure or passing evidence.

Static limits remain explicit: production types, all core test type graphs, three-file typed lint, formatting and diff checks pass after integration. The aggregate changed-check run against the preceding tested merge stops at two newly incorporated main size-growth findings: acp-spawn.test.ts 1302→1303 and sqlite-schema-facts.ts 700→703. Both files equal integrated main; no suppression or baseline modification was made. Earlier whole-PR size findings remain recorded below. This is not a green full-PR strict-check claim.

SDK/security R1 acceptance and installed-old-node/Settings recovery proof gaps remain outstanding. Green CI alone will not waive them. Current per-file CI execution/timings are pending, not replaced with local proof.

Previous concurrency repair and failed CI

Previous concurrency repair — 2026-10-08

Prior head: 5937588. Exact-head CI run 37754174491, attempt 1, failed: 149 successful, 18 skipped, 4 failed jobs (171 total; no pending/cancelled jobs in this CI run). Three root jobs failed: Slack HTTPS_PROXY echo child killed by its 10-second watchdog (10.136 s); local prepared-catalog test expected one published-owner lookup and observed two (0.199 s); native Codex hook-pressure E2E hit the 300-second no-output watchdog (310.04 s invocation, no case verdict). The fourth failure is the aggregate CI gate. Actual checkout was cf63bed, with main parent 54bd6ec and this PR head—not the stale API base. No CI success, merge, or auto-merge is claimed. Bounded diagnosis/repairs continue; absence from failed-root logs is not per-case passing proof. This head retains the previous PR ancestry and incorporates the actual failed CI merge 59d213f (main parent a066127, PR parent 72b7720), followed by seven reviewed repair files. That merge tree was reconstructed locally and matched exactly. Current main 143cb75 merged cleanly in a preview, with no intervening changes in the seven repair paths; it was not integrated merely for freshness.

Two owner-level races repaired:

  • Known worker-placement inventory conflicts now enter the existing reply-initialization reprepare path. Source admission, released/indeterminate observations, and lost physical-owner custody remain terminal. No invalidation check or retry budget was relaxed.
  • Delivery recovery excludes snapshots with active durable producers before taking their process-local claim. The existing policy module owns selection for startup and recurring scans. Settlement precedence, FIFO, authoritative reload, late owner checks, and SQLite fences remain intact.

Four deterministic cases failed before repair: worker claim/release during retained preparation, and startup/recurring recovery during a committed-but-unpublished enqueue reply. All pass afterward. Two additional worker negative controls verify indeterminate/released custody still rejects without writing. 78 focused cases across eight files pass (45 worker/initialization, 33 delivery/recovery). Final seven-file independent P0–P2 review is scoped-clean.

Final real-flow proof: the worker workspace-transfer/load case and Telegram model-button identity case pass together in a network-isolated, mock-provider Gateway run: 2/2, 429.17 s wrapper wall / 179.48 s Vitest. Worker case 111.957 s; Telegram case 10.455 s. The worker fixture uses its existing temporary-parent option so Gateway state and managed worktrees share the owned test filesystem; executable/arguments, reserve, load waves, deadlines and assertions are unchanged. This is boundary proof, not physical-node, installed-old-node, live OAuth, or Telegram Test Server proof.

Final individual changed-test timings with --maxWorkers=1: worker-maintenance 17/17, 38.45 s wall / 32.63 s Vitest; enqueue publication 6/6, 12.82 s wall / 10.96 s Vitest; producer recovery 10/10, 22.84 s wall / 21.06 s Vitest. These real SQLite owner/receipt interleavings reuse existing fixtures without adding Gateway boots; command time includes compiler/import preparation. Per-file CI seconds for these repaired files were not identified in the bounded failure logs; local timings are not substituted.

Static proof and limits: the documented changed-check pipeline passes for the seven-file repair delta against tested merge 59d213f, including production/test/root types, typed lint, dead exports, schema and other selected guards. Shared eligibility moved into its existing policy owner, so the large recovery module has no counted-line growth. A full-PR local comparison still reports earlier, unchanged size growth in github-tool-identity.ts (700→705) and node-registry.ts (1258→1259). No suppression, baseline relaxation, or CI-environment spoofing was used. Repair-delta success is not a green full-PR strict-check claim.

Slack remains an investigated non-reproduction, not a claimed fix. CI's own 10-second child watchdog sent SIGTERM; retained output does not identify startup, transport, or cleanup as the stalled phase. The unchanged case passes alone on Node 24.19.0 (1.784 s), and the broader Slack owner suite passes 169 files / 2,298 cases, 286.49 s wall, on Node 24.19.0 limited to two CPUs and two workers (case 1.674 s). That broader replay is not the exact prior 75-file CI selection/order. No Slack source, TLS checks, timeouts or assertions changed, and no unchanged CI rerun was requested.

SDK/security owner acceptance and the previously disclosed upgrade/recovery proof gaps remain outstanding. Green CI alone will not waive them.

Prior rebase and CI evidence

Prior CI repair — 2026-10-08

Prior head: 72b7720542edf5add57711098ad93aebdfed9295. The reviewed two-file Stop fixture repair is published; exact-head CI failed. Run 37745182330, attempt 1: 149 successful, 18 skipped, 4 failed jobs (171 total; no cancelled or pending jobs in that CI run). No merge or auto-merge has been submitted.

Three root test jobs failed; the fourth is the downstream aggregate:

  • Slack proxy connection: opens a trusted wss target through HTTPS_PROXY — echo child terminated with SIGTERM and empty stdout/stderr (10.249 s). The termination cause is not established.
  • Telegram model-button identity: keeps an emitted model button bound to its provider after inventory replacement — picker wait timed out; Gateway logged Delivery intent is already claimed (43.169 s).
  • Node-worker workspace wire: transfers and reconciles a gateway-push workspace through a device runner — one concurrent load turn returned Worker placement inventory changed (108.148 s).

All three job logs bind the actual tested merge to 59d213f078b894e52fea9f34f2167c420d7f87ca, with main parent a06612710e674f493a3ae8fe1158f60bb56d3924 and this PR head. This differs from the stale base reported in run metadata. These are observed failure boundaries, not proven PR/base attribution; bounded reproduction and owner diagnosis are in progress. No retry-to-green or weakened assertions.

Exact-head ClawSweeper revision 69 remains needs-human / blocked; SDK/security owner acceptance is not recorded. Automated security and baseline checks passed; production dependency audit was skipped. Separate iOS scan was still running at the 08:03 UTC observation, not counted as a passing CI job.

Both original /stop failures reproduced on main and in its scheduled CI. The shared session fixture omitted agentId, causing the native Stop controller-origin check to refuse cancellation. It now supplies the full typed session-reader result; both response assertions require success. Runtime cancellation/authorization is unchanged.

Repair proof: final complete agent suite 393/393 passed, 77.96 s wrapper wall / 72.47 s Vitest with --maxWorkers=1. The two original regressions also pass on this exact PR head (2/2, 63.85 s wrapper wall / 60.97 s Vitest; other cases intentionally excluded from that focused replay). Production types, all 27 selected test-type graphs, scoped typed lint, formatting, relevant static guards, and fresh independent P0–P2 review pass. Broad changed checks still report an unrelated baseline dead export, observePlacementAuthority; this is not a green aggregate claim or a suppression. The existing 705/700 strict local lint finding below remains historical and unresolved.

Update/Doctor cases: main concurrently changed their expected bindings in bc0368d6be373c61da8e50d027d70c31456dba74 to include the wildcard. This PR did not alter those assertions or ship the alternative config-writer repair. An account-scoped writer/provenance proposal passed 83 migration-related cases (476 total including agent tests) and independent review, but remains unpublished pending coordination with that commit’s author: the checked-in migration docs describe account-scoped ownership for markerless rosters, whereas the new expectation accepts fleet-wide ambient ownership. That unresolved contract discrepancy is disclosed, not claimed fixed.

Direct publication of the isolated Stop fix to main was refused by the pull-request-required rule. Focused main repair #167039 merged the same reviewed two-file fix as 35e5f4ab9818deb9347e2ec87c38aee8c05b3e05 after green exact-head CI and normal native review/landing gates; no bypass was attempted.

SDK/security owner acceptance and the installed-old-node/Settings recovery proof gaps remain outstanding. Green CI alone will not waive them.

Prior rebase — 2026-10-08

Prior rebased head: 0df185ed6759f563f3776ab030f6a9d5a3535d11, rebased onto main 158b707b09ea1ef8b2db1c7a2f05e1e21af407cb at @galiniliev’s request. All 47 predecessor commits were retained, followed by one reviewed integration repair. Main’s managed-workspace shape, node event/registry owners, native response-retry fixture and intentional test removals remain intact. The UI tree equals the rebase base.

Integration repair: preserve the admitted session target, physical store, lifecycle and writer while preparing and renewing credentials. Worktrees use a retained worker-reader guard, not a restored synchronous registry lookup. Configured logical store paths are qualified against the admitted physical SQLite path once through the existing worker-backed path owner. Credential-only turns remain supported without granting publication authority. Live execution assertions also reach credential preparation.

The full-candidate review found a pending-refresh replay that skipped the bounded worker-backed recheck while awaiting an acknowledgment. Two focused regressions failed before repair. Pending generations now revalidate when due or when the selected profile changes, retain their generation when unchanged, and can be superseded by a newer rotation. The follow-up P0–P2 review found no remaining actionable issue in the correction.

Local proof: 209 cases passed across nine files, covering credential selection/renewal, worker execution and native inference, publication/worktree authority, node events, exec environment filtering, and the node Codex adapter. The latter includes tests using the actual pinned Codex binary with synthetic transport/preparation; it is not live external-account or physical-node deployment proof. The missing admitted-session regression failed before target propagation; real worker tests also caught and verified the logical/physical store qualification correction. Nine focused regression cases were added.

Final per-file --maxWorkers=1 timings through the canonical test wrapper: credential binding 43/43, 30.97 s wall / 28.37 s Vitest; publication/worktree preparation 13/13, 16.92 s wall / 15.13 s Vitest. The combined authority/worker suite passed 93 cases in 151.01 s wall; four additional integration files passed 55 cases in 56.30 s. The two node-event files contribute 61 passing cases from the earlier mixed run, whose worker failures were subsequently repaired and replayed. The requested per-file CI execution counts/timings were not identifiable in the bounded CI logs; the numbers above are local proof only.

Production types and the production dependency audit pass. All 27 selected test-type graphs, the mock-export guard (10,411 grandfathered factories), formatting and diff checks pass. Twelve-file type-aware lint reports one size-only error: src/agents/github-tool-identity.ts is 705 counted lines against 700, unchanged by this rebase repair’s single-line type-signature edit. The checked-in GitHub Actions policy treats size limits as advisory; no rule, baseline or environment exception was changed. No full local build or new installed-old-node/Settings recovery proof is claimed.

The previous MCP audit blocker was repaired upstream in main (c39d9b0692d); this rebase incorporates SDK 1.31.0 and client 2.2.0 without a separate dependency update.

Prior-head CI: failed. Run 37738645599, attempt 1, completed on this exact head with 151 succeeded, 18 skipped and 3 failed jobs (172 total; none pending or cancelled). There are two failing test jobs and one downstream aggregate:

  • Agent abort integration: two /stop cases—accepted-ack yield and pre-accept setup—failed with Expected record while asserting the stop response.
  • Update/Doctor configuration provenance: two cases received an extra wildcard Discord binding for ops in the persisted configuration.
  • Aggregate gate: selected Node test shards failed. Both required gate entries report failure; the separate gate status is not another independent test defect.

The actual tested merge was 684089f62cdd6208174347925b7f8464e7484b39, with main parent f66ca124026797950926620645498b93c3672627 and this PR head. The failing test modules and inspected stop/admission/config-migration owners are unchanged relative to that exact main parent. The wildcard comes from the existing legacy-role materializer. Bounded inspection did not identify a safe branch-specific correction, and the nearest earlier completed main run inspected supplied no matching failure evidence. That earlier bounded investigation was inconclusive. The subsequent main replay and main CI logs now establish both failure shapes on the baseline; the current repair and concurrent upstream expectation change are recorded above. No inherited-red waiver is claimed.

Baseline ratchets and security-fast passed. The production dependency audit step was skipped in this CI run, so the separate local audit pass above must not be relabeled as hosted audit proof. iOS was skipped. At the 06:55 UTC observation, the full 250-entry rollup had no pending checks (190 success, 54 skipped, 4 failure, 1 cancelled and 1 neutral).

Exact-head ClawSweeper revision 67 remains needs-human / blocked for the reserved SDK/security trust and upgrade/refusal acceptance and installed-node/Settings recovery evidence; no new human acceptance was found. The green-only landing condition is not met. No merge or auto-merge was submitted.

Historical proof and limits

  • Previous head d6346eecc49682c549764ec4f365591a2611be3b completed CI run 37530591689 with 4 successes, 143 cancellations, 18 skips and two failed jobs: the inherited MCP production audit and the downstream aggregate. That cancellation is historical, not current-head proof.

  • Previous head 07d1c2ff6ebe8347ea0c6cf40cf5a1c4bcdf5174 failed CI run 37334679683: 146 successes, 18 skips, four test jobs plus the aggregate gate failed. Observed subjects were ACP completion/session-facts changes, SSH upload/session-facts changes, unready agent database after hard kill, and a node-workspace-files timeout. These are historical observations, not the new head’s result.

  • The preceding head f821c7604eae252c6ec6187cda400d56f5466da7 failed CI run 37271737377. Its reported inventory was 144 passed, 18 skipped, four failed check jobs plus the aggregate gate, and one inconsistent pending job. Failure subjects were QA cleanup error text, retained-config exports, a worker first-turn duplicate reply, hard-kill recovery, and Telegram fixture errors. Those are prior-head observations, not current-head results.

  • The first-turn worker duplicate-reply cause was not established by bounded source/log analysis: CI elided the actual two history rows and their identifiers. Existing launch/commit replay identifiers do not rule out a second production sequence or a projection/finalization interaction. No assertion was weakened or speculative correction applied.

  • Historical native boundary proof covers selected-identity delivery, stale-selection rejection, private refresh acknowledgement, process/profile cleanup, and retained canonical GitHub authorization using production owners and native Codex/stock gh/HTTPS Git. Synthetic preparation, transport and approval adapters limit that proof: physical pairing, installed-old-node update/reconnect, unavailable-account Settings recovery, live OAuth expiry and end-to-end Enterprise deployment are not newly demonstrated.

  • Exact-head ClawSweeper review on the predecessor identified no discrete blocking correctness defect but retained the explicit SDK/security trust and upgrade/refusal decision. Successful automated security checks are not that owner acceptance. No persistent database-schema change has been identified.

Original implementation: @galiniliev.

Work sessions


View the OpenClaw team session

@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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts docker Docker and sandbox tooling agents Agent runtime and tooling extensions: codex plugin: file-transfer extensions: crabbox extensions: github GitHub plugin: link previews and reader size: XL labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

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

  • Current SHA: 8c5e405a4ce78b63d2c131f8e8a20a09fa26d565
  • Maintainer: @galiniliev
  • Repository role: maintain

These security sensitive changes were made:

  • src/agents/github-exec-credential.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/github-oauth-client.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/harness/tool-authority.runtime.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/sandbox/docker-backend.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/server/ws-connection/connect-hello.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/worker-connection-dispatch.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/worker-environments/placement-sandbox.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/gateway/worker-environments/worker-tool-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@galiniliev
galiniliev force-pushed the galiniliev/teamclaw-github-proxy-binding branch from a8a8578 to b2b47b7 Compare September 24, 2026 19:06
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed docs Improvements or additions to documentation app: web-ui App: web-ui docker Docker and sandbox tooling plugin: file-transfer extensions: crabbox extensions: github GitHub plugin: link previews and reader size: XL labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR delivers the selected GitHub execution identity to workers and approved Codex nodes, with credential refresh and cleanup.

Example: A Codex session on an approved node runs gh auth status with System GitHub identity system-octocat selected.

  • Before: The node's private execution environment has no selected GitHub credential.
  • After: Stock gh uses system-octocat through a private profile that follows same-account credential rotations.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Historical native evidence supports the design, but required authority and upgrade scenarios remain incomplete and current source contains introduced validation defects.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) Security review found an item that needs attention.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Remote Codex sessions cannot use stock gh and HTTPS Git with the Gateway's selected execution identity, and long-running remote sessions need credential renewal.
Reason: The feature has clear value and maintainer direction, but the body explicitly reserves SDK/security acceptance of token delegation and upgrade/refusal behavior.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 12 items remain

Keep this PR open: it addresses a concrete remote-execution capability gap, but the discovery regression, introduced fixture defects, and reserved security and compatibility decisions prevent merging.

Priority: P2
Reviewed head: 8c5e405a4ce78b63d2c131f8e8a20a09fa26d565
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Accept selected-account bearer-token delegation to approved Codex nodes, including copied-token persistence, mandatory refresh-capable nodes, and whole-turn refusal for unavailable managed credentials?
  • Recommendation: Accept the documented trusted-host contract: Approve the delegated token permissions and refusal behavior after final-effect and upgrade proof, with clear operator-facing recovery.
  • Why: The PR establishes feature direction but explicitly reserves this SDK/security and upgrade/refusal choice, and no recorded approval resolves it.

Before merge

  • Add real behavior proof - Authority-chain proof required: discussion reports production grant/dispatch owners exercising native Codex, stock gh/Git, refresh acknowledgments, cleanup, and stale-selection rejection, but synthetic approval/transport limits do not establish allowed-versus-forbidden final effects under operator revocation or node reassignment. Historical Settings screenshots do not cover those boundaries. Also demonstrate latest-stable node update/reconnect and unavailable-account recovery through Settings; redact credentials, IPs, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Keep GitHub discovery off worker turn admission (P2) - Every worker turn now awaits prepareWorkerGitHubBindingGrant before launch, including turns without GitHub work. That calls prepareCurrentGitHubPublicationIdentity, whose native path runs gh auth token and whose verification can await network work. A slow native lookup or expired verification therefore delays an ordinary model turn, reversing the explicit background-only contract in perf(gateway): move GitHub discovery off agent turns #169488. Prepare renewable identity facts through the existing background owner and retain synchronous live-authority checks at launch.
  • Restore the helper import used by the retained cancellation test (P2) - Replacing this import leaves createSyntheticPluginRuntimeClient unresolved at line 1493. Running the retained delegated-caller cancellation case raises ReferenceError, and its test-type graph fails. Restore the import and preserve one cancellation test when consolidating the duplicate coverage. Current-head CI supplies new failure evidence for this defect.
  • Include updatedAt in new publication postimages (P2) - The new entry and replacement passed to recordCommittedSessionMetadataPublication lack updatedAt, which InternalSessionEntry requires. The same omission appears in github-publication-availability.worker.test.ts at lines 399–424. These added fixtures fail the current test-type check; supply complete typed session postimages in both files without weakening the publication contract.
  • Use the internal session type for writer-authority fixture patches (P2) - The fixture's patch helper accepts Partial<SessionEntry>, but this new call supplies activeWriterRunId, which exists only on InternalSessionEntry. The replacement table has the same mismatch. The added memory-authority coverage consequently fails test-type validation; type the core-owned fixture patch with InternalSessionEntry rather than widening the public session contract.
  • Declare isolation for the relocated credential mock factories (P2) - Moving the closed factories into this new support file removes their old exact baseline coverage. Seven factories neither preserve real exports nor have the required immediately preceding mock-isolation explanation, so the mock-export guard rejects the PR. Document the individually verified isolation boundaries here, or preserve exports where real module state is safe; do not expand the baseline.
  • Resolve security concern: Finalize the delegated-credential authority proof - Grants retain operator/session authority and node channels revalidate connection features, but historical native proof uses synthetic approval and transport adapters. Establish rejection for the nearest unauthorized caller and for revoked or reassigned authority before new token delivery or process I/O; copied-token revocation is separately a documented trust-model choice.
  • Resolve merge risk - Before merge, establish that revoked operator authority or node-connection reassignment prevents subsequent credential delivery and command effects through the production owners.
  • Complete next step - Address the remaining diff-caused formatting/lint failures and attribute the other failed CI jobs to the PR, an evidenced baseline failure, or an unexecuted check.
  • Improve patch quality - Add final-effect proof for the nearest unauthorized caller and revoked or reassigned authority before worker/node credential delivery and process I/O.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Explain or restore the original intent of Worker turn GitHub discovery - c7fae40: Move account and workspace discovery entirely off agent turns and consume background-published facts with effect-point validation.

Findings

  • [P2] Keep GitHub discovery off worker turn admission — src/gateway/worker-environments/worker-turn-execution.ts:334-342
  • [P2] Restore the helper import used by the retained cancellation test — src/gateway/server-plugins.test.ts:37
  • [P2] Include updatedAt in new publication postimages — src/gateway/worker-environments/worker-github-binding.test.ts:252-256
  • [medium] Finalize the delegated-credential authority proof — src/gateway/server-plugins-node-runtime.ts:98

Provenance

  • Worker turn GitHub discovery changes intended behavior without addressing why it exists (c7fae40: Move account and workspace discovery entirely off agent turns and consume background-published facts with effect-point validation.)

Tests

  • Low-value test src/gateway/server-plugins.node-duplex-authority.suite.ts: The added delegated-caller cancellation case duplicates the retained case in server-plugins.test.ts; remove the added duplicate while preserving one complete cancellation contract.
  • Missing end-to-end proof: Show allowed and forbidden callers plus revocation/reassignment before final credential and process effects, then latest-stable node update/reconnect and unavailable-account Settings recovery.
Agent review details

How this fits together

The Gateway selects credentials and retains run authority; authenticated worker and node transports deliver execution profiles to stock gh and HTTPS Git, then settle delivery and remove temporary profiles.

flowchart LR
  A[Selected GitHub account] --> B[Gateway credential owner]
  C[Admitted run and session] --> D[Execution grant]
  B --> D
  D --> E[Authenticated worker or node transport]
  E --> F[Private GitHub profile]
  F --> G[Stock gh and HTTPS Git]
  D --> H[Refresh and cleanup]
Loading

Technical review

Best possible solution:

Extend the existing background identity owner with renewable execution grants while preserving nonblocking turn admission, explicit trusted-node semantics, and in-product recovery.

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

Source and the linked maintainer request establish the missing Codex credential path; the discovery and fixture defects are source-reproducible, without executing target code.

Is this the best way to solve the issue?

Reusing selection, OAuth, and transport owners is appropriate, but synchronous discovery during worker admission reverses an explicit main-branch design decision.

Full review comments:

  • [P2] Keep GitHub discovery off worker turn admission — src/gateway/worker-environments/worker-turn-execution.ts:334-342
    Every worker turn now awaits prepareWorkerGitHubBindingGrant before launch, including turns without GitHub work. That calls prepareCurrentGitHubPublicationIdentity, whose native path runs gh auth token and whose verification can await network work. A slow native lookup or expired verification therefore delays an ordinary model turn, reversing the explicit background-only contract in perf(gateway): move GitHub discovery off agent turns #169488. Prepare renewable identity facts through the existing background owner and retain synchronous live-authority checks at launch.
    Confidence: 0.99
  • [P2] Restore the helper import used by the retained cancellation test — src/gateway/server-plugins.test.ts:37
    Replacing this import leaves createSyntheticPluginRuntimeClient unresolved at line 1493. Running the retained delegated-caller cancellation case raises ReferenceError, and its test-type graph fails. Restore the import and preserve one cancellation test when consolidating the duplicate coverage. Current-head CI supplies new failure evidence for this defect.
    Confidence: 1
  • [P2] Include updatedAt in new publication postimages — src/gateway/worker-environments/worker-github-binding.test.ts:252-256
    The new entry and replacement passed to recordCommittedSessionMetadataPublication lack updatedAt, which InternalSessionEntry requires. The same omission appears in github-publication-availability.worker.test.ts at lines 399–424. These added fixtures fail the current test-type check; supply complete typed session postimages in both files without weakening the publication contract.
    Confidence: 0.99
  • [P2] Use the internal session type for writer-authority fixture patches — src/gateway/session-actor-effect-reads.test.ts:190
    The fixture's patch helper accepts Partial<SessionEntry>, but this new call supplies activeWriterRunId, which exists only on InternalSessionEntry. The replacement table has the same mismatch. The added memory-authority coverage consequently fails test-type validation; type the core-owned fixture patch with InternalSessionEntry rather than widening the public session contract.
    Confidence: 0.99
  • [P2] Declare isolation for the relocated credential mock factories — src/gateway/worker-environments/worker-github-binding.test-support.ts:17-24
    Moving the closed factories into this new support file removes their old exact baseline coverage. Seven factories neither preserve real exports nor have the required immediately preceding mock-isolation explanation, so the mock-export guard rejects the PR. Document the individually verified isolation boundaries here, or preserve exports where real module state is safe; do not expand the baseline.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Resolve the reserved contract before merging (recommended)
    Record SDK/security acceptance and establish rejection before credential delivery or command effects under revocation and connection reassignment.
  2. Defer node delegation
    Keep Codex node publication brokered while separating any independently useful worker renewal work.

Provenance checked

  • Worker identity selection and Codex boundary changes intended behavior with a stated reason (56d4058: Deliver the selected identity to workers while retaining brokered Codex publication until a deliberate plugin-owned credential channel exists.)
  • GitHub Enterprise host propagation keeps the original intent (db01f6d: Bind repository discovery and preparation to the configured GitHub host while keeping public OAuth and personal publication separate.)

Testing

Proof path: in-process harness.

Security

Needs attention: The trusted-host delegation contract remains explicitly reserved, and supplied evidence does not establish rejection at all final credential and command effects.

Evidence

Security concerns:

  • [medium] Finalize the delegated-credential authority proof — src/gateway/server-plugins-node-runtime.ts:98
    Grants retain operator/session authority and node channels revalidate connection features, but historical native proof uses synthetic approval and transport adapters. Establish rejection for the nearest unauthorized caller and for revoked or reassigned authority before new token delivery or process I/O; copied-token revocation is separately a documented trust-model choice.
    Confidence: 0.96

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Protocol and SDK additions 2 heartbeat fields, 2 duplex options, and 1 node-command features field These additions carry credential generations and connection-bound capability requirements without adding user configuration.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The feature improves GitHub execution on remote workers and nodes, with bounded scope rather than an established urgent runtime outage.
  • merge-risk: 🚨 compatibility: The SDK gains optional invocation contracts, and existing nodes without refresh support are refused until updated and reconnected.
  • merge-risk: 🚨 security-boundary: Selected bearer credentials cross to node hosts, and final-effect rejection under revoked or reassigned authority remains unproven.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

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

Workflow

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

History

Review history (92 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-10T15:44:04.039Z sha 0a34988 :: blocked before merge. :: none
  • reviewed 2026-10-10T19:36:22.350Z sha 27ada72 :: blocked before merge. :: none
  • reviewed 2026-10-10T22:56:10.484Z sha 5be2347170d569bfb279b587a25f85f17b54b8b7 :: blocked before merge. :: none
  • reviewed 2026-10-10T23:49:49.427Z sha af13f15 :: blocked before merge. :: none
  • reviewed 2026-10-11T00:23:36.632Z sha af13f15 :: blocked before merge. :: none
  • reviewed 2026-10-12T03:50:55.632Z sha 54318a7 :: blocked before merge. :: [P2] Update the remaining inventory-conflict assertion
  • reviewed 2026-10-12T04:08:15.286Z sha 54318a7 :: needs real behavior proof before merge. :: [P2] Update the remaining inventory-conflict assertion
  • reviewed 2026-10-13T15:08:56.359Z sha 8c5e405 :: needs real behavior proof before merge. :: [P2] Keep GitHub discovery off worker turn admission

Reviewed October 13, 2026, 11:59 AM ET / 15:59 UTC (Revision 93).

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed clawsweeper-recovery-stuck labels Sep 25, 2026
roboclaw-bot and others added 9 commits October 8, 2026 06:04
Publish the committed failed placement through the existing transition reporter so session reads cannot retain draining after the worker has stopped. Cover the asynchronous cleanup boundary through the real session projection and sessions.describe handler.

Co-authored-by: galiniliev <[email protected]>
Integrate the selected GitHub grant with current worker tool assembly and retain late cancellation cleanup. Deliver a profile rotation immediately when renewal attaches after node approval rather than waiting for the periodic refresh.

Co-authored-by: galiniliev <[email protected]>
Retain the current publication reader and worker finalization owners after rebase. Fence newer workspace snapshots and retain profile rotations across asynchronous preparation; keep tool construction with its policy owner.

Co-authored-by: galiniliev <[email protected]>
Document the seven intentional closed-mock boundaries for synthetic credential, workspace, and node-registry fixtures. Prune five obsolete exact baseline entries through the existing ratchet owner; keep executable test code and assertions unchanged.

Co-authored-by: galiniliev <[email protected]>
Keep the main failure-suite owner while retaining full ambient GitHub isolation. Remove duplicate registrations without changing assertions.

Co-authored-by: galiniliev <[email protected]>
Compose worker-backed workspace preparation with credential-only turns, preserve the admitted session target and physical store aliases, and revalidate unacknowledged credential replacements before replay.

Co-authored-by: galiniliev <[email protected]>
The main-session fixture omitted the admitted agentId, so native Stop origin validation rejected both pre-dispatch cancellation cases. Provide the complete typed session-load result and assert successful Stop responses without weakening cancellation authority. Full agent suite: 393 passing cases; production and 27 test graphs pass; scoped typed lint and independent P0-P2 review pass.

Co-authored-by: galiniliev <[email protected]>
galiniliev and others added 16 commits October 8, 2026 07:43
Classify known placement inventory conflicts through existing reply initialization recovery while keeping lost source custody terminal. Select recovery candidates before taking local claims from live durable producers, preserving settlement precedence and authoritative reload fences. Regressions reproduce both races before repair; 78 focused cases, final real worker/Telegram flows, repair-delta checks and independent review pass. Keep worktree fixture state on its owned filesystem without changing reserve or deadlines.

Co-authored-by: galiniliev <[email protected]>
Preserve shared attempt counting and active-producer scan selection while resolving the recorded recovery import conflict.

Co-authored-by: galiniliev <[email protected]>
Keep menu, localization, retry and cleanup assertions and the 120-second deadline unchanged. Distinguish startup, registration and teardown without polling heartbeats.

Co-authored-by: galiniliev <[email protected]>
Resolve the parallel local-model fixture correction while retaining its native-login check and the stronger response-owner and no-discovery assertions.

Co-authored-by: galiniliev <[email protected]>
Reuse accepted update-repair progress and failure-only fixture diagnostics without changing deadlines, workload, authority checks, or cleanup.

Co-authored-by: galiniliev <[email protected]>
Adopt main's pending-registration owner fix and deterministic regression. Preserve live session reads, admitted physical-store ownership and credential-only execution while integrating discovery caching.

Co-authored-by: galiniliev <[email protected]>
Retain test cancellation and child settlement alongside the existing 10-second subprocess deadline. Preserve the interrupted local candidate for the requested main rebase; remaining validation is not claimed complete.

Co-authored-by: galiniliev <[email protected]>
Capture the original incognito metadata source before yielding and reuse it for workspace and retained worktree checks. Exercise actual grants outside their admission binding, credential refresh, writer/lifecycle retirement and same-path actor replacement through the existing host database test pool.

Co-authored-by: galiniliev <[email protected]>
Resolve the admitted GH_HOST profile at private launch and reuse GH_TOKEN and GH_ENTERPRISE_TOKEN for host and container execution. Keep fallback variables cleared and reread the profile for rotation.

Co-authored-by: galiniliev <[email protected]>
Use one selected-account projection for initial checkout and renewable worker or node execution. Preserve the signed-in person in the existing caller authority, independently of the bot token and verified GitHub login.

Co-authored-by: galiniliev <[email protected]>
Complete the main integration with retained publication ownership, typed contracts, explicit lease transfer, and worker-backed fixture invalidation.

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

Copy link
Copy Markdown
Collaborator

Closing as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: slack Channel integration: slack docs Improvements or additions to documentation extensions: codex extensions: qa-lab extensions: xai gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts security-sensitive-changed size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants