feat: Retain native command custody after caller loss #305

Open
erikinkinen wants to merge 5 commits from feature/native-caller-loss-command-custody into feature/externally-clocked-owned-commands
Owner

Keep a surviving execution owner for a selected host command. The caller holds the sole pipe writer; the known helper receives only its read endpoint. Caller exit closes that channel and triggers native cancellation, including when the caller is killed. The command receives the exact selected environment and no control descriptor.

Reuse the existing execution engine and adopted-descendant custody. Positive completion requires the original child, escaped descendants and native policy lease to retire. Uncertain cleanup retains its owner. Existing finite defaults and cleanup intervals stay unchanged; this entry uses the caller’s clock policy.

This supplies command lifetime custody, not compiler-origin attestation. The Boot-tool producer still needs its source, tool, input and output checks.

Depends on #299.

Keep a surviving execution owner for a selected host command. The caller holds the sole pipe writer; the known helper receives only its read endpoint. Caller exit closes that channel and triggers native cancellation, including when the caller is killed. The command receives the exact selected environment and no control descriptor. Reuse the existing execution engine and adopted-descendant custody. Positive completion requires the original child, escaped descendants and native policy lease to retire. Uncertain cleanup retains its owner. Existing finite defaults and cleanup intervals stay unchanged; this entry uses the caller’s clock policy. This supplies command lifetime custody, not compiler-origin attestation. The Boot-tool producer still needs its source, tool, input and output checks. Depends on [#299](https://git.erikinkinen.fi/erix/integration/pulls/299).
erikinkinen added this to the Alpha 1 milestone 2026-11-05 17:14:26 +01:00
Keep the cancellation writer in the original caller and pass its actual read endpoint only to the surviving command owner. Reuse native child custody for command retirement and let the caller reap its helper after closing the channel.

Keep this route group-scoped; adopted descendants and compiler origin remain separate contracts.
Bind the existing command scope and native lifetime to exclusive subreaper custody. Reuse the original adopted-child descriptors and forest retirement, then let the command engine restore its callbacks, close captures and release the same lifetime.

Retire acquired policy on pre-birth refusal and retain uncertain restoration without another signal or policy attempt.
fix: Commit forest retirement before unmasking cancellation
Some checks failed
CI / rust (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Successful in 2m15s
CI / host_one (push) Successful in 10m33s
CI / host_zero (push) Successful in 11m24s
CI / integration (push) Failing after 1m32s
1d676bf7e0
Pipe readiness can deliver cancellation as the native retirement barrier exits. Commit the verified forest before unmasking, and refuse lifetime release when only its leader has retired.

Retain the actual defining backend objects so import-alias retirement cannot replace an existing native owner.
ci: Use shared development dependency profiles
Some checks failed
CI / rust (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / rust (push) Has been cancelled
CI / host_zero (push) Has been cancelled
CI / host_one (push) Has been cancelled
CI / integration (push) Has been cancelled
CI / markdown (push) Has been cancelled
2d99af74ed
Keep authored manifests on main and select coordinated providers through Integration. Resolve branches once per run, retain the frozen snapshot and helper identity as artifacts, and use shared source checks instead of copied tests and guides.
ci: Use shared development dependency profiles
Some checks failed
CI / rust (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / markdown (push) Successful in 10s
CI / rust (push) Successful in 6m11s
CI / host_one (push) Failing after 4m34s
CI / host_zero (push) Failing after 20m41s
CI / integration (push) Has been skipped
662c320236
Keep authored manifests on main and select coordinated providers through Integration. Resolve branches once per run, retain the frozen snapshot and helper identity as artifacts, and use shared source checks instead of copied tests and guides.
Some checks failed
CI / rust (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / markdown (push) Successful in 10s
CI / rust (push) Successful in 6m11s
CI / host_one (push) Failing after 4m34s
CI / host_zero (push) Failing after 20m41s
CI / integration (push) Has been skipped
This pull request has changes conflicting with the target branch.
  • .github/workflows/ci.yml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feature/native-caller-loss-command-custody:feature/native-caller-loss-command-custody'
git switch 'feature/native-caller-loss-command-custody'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'feature/externally-clocked-owned-commands'
git merge --no-ff 'feature/native-caller-loss-command-custody'
git switch 'feature/native-caller-loss-command-custody'
git rebase 'feature/externally-clocked-owned-commands'
git switch 'feature/externally-clocked-owned-commands'
git merge --ff-only 'feature/native-caller-loss-command-custody'
git switch 'feature/native-caller-loss-command-custody'
git rebase 'feature/externally-clocked-owned-commands'
git switch 'feature/externally-clocked-owned-commands'
git merge --no-ff 'feature/native-caller-loss-command-custody'
git switch 'feature/externally-clocked-owned-commands'
git merge --squash 'feature/native-caller-loss-command-custody'
git switch 'feature/externally-clocked-owned-commands'
git merge --ff-only 'feature/native-caller-loss-command-custody'
git switch 'feature/externally-clocked-owned-commands'
git merge 'feature/native-caller-loss-command-custody'
git push origin 'feature/externally-clocked-owned-commands'
Sign in to join this conversation.
No description provided.