Repository navigation
fix(process): settle native exit and repair ownership verification - #5249
Conversation
Use the pre-launch baseline only to select candidates for current native identity/token validation. Preserve confirmed absence and verified foreign generations instead of carrying a premature baseline identity failure. Exercise the real Linux enumeration/exit race and retain countercontrols for unknown identities and live token-owned processes. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The changes reach process cleanup and recorded-crash verification workflows. Fix the lost-child ownership case before merging. FindingsFix with agent prompt### Issue 1
src/process/ProcessOwnershipObservation.ts:630-635
When a detached, token-owned helper exits during polling, this replaces its readable post-token identity with `absent`. If its child was first observed in another group with a cleared or different token, `ProcessOwnershipEvidenceOwner` loses the verified parent that tied the child to the run. The child is not retained, so verification can return `cleaned: true` while it remains alive.
Keep the original identity/token/identity facts for ownership tracking and record the later exit observation separately.
### Issue 2
src/process/ProcessOwnershipObservation.ts:549
Each call starts a fresh one-second wait, but `createOwnedCleanupPlan` checks each process group separately. With several groups stuck in `PF_EXITING`, cleanup waits about one second per group, even after the initial sweep has already waited for those same processes. Signaling starts only after the whole plan finishes, so other owned groups keep running during these repeated waits.
Share the deadline across the cleanup attempt or settle all selected PIDs together.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR separates native exit progress from confirmed exit and centralizes recorded-crash trace checks.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Read native identity] --> B[Read run token]
B --> C[Read native identity again]
C --> D{Exit in progress?}
D -- No --> F[Build ownership facts]
D -- Yes --> E[Poll only selected PIDs]
E --> F
F --> G[Reconcile retained ownership]
G --> H[Validate each process group]
H --> I[Signal verified groups]
I --> J[Verify remaining ownership]
Reviews (15) · Last reviewed commit: "fix(ci): retain trace coverage limits af..." · Reviewed by Greptile |
|
Added follow-up b32ce58 for the required recorded-crash oracle failure. It permits only exact Node/thread stat inventory for the live collision and adds a second unassignable historical-PID recording that rejects every lookup through CLI and MCP. Eight controls, an actual strace/Node worker read, static checks, docs and discovery pass; the body records the local home-permission gap and unavailable full debugger qualification. New-head CI 39260522926 has started. The previous-head CI 39258168652 was already completed, so there was no still-running old CI to cancel. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b32ce58c3a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Final fixture qualification is in b82ae19: both traced adapters must decode the selected historical PID before the syscall result can qualify. New-head CI 39262144887 is running; superseded run 39260522926 is confirmed cancelled. The preceding head passed both real recorded-crash container lanes. No further changes are planned absent an actionable review/CI defect. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b82ae1962f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Classify producer-decoded FD/path pairs once instead of limiting failed relative lookup detection to openat on /proc. This preserves attempted readlinkat, statx and newfstatat accesses with no returned descriptor. Three regression cases fail against the previous policy and all 33 controls pass with the shared pathname interpretation. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 804caa2cb2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Report the historical-PID access surfaces actually checked and explicitly mark legacy cwd-relative pathname calls unverified. The existing tracer does not provide their cwd identity, and a blanket rejection also rejects legitimate GDB build-ID metadata queries. Retain every committed access guard and document the preexisting limit without claiming absence from missing path evidence. The complete real 44-case CLI/MCP recorded-crash qualification passes with the coverage declaration. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
# Conflicts: # docs/recorded-crashes.md
strace renders non-ASCII pathname bytes as C octal escapes, not JSON strings. Keep those components opaque when resolving literal ASCII path separators and proc PID selectors, matching the existing absolute-path interpretation. Two controls fail before the correction and all 35 pass afterward. An actual strace observation independently reproduces the rejection of an unrelated Chinese filename and verifies the corrected classification. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8dd8ca0804
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c49e7a24c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Confirmed both resource/scheduler findings with controls on the current integrated head. A real owned Python sentinel reproduces prlimit64 query/same-value update and sched_getaffinity/same-affinity set: the prior oracle accepts all four, the local policy rejects them, and sentinel limits/affinity remain unchanged. The follow-up covers the complete sched PID-first family plus prlimit64, with distinct PID and self-selector controls. Publishing after focused/static and real CLI/MCP qualification; leaving these two threads open until that commit is reviewable. |
|
Current-head shard 5 exposes a deterministic main baseline conflict: main 49b4e... introduced look-around into CANONICAL_BASE64_PATTERN to avoid large-input V8 stack exhaustion, while advertisedPatternsVMode requires RE2/Rust-compatible advertised schemas. Five outputSchema patterns fail that gate. I am preserving both requirements (canonical/large inputs and portable schemas), without weakening the gate. Current Windows failure is separately a 30s CLI help/removed-command timeout; the log is retained and no product defect or fix is claimed for that timeout. |
Retain main’s provider-independent registration fixtures and stronger native lifecycle controls. The earlier shared-host EACCES failure remains recorded; no permission error is suppressed. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
|
@codex review Please review head |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Adopt main’s selected-path versus artifact-identity test correction and Rizin plain-output update. Product ownership and recorded-crash qualification code are unchanged from the locally and remotely verified 2a42096 implementation. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
|
@codex review Please review final integrated head |
…into fix/ci-process-observation-baseline
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Restore explicit unverified symlink aliases and same-Node stat/status purpose in the shared coverage contract and guide. The native-exit and trace-attribution integration does not establish those properties. Preserve both limitations rather than silently broadening the reported qualification. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
|
@codex review Please review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Summary
Cleanup could reject an already exiting Linux child because its environment became unreadable or
pschanged its command display before state Z. Separately, a provisional baseline identity failure could override fresh ownership facts, and the recorded-crash oracle did not consistently distinguish native ownership inventory from historical-PID access.Executed validation
Runtime source at
3de261cc5is identical to the validated2026d0099(tree equality checked), including mainb44cb5bd3and existing audit commits. Final head33450d02eaonly restores two explicit unverified coverage entries and their documentation; execution/guard behavior is unchanged:npm run check:fast,npm run docs:checkand the full-repository formatting check passed.Heavy checks run serially on two CPUs, with a 3 GiB V8 heap and an 8 GiB sampled process-family guard. Build: 51.50 s wall / 80.73 s CPU / 3,060 MiB peak family RSS. Jadx controls: 49.79 s / 40.96 s / 852 MiB. Shared controls: 23.83 s / 27.57 s / 1,058 MiB. Real GDB task: 117.70 s / 129.39 s / 2,802 MiB. Final static gate: 123.42 s / 239.36 s / 4,452 MiB; docs: 25.91 s / 31.10 s / 781 MiB. Family RSS is sampled every 20 ms, can double-count shared pages and miss brief/reparented children; OS caches are uncontrolled. No speedup, model-token saving or unmeasured platform/provider qualification is claimed.
Follow-up on the final coverage declaration: 118 lifecycle/parser/policy/topology tests across four files and docs checks pass. Two CPUs; 2.85 s wall / 2.69 s CPU / 390 MiB sampled family RSS for the controls; docs 9.08 s / 10.66 s / 704 MiB.
Limits
The trace report explicitly leaves legacy cwd-relative paths, symlink aliases, unlisted PID interfaces and same-Node-thread stat/status purpose unverified; it is not universal kernel containment. No local macOS, Windows or live Ghidra qualification is claimed. Required CI lanes and token retry counts remain unchanged; permission errors and unresolved identities still fail cleanup.
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.