Skip to content

Preserve process facts when the remote Holder owner disappears - #342

Open
cristicretu wants to merge 1 commit into
parity/process-birth-identityfrom
fix/remote-inspection-owner-loss
Open

cristicretu wants to merge 1 commit into
parity/process-birth-identityfrom
fix/remote-inspection-owner-loss

Conversation

@cristicretu

Copy link
Copy Markdown
Owner

Remote inspect used to rewrite a missing Holder lock into Exited { code: None, signal: None }, so reconnect and scripts could accept an exit that was never observed. It now returns exit status 1 with {"error":"holder_unavailable"}, preserves the stored process state, and keeps recorded exit facts intact.

The Engine retains the typed error as NotConnected. Existing successful responses are unchanged; older Engines already reject nonzero Helper RPCs. No attachment, controller change, or process signal is added. kill semantics are a separate follow-up.

Validation

  • Real Helper subprocess with a disposable live child: typed owner failure, unchanged state bytes, child remains alive, authenticated facts only, recorded exit126 preserved.
  • Real Holder crash still cleans up the Agent; inspection reports owner failure without inventing exit facts.
  • State/lock/incarnation fixtures and Engine old/unknown/truncated error decoding.
  • Regression fails with the old success/fabricated-exit behavior.
  • Full workspace: 1,686 passed / 36 ignored, formatting, strict workspace Clippy and release build passed.

CLI/test evidence

Rendered synthetic fixtures and test results; no user session data or GUI claim.

Helper owner-loss CLI/test evidence

Stacked on #340 for the shared process identity work.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying diri with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3cfaf08
Status: ✅  Deploy successful!
Preview URL: https://59f5a403.diri-53j.pages.dev
Branch Preview URL: https://fix-remote-inspection-owner.diri-53j.pages.dev

View logs

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