Skip to content

fix(mojo): isolate PM2 metadata from child environments - #1347

Open
swtxbling wants to merge 7 commits into
deepcoldy:masterfrom
swtxbling:fix/mojo-child-env-isolation
Open

fix(mojo): isolate PM2 metadata from child environments#1347
swtxbling wants to merge 7 commits into
deepcoldy:masterfrom
swtxbling:fix/mojo-child-env-isolation

Conversation

@swtxbling

Copy link
Copy Markdown
Contributor

Summary

  • scrub PM2-managed process metadata from the ambient environment before spawning Mojo children
  • preserve PATH, HOME, proxies, certificates, credentials, and Botmux session routing; explicit bot env and mojo.env keep their existing precedence
  • use the same effective environment for worker wrapper resolution and the real MojoBackend spawn path
  • cover host, cloud, sandbox, dynamic instance_var safety, explicit overrides, and non-Mojo compatibility
  • update the bug ledger with real-device verification and final review evidence

Validation

  • Mojo 1.0.12 direct host Bash: 2/2 completed, one tool call each, return code 0
  • real MojoBackend host smoke: completed with Bash result and final answer
  • full Mojo Vitest suite: 33 files passed, 1 skipped; 667 tests passed, 32 skipped
  • focused independent review: 140 passed, 1 skipped across the directly relevant suites
  • bun 1.4.2 build: passed, including TypeScript checks, dashboard bundle, dist audit, and embedded-asset audit
  • git diff --check: passed
  • independent final review: PASS, blocker 0, major 0, minor 0 after ledger closeout

Compatibility and evidence boundary

  • non-Mojo environment merging is unchanged
  • ambient proxy variables remain available and can still be overridden or cleared explicitly
  • PM2 Common.js drift coverage runs when PM2 is installed; static fixtures always cover the scrub behavior now that PM2 is no longer a runtime dependency
  • on macOS, the isolated smoke workspace has no remaining process using it, but one synthetic-session containment handle remains fail-closed because Darwin cannot provide Linux /proc-level process-tree proof

Tracking

  • BUG-20260828-001

@swtxbling
swtxbling requested a review from deepcoldy as a code owner September 9, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant