WIP: Share explicit native command file and lease clients #2

Closed
erikinkinen wants to merge 30 commits from feature/posix-compat into main
Owner

Summary and rationale

Share native command startup, descriptor intake, exact-file reads and temporary READ leases through an opt-in client. SHA-2 and Coreutils can use the same checked framing and cleanup rules. The default library remains allocation-free and performs no native effects.

Tracking and scope

This branch also skips duplicate same-repository pull-request jobs; fork jobs retain their existing eligibility. Consumer adoption and the phase-wide build requirements remain open.

Architecture, authority and failure behavior

The caller supplies the original transport and command policy. Startup checks the authenticated command entry, inherited descriptors and complete local capability inventory. File operands request only manifest-bounded leases through the inherited job broker. The client discovers no service and treats paths and numeric identities as data.

Each opaque grant retains its own retirement state. An independent live grant can retire after later admission fails; an uncertain retirement is never replayed. The original operation and cleanup errors remain distinct. Callers must retain unresolved owners until their custody is settled. The shared client contains no unsafe code.

Validation evidence

Consumer, native-target and guest checks remain open for the new client. Earlier checks cover their original revisions only.

Review checklist

  • Original implementation uses EriX dependencies tracking main.
  • Signed commits explain the client and ownership contracts.
  • Public APIs have rustdoc; authored code files remain below 1,000 lines.
  • README, ARCHITECTURE and ROADMAP describe the opt-in client.
  • Complete matching consumer and guest acceptance.

Keep this review WIP until its remaining scope is complete.

## Summary and rationale Share native command startup, descriptor intake, exact-file reads and temporary READ leases through an opt-in client. SHA-2 and Coreutils can use the same checked framing and cleanup rules. The default library remains allocation-free and performs no native effects. ## Tracking and scope - [Native SHA-2 design](https://git.erikinkinen.fi/erix/sha2-tool/issues/4) - [Shared stream client](https://git.erikinkinen.fi/erix/lib-stdio/pulls/2) - [Coreutils](https://git.erikinkinen.fi/erix/coreutils/pulls/2), [Integration](https://git.erikinkinen.fi/erix/integration/pulls/12) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65) - [Component audit](https://git.erikinkinen.fi/erix/lib-cli/issues/1) and [duplicate CI jobs](https://git.erikinkinen.fi/erix/meta/issues/2) This branch also skips duplicate same-repository pull-request jobs; fork jobs retain their existing eligibility. Consumer adoption and the phase-wide build requirements remain open. ## Architecture, authority and failure behavior The caller supplies the original transport and command policy. Startup checks the authenticated command entry, inherited descriptors and complete local capability inventory. File operands request only manifest-bounded leases through the inherited job broker. The client discovers no service and treats paths and numeric identities as data. Each opaque grant retains its own retirement state. An independent live grant can retire after later admission fails; an uncertain retirement is never replayed. The original operation and cleanup errors remain distinct. Callers must retain unresolved owners until their custody is settled. The shared client contains no unsafe code. ## Validation evidence Consumer, native-target and guest checks remain open for the new client. Earlier checks cover their original revisions only. ## Review checklist - [x] Original implementation uses EriX dependencies tracking `main`. - [x] Signed commits explain the client and ownership contracts. - [x] Public APIs have rustdoc; authored code files remain below 1,000 lines. - [x] README, ARCHITECTURE and ROADMAP describe the opt-in client. - [ ] Complete matching consumer and guest acceptance. Keep this review WIP until its remaining scope is complete.
ci: Skip duplicate same-repository pull request jobs
All checks were successful
CI / markdown (push) Successful in 15s
CI / rust (push) Successful in 30s
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
eca5c30ec9
Skip pull-request jobs when the head and base repository names match,
since push CI already covers these branches. Retain fork pull-request,
push and manual execution and existing release publication conditions.
Apply the guard before any job steps, including Markdown validation.

Test execution and CI observation are deferred at the user's request;
no execution result is claimed for this workflow-only change.
ci: Adopt the signed original Git dependency helper
All checks were successful
CI / markdown (pull_request) Has been skipped
CI / rust (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / rust (push) Successful in 12s
7d208a15ff
Select the verified immutable Integration helper that preserves actual
Git objects and denies registry dependencies without obsolete path
patches. Retain every duplicate same-repository PR guard. Where needed,
adopt the coherent signed ABI graph and preserve original authority and
validation budgets. Maintain canonical documentation formatting.

Tests and exact-head CI run in parallel with implementation. Earlier failed,
skipped or unrun checks remain distinct from actual passes. Keep the full
EriX guest build generations and external Rust/LLVM guest rebuild required;
no final all-repository CI success or guest completion is claimed.
ci: Adopt the signed original Git dependency helper
All checks were successful
CI / markdown (pull_request) Has been skipped
CI / rust (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Successful in 15s
bbd5b37d43
Select the verified immutable Integration helper that preserves actual
Git objects and denies registry dependencies without obsolete path
patches. Retain every duplicate same-repository PR guard. Where needed,
adopt the coherent signed ABI graph and preserve original authority and
validation budgets. Maintain canonical documentation formatting.

Tests and exact-head CI run in parallel with implementation. Earlier failed,
skipped or unrun checks remain distinct from actual passes. Keep the full
EriX guest build generations and external Rust/LLVM guest rebuild required;
no final all-repository CI success or guest completion is claimed.
ci: Select the reviewed native process custody helper
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / rust (push) Failing after 11s
d2c7b07393
Select the coherent Integration source for dependency preparation and
native process ownership. This keeps helper inputs aligned with the
published runtime producer and refuses unsupported descriptor queries
before starting a child.
ci: Adopt the repaired native signal owner
All checks were successful
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 20s
CI / rust (push) Successful in 51s
9e8b3e32f4
Select the coherent Integration helper that admits observed default or
ignored reserved signals while preserving complete native action identity.
Keep the existing workflow commands and limits for Integration #118.
ci: Carry checked Cargo inputs through component jobs
Some checks are pending
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 16s
CI / rust (push) Has started running
cbeb0715c7
Prepare Cargo inputs with the selected Integration helper and carry its
workspace, environment and target directory through the existing CI steps.
Keep shared dependency and review policies aligned.

Refs: erix/integration#142
ci: Select the repaired Cargo gateway
Some checks are pending
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / rust (push) Successful in 1m16s
CI / markdown (push) Has started running
0897dd5363
Use the shared gateway that selects installed Rust tools when a component
has no toolchain file. Keep tool selection, feature-branch resolution and
original source checks together in the pinned helper snapshot.

Refs: erix/integration#147
ci: Use the shared acquisition fix for packed Git transfers
All checks were successful
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 13s
CI / rust (push) Successful in 38s
e869d47d55
Use the shared acquisition fix for packed Git transfers. The pinned helper
keeps unexpected object-store metadata outside the acquired source context.

Refs: erix/integration#150
Share canonical descriptor intake, exact-file streaming and manifest-bounded broker leases. Retain original request identities and freeze the client after uncertainty without replaying accepted work.

Refs erix/sha2-tool#4.
fix: retain original grant retirement custody
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Failing after 51s
e8fff1bd74
Keep retirement admission inside the opaque original receipt. Retire independent earlier grants after ordinary admission freezes, preserving the first operation and exact cleanup failures.

Refs erix/sha2-tool#4.
erikinkinen changed title from WIP: Skip duplicate same-repository pull request jobs to WIP: Share explicit native command file and lease clients 2026-10-24 03:23:51 +02:00
Author
Owner

Published e8fff1bd with the opt-in native command client. It admits the complete startup inventory, streams exact-file reads and owns temporary broker grants through one-attempt retirement. SHA-2 and Coreutils adoption is tracked in erix/sha2-tool#4.

Published e8fff1bd with the opt-in native command client. It admits the complete startup inventory, streams exact-file reads and owns temporary broker grants through one-attempt retirement. SHA-2 and Coreutils adoption is tracked in erix/sha2-tool#4.
test: preserve failed packets and installed receipt observations
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / rust (push) Failing after 49s
a2a8001bc6
Assert the retained original failed reply and consume the fake empty-slot observation before receipt installation.

Refs erix/sha2-tool#4.
fix: audit complete replies in caller-owned packet storage
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Failing after 1m4s
c07290430e
Retain original caller reply capacity for broker and exact-file calls after minimum preflight. Audit all parseable receipts without broadening requests or replacing the first cleanup failure.

Refs #3.
test: keep file receipt fixtures within the transport budget
All checks were successful
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / rust (push) Successful in 1m0s
f0ea536ccf
Audit unsolicited receipts before rejecting a truncated typed record, and preserve a positive full-size canonical file response. A complete fixed record already occupies the whole transport.

Refs #3.
Borrow admitted startup through exact native calls and preserve full transport
statuses. Select the original job sender only when its manifest and complete
inventory admitted that route, without endpoint discovery or fallback.
Keep the exact READ lease, cursor and private fallible sink in a durable journal.
Expose complete bytes only after EOF and positive retirement, preserving first
failures and independent cleanup observations without reacquisition or replay.
Keep immutable broker policies, original grant issuers and publication journals
with the invocation. Share caller-stored stream retirement and original mapped
workspace lifetime so native tools retain their first failures and outstanding
owners through final cleanup without acquiring replacement authority.
Preserve full native and IPC result domains in allocation-free diagnostics. Keep classification separate from retained owner packets and cleanup so command clients can share formatting without acquiring authority.
Share the original read lease and cursor between whole-file input and bounded streaming consumers. Keep acquisition, EOF, exact receipt state and independent once-only retirement in the retained owner.

Refs erix/boot-tool#8
Keep original grants and inherited views through narrowing, bounded reads and independent cleanup. Fence unfinished calls across callback unwind so Status cannot reopen uncertain input.
Distinguish declared closure from missing startup data and resolve actual use as a local descriptor error. Closed roles acquire no cursor or cleanup obligation; existing original stream owners retain their independent lifetime.
Expose the existing pure startup description iterator for process wrappers. Preserve every original ID, capability slot and access tuple, including descriptions used only by sparse descriptors, without constructing stream owners.
Require the shared receiver slot before capability queries while preserving the complete startup inventory and original descriptor ownership. Keep generic supplied-bound helpers independent of ordinary command policy.
Share authenticated launch checks while allowing an ordinary C process to have no argument zero. Retain decoded retirement failures and their actual native storage independently of earlier I/O failures, with pending observations fencing later reuse.
Cancel borrowed views before releasing their aliases and preserve ordinary directional close behavior for owned channels. Latch every cleanup callback until it returns so caught unwinds cannot reopen I/O or reuse the original pending packet.
docs: Explain pending stream regression ownership
Some checks failed
CI / rust (push) Failing after 36s
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 6s
73b6b135fc
Document each interrupted callback, local alias observation and observer counter in the pending-cleanup controls. These comments make the original packet and independent-owner assertions easier to audit.
ci: Select the catalog containing the owned-region dependency
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 8s
CI / rust (push) Failing after 2m6s
d8ea9f418f
Use the published Integration helper revision whose explicit catalog contains lib-owned-region for native workspace preparation. Preserve the existing source admission and command bounds.
test: Restore unambiguous native intake fixtures
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Failing after 1m55s
07c01f8d75
Use explicit fixture result types, share the existing row constructor, capture the actual cleanup lifetimes and select the original broker binding. Preserve native ownership checks and runtime method bodies.
refactor: Name the borrowed environment observation
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 11s
CI / rust (push) Failing after 2m20s
9149d4489c
Give startup fixtures a documented alias for the existing environment tuple without changing its borrowed data or serialization.
test: Keep native stream fixtures within their wire contracts
Some checks failed
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 9s
CI / rust (push) Failing after 1m57s
01bca2e12d
Retain the complete correlated broker refusal and untouched buffer tail. Encode consistent stream counters and split the original file bytes across bounded replies, preserving exact offsets and once-only retirement.
docs: Render the conventional argument name as code
All checks were successful
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Successful in 1m32s
420c68a5c1
Keep argv[0] literal in the process-startup contract so rustdoc does not interpret its index as an unresolved item link.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:37 +01:00
Author
Owner

Replaced by #8, #9, #10, #11, #12, #13, #14, #15, #16, #17, #18. These feature branches preserve the original source in separate changes. Closing this combined PR without merging it; the original branch is retained.

Replaced by [#8](https://git.erikinkinen.fi/erix/lib-cli/pulls/8), [#9](https://git.erikinkinen.fi/erix/lib-cli/pulls/9), [#10](https://git.erikinkinen.fi/erix/lib-cli/pulls/10), [#11](https://git.erikinkinen.fi/erix/lib-cli/pulls/11), [#12](https://git.erikinkinen.fi/erix/lib-cli/pulls/12), [#13](https://git.erikinkinen.fi/erix/lib-cli/pulls/13), [#14](https://git.erikinkinen.fi/erix/lib-cli/pulls/14), [#15](https://git.erikinkinen.fi/erix/lib-cli/pulls/15), [#16](https://git.erikinkinen.fi/erix/lib-cli/pulls/16), [#17](https://git.erikinkinen.fi/erix/lib-cli/pulls/17), [#18](https://git.erikinkinen.fi/erix/lib-cli/pulls/18). These feature branches preserve the original source in separate changes. Closing this combined PR without merging it; the original branch is retained.
erikinkinen closed this pull request 2026-10-30 16:38:26 +01:00
All checks were successful
CI / rust (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / rust (push) Successful in 1m32s

Pull request closed

Sign in to join this conversation.
No description provided.