Skip to content

Integration batch O (#1439, #1451) - #1461

Merged
Juliusolsson05 merged 14 commits into
mainfrom
integration/batch-2026-09-27-o
Sep 27, 2026
Merged

Juliusolsson05 merged 14 commits into
mainfrom
integration/batch-2026-09-27-o

Conversation

@Juliusolsson05

@Juliusolsson05 Juliusolsson05 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Integration batch O (owner-approved merge mode, owner-requested history form). The branch was built from origin/main 1681e68 (batch N). Each member PR was retargeted to this branch and merged through GitHub, so history shows "Merge pull request #N from " for each member.

Both members had GATE PASS (--member). Merged after green exact-head CI and a recorded non-member gate PASS (see comments).

🤖 Generated with Claude Code

Juliusolsson05 and others added 12 commits September 26, 2026 18:53
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
node-pty 1.1.0's pty_posix_spawn leaks one /dev/ptmx per spawn (low_fds[0]
is never closed), so a long-running app exhausts kern.tty.ptmx_max and every
spawn fails. Port upstream microsoft/node-pty#882 as a sha256-guarded source
patch run from postinstall before electron-rebuild; pin node-pty to 1.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…root management (#1339)

usage_read returns the same sanitized snapshot as the Usage screen and
ac_usage_read (one shared readUsageSnapshotForTools, no force, the 30 s
cache). Configurable on every provider, off by default, not gated. The
tool-boundary test reads a recorded ac_usage_read answer that the manager
supplies (testing/fixtures/usage, pending).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#1339)

The manager's raw answer from the owner's machine (read in full: plan names,
percentages, labels; no credentials). Pins that the recorded Grok error row
reaches the agent as an error, not zero usage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	src/main/index.ts
#	src/mcp/runtime/BuiltInMcpHttpHost.ts
… symlink (#1439 review a, b)

a: the unit test asserts the generated 'if (low_fds[i] != -1)' and final
'if (spawn_err != 0)' text, so an inversion fails CI even with the recorded
hash updated (Linux CI never runs the macOS fd test).
b: the CLI entry compares realpaths; through a symlinked path it used to
exit 0 without patching. Pinned by running the real script via a symlink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… real classifier (#1439 review c)

The comment and plan claimed nothing in the app matched on 'posix_spawnp
failed'. src/main/ipc/session.ts classifySpawnFailure keys the posix-spawnp
signature on it. Both now say so, and session.test.ts pins that the patched
node-pty messages ('posix_spawnp failed: <call>: <strerror>') keep that
signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 review a)

An agent holding only Orchestration could mint the off-by-default usage
domain for a child and read the quota back; usage now joins the parent-held-
only set. sanitizeUsageError passed any message naming auth.json verbatim,
including an fs error's absolute credential path; only Agent Code's own
fixed auth.json messages keep their words, the rest is one curated sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew a)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…q132, security)

sanitizeUsageError passed messages by prefix/substring (Keychain, '<Provider>
auth.json ...', 'Grok login expired'), so a prefix-shaped error with a path
or token tail passed whole to the usage MCP domain. It now keeps only the
exact sentences Agent Code throws; everything else is fixed text. Pinned at
the sanitizer, the real Usage reader's error row and the real usage_read tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tructions with the domain (#1451 review c)

- usageSnapshotForTools.test.ts drives the real readUsageSnapshotForTools over
  the real Usage service (only the provider reads replaced, with the recorded
  rows): the Grok error stays an error row, and two default reads hit the
  providers once. Dropping error rows (6 red) or a force default (1 red) fail.
- main passes the reader itself, not a lambda, so no unpinned wrapper can add
  force.
- usageTools.test.ts asserts the instructions ship WITH the domain (dropping
  them: 1 red) and types the fixture rows as recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Juliusolsson05 Juliusolsson05 added the type:chore Maintenance, deps, tests, docs label Sep 27, 2026
@Juliusolsson05

Copy link
Copy Markdown
Owner Author

Batch disposition (B6): #1439 7e346a6 (PTY leak fix, W3 a/b/c) and #1451 b8b7506 (Usage domain; q132 fixed with an exact-message allowlist). Base is 1681e68. It merges when exact-head CI is green, the body is in past tense and a non-member gate PASS is recorded.

@Juliusolsson05
Juliusolsson05 force-pushed the integration/batch-2026-09-27-o branch from 35949e7 to 1681e68 Compare September 27, 2026 19:16
fix(pty): stop leaking one /dev/ptmx per macOS spawn (node-pty 1.1.0 low_fds[0])
feat(mcp): an optional Usage domain so agents can read quota without root management
@Juliusolsson05

Copy link
Copy Markdown
Owner Author

History form changed at the owner's request: the branch was reset to main and #1439/#1451 were retargeted and merged into it through GitHub (54c63d5, e03147a). CI re-runs on the new exact head e03147a; the non-member gate is re-run before merge.

@Juliusolsson05

Copy link
Copy Markdown
Owner Author

Pre-merge gate record: merge-gate.sh agent-code 1461 --dry → GATE PASS #1461 (e03147a, 0 behind main, checks green, reviews OK). The body is in past tense; the members were merged via GitHub (the owner's history form). Merging.

@Juliusolsson05
Juliusolsson05 marked this pull request as ready for review September 27, 2026 20:33
@Juliusolsson05
Juliusolsson05 merged commit 53568fb into main Sep 27, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the integration/batch-2026-09-27-o branch September 27, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance, deps, tests, docs

Projects

None yet

1 participant