Keep original source descriptor custody through interrupted capture #580

Open
erikinkinen wants to merge 3 commits from fix/source-descriptor-acquisition-custody into feature/clean-native-image-closure
Owner

An interrupted open could leave no returned number while cleanup treated the receiver as empty. Keep capture outcomes separate from close outcomes, preserve unresolved original receivers and signal restoration, and refuse replacement openers or copied close records before effects.

Typed filesystem inputs now share the original capturer with search-only directory rights. Their descriptor views do not open or close another handle, and cleanup keeps raw failures without invoking exception-defined hooks.

Required by #574 and the filesystem input path used with #579.

  • Preserve original capture, close and signal retirement state
  • Share actual filesystem input receivers without wider directory rights
  • Exercise real FD/signal, unreturned-view, substitution and cleanup controls
An interrupted open could leave no returned number while cleanup treated the receiver as empty. Keep capture outcomes separate from close outcomes, preserve unresolved original receivers and signal restoration, and refuse replacement openers or copied close records before effects. Typed filesystem inputs now share the original capturer with search-only directory rights. Their descriptor views do not open or close another handle, and cleanup keeps raw failures without invoking exception-defined hooks. Required by #574 and the filesystem input path used with #579. - [x] Preserve original capture, close and signal retirement state - [x] Share actual filesystem input receivers without wider directory rights - [x] Exercise real FD/signal, unreturned-view, substitution and cleanup controls
fix: Retain original source descriptor acquisition and retirement custody
Some checks failed
CI / rust (pull_request) Has been skipped
CI / native_sources (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / host_two (pull_request) Has been skipped
CI / host_three (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
Coreutils provider graph / coreutils (pull_request) Has been skipped
Markdown / markdown (pull_request) Has been skipped
CI / host_three (push) Has been cancelled
CI / rust (push) Has been cancelled
CI / native_sources (push) Has been cancelled
CI / host_zero (push) Has been cancelled
CI / host_one (push) Has been cancelled
CI / host_two (push) Has been cancelled
CI / integration (push) Has been cancelled
Coreutils provider graph / coreutils (push) Has been cancelled
Markdown / markdown (push) Has been cancelled
65c322888e
A missing open result must not be treated as an empty receiver. Record actual capture and confirmed native negative outcomes separately from once-only close, preserve uncertain results and signal restoration, and refuse foreign record or opener substitution before effects.

Share that same capturer with typed filesystem inputs while retaining search-only directory rights. Non-owning descriptor views no longer acquire or close a second native handle; cleanup annotations preserve raw failures without exception-defined callbacks.
erikinkinen added this to the Alpha 1 milestone 2026-11-08 06:03:38 +01:00
perf: Use original capture registrations for descriptor retirement
Some checks failed
CI / rust (pull_request) Has been skipped
CI / native_sources (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / host_two (pull_request) Has been skipped
CI / host_three (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
Coreutils provider graph / coreutils (pull_request) Has been skipped
Markdown / markdown (pull_request) Has been skipped
Markdown / markdown (push) Failing after 15s
CI / rust (push) Failing after 2m13s
Coreutils provider graph / coreutils (push) Successful in 4m27s
CI / native_sources (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_three (push) Has been skipped
CI / host_two (push) Has been skipped
CI / integration (push) Has been skipped
d4a8295f6f
Repeated directory censuses retain many original descriptor records. Checking the same exact capture registration through its identity index avoids rescanning the chronological vector for every close while preserving foreign-record refusal and once-only cleanup custody.
docs: Wrap feature documentation consistently
Some checks failed
Coreutils provider graph / coreutils (push) Successful in 3m39s
Markdown / markdown (push) Successful in 14s
CI / rust (push) Failing after 1m56s
CI / rust (pull_request) Has been skipped
CI / native_sources (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / host_two (pull_request) Has been skipped
CI / host_three (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
Markdown / markdown (pull_request) Has been skipped
Coreutils provider graph / coreutils (pull_request) Has been skipped
CI / native_sources (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_two (push) Has been skipped
CI / host_three (push) Has been skipped
CI / integration (push) Has been skipped
3b021a3254
Keep the existing feature documentation within the shared Markdown layout rules without changing its content.
Some checks failed
Coreutils provider graph / coreutils (push) Successful in 3m39s
Markdown / markdown (push) Successful in 14s
CI / rust (push) Failing after 1m56s
CI / rust (pull_request) Has been skipped
CI / native_sources (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / host_two (pull_request) Has been skipped
CI / host_three (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
Markdown / markdown (pull_request) Has been skipped
Coreutils provider graph / coreutils (pull_request) Has been skipped
CI / native_sources (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_two (push) Has been skipped
CI / host_three (push) Has been skipped
CI / integration (push) Has been skipped
This pull request has changes conflicting with the target branch.
  • ARCHITECTURE.md
  • README.md
  • ROADMAP.md
  • scripts/check-python-host-syntax.sh
  • scripts/check-retained-image-input-tests.sh
  • scripts/dynlink_c_runtime.py
  • scripts/native_c_helpers.py
  • tests/fixtures/python-host-syntax-commands.json
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 'fix/source-descriptor-acquisition-custody:fix/source-descriptor-acquisition-custody'
git switch 'fix/source-descriptor-acquisition-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/clean-native-image-closure'
git merge --no-ff 'fix/source-descriptor-acquisition-custody'
git switch 'fix/source-descriptor-acquisition-custody'
git rebase 'feature/clean-native-image-closure'
git switch 'feature/clean-native-image-closure'
git merge --ff-only 'fix/source-descriptor-acquisition-custody'
git switch 'fix/source-descriptor-acquisition-custody'
git rebase 'feature/clean-native-image-closure'
git switch 'feature/clean-native-image-closure'
git merge --no-ff 'fix/source-descriptor-acquisition-custody'
git switch 'feature/clean-native-image-closure'
git merge --squash 'fix/source-descriptor-acquisition-custody'
git switch 'feature/clean-native-image-closure'
git merge --ff-only 'fix/source-descriptor-acquisition-custody'
git switch 'feature/clean-native-image-closure'
git merge 'fix/source-descriptor-acquisition-custody'
git push origin 'feature/clean-native-image-closure'
Sign in to join this conversation.
No description provided.