Strengthen spawn ownership and align the quality gates - #9
Merged
Conversation
Completes the in-flight ownership work and closes the gaps that separated this crate from its siblings. Ownership and ConPTY: - Private running/suspended typestates, unified handle-transfer ownership, and value-based pseudoconsole storage. - ConPTY startup now sets STARTF_USESTDHANDLES with all ordinary standard handles null, matching Microsoft Terminal, so a hosted child can no longer read or write the parent's redirected streams. A 32-bit CI leg runs the regression, because the failure mode is pointer-width sensitive. - SuspendedChild::resume requires the primary thread's previous suspend count to be exactly one; external changes are rejected and rolled back. - Output capture joins both reader threads even when one errors or panics. Quality gates: - Deny clippy::undocumented_unsafe_blocks. CONTRIBUTING already required a specific safety justification on every unsafe block, but nothing checked it; five blocks had none. multiple_unsafe_ops_per_block is deliberately left off, because several blocks adopt two OS resources together to stay exception-safe and splitting them would widen the leak window. - Add a compiled and executed Command example. The crate had only compile_fail boundary pins, so no usage example was ever type-checked and the README example had never been compiled. - Add _typos.toml so the spell-check gate has a checked-in configuration. Dependency handling: - The release checksum helper no longer depends on LowerHex being implemented for the digest output, so it builds against sha2 0.10 and 0.11 alike. The bump itself stays deferred and is now recorded in dependabot.yml: sha2 0.11 requires Rust 1.85, and both `just msrv` and the 1.75 test legs cover the whole workspace, so taking it would break CI even though xtask never ships. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the in-flight ownership work and closes the gaps that separated this crate from its siblings.
Ownership and ConPTY
STARTF_USESTDHANDLESwith all ordinary standard handles null, matching Microsoft Terminal, so a hosted child can no longer reach the parent's redirected streams. A 32-bit CI leg runs the regression because the failure mode is pointer-width sensitive.SuspendedChild::resumerequires the primary thread's previous suspend count to be exactly one; external changes are rejected and rolled back.Quality gates
clippy::undocumented_unsafe_blocks. CONTRIBUTING already required a specific safety justification on everyunsafeblock, but nothing enforced it and five blocks had none.multiple_unsafe_ops_per_blockis deliberately not enabled: several blocks adopt two OS resources together to stay exception-safe (seepipe), and splitting them would widen the window in which one handle can leak. The reason is recorded inCargo.toml.Commandexample. The crate previously had onlycompile_failboundary pins, so no usage example was ever type-checked, and the README example had never been compiled at all._typos.tomlso the spell-check gate has a checked-in configuration like the sibling repositories.Dependency handling
The release checksum helper no longer relies on
LowerHexbeing implemented for the digest output, so it builds againstsha20.10 and 0.11 alike.The bump itself stays deferred, and the reason is now recorded in
dependabot.yml: sha2 0.11 requires Rust 1.85, while this crate targets 1.75. Bothjust msrvand the Rust 1.75 test legs cover the whole workspace, so taking the bump breaks CI even thoughxtasknever ships. That is the real reason #8 fails — theLowerHexcompile error was only the first of several failures. #8 should be closed rather than merged.Verification
Run locally on Windows:
fmt,clippy -D warnings,test --workspace --all-targets,test --doc,typos,reuse lint,cargo deny check, and thepublic-apisnapshot check all pass. MSRV and mutation re-audit were not run locally (the toolchain here is mise-pinned); CI covers MSRV.