Skip to content

fix: let maintainers compare catalog changes against released readers again - #204528

Merged
steipete merged 1 commit into
mainfrom
claude/catalog-compare-broker-socket
Nov 24, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/catalog-compare-broker-socket

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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 bundled memory-core) failed to load with AggregateError: 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 read HTTP/1.1 400 Bad Request as a frame header, failed with Invalid 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: its TMPDIR path is too long for sockaddr_un, so the release falls back to a private random /tmp directory. 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 PluginLoadFailureError carries 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 error SpawnBrokerError: Invalid spawn broker resource frame length raised from a TCP stream, and the diagnostics carried ERR_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):

2026.11.7 (latest): no behavior change
2026.10.33 (extended-stable): no behavior change
2026.11.10-beta.3 (beta): no behavior change
[catalog-compare-released] rows 2026.11.7=6 2026.10.33=6 2026.11.10-beta.3=18

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.ts gains two rows in the existing fake-release table: a release that dials its own broker socket (on the base it failed with broker 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).

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

clawsweeper Bot commented Nov 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T09:13:40.097925Z 941ee38 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Nov 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

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

  • Before: The broker connection receives HTTP bytes, plugin loading fails, and the comparison exits 1.
  • After: The broker connection succeeds and the report completes with six rows and no behavior change.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with reported real-release CLI proof and two distinct regression cases; no introduced defect was found.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR records the actual catalog-comparison CLI completing against three installed releases after the worker repair, supported by broker-path diagnostics and base-failing regression cases.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Maintainers cannot complete released-reader catalog comparisons, and failure output hides the underlying error.
Reason: Restoring the documented comparison workflow has clear value, and the maintainer-authored PR explicitly accepts the IPC isolation tradeoff.

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
Reviewed head: 941ee3820e58652516f5054e6e0f63c051ddc301

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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
Loading

Technical review

Best 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

  • Released-worker socket interception changes intended behavior with a stated reason (409b16c: Intercept released-reader requests so comparisons use synthetic upstreams and cannot contact real vendor or loopback TCP services.)
  • Released-reader CLI fixture table keeps the original intent (58cd522: Exercise minified and stable reader entry points while rejecting releases without a runnable refresh.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Tests +41, Other +25. Total +66 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 44 3 +41
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 30 5 +25
Total 2 74 8 +66

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The failure blocks a maintainer catalog-comparison tool; the patch does not change deployed agent or channel behavior.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The failure blocks a maintainer catalog-comparison tool; the patch does not change deployed agent or channel behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

Reviewed November 24, 2026, 4:25 AM ET / 09:25 UTC.

@steipete
steipete merged commit 6400a15 into main Nov 24, 2026
112 of 113 checks passed
@steipete
steipete deleted the claude/catalog-compare-broker-socket branch November 24, 2026 19:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

tideclaw-bot pushed a commit that referenced this pull request Nov 25, 2026
…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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
…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.
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant