Skip to content

fix(process): avoid cold ownership helper deadline exhaustion - #1139

Merged
morluto merged 4 commits into
morluto:mainfrom
MegaPhoenix92:codex/fix-macos-ownership-helper-cold-start
Oct 8, 2026
Merged

morluto merged 4 commits into
morluto:mainfrom
MegaPhoenix92:codex/fix-macos-ownership-helper-cold-start

Conversation

@MegaPhoenix92

Copy link
Copy Markdown
Contributor

Summary

  • let Swift use its compiler-managed module cache instead of rebuilding macOS system modules in a fresh per-process cache for every ownership helper
  • prepare process ownership inspection before starting the source-map codec's advertised 20-second execution deadline
  • align the acceptance harness with legitimate first-time ownership-helper preparation while preserving cancellation and cleanup behavior

Problem and behavior change

On a cold macOS CLI process, compiling the native process-ownership helper took about 18.6 seconds. That prerequisite ran inside the source-map codec's 20-second deadline and the acceptance harness's 15-second subprocess deadline, so valid source-map work could be cancelled before the codec launched.

This change preserves the helper's PID/start-identity and run-token ownership checks, but avoids intentionally cold system-module compilation on every REA process. Ownership preparation remains abort-aware and completes before the codec-specific deadline begins. Preparation failures retain the source-map operation, map path, failed phase, and underlying error.

Fixes #1137.

Verification

  • npm run test:focused -- tests/boundary/process/darwinProcessRunTokenReader.test.ts tests/boundary/javascript/sourceMapDecoder.test.ts
  • npm run test:focused -- tests/acceptance/webSourceLocationCli.test.ts
  • npm run check:fast
  • npm run verify:package
  • installed package advertised 138 MCP tools and reported verified process lineage
  • real cancellation removed the owned codec process and private request root

Coverage limits

The exact CLI/stdio MCP parity acceptance was run on a warm compiler-cache path and passed. A separate real cold ownership preparation took about 18.6 seconds and was followed by successful real codec execution. Deterministic deadline-separation, compiler-cache, cancellation, and cleanup regressions cover the cold behavior independently.

Optional Hopper, Ghidra, and IDA verification was not performed; those providers are not involved in this process/source-map boundary change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T23:21:02.954696Z d652f4c New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7fcf2443d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@morluto
morluto merged commit 65a809a into morluto:main Oct 8, 2026
6 checks passed
@morluto

morluto commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR and for tracking down the cold-start ownership-helper issue! The deadline separation and compiler-cache improvements are much appreciated.

darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…o#1139)

* fix(process): avoid cold ownership helper deadline exhaustion

Fixes morluto#1137.

* test(process): fix cold ownership test deadlines and cleanup

* fix(process): isolate Swift cache overrides and retain diagnostics

* test(electron): assert blank path rejection without trim assumptions

---------

Co-authored-by: Chris <Chis@RICH-13918M.local>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the area: runtime Process capture and runtime observation label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(process): cold macOS ownership-helper compilation exhausts source-map CLI deadlines

2 participants