WIP: Prepare image commands for native EriX I/O #2

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

Summary and rationale

Move image commands into a no_std library and keep Linux file and stream operations in a separate adapter. This gives the native EriX port the same parser, image formats and response logic. Output write or flush failures return an error instead of panicking or repeating a publication.

Tracking and scope

Component audit, native build tools, output failures, phase completion.

The shared command and Linux adapter are implemented. Preparation exposes the selected file and stream needs before grant binding. The native backend remains unfinished.

Architecture, authority and failure behavior

The shared command receives an explicit I/O backend. Native implementations must bind only the selected command's original capabilities and retain uncertain owners until positive drain or accepted custody transfer. Path bytes confer no authority. Existing Linux publication order and artifact bytes are preserved. Cargo Git dependencies track main; locks retain their resolved identities.

Validation evidence

Regression coverage includes malformed arguments, lexical output aliases, partial writes, flush failures and publication order. Native runtime and image acceptance require the actual EriX backend.

Review checklist

  • Separate shared command logic from Linux I/O and document the boundary.
  • Handle output failures without panics or repeated file effects.
  • Update component documents and manual pages.
  • Prepare commands before binding their required grants.
  • Publish the indexed boot-tool(1) page and explicit source bindings for offline manual packaging.
  • Implement the native backend and runtime regressions.
  • Complete current CI and dependent image checks.
## Summary and rationale Move image commands into a `no_std` library and keep Linux file and stream operations in a separate adapter. This gives the native EriX port the same parser, image formats and response logic. Output write or flush failures return an error instead of panicking or repeating a publication. ## Tracking and scope [Component audit](https://git.erikinkinen.fi/erix/boot-tool/issues/1), [native build tools](https://git.erikinkinen.fi/erix/integration/issues/8), [output failures](https://git.erikinkinen.fi/erix/boot-tool/issues/4), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). The shared command and Linux adapter are implemented. Preparation exposes the selected file and stream needs before grant binding. The native backend remains unfinished. ## Architecture, authority and failure behavior The shared command receives an explicit I/O backend. Native implementations must bind only the selected command's original capabilities and retain uncertain owners until positive drain or accepted custody transfer. Path bytes confer no authority. Existing Linux publication order and artifact bytes are preserved. Cargo Git dependencies track `main`; locks retain their resolved identities. ## Validation evidence Regression coverage includes malformed arguments, lexical output aliases, partial writes, flush failures and publication order. Native runtime and image acceptance require the actual EriX backend. ## Review checklist - [x] Separate shared command logic from Linux I/O and document the boundary. - [x] Handle output failures without panics or repeated file effects. - [x] Update component documents and manual pages. - [x] Prepare commands before binding their required grants. - [x] Publish the indexed `boot-tool(1)` page and explicit source bindings for offline manual packaging. - [ ] Implement the native backend and runtime regressions. - [ ] Complete current CI and dependent image checks.
build: Align dependencies for coherent runtime adoption
All checks were successful
CI / markdown (push) Successful in 11s
CI / test (push) Successful in 35s
CI / markdown (pull_request) Successful in 10s
CI / test (pull_request) Successful in 32s
23acf7b7e3
Select the current original signed foundation commits in the existing Git
dependencies. Keep Rust implementation files unchanged and record the
separate product-image acceptance requirement in the roadmap.

The complete supported feature/profile matrix passes with formatting,
strict Clippy, unit tests, builds and private rustdoc. Product runtime
adoption remains pending the complete dependency graph.
ci: Skip duplicate same-repository pull request jobs
All checks were successful
CI / markdown (pull_request) Has been skipped
CI / test (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / test (push) Successful in 24s
fe9d435bc6
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.
build: Adopt original-custody filesystem revisions
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 8s
CI / test (push) Successful in 35s
5ee9a4504b
Select complete signed native filesystem and compatibility dependencies by
immutable commit. Preserve original endpoints, rights, cleanup and resource
budgets throughout the coherent compilation graph.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
build: Adopt original key lifetime dependencies
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 11s
CI / test (push) Successful in 38s
f8f64888af
Select signed original key-material lifetime dependencies by immutable
commit. Preserve endpoints, grants, resource budgets and existing
duplicate same-repository PR conditions throughout the compilation graph.

Tests, builds, lint checks, generated documentation, VM/profiler execution and
CI observation remain deferred. Rustfmt was applied through stdin. No test
pass, warning-free build or measured performance improvement is claimed.
Full EriX guest generations and external Rust/LLVM guest rebuilding remain
required and unperformed.
ci: Adopt the signed original Git dependency helper
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / test (push) Failing after 17s
52e1f176cc
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 / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / test (push) Successful in 20s
30a83cd564
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.
build: Align consumer inputs with the signed library graph
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / test (push) Successful in 17s
4dcf7ff78c
Select the current actual library commits and preserve original Git
source identities. Keep the compiled Integration helper on its
independent reviewed revision so transitive ABI types agree.
ci: Select the reviewed native process custody helper
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 54s
36d7f6d7de
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 / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 20s
d2bd6f2f2a
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.
Declare main for internal Git dependencies. Prepare offline Cargo inputs with
the selected Integration helper, then carry the generated workspace, environment
and target directory through each CI step.

Keep shared dependency and review policies aligned.

Refs: erix/integration#142
build: regenerate the main dependency lockfile
Some checks are pending
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Has started running
CI / markdown (push) Has started running
6d5e4bb642
Regenerate Cargo.lock after switching internal dependencies to main. Keep
the resolved commits recorded in the lockfile.

Refs erix/integration#142
ci: Select the repaired Cargo gateway
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Failing after 47s
CI / markdown (push) Has started running
e872729372
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 / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 27s
CI / test (push) Successful in 3m10s
0159c8e195
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
build: Refresh main-branch dependency locks
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 5s
CI / test (push) Successful in 35s
e2a59008fc
Keep the maintained lockfile aligned with the published dependency revisions.
Use the whole lockfile generated by offline Cargo against the selected original
Git objects; preserve the main-branch dependency declarations.

Refs erix/integration#142.
Keep byte arguments, image operations and response formatting in a no_std
library with an explicit I/O interface. Preserve the Linux command and
publication order, and specify the capability and cleanup contract for the
native EriX port. Handle output failures without panicking or repeating
already published files, addressing #4.
refactor: Simplify path diagnostics and update interface notes
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 34s
64e43b0f24
Remove redundant references when formatting borrowed paths. Keep the
platform contract within the numbered architecture interface section and
replace the old unchanged-source summary with the shared library and native
port work that now exist.
erikinkinen changed title from WIP: Align signed runtime dependencies to WIP: Prepare image commands for native EriX I/O 2026-10-17 08:10:20 +02:00
Own the parsed command before selecting file and stream grants, then execute
that same command without reparsing. Separate the grammar from image operations
and describe native error context, partial effects and final owner retirement.
Shorten parity-matrix labels while retaining the input, transport, partial-I/O
and cleanup cases. Preserve the native error grammar and shared tool behavior.
docs: Shorten the help parity case
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / test (push) Successful in 29s
3040a592e2
Keep the help and syntax case within the existing table width while preserving
the required status, response and absence of file effects.
Clear the temporary-name cleanup claim as soon as rename succeeds, so the
output guard cannot remove a later occupant of the vacated name. Preserve
unpublished cleanup after a refused rename and document the Linux adapter's
parent-directory and best-effort cleanup assumptions.
docs: Clarify temporary-output cleanup ownership
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 10s
CI / test (push) Successful in 1m0s
50e22cb05a
Describe when the Linux output guard stops cleaning the temporary name,
including later name reuse and failures before rename. State the parent
directory and best-effort cleanup assumptions at the platform boundary.
Author
Owner

Fixed #5: successful publication now disarms cleanup of the old temporary name. Two deterministic controls cover name reuse and refused-rename cleanup. All 31 tests pass in both profiles, strict Clippy and CI 65 are clean. The Linux directory assumptions and best-effort destructor cleanup are documented; matching manual wording is published in Docs 1f306e22.

Fixed #5: successful publication now disarms cleanup of the old temporary name. Two deterministic controls cover name reuse and refused-rename cleanup. All 31 tests pass in both profiles, strict Clippy and CI 65 are clean. The Linux directory assumptions and best-effort destructor cleanup are documented; matching manual wording is published in Docs 1f306e22.
docs: Publish the complete boot image command manual
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Failing after 3s
CI / test (push) Successful in 38s
110c5046d7
Add the owning section-1 page and explicit source bindings for all implemented
commands. Describe detached signatures, structural versus authenticated reads,
publication failures and authority, and keep the offline inventory current.

Refs #1
docs: Clarify boot tool allocation failure reporting
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Failing after 5s
CI / test (push) Successful in 56s
3cba606c4a
Keep returned operational statuses distinct from a host allocation abort.
The manual now states that boundary without promising every allocation failure
returns through the command error path.

Refs #1
Author
Owner

Added the complete owning manual and explicit source bindings, including the allocation-status clarification. The page keeps Linux publication behavior distinct from the unfinished native backend.

Added the complete owning manual and explicit source bindings, including the [allocation-status clarification](https://git.erikinkinen.fi/erix/boot-tool/commit/3cba606c4a74557657cd6d93e05b6d488fa85a09). The page keeps Linux publication behavior distinct from the unfinished native backend.
docs: wrap manual overview prose
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 40s
906d76c3be
Keep the command overview within the documentation line width.
feat: Retain original boot command file occurrences
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 10s
CI / test (push) Successful in 2m5s
57ca22b3c6
Keep raw argv indices with parsed file operands so native admission can bind
reordered reads and publications without reparsing or merging equal paths.
Expose the immutable footprint through FileOccurrence while preserving Linux
command behavior and the existing path-only visitor.
feat: Bind boot command preparation to admitted startup
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 1m14s
cb89f2c949
Parse counted original arguments once and keep selected file occurrences
borrowed from that immutable startup after the prepared command is consumed.
Preserve original output descriptions while keeping actual read, publication
and stream effect owners separate from descriptive preparation.
Keep canonical deduplicated rights separate from original ordered file
occurrences. Bind each effect to its exact argv bytes and row ordinal, preserve
invalid-path error order, and refuse mismatched operations before native effects.
Bind the prepared command to its original broker policy, whole-file journals,
publication owners and inherited streams. Add the kernel entry and explicit
mapped workspace, keeping startup and physical I/O owners alive through cleanup
and one final exit. Include executable metadata and the native manual contract.
Record the original publication action, stream descriptor and broker operation when an effect fails. Use shared LibCli descriptions while retaining the first operation and independent cleanup causes with their original owners.
Prepare explicit GPT metadata before file authority binding and stream borrowed bytes and zero extents with bounded memory. Preserve the existing publication lifecycle and report geometry only after commit and grant retirement.

Refs #7
Bind exact argument-selected inputs to checked partition extents and verify their complete length and SHA-512 while streaming. Keep input and output progress separate, retire each input before reuse and commit only after all payloads finish.

Refs #8
Prepare deterministic FAT32 metadata from explicit geometry and entries, then interleave sector encoding and exact source reads through the shared publication owner. Preserve original operands, bounded scratch and input retirement before commit.

Refs #9
Prepare explicit groups, allocation metadata, sparse backups and an internal journal without device or mount access. Stream initialized ranges and zero gaps through the existing publisher and share batched metadata emission with FAT32.
Prepare complete inode metadata, links and mapped file extents before
publication. Keep one original source across metadata gaps and use the
shared assembly driver for both mapped and contiguous inputs.

Refs: #11, #12
Narrow each original input endpoint before copying and check real EOF without reading an extra byte. Keep mapped source progress and failure packets through independent retirement so a refused or uncertain bound cannot publish an image.
Keep command output selection independent of descriptor closure. Refuse attempted writes and flushes locally while preserving original diagnostics and once-only stream retirement.
Bind native startup cases and manuals to the reserved receiver. Cover rejected receiver coordinates and preservation of shared outputs and the complete original inventory.
fix: Account for inherited recipient view retirement
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / test (push) Failing after 28s
CI / markdown (push) Failing after 17s
5505dc7128
Include each original view cancellation in stream cleanup failure and settlement checks. A refused cancellation keeps its alias held and prevents final completion even when an earlier operation already failed.
test: Keep boot manual inventory aligned with command dispatch
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Failing after 16s
64b6738ee0
Recognize digit-bearing subcommands while retaining exact command and page
coverage. Add missing and extra dispatch controls, refresh the cleanup source
binding, and remove surplus Markdown blanks.

The four manual inventory tests and the maintained Markdown checks pass.
ci: Select the catalog containing the owned-region dependency
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 7s
CI / test (push) Failing after 3m1s
97193a47c8
Use the published Integration helper revision whose explicit catalog contains lib-owned-region. Preserve immutable helper acquisition and the existing source, profile and deadline guards.
refactor: Group original extent node selection for sector encoding
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 9s
CI / test (push) Failing after 2m18s
475839a933
Pass the retained mapping and its node coordinates as one borrowed selection, preserving all four emission paths. Keep complete prepared plans inline and refresh the exact manual source bindings.
test: Use explicit non-null pointer sentinels
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 8s
CI / test (push) Failing after 26s
d70c7ce182
Keep malformed-range preflight cases non-dereferencing while expressing their sentinel address through the standard pointer API.
docs: Bind the manual to the current source
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 4s
CI / test (push) Failing after 1m23s
e7ed600f9f
Refresh the exact source digest for src/native_entry/ingress.rs after its corresponding source change.
test: Use the native fixture result type explicitly
Some checks failed
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 14s
CI / test (push) Failing after 3m45s
211ca0fcc2
Keep native transport and cleanup errors in the generic Result type instead of the IPC parsing alias. Preserve the complete fixture bodies and refresh the matching manual source binding.
refactor: Name the native response correlation pair
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / test (push) Successful in 1m10s
40d19cd301
Keep request and observed-request coordinates together in shared wire fixtures without changing their values. Preserve transport error markers, place conversion implementations before tests and update the matching manual source bindings.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:33 +01:00
Author
Owner

The source changes are now split into these feature PRs:

#13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25, #26, #27.

Closing this aggregate PR unmerged as superseded. The replacement PRs remain WIP where acceptance or provider links are incomplete. The original branch is retained for recovery and existing source references.

The source changes are now split into these feature PRs: #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25, #26, #27. Closing this aggregate PR unmerged as superseded. The replacement PRs remain WIP where acceptance or provider links are incomplete. The original branch is retained for recovery and existing source references.
erikinkinen closed this pull request 2026-10-30 12:35:23 +01:00
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 2s
CI / test (push) Successful in 1m10s

Pull request closed

Sign in to join this conversation.
No description provided.