[PR #5280] [MERGED] fix(process): retain child scope and bound native exit waits #6857

Closed
opened 2026-11-01 21:43:34 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5280
Author: @gensokyo-dev
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/native-exit-proof-budget-20261019


📝 Commits (4)

  • 74e21f1 fix(process): preserve exit scope and share native wait budgets
  • 47dbc9e fix(process): retain original scope facts across token retries
  • e55d5fa fix(process): retain prior parent proof through retirement
  • 6876278 chore: sync latest main for cleanup verification

📊 Changes

5 files changed (+293 additions, -18 deletions)

View changed files

📝 src/process/ProcessLifecycle.ts (+5 -0)
➕ src/process/ProcessOwnership.exitScope.test.ts (+190 -0)
📝 src/process/ProcessOwnership.ts (+43 -4)
📝 src/process/ProcessOwnershipEvidence.ts (+28 -10)
📝 src/process/ProcessOwnershipObservation.ts (+27 -4)

📄 Description

Summary

Follow up on #5249's P1 and P2, which remained unresolved when that PR merged.

  • Preserve the original bracketed identity/token facts alongside later exit observations. Derive historical child scope from the intact original batch, including earlier token-verified parent proof before retirement. Fence that history by the child's native generation; historical scope never authorizes signaling.
  • Keep one reconciliation per supplied batch, so native settlement and token retries do not inflate snapshotCount.
  • Share the existing, lazily started one-second native-exit wait budget throughout each cleanup attempt, including discovery, group validation/revalidation and final verification. Unknown or reused identity stays fail-closed.

Five changed files. Synced main 909b9f7b6 in head 6876278f6; the five PR files are byte-identical to qualified e55d5faf1. No provider authority, retry-count, grace-interval or CI-exclusion changes.

Executed validation

  • Fail-before/pass-after controls cover a live child surviving its parent, token retry after reparenting, earlier parent proof with an unreadable current token, reused-child PID rejection, one snapshot per batch, and cumulative exit waiting. The old wait implementation delayed the healthy group's first signal to 4,400 ms of controlled observation time; the correction stays below 2,000 ms. Native observers are simulated; this is not a claimed real leaked-child reproduction or production speedup.
  • Qualified e55d5faf1: 387 passed, one Darwin-only skip across 24 files, including ownership/native parsers, capture, Linux absence, Jadx/Java test producers and trace-policy boundaries. All five scope/budget controls passed three additional consecutive runs.
  • Same revision: full static/architecture and docs checks pass; discovery finds 1,672 files exactly once. Real GDB 13.1/pwndbg qualification passes 44 CLI/MCP cases, with 207 catalogued tools, four inspection traces, both PID controls and no remaining descendants.
  • Latest-main head 6876278f6: 30 passed, one platform skip / three scope/Rizin files; full static/architecture, docs and discovery all pass. Real GDB qualification again passes 44 public cases, 207 catalogued tools and four traces. Current-head Codex review completed without findings; Greptile reviewed the same SHA at 5/5 with no blocking defects. See the current-head CI checks for full remote matrix results; merge remains conditioned on successful required checks.

Heavy work is serialized on two CPUs. The 387-case task took 108.7 s elapsed / 115.8 s CPU / 3,410 MiB peak sampled family RSS; synced-head static gate 113.7 s / 168.9 s / 4,601 MiB; synced-head real GDB 114.0 s / 127.7 s / 2,842 MiB. RSS sampled every 100 ms may double-count shared pages and miss brief/reparented children. Cache/host state is uncontrolled; agent-token costs are unmeasured. No attributed speedup is claimed. No local macOS, Windows, real Jadx-engine or Ghidra-engine qualification is claimed.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly delegated these declarations and authorized opening ready, following CI/review and merging in this session. Codex reviewed the final diff and stated evidence; independent human review was not observed.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5280 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/native-exit-proof-budget-20261019` --- ### 📝 Commits (4) - [`74e21f1`](https://github.com/morluto/rea/commit/74e21f1a85c3a9799f0fdefc9688b2403a4b378f) fix(process): preserve exit scope and share native wait budgets - [`47dbc9e`](https://github.com/morluto/rea/commit/47dbc9e0ea99e7a5a9575a699daebec6f6e4cff0) fix(process): retain original scope facts across token retries - [`e55d5fa`](https://github.com/morluto/rea/commit/e55d5faf1df5a3487e01572c279aae3e5769f9bd) fix(process): retain prior parent proof through retirement - [`6876278`](https://github.com/morluto/rea/commit/6876278f66365c17e97af102c3247d8c67d0117c) chore: sync latest main for cleanup verification ### 📊 Changes **5 files changed** (+293 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/process/ProcessLifecycle.ts` (+5 -0) ➕ `src/process/ProcessOwnership.exitScope.test.ts` (+190 -0) 📝 `src/process/ProcessOwnership.ts` (+43 -4) 📝 `src/process/ProcessOwnershipEvidence.ts` (+28 -10) 📝 `src/process/ProcessOwnershipObservation.ts` (+27 -4) </details> ### 📄 Description ## Summary Follow up on [#5249's P1](https://github.com/morluto/rea/pull/5249#discussion_r4317053056) and [P2](https://github.com/morluto/rea/pull/5249#discussion_r4317053071), which remained unresolved when that PR merged. - Preserve the original bracketed identity/token facts alongside later exit observations. Derive historical child scope from the intact original batch, including earlier token-verified parent proof before retirement. Fence that history by the child's native generation; historical scope never authorizes signaling. - Keep one reconciliation per supplied batch, so native settlement and token retries do not inflate `snapshotCount`. - Share the existing, lazily started one-second native-exit wait budget throughout each cleanup attempt, including discovery, group validation/revalidation and final verification. Unknown or reused identity stays fail-closed. Five changed files. Synced main `909b9f7b6` in head `6876278f6`; the five PR files are byte-identical to qualified `e55d5faf1`. No provider authority, retry-count, grace-interval or CI-exclusion changes. ## Executed validation - Fail-before/pass-after controls cover a live child surviving its parent, token retry after reparenting, earlier parent proof with an unreadable current token, reused-child PID rejection, one snapshot per batch, and cumulative exit waiting. The old wait implementation delayed the healthy group's first signal to 4,400 ms of controlled observation time; the correction stays below 2,000 ms. Native observers are simulated; this is not a claimed real leaked-child reproduction or production speedup. - Qualified `e55d5faf1`: **387 passed, one Darwin-only skip across 24 files**, including ownership/native parsers, capture, Linux absence, Jadx/Java test producers and trace-policy boundaries. All five scope/budget controls passed three additional consecutive runs. - Same revision: full static/architecture and docs checks pass; discovery finds **1,672 files exactly once**. Real GDB 13.1/pwndbg qualification passes **44 CLI/MCP cases**, with **207 catalogued tools**, four inspection traces, both PID controls and no remaining descendants. - Latest-main head `6876278f6`: **30 passed, one platform skip / three scope/Rizin files**; full static/architecture, docs and discovery all pass. Real GDB qualification again passes **44 public cases, 207 catalogued tools and four traces**. Current-head Codex review completed without findings; Greptile reviewed the same SHA at 5/5 with no blocking defects. See the current-head CI checks for full remote matrix results; merge remains conditioned on successful required checks. Heavy work is serialized on two CPUs. The 387-case task took **108.7 s elapsed / 115.8 s CPU / 3,410 MiB peak sampled family RSS**; synced-head static gate **113.7 s / 168.9 s / 4,601 MiB**; synced-head real GDB **114.0 s / 127.7 s / 2,842 MiB**. RSS sampled every 100 ms may double-count shared pages and miss brief/reparented children. Cache/host state is uncontrolled; agent-token costs are unmeasured. No attributed speedup is claimed. No local macOS, Windows, real Jadx-engine or Ghidra-engine qualification is claimed. ## Author readiness Human owner: @gensokyo-dev The owner explicitly delegated these declarations and authorized opening ready, following CI/review and merging in this session. Codex reviewed the final diff and stated evidence; independent human review was not observed. - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:43:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6857
No description provided.