Repository navigation
fix: let maintainers compare catalog changes against released readers again - #204528
Conversation
…e broker
pnpm catalog:compare-released failed for every released reader: every
provider plugin and bundled memory-core failed to load with
"AggregateError: Native resource creation cleanup failed", the worker
exited 1, and the reported log tail was a plugin-registry dump.
The worker redirects every outgoing socket to its fake upstream. Its
connect-argument parser only knew TCP forms, so the release's
net.connect("/tmp/oc-br-<hex>/resource.sock") was read as a port and sent
to the fake HTTP server; the broker client parsed "HTTP/1.1 400" as a
frame header (Invalid spawn broker resource frame length) and every
plugin load failed. Socket paths now pass through, parsed the way Node
does; TCP stays redirected.
Node's uncaught-error printer inspects every own property, and a released
PluginLoadFailureError carries its whole registry. The worker now prints a
fatal error as its stack and cause chain, so the parent's tail shows it.
|
🦞👀 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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves released readers’ broker socket connections and reports fatal errors without dumping the plugin registry. Example: Run catalog:compare-released with served-v3.json and --filter zai against 2026.11.7.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a concrete failure still present on main with a focused change and meaningful regression coverage; no actionable findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe catalog comparison CLI runs installed releases in temporary worker environments, supplies catalog bundles and synthetic upstream responses, and returns reader observations or failure diagnostics. flowchart TD
A[Catalog comparison CLI] --> B[Isolated release worker]
B --> C[Released catalog readers]
C --> D[Native resource broker IPC]
C --> E[Redirected TCP upstream]
D --> F[Comparison report or error]
E --> F
Technical reviewBest possible solution: Keep the repair in the existing worker: preserve broker IPC, retain TCP interception, and render fatal stacks and causes compactly. Do we have a high-confidence way to reproduce the issue? Source inspection confirms that main redirects broker socket paths to HTTP; the PR supplies matching failure diagnostics and successful repaired CLI output, without this review executing target code. Is this the best way to solve the issue? The patch repairs the existing socket-routing owner directly, preserves prior entry-point checks, and adds one regression for each distinct failure without unnecessary machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 459e14b90136. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +41, Other +25. Total +66 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 Reviewed November 24, 2026, 4:25 AM ET / 09:25 UTC. |
|
Merged via squash.
|
…e broker (#204528) pnpm catalog:compare-released failed for every released reader: every provider plugin and bundled memory-core failed to load with "AggregateError: Native resource creation cleanup failed", the worker exited 1, and the reported log tail was a plugin-registry dump. The worker redirects every outgoing socket to its fake upstream. Its connect-argument parser only knew TCP forms, so the release's net.connect("/tmp/oc-br-<hex>/resource.sock") was read as a port and sent to the fake HTTP server; the broker client parsed "HTTP/1.1 400" as a frame header (Invalid spawn broker resource frame length) and every plugin load failed. Socket paths now pass through, parsed the way Node does; TCP stays redirected. Node's uncaught-error printer inspects every own property, and a released PluginLoadFailureError carries its whole registry. The worker now prints a fatal error as its stack and cause chain, so the parent's tail shows it. (cherry picked from commit 6400a15) Co-authored-by: RomneyDa <[email protected]>
…e broker (openclaw#204528) pnpm catalog:compare-released failed for every released reader: every provider plugin and bundled memory-core failed to load with "AggregateError: Native resource creation cleanup failed", the worker exited 1, and the reported log tail was a plugin-registry dump. The worker redirects every outgoing socket to its fake upstream. Its connect-argument parser only knew TCP forms, so the release's net.connect("/tmp/oc-br-<hex>/resource.sock") was read as a port and sent to the fake HTTP server; the broker client parsed "HTTP/1.1 400" as a frame header (Invalid spawn broker resource frame length) and every plugin load failed. Socket paths now pass through, parsed the way Node does; TCP stays redirected. Node's uncaught-error printer inspects every own property, and a released PluginLoadFailureError carries its whole registry. The worker now prints a fatal error as its stack and cause chain, so the parent's tail shows it.
…e broker (#204528) pnpm catalog:compare-released failed for every released reader: every provider plugin and bundled memory-core failed to load with "AggregateError: Native resource creation cleanup failed", the worker exited 1, and the reported log tail was a plugin-registry dump. The worker redirects every outgoing socket to its fake upstream. Its connect-argument parser only knew TCP forms, so the release's net.connect("/tmp/oc-br-<hex>/resource.sock") was read as a port and sent to the fake HTTP server; the broker client parsed "HTTP/1.1 400" as a frame header (Invalid spawn broker resource frame length) and every plugin load failed. Socket paths now pass through, parsed the way Node does; TCP stays redirected. Node's uncaught-error printer inspects every own property, and a released PluginLoadFailureError carries its whole registry. The worker now prints a fatal error as its stack and cause chain, so the parent's tail shows it. (cherry picked from commit 6400a15) Companion audit: #204900 concerns Codex chat sign-in links and is not required by the released-catalog transport. Preserve baseline release reader and intercept TCP; admit only the known native resource socket shape. Release adaptation: Keep stable bundled reader discovery; route only native broker socket/pipe shapes directly. Adapt the released-reader fixture to stable installer and chunk discovery. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
pnpm catalog:compare-released --candidate <bundle.json>is the gate the Model Listing rules require before changing a shipped catalog row: it runs the latest stable, extended-stable and beta readers over the candidate and shows what changes. It failed for every released reader. Every provider plugin (and bundledmemory-core) failed to load withAggregateError: Native resource creation cleanup failed, the worker exited 1, and the reported 40-line log tail was a plugin-registry object dump that hid the error. The GLM-5.4 catalog work had to fall back to calling each release's plugin hooks by hand.User Impact
Maintainers can run the released-reader comparison again: the report completes for all three dist-tags, and when a reader does fail, the reported tail ends with the reader's error message and causes instead of the registry dump.
Why This Change Was Made
The worker sandbox redirects every outgoing socket to its fake upstream, so released code builds real vendor requests without leaving the machine. Its connect-argument parser only knew TCP forms, so
net.connect("/tmp/oc-br-<hex>/resource.sock")was treated as a port and sent to the fake HTTP server. Since released plugin loading dials the native resource broker over that local socket, the broker client readHTTP/1.1 400 Bad Requestas a frame header, failed withInvalid spawn broker resource frame length, and every plugin load failed. Socket paths now pass through (parsed the way Node does); TCP stays redirected, so no vendor host or local TCP service such as a running Gateway is reachable. The broker socket never lands inside the sandbox: itsTMPDIRpath is too long forsockaddr_un, so the release falls back to a private random/tmpdirectory. Accepted edge case, named in the comment: a released reader that dialed a fixed system socket would now reach it; none of the readers this tool drives does.The dump came from Node's uncaught-error printer, which inspects every own property, and a released
PluginLoadFailureErrorcarries the whole plugin registry. The worker now prints a fatal error as its stack plus its cause chain and exits 1, so the parent's existing tail shows the message.Evidence
Reproduction on the base, with the served catalog as the candidate (
pnpm catalog:compare-released --candidate served-v3.json --filter zai):released reader failed ... (exit 1)with a tail of plugin-record fields. Instrumenting the worker showed the inner errorSpawnBrokerError: Invalid spawn broker resource frame lengthraised from a TCP stream, and the diagnostics carriedERR_SPAWN_BROKER_UNAVAILABLE.With the fix, the same command completes for all three dist-tags (29 s including the new beta install, 14 s with cached installs):
Every zai row resolves and every offered thinking level's request completes with
stop. Logging socket paths during the 2026.11.7 and 2026.11.10-beta.2 runs showed one IPC connection per reader, to/tmp/oc-br-<hex>/resource.sock. Stable and extended-stable read only the v1 feed, so they reject a v3 candidate and baseline alike; that is the expected outcome for a v3 comparison, not a sandbox fault.test/scripts/catalog-compare-released.test.tsgains two rows in the existing fake-release table: a release that dials its own broker socket (on the base it failed withbroker socket reply: HTTP/1.1 400 Bad Request), and a release that throws a registry-carrying error with a cause (on the base the message was missing from the reported tail). Both fail on the base worker and pass with the fix. The file runs 19 tests in 2.5 s (pnpm test test/scripts/catalog-compare-released.test.ts --maxWorkers=1, 4.5 s wall).Also run: oxfmt check, oxlint,
pnpm check:script-erasability,pnpm tsgo:scripts, and the tooling test typecheck (test/tsconfig/tsconfig.test.root.tooling.json).