Skip to content

fix(proxy): keep capture writes with the Gateway state owner - #168459

Merged
steipete merged 32 commits into
mainfrom
dbasync/ow3-proxy-workboard
Oct 10, 2026
Merged

steipete merged 32 commits into
mainfrom
dbasync/ow3-proxy-workboard

Conversation

@steipete

@steipete steipete commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes standalone proxy capture writing outside the live Gateway's database owner, including capture written by an OpenClaw child launched with openclaw proxy run.

User Impact

The proxy listener and child process remain local. Capture reads and writes route through the live Gateway, or use exclusive offline ownership through shutdown when the Gateway is stopped. Ambiguous delivery is never replayed locally. Parent-only SIGINT/SIGTERM reaches the child, and capture cleanup settles before ownership is released.

This PR is stacked on #168457 for the shared CLI ownership SDK boundary and inherits its sole main integration pinned to ff06ae699514. For child commands that mutate other OpenClaw state, run the Gateway first so those writes can route; offline capture retains exclusive parent ownership until the child exits. Generic manually environment-enabled CLI capture outside the proxy invocation remains a separate follow-up. The released synchronous capture SDK remains supported.

Why This Change Was Made

debugProxy.capture is a narrow admin RPC over the existing shared-state worker operations. The CLI reuses runWithLocalStateOwner and serializes capture operations in FIFO order. Offline custody spans server stop, response finalization, session end, and lease release, including failure paths.

An OpenClaw child sends only session-bound capture writes to a private endpoint on its parent's existing listener. An ephemeral token travels in the existing debug endpoint URL; normal HTTP proxy variables stay credential-free, and resolved settings strip the token before transport or storage. The endpoint cannot read, purge, or execute arbitrary worker commands, revalidates lifetime/session after body preparation, and drains accepted work on stop. A parent-marked endpoint with missing or invalid credentials never selects a SQLite fallback.

No schema, retention, durability, or permission semantics change. Production source: +713/-126 (839 changed lines); tests/fixtures: +366/-40; docs/check metadata: +3/-3. The generated mock allowance baseline shrinks by one retired factory. The added transport is needed because moving the parent alone would leave instrumented child payloads as a second database writer.

Evidence

  • Final proxy owner + cleanup suites: 16 passed with pnpm test src/cli/proxy-owner.test.ts src/cli/proxy-cli.runtime-cleanup.test.ts --maxWorkers=1 on d25682aed604 (31.51 seconds command wall; 9.446 seconds summed owner-test durations and 0.080 seconds cleanup-test durations). Later parent-only Workboard normalization leaves this proxy source unchanged.
  • Both real child runs require three physical capture rows (WS frame, HTTP request, HTTP response), reach the upstream without Authorization/Proxy-Authorization/token leakage, store a credential-free session URL, and create no child capture database. Missing credentials, wrong session/token, and purge attempts are rejected. An earlier fixture passed the wrong proxyline protocol option and bypassed HTTP proxying; that earlier forwarding assertion is not counted as evidence. The repaired fixture and final run exercise actual proxy traversal.
  • The original-routing regression against pinned main ff06ae699514 failed at the intended assertion: all three expected owner RPCs were absent. The candidate routes session, event, and end-session writes. The original parent-only SIGTERM path also failed; the candidate forwards the signal and settles cleanup.
  • Startup deferral: seven cases passed in run-main.profile-env.test.ts (10.302 seconds summed test durations) in an earlier mixed run whose two owner-suite import failures were subsequently repaired. Existing runtime suite: seventeen passed (26.28 seconds). Existing listener/runtime-owner group: thirty-three passed (123.05 seconds). Those unaffected results are reused, not mislabeled as new final-head executions.
  • Every stage of the canonical typecheck pipeline now has passing evidence. Core/UI and the first ten core test graphs passed on c0c38840697d; the remaining seventeen graphs and scripts passed on d25682aed604; extension projects and the final root graph passed on 1e2c76b3a3e8. The other three root graphs passed on d25682aed604, and the changed CLI test graph was rechecked on the final head (2.4 seconds). Earlier owned failures were repaired, rather than reported as inherited. The final production delta normalizes the offline Workboard result; subsequent test-only changes do not invalidate the reused graphs.
  • Typed lint passed for the repaired core files and Workboard CLI/Gateway. Full lint still reports eleven untouched line-limit findings in session-incognito-history.worker.ts, server-http.ts, message-tool-execution.ts, subagent-registry-restore.ts, model-catalog-decisions.ts, prepared-model-runtime.full-catalog.ts, session-cold-storage.ts, session-entry-read-runtime.ts, session-transcript-worker-runtime.ts, session-transcript-worker.types.ts, and openclaw-agent-db-schema.ts. Their blobs are identical to pinned base ff06ae699514; no overall full-lint pass is claimed.
  • The canonical changed check stops at the inherited 456/455 environment-name count caused by the untouched HTML constant OPENCLAW_PITCH. Main fixes it in 060b20e595f36; this change adds no environment names or budget allowance. All remaining canonical plan commands were executed separately. Formatting, assertion safety, mock-export and timeout-race checks, dependency/config/SDK boundary checks, Doctor contracts, script/database/media/sidecar guards, coercion/deprecated-API checks and import-cycle checks passed. The touched Workboard page also passed MDX validation.
  • SDK surface check passed with exactly 152 entrypoints / 3648 exports / 2118 callable exports. Madge found zero cycles (18.17 seconds), and the SQLite worker ratchet found no T1 call-count growth (6.40 seconds). These checks were run on 3b7bd1fda1b0 and reused for unchanged production exports, import topology and SQLite access. Full build passed on combined head 2558c6fea23e (206.26 seconds, Testbox); SDK API diff passed there (393.49 seconds): one subpath / four exports added, no removed or modified direct declarations, and 148 reachable capture-runtime/method-tuple declaration changes. Later changes preserve those exported signatures and are covered by the completed current type stages; no current-head full-build run is claimed.
  • Full Knip retains three pinned-base findings: .github/actions/setup-release-harness/narrow-lockfile.mjs, src/infra/sqlite-source-fence-admission.ts, and exported PUBLIC_SESSION_ENTRY_SCRIPT. All three files are byte-identical to the pinned base. The separate all-exports phase passed (69.13 seconds), as did the script and full-tree export scans. No overall Knip pass is claimed.
  • Three fresh Codex P2 review rounds covered the combined Workboard/proxy change. All reported findings were fixed: dispatch timeout forwarding, parent-signal forwarding, and the child test entrypoint. The accepted-work authority issue was separately fixed and regression-proven. Later changes resolved required type/lint/environment-budget gates and normalized the offline response. No fourth review was run under the requested convergence rule.
  • CI seconds are not yet measured; the timings above are local command wall time and summed test durations.
  • Published-driver × candidate update cell: passed on final head 1cb38c03856329000a2d23e23e5d125ec5e42522 using Testbox. Run 38067918691: published 2026.9.9 driver, finished update, readiness 200, running version verified, durable and incognito state survived. Command time 14m13s. Candidate tree 29c58c023c8ebb58a7d402474759e2c3170400b6 was verified before execution; Testbox uses a synthetic checkout commit. No schema changes. A post-result external runner portal sync emitted a timeout warning; the remote command and update proof passed.
Shared SQL census context; these CLI branches were not the measured candidate

The shared six-run alternating census compared base 427f926e7c2d with devices/backup candidate 13959252b2d6. Workboard and proxy capture were not in that candidate. Each value is a phase median [min–max]; warmed values are per turn (10 warmed turns per run). Requests count all worker requests. MAIN counts are included without treating movement to another thread as a saving.

Phase Base all-thread SQL Candidate all-thread SQL Base MAIN SQL Candidate MAIN SQL Base requests Candidate requests Duration C/M
01.boot 3347 [3325–3351] 3348 [3345–3349] 1988 [1986–1988] 1988 [1984–1988] 69 [66–70] 69 [69–70] 0.845
01.connect 379 [314–462] 345 [290–484] 61 [61–63] 61 [61–65] 45 [37–46] 42 [36–50] 1.140
02.first-turn 1988 [1875–2497] 2478 [1833–2497] 77 [56–105] 98 [70–105] 291 [290–346] 341 [288–346] 1.072
03.warmed 1105.7 [1087.7–1189] 1121.5 [1058.4–1142.5] 13 [11–19] 12.1 [9.8–13.9] 204.4 [200.1–213.2] 204.8 [199.8–209.1] 1.020
04.second-session 4270 [4108–4347] 4286 [4272–4340] 134 [126–156] 147 [137–148] 709 [688–729] 732 [719–736] 0.804
05.control-plane 86 [33–100] 121 [35–126] 13 [0–23] 35 [0–35] 11 [5–20] 24 [5–25] 0.951
06.cron 1327 [1257–1403] 1318 [1241–1320] 44 [40–46] 32 [9–74] 202 [190–213] 198 [188–201] 1.168
07.compaction 422 [408–526] 465 [407–536] 25 [25–53] 48 [25–48] 85 [84–102] 92 [84–104] 1.098
08.shutdown 201 [197–205] 204 [199–207] 133 [130–133] 133 [128–136] 15 [15–15] 15 [15–15] 0.357

The raw first-turn and warmed SQL gate did not pass in this census. Excess attribution is indeterminate; this is not a claim that all increases are noise or background work. No statement or request reduction is claimed for this PR. The Gateway adds a lazy debugProxy.capture handler; it runs only for explicit capture RPCs. Child transport selection runs only for enabled asynchronous capture, and run-main deferral is limited to the standalone proxy command. No new SQL statement or worker request is introduced on an ordinary chat turn with capture disabled. Per-operation proxy CLI statement/request totals were not measured; the boundary tests prove routing, capture contents, and settlement, not a call-count reduction. The separate follow-up observations and their limitations are recorded below.

Separate remote follow-up observations; neither measured these CLI branches

The designated Hetzner follow-up and the independently retained Testbox follow-up are separate one-pair observations for the devices/backups work. They are not pooled with each other or with the initial six-run census, and neither measured this Workboard or proxy branch.

Startup through shutdown All-thread SQL, base → candidate SQL delta Worker requests, base → candidate Request delta Evidence limit
Designated Hetzner pair 22583 → 22437 −146 3396 → 3391 −5 Completed totals retained; detailed operation/caller artifacts were lost after later setup exhausted remote temporary storage.
Separate Testbox pair 21645 → 21652 +7 3315 → 3317 +2 Full phase, operation, caller and SQL-class vectors retained and reconciled; event-level async origins are unavailable after reduction.

The Testbox pair compared 427f926e7c2d763e362f59678c6486b6f2f4aec4 with devices/backups candidate b2825e4bebc51e76b62b539daf275d50e212182c. Total wall time was 41.840 → 41.774 seconds. Each phase cell below is a one-sample median [min–max]; warmed SQL and requests are per turn across ten warmed turns, while warmed duration covers that whole window.

Phase All-thread M → C MAIN M → C Requests M → C Duration M → C (s) C/M duration
01.boot 3320.0 [3320.0–3320.0] → 3319.0 [3319.0–3319.0] 1984.0 [1984.0–1984.0] → 1984.0 [1984.0–1984.0] 67.0 [67.0–67.0] → 67.0 [67.0–67.0] 6.449 → 6.340 0.983
01.connect 484.0 [484.0–484.0] → 490.0 [490.0–490.0] 69.0 [69.0–69.0] → 69.0 [69.0–69.0] 72.0 [72.0–72.0] → 73.0 [73.0–73.0] 1.322 → 1.366 1.033
02.first-turn 1813.0 [1813.0–1813.0] → 1816.0 [1816.0–1816.0] 59.0 [59.0–59.0] → 59.0 [59.0–59.0] 264.0 [264.0–264.0] → 263.0 [263.0–263.0] 4.537 → 4.473 0.986
03.warmed 1023.9 [1023.9–1023.9] → 1023.4 [1023.4–1023.4] 7.8 [7.8–7.8] → 7.8 [7.8–7.8] 195.0 [195.0–195.0] → 195.0 [195.0–195.0] 15.207 → 15.145 0.996
04.second-session 3944.0 [3944.0–3944.0] → 3948.0 [3948.0–3948.0] 118.0 [118.0–118.0] → 118.0 [118.0–118.0] 684.0 [684.0–684.0] → 686.0 [686.0–686.0] 6.399 → 6.434 1.005
05.control-plane 34.0 [34.0–34.0] → 34.0 [34.0–34.0] 0.0 [0.0–0.0] → 0.0 [0.0–0.0] 5.0 [5.0–5.0] → 5.0 [5.0–5.0] 1.072 → 1.086 1.013
06.cron 1210.0 [1210.0–1210.0] → 1211.0 [1211.0–1211.0] 44.0 [44.0–44.0] → 44.0 [44.0–44.0] 175.0 [175.0–175.0] → 175.0 [175.0–175.0] 5.287 → 5.280 0.999
07.compaction 406.0 [406.0–406.0] → 405.0 [405.0–405.0] 25.0 [25.0–25.0] → 25.0 [25.0–25.0] 84.0 [84.0–84.0] → 84.0 [84.0–84.0] 1.249 → 1.324 1.060
08.shutdown 195.0 [195.0–195.0] → 195.0 [195.0–195.0] 129.0 [129.0–129.0] → 129.0 [129.0–129.0] 14.0 [14.0–14.0] → 14.0 [14.0–14.0] 0.318 → 0.326 1.025

The retained Testbox observation has unchanged warmed MAIN SQL (7.8/turn) and worker requests (195/turn), with all-thread warmed SQL 1023.9 → 1023.4. Its first-turn change is 1813 → 1816 statements, MAIN stays 59, and worker requests fall 264 → 263. Count reconciliation is complete: first-turn SQL is existing admission trios (+6), config-machine reads (+3), exact-entry reads (−1), and catalog reads (−5), net +3. Whole-workload varying operations sum to +7 statements; the only extra requests are session-row-facts (+1) and sessionRows.sharedFacts (+1). Every named varying caller is byte-identical and no retained native SQL stack names changed operational source. Unknown caller labels and unavailable event-level async origins remain explicit limits; the retained Testbox vectors cannot recover the lost Hetzner vectors.

The designated whole-workload observation is lower; the independent Testbox observation is slightly higher. Under the campaign's updated RAW TURN INCREASE and TARGETS ARE AIMS disposition, there is no confirmed PR-caused regression. This is not a claim that the independent Testbox totals decreased, nor a reconstruction of missing attribution. No statement or request saving is claimed for either CLI branch, and their per-operation CLI totals remain unmeasured.

Landing validation

Final candidate: 1cb38c03856329000a2d23e23e5d125ec5e42522. Fixed missing wrapper transitive dependencies and appended the new capture RPC to preserve legacy method ordering. Integrated main and removed the exact stale six-call session-accessor allowance after main removed those fixture calls; no budget was raised.

  • Wrapper extraction suite: 17 passed, 206.82s command wall.
  • Gateway method-list suite: 7 passed, 201.66s command wall.
  • Session-accessor boundary guard: passed.
  • Scoped P0/P1 autoreview of the landing code fixes: no actionable findings.
  • Exact-head CI: green.

@clawsweeper

clawsweeper Bot commented Oct 10, 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 the docs Improvements or additions to documentation label Oct 10, 2026
@clawsweeper clawsweeper Bot added the status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. label Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR routes proxy capture through the running Gateway or exclusive offline ownership and forwards child capture writes through the parent.

Example: Run openclaw proxy run -- openclaw status while the Gateway owns the same state directory.

  • Before: Parent and child capture can write independently of the Gateway's persistence owner.
  • After: The parent routes capture through the Gateway, and the child forwards session-bound writes to the parent.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful ownership repair with two prior findings resolved, one confirmed startup defect remaining, and required authority evidence absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Standalone proxy captures can bypass the running Gateway's database ownership, including writes from an instrumented child.
Reason: This maintainer-authored repair restores the documented single-owner contract and reuses the existing routing boundary.

Merge readiness

⛔ Blocked before merge - 4 items remain

This PR addresses a current state-ownership defect; the prior IPv6 finding remains, while the method-order and wrapper-dependency findings are fixed.

Priority: P2
Reviewed head: 1cb38c03856329000a2d23e23e5d125ec5e42522

Before merge

  • Add real behavior proof - Authority-chain proof required: The reported child runs exercise real HTTP and SQLite with simulated Gateway transport and reject wrong tokens, sessions, and purge commands, but do not demonstrate rejection after endpoint retirement during body preparation or requester revocation before queued SQLite execution; provide allowed and forbidden final-effect traces while preserving accepted-work settlement, with credentials, IPs, and private endpoints redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Bracket IPv6 hosts before constructing the capture endpoint (P2) - With openclaw proxy start --host ::1 or proxy run --host ::1, the listener binds successfully, then this new call passes a URL such as http://::1:7799 to new URL() in captureEnv and throws. Startup fails before returning the stop handle, and the catch releases storage without closing the bound listener. Construct one bracketed IPv6 URL and reuse it for proxyUrl and captureEnv. This prior finding remains unfixed.
  • Resolve security review attention item - The new capture authority paths require final-effect authorization evidence.
  • Resolve merge risk - The new session capability and admin RPC materially change authority flow; rejection after endpoint retirement or requester revocation remains unproven at the final persistence boundary.

Findings

  • [P2] Bracket IPv6 hosts before constructing the capture endpoint — src/proxy-capture/proxy-server.ts:468

Tests

  • Missing end-to-end proof: Missing final-effect evidence for endpoint retirement during body preparation and requester revocation before queued capture persistence.
Agent review details

How this fits together

The proxy CLI receives transport events from its listener and child processes, then sends capture operations to the canonical shared-state SQLite worker.

flowchart LR
  A[Proxy CLI] --> B[Local proxy listener]
  C[OpenClaw child] --> B
  B --> D[State owner routing]
  D --> E[Running Gateway]
  D --> F[Exclusive offline owner]
  E --> G[SQLite worker]
  F --> G
Loading

Technical review

Best possible solution:

Retain the existing state-owner routing, construct valid IPv6 endpoint URLs, and establish final-effect authority fencing.

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

Current-main source opens standalone capture persistence directly, establishing the ownership failure; the remaining IPv6 exception is also source-reproducible, but no target code was executed during this review.

Is this the best way to solve the issue?

Routing through the existing owner addresses the producer boundary and preserves worker persistence, FIFO ordering, and offline custody without introducing a competing storage owner.

Full review comments:

  • [P2] Bracket IPv6 hosts before constructing the capture endpoint — src/proxy-capture/proxy-server.ts:468
    With openclaw proxy start --host ::1 or proxy run --host ::1, the listener binds successfully, then this new call passes a URL such as http://::1:7799 to new URL() in captureEnv and throws. Startup fails before returning the stop handle, and the catch releases storage without closing the bound listener. Construct one bracketed IPv6 URL and reuse it for proxyUrl and captureEnv. This prior finding remains unfixed.
    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 379da8e45692.

Merge-risk options

Maintainer options:

  1. Hold for final-effect authorization evidence (recommended)
    Keep this PR open until evidence shows endpoint retirement and requester revocation prevent forbidden SQLite effects while accepted work still settles.

Provenance checked

  • Asynchronous capture persistence and shutdown keeps the original intent (19c6ef8: Move SQLite and compression off the main thread while draining admitted writes and retaining released synchronous SDK support.)
  • Shared capture database keeps the original intent (0876ed5: Store captures in the shared state database.)
  • Standalone listener and child invocation keeps the original intent (958c34e: Provide the proxy capture core, CLI, transport seams, and QA inspector.)
  • Early CLI capture deferral keeps the original intent (e47d0ce: Defer capture before update and Doctor admission so original state is retained before mutation; this change extends that mechanism to standalone proxy ownership.)

Testing

Proof path: in-process harness.

Security

Needs attention: The new capture authority paths require final-effect authorization evidence.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 19c6ef8 adds src/proxy-capture/proxy-server.ts:195 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 19c6ef8d9e02; files: src/proxy-capture/proxy-server.ts)
  • Tak Hoffman: Raw commit 958c34e adds src/proxy-capture/proxy-server.ts:64 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 958c34e82cdb; files: src/proxy-capture/proxy-server.ts)
  • Vincent Koc: Raw commit 51b64b8 adds src/proxy-capture/proxy-server.ts:122 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 51b64b81980b; files: src/proxy-capture/proxy-server.ts)

PR surface

Source +587, Tests +327, Docs 0, Other 0. Total +914 across 24 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 15 713 126 +587
Tests 5 367 40 +327
Docs 1 2 2 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 2 2 0
Total 24 1084 170 +914

Review metrics

Metric Value Why it matters
Production versus test changes Production +713/-126; tests and fixtures +366/-40 The child transport closes a separate-writer path that moving the parent alone would leave open; the tests cover routing, durable capture contents, and cleanup.
Gateway surface One new operator.admin RPC debugProxy.capture exposes a bounded capture command schema through the existing state-owner boundary.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review merge-risk labels are merge-risk: 🚨 compatibility, merge-risk: 🚨 security-boundary.

Label justifications:

  • P2: This repairs a diagnostic persistence workflow with limited blast radius.
  • merge-risk: 🚨 compatibility: Older live Gateways lack capture routing, an explicitly documented maintainer tradeoff; the remaining IPv6 defect also breaks an existing bind option.
  • merge-risk: 🚨 security-boundary: The child bearer capability and Gateway admin RPC require final-effect proof for retired or revoked authority.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Add final-effect proof that retiring the child endpoint during body preparation and revoking the Gateway requester before SQLite execution prevent writes while accepted work still settles.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-10T13:43:19.332Z sha 1e2c76b :: needs real behavior proof before merge. :: [P2] [P2] Bracket IPv6 hosts before constructing the capture endpoint
  • reviewed 2026-10-10T15:30:19.740Z sha 1e2c76b :: needs real behavior proof before merge. :: [P2] Bracket IPv6 hosts before constructing the capture endpoint | [P2] Append the capture RPC after the frozen advertised prefix | [P1] Include the new capture modules in native wrapper extraction

Reviewed October 10, 2026, 12:05 PM ET / 16:05 UTC (Revision 3).

Base automatically changed from dbasync/ow3-workboard to main October 10, 2026 15:22
@github-actions

github-actions Bot commented Oct 10, 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: 1cb38c03856329000a2d23e23e5d125ec5e42522
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/methods/core-descriptors.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Oct 10, 2026
@openclaw-barnacle openclaw-barnacle Bot removed scripts Repository scripts plugin: workboard labels Oct 10, 2026
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 10, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Oct 10, 2026
@steipete
steipete merged commit 94907ee into main Oct 10, 2026
171 checks passed
@steipete
steipete deleted the dbasync/ow3-proxy-workboard branch October 10, 2026 16:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 10, 2026
…th fixtures

check-dependencies has been red on hourly main. Its three Knip scripts
failed for separate reasons:

- deadcode:full (production pass) reported
  canUseProfileAsProviderEntryApiKey. #168552 made
  src/plugin-sdk/plugin-test-runtime.ts, a production root, lazily load
  isolated-completion.adapter.test-support.ts. That fixture passes the
  model-auth and prepared-model-runtime namespaces to vi.spyOn. In Knip
  6.32.2, any opaque import (here the lazy loaders in the media-understanding
  runner and config model validation) counts every export of a module as
  used, unless every namespace importer references only the bare namespace
  (is-referenced.js hasOnlyNsRefs). The spies flip that, so the facade's
  dead re-exports surfaced, and deadcode:exports reported nine
  "exports in used namespace" findings for test seams and the lazy-loaded
  isProviderAuthError.
- deadcode:exports' script scan reported the default export of
  tools/solid-lint/index.mjs, which Oxlint loads by path through
  .oxlintrc.json jsPlugins (#168376).
- deadcode:unused-files' full-tree scan reported six files that are only
  loaded by path: scripts/control-ui-parity/{vitest.config,capture-suite,
  fixtures,scenarios}.ts (`pnpm ui:parity`, #168597),
  src/proxy-capture/child-transport.process.test-support.ts
  (resolveRuntimeWorkerUrl in proxy-owner.test.ts, #168459) and
  test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs (spawned by
  the Codex adapter test, #168552).

Changes:

- Make canUseProfileAsProviderEntryApiKey module-private and drop four other
  model-auth facade re-exports with no consumers anywhere (EnvApiKeyResult,
  ProviderEntryApiKeyBindingResolution, ProviderCredentialPrecedence,
  resolveAwsSdkEnvVarName). Their owners keep their real consumers.
- Ignore only nsExports in the production scan for model-auth.ts,
  model-auth-runtime.ts, model-auth-runtime-shared.ts and
  prepared-model-runtime.ts. Each has a verified opaque lazy importer; plain
  unused exports stay reported, and the full-tree scan still audits every
  export against its test consumers. plugin-test-runtime stays a production
  root: un-rooting it surfaced 24 false positives, because extension tests
  import it through the openclaw/plugin-sdk alias.
- Register the solid-lint default export as Oxlint-consumed, matching
  oxlint-boundary-guards.mjs.
- Add full-tree entries for the six by-path files. No files are deleted.

Proof: deadcode:full, deadcode:unused-files and deadcode:exports all exit 0
on the final tree; the model-auth focused tests pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…w#168459)

* feat(plugin-sdk): expose local state owner routing for CLI commands

* fix(cli): route proxy and Workboard writes through the state owner

* fix(workboard): route CLI mutations through the active Gateway

* fix(workboard): preserve dispatch without explicit parameters

* fix(cli): retain accepted work through capture and dispatch cleanup

* fix(plugin-sdk): type and account for the CLI ownership surface

* fix(proxy): complete typed capture ownership contracts

* fix(proxy): carry child credentials in the existing capture endpoint

* test(workboard): preserve state owner module exports

* test(proxy): preserve mocked owner and listener exports

* test(workboard): prune the retired config mock allowance

* test(proxy): prune the retired runtime mock allowance

* test(proxy): require actual upstream proxy traversal

* test(workboard): load plugin owners through public test surfaces

* test(workboard): type owner routing fixtures precisely

* fix(proxy): satisfy capture lifecycle type and lint contracts

* test(workboard): type the facade export as a standalone function

* test(proxy): preserve signal and environment fixture contracts

* fix(workboard): report empty worker results for offline dispatch

* fix(proxy): preserve method order and wrapper dependencies

* test: ratchet removed session accessor fixture debt
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
…th fixtures

check-dependencies has been red on hourly main. Its three Knip scripts
failed for separate reasons:

- deadcode:full (production pass) reported
  canUseProfileAsProviderEntryApiKey. openclaw#168552 made
  src/plugin-sdk/plugin-test-runtime.ts, a production root, lazily load
  isolated-completion.adapter.test-support.ts. That fixture passes the
  model-auth and prepared-model-runtime namespaces to vi.spyOn. In Knip
  6.32.2, any opaque import (here the lazy loaders in the media-understanding
  runner and config model validation) counts every export of a module as
  used, unless every namespace importer references only the bare namespace
  (is-referenced.js hasOnlyNsRefs). The spies flip that, so the facade's
  dead re-exports surfaced, and deadcode:exports reported nine
  "exports in used namespace" findings for test seams and the lazy-loaded
  isProviderAuthError.
- deadcode:exports' script scan reported the default export of
  tools/solid-lint/index.mjs, which Oxlint loads by path through
  .oxlintrc.json jsPlugins (openclaw#168376).
- deadcode:unused-files' full-tree scan reported six files that are only
  loaded by path: scripts/control-ui-parity/{vitest.config,capture-suite,
  fixtures,scenarios}.ts (`pnpm ui:parity`, openclaw#168597),
  src/proxy-capture/child-transport.process.test-support.ts
  (resolveRuntimeWorkerUrl in proxy-owner.test.ts, openclaw#168459) and
  test/e2e/qa-lab/runtime/codex-isolated-app-server.fixture.mjs (spawned by
  the Codex adapter test, openclaw#168552).

Changes:

- Make canUseProfileAsProviderEntryApiKey module-private and drop four other
  model-auth facade re-exports with no consumers anywhere (EnvApiKeyResult,
  ProviderEntryApiKeyBindingResolution, ProviderCredentialPrecedence,
  resolveAwsSdkEnvVarName). Their owners keep their real consumers.
- Ignore only nsExports in the production scan for model-auth.ts,
  model-auth-runtime.ts, model-auth-runtime-shared.ts and
  prepared-model-runtime.ts. Each has a verified opaque lazy importer; plain
  unused exports stay reported, and the full-tree scan still audits every
  export against its test consumers. plugin-test-runtime stays a production
  root: un-rooting it surfaced 24 false positives, because extension tests
  import it through the openclaw/plugin-sdk alias.
- Register the solid-lint default export as Oxlint-consumed, matching
  oxlint-boundary-guards.mjs.
- Add full-tree entries for the six by-path files. No files are deleted.

Proof: deadcode:full, deadcode:unused-files and deadcode:exports all exit 0
on the final tree; the model-auth focused tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation 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. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

1 participant