Skip to content

fix(server): launch contained ACP providers from packaged runtimes - #12791

Merged
juliusmarminge merged 1 commit into
pingdotgg:t3code/codex-turn-mappingfrom
pekth:fix/acp-cgroup-packaged-launcher
Sep 21, 2026
Merged

juliusmarminge merged 1 commit into
pingdotgg:t3code/codex-turn-mappingfrom
pekth:fix/acp-cgroup-packaged-launcher

Conversation

@pekth

@pekth pekth commented Sep 20, 2026 •

Copy link
Copy Markdown

Packaged Linux T3 can launch its own CLI instead of the ACP provider when cgroup containment is enabled. The wrapper calls process.execPath -e, but in the packaged runtime that executable is T3 rather than Node. Preview 0.0.43-preview.20260919.1974 emitted CLI help on ACP stdout, and Grok rejected it as invalid JSON.

Use /bin/sh builtins to enter and verify the cgroup, clear wrapper environment markers, and exec the provider with its original arguments. This retains failure exits 125 and 126 without requiring a Node evaluator.

This is a T3 Code packaged-runtime bug, not a Fleet configuration bug. The actual preview binary rejects -e, exits 1, writes DESCRIPTION CLI help to stdout, and reports Unrecognized flag: -e on stderr. A separate source-derived comparison used the same fake lease and arguments without importing or executing Fleet. The original T3 wrapper did not start the target; the patched wrapper exited 0, preserved the exact arguments, cleared the wrapper markers, and wrote its PID only to the fake cgroup file. Fleet has a separate local push-gate defect, which is outside this PR.

Validation: a regression with process.execPath stubbed to a non-Node executable failed against the original code. All 23 focused process-tree tests passed, including argument/marker preservation, membership mismatch, and a missing executable. The real cgroup containment test also passed separately. Server typecheck, scoped lint, formatting, and diff checks passed. The running preview was not replaced, so successful installed-candidate Grok startup remains unverified.

Targets the V2 branch tracked by #2829.

Models: GPT-5.6 Luna for implementation, GPT-5.6 Sol for independent review, and GPT-6 Astra for controller verification. Harness: Codex through T3 Code preview.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 20, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 023edef

Macroscope's review found this PR approvable — This is a narrowly scoped Linux cgroup-wrapper bug fix that enables packaged ACP runtimes while preserving existing argument, environment, membership-check, and failure behavior. The production change is isolated and accompanied by focused regression coverage, with no product-default or static-analysis configuration changes.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from a1f8051 to 0337dd6 Compare September 21, 2026 05:40
@pekth
pekth force-pushed the fix/acp-cgroup-packaged-launcher branch from 023edef to b9ee95e Compare September 21, 2026 13:28
@juliusmarminge
juliusmarminge force-pushed the fix/acp-cgroup-packaged-launcher branch from b9ee95e to 5200cf8 Compare September 21, 2026 20:50
@juliusmarminge

Copy link
Copy Markdown
Member

Rebased onto the current v2 head (no code changes). Locally one assertion in AcpSessionRuntime.processTree.test.ts (resolveLinuxCgroupTargetCommand("node", …, { PATH: undefined })) fails on my box because no node lives in /usr/bin or /bin; it fails identically on v2 without this PR, so it is environmental and not yours. Will merge once CI is green.

@juliusmarminge
juliusmarminge merged commit d1f3f17 into pingdotgg:t3code/codex-turn-mapping Sep 21, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants