Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR ignores unused stdin and writes complete JSON responses synchronously for argument-fed SQLite inspection workers. Example: Run pnpm openclaw config get tools.exec inside restricted native Codex execution on Linux with Node 26.8.1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a focused repair for a demonstrated configuration-read failure that current main still retains, with no actionable defect found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI configuration inspection reaches isolated SQLite readers; arguments enter child workers, and JSON results return through stdout for validation by the parent. flowchart LR
A[Config CLI] --> B[State snapshot reader]
B --> C[Synchronous worker launcher]
C --> D[Isolated SQLite inspection]
D --> E[Direct stdout JSON write]
E --> F[Parent result validation]
F --> A
Technical reviewBest possible solution: Land the scoped transport repair while preserving process isolation, transport-error rejection and stdin-dependent worker lifecycles. Do we have a high-confidence way to reproduce the issue? Official-release failures, version-matched dependency contracts and unchanged current-main transport code establish the failure path; this read-only review executed no target code. Is this the best way to solve the issue? The repair addresses both observed transport failures at their existing owners without suppressing errors, widening permissions or duplicating configuration readers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a092be7ca9f0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +10, Tests +142. Total +152 across 7 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 14, 2026, 10:38 AM ET / 14:38 UTC (Revision 2). |
Related reports and a newly verified stdout limitation#165705 independently reports the same SQLite Following #170373, I tested nonblocking stdout at this PR's
The parent correctly rejects these failures; it does not report false success. The demonstrated loss is the original large diagnostic, generated using deliberately oversized invalid paths. Small successful replies passed; no ordinary snapshot/data corruption is established. This exposed a transport limitation in the earlier Repair follow-up —
|
Current Status — 2026-11-09: CI Passed
Head
b0df337dc84e8141908403c19d9f8143efc5f7b4changes only the dedicated test-line allocation and its explanatory comments relative toe11304339bf65973e7b89ad8f644022d5fd99c73. The approved exact grant is now 379 lines = 287 net regression-test lines + 92 inherited lines above the integrated main budget. The shared baseline scalar remains unchanged; no tests, coverage, runtime code, timeout or assertion changed, and no extra headroom was added.The repository test-line gate against integrated main
465c110e4975690406b48709d58a581756c85b82now passes on the staged candidate: 6,586,713 test lines / 6,586,713 ceiling / zero slack. The allocation bound and PR-relative whitespace check also pass. The 58 passing tests, targeted types/lint and unchanged code-review coverage recorded for the immediately preceding integration remain applicable; they were not rerun for this numeric/comment-only change.Exact-head CI 42523720314 completed successfully: 52 jobs passed, 29 were skipped, and none failed. All three PostgreSQL conformance shards and the aggregate
openclaw/ci-gatepassed. The hosted baseline-ratchet job passed with 6,586,713 lines / 6,586,713 ceiling / zero slack. Its checkout log verifies synthetic mergea8b922f8d9175402cda37c40955284f3a3bcc483, merging this head into the same pinned main465c110e4975690406b48709d58a581756c85b82. The separate Build Artifacts Testbox run 42523720403 has also passed, so the prior build and budget blockers are cleared on this revision. The exact-head security-sensitive status is successful (“No sensitive product changes”). The exact-head CI and aggregate gate are now green. Maintainer review and any merge decision remain separate; this update does not merge the PR. The former local inherited-budget blocker is resolved by this explicitly approved exact reconciliation, not by weakening tests or silently raising the shared scalar. No PR merge or deployment is included.Historical Integration — 2026-11-08 (Before Approved Budget Reconciliation)
Head
e11304339bf65973e7b89ad8f644022d5fd99c73merges main465c110e4975690406b48709d58a581756c85b82without rewriting history. This addresses the November 6 main-integration build risk: the previously missing Deep Research browser client source is now present in the integrated upstream tree. A new hosted build result is still required; source presence alone is not a passing build claim.The existing ten-file SQLite code/test patch is unchanged by this conflict-free merge (stable patch identity matches the November 6 reviewed candidate). The prior independent review is reused for that unchanged delta, not claimed as a fresh review of all new upstream code. The only additional PR-owned change is
config/test-lines-allocations/172128-sqlite-worker-stdout.txt, granting exactly 287 lines for this PR's measured net regression-test growth. These tests cover unused stdin, UNKNOWN stdout, UTF-8 partial writes/backpressure, fatal writer failures and diagnostic integrity. No tests, assertions, timeouts or shared baseline were weakened or removed.Fresh validation on Node 26.12.1 with pinned pnpm 12.15.0 and a frozen-lockfile install:
The new exact-head CI is pending. This PR is not yet CI-green; the remaining inherited test-budget excess is explicitly unresolved. No merge, deployment, shared-baseline increase, or unrelated repair is included.
Historical Integration — 2026-11-06
Commit
92d22111a2de1ae1e205ca449b79a4ab26b5d956integrates main097f990aa244e71eeb7cacc2348c92df90d73b5dwithout rewriting history. The SQLite transport fix is still needed and remains in this PR. The resolution preserves main's new one-shot delivery/cleanup owner: delivery is marked successful and the temporary snapshot is released only after the awaited direct-fd response write succeeds. Nondelivery cleanup, asynchronous/staged paths, IPC and reclaim behavior remain intact.Fresh verification on Linux / Node 26.12.1, using pinned pnpm 12.15.0 and the frozen lockfile:
CI run 42272405613 for this head completed with failure: UI E2E, PostgreSQL conformance shard 2/3, changed-node checks and production types fail on the missing
extensions/deep-research/browser/client.jsimport (with related implicit-any errors). The separate Build Artifacts Testbox run fails on the same missing import.The hosted checkout is synthetic merge
f0fc4a8b851b03ad03068ae45e9d671edc6114c6against newer maine27b909e49d33bd723a2cfc10e944845f00249b7, rather than the pinned local integration base above. The Deep Research browser files and relevant build implementation are identical between that upstream base and the CI merge; the upstream tree already imports./client.jswithout a corresponding tracked client source. This is an upstream build blocker outside the SQLite delta; no unrelated source repair, rerun, timeout change or CI bypass is included.A separate PR-relevant failure was subsequently identified in the baseline-ratchet job: the test-line check reports 6,551,952 lines against a 6,551,611 ceiling, with this PR adding 287 net regression-test lines. Thus 287 of the 341 excess lines are this PR's growth; the other 54 are inherited from the CI base (the budget files are unchanged by this PR). This is not attributed entirely to the unrelated build failure. A justified PR-specific allocation or consolidation remains necessary; allocating only this PR's 287 lines would still leave the inherited 54-line excess under the current checker. No shared baseline increase, unrelated test deletion or weakening of coverage has been made.
Final CI result: 46 successful jobs, six failed jobs and 28 skipped jobs. The six failures comprise the four missing-client build/type failures, the test-line ratchet, and the aggregate
openclaw/ci-gate; the aggregate log reports those failed prerequisites rather than a new independent defect. The previously pending PostgreSQL shards 1/3 and 3/3 both passed. All workflows from this push are terminal; the separate Build Artifacts Testbox failure is the same missing-client issue. This head is not CI-ready, and the test-budget correction and upstream build blocker remain unresolved. The exact-headopenclaw/security-sensitive-reviewstatus is successful with the description “No sensitive product changes”; this does not clear the failing CI gate.Earlier green CI and built-CLI results below remain historical evidence for their recorded heads, not current-head completion. Maintainer acceptance remains separate from automated checks.
Historical Proposal and Evidence
Related: #167622
What Problem This Solves
Fixes CLI configuration reads failing with
spawnSync EPERMor an empty SQLite worker response inside restricted native Codex execution, while preserving complete replies on ordinary nonblocking stdout.User Impact
Users can run
openclaw config get tools.execin the affected environment without disabling the sandbox or ignoring transport failures. No configuration migration or production-state change is required.Why This Change Was Made
Argument-fed synchronous workers do not need stdin. Ignoring that unused pipe avoids the observed shutdown failure. Their one-shot JSON responses use direct fd writes because Node can classify restricted stdout as an unknown handle and acknowledge stream writes without delivering bytes.
The additional investigation prompted by #170373 showed that a single
writeFileSynccould truncate large diagnostics with EAGAIN on nonblocking stdout. The shared response writer now serializes once, preserves byte offsets across partial writes, and waits 10 ms on EAGAIN/EWOULDBLOCK or zero progress before resuming the remaining bytes. Other errors remain fatal. The parent's existing timeout, SIGKILL and output limit continue to bound the child; no private stdout handles or stream fallback are used.The change is limited to
sync,content-versionandfile-generation. Reclaim stdin/cancellation, session IPC, asynchronous response transport, and transport-error precedence remain unchanged.Evidence
Linux / Node 26.8.1; runtime implementation and build/CLI evidence at
0b03949abd837633817ac7d1ced875049124631f(runtime code unchanged by the CI repair below):The large real-worker diagnostic regression fails before the repair with EAGAIN and passes afterward (232 ms).
51 focused tests pass across five files (47.10 s Vitest / 49.99 s wrapper, including compiler preparation). After final await/return and explicit multibyte-split adjustments, the 17 affected tests pass again (34.49 s / 38.41 s). These include exact UTF-8 bytes across partial writes, EAGAIN/EWOULDBLOCK, zero progress, and fatal EPIPE after partial output.
36 uninstrumented current-source worker cases pass: all three modes, normal and restricted execution, nonblocking FIFO, blocking socket and forced-nonblocking socket, with a slow reader or closure after partial output. Approximately 540 KB error JSON retains the complete original diagnostic; closure remains EPIPE/nonzero.
Six real parent/child controls retain ENOBUFS and ETIMEDOUT/SIGKILL. Each timeout occurs after 65,536 bytes were written, not merely during startup.
Targeted infra TypeScript graph, lint, formatting and diff checks pass. Independent canonical incremental review is scoped-clean through P2.
Regular
build:runtimepackage-script command passes (88.3 s). Both build stamps identify this commit withinputsClean: true.The supported
openclawpackage-script entry (node scripts/run-node.mjs config get tools.exec) runs in native restricted execution with fresh synthetic SQLite/config state: exit 0, exact{ "host": "gateway" }, empty stderr, 2.219 s. The script was invoked directly because pnpm was absent from PATH; no source-runner guards, output adapters, sandbox changes or production state were bypassed.The large responses above deliberately use oversized invalid paths; the reproduced defect was diagnostic loss, not evidence of ordinary snapshot/data corruption. Earlier live-WAL, source-integrity, session and reclaim proof remains applicable to unchanged paths. At that evidence revision, Bun/macOS/Windows behavior had not been validated locally. Later targeted Node/Bun regression checks do not establish full-CLI parity across platforms; see the current-revision CI and limitations below.
Original full-CLI evidence · Related reports, nonblocking reproduction and repair follow-up.
CI Repair —
72d66236c0dCI run 38630219485 exposed two patch regressions: the new stdout helper was missing from the PR wrapper's extraction inventory, and four
writeSynctest mocks inferred only Node's string overload. This revision adds the required inventory entry and explicitly types both valid overload inputs. Runtime code, assertions, test selection, and timeouts are unchanged.state-loggingtest-type graph reproduces the original errors before the correction and passes afterward. The earlier infra production graph had not covered these test files. Targeted lint, formatting, diff checks and independent P0–P2 review pass.check-lintfailure was a 300 s SDK-declaration preparation timeout, not a lint diagnostic. The separate boundary job on the same head successfully emitted 12,514 files and checked the selected plugins, but preparation scope/resource differences remain possible. This timeout is not claimed fixed or proven pre-existing; no timeout increase, retry or CI bypass is included.At that intermediate revision, fresh PR CI was still required; the current-head result is recorded below. The previous successful runtime build/CLI proof remains prior-head evidence for unchanged runtime code, not a rebuilt artifact for this commit.
Previous Review Revision
Removed three redundant mocked-success stdio-array cases requested in review. The inspection-diagnostics fixture now captures actual fd output as well as the unchanged stream path, retaining failure identity, native codes, source integrity and cleanup assertions. Its original CI timeout was reproduced and corrected without changing timeouts or retries.
This PR supplies the candidate and evidence for maintainer assessment; it does not request bypassing review or merging automatically.
Previous Revision and Diagnostic Cleanup —
5b0c63ef5ee4The temporary SDK phase/resource diagnostics were removed from
scripts/lib/native-declaration-emitter.mts,scripts/prepare-extension-package-boundary-artifacts.mtsandtest/scripts/native-declaration-boundary.test.ts. Those diagnostic changes are not part of the current PR delta.The SQLite production transport fix remains in this PR. It ignores unused stdin only in the argument-fed synchronous launcher and uses the shared direct-fd response writer for the one-shot
sync,content-versionandfile-generationresponses. The writer preserves byte offsets and handles temporary nonblocking backpressure. Reclaim stdin/cancellation, session IPC, asynchronous response paths, and the parent's timeout, output limit and transport-error rejection remain unchanged. The PR also includes regression tests and the wrapper extraction-inventory entry; it is not a config-/test-only change.Exact-head CI run 39254280885 completed successfully for
5b0c63ef5ee4036ae5a2bc69a6536db687d7d72a. This supersedes the earlier pending-CI statements for intermediate revisions, not the scope limitations of their runtime evidence.Remaining Limitations
View the OpenClaw team session