WIP: Retain original recipe compiler product files #676

Draft
erikinkinen wants to merge 0 commits from feature/native-recipe-product-files into feature/native-build-script-producers
Owner

Summary and rationale

Keep a recipe compiler output's original file capture alive across native retirement. Each receiver is enrolled before opening the file and reads fresh bytes through its original descriptor and directory edge under the existing stage counter.

Tracking and scope

Part of the build-script design, based on #665 and #674. Implements the retained output-file receiver. Connecting genuine host-script and root producers, with file mutation and cleanup controls, remains in progress.

Architecture, authority and failure behavior

Admission requires the actual stage, completed compiler producer and original positively retired delegated caller/forest. A snapshot or digest cannot establish those owners. After native retirement, reads use the original source lifetime; they cannot restart native work. Physical reads remain accounted when descriptor postchecks fail, retaining the raw failure first. Cleanup drains the saved original capturer despite public-view loss; copied receivers cannot close it. Executable/object format interpretation remains with the defining compiler and link producers.

Validation evidence

Two receiver-admission controls and four stage-admission controls pass. The maintained syntax suite, five pinned runner controls and 197 Markdown files pass. The complete 414-helper/input-owner inventory is regenerated and checked, all three defining runner fields are bound, and native seven/bootstrap are unchanged. These are admission and source checks; genuine produced-file lifetime acceptance and current CI remain pending.

Review checklist

  • Original receiver enrollment, bounded reads and independent cleanup implemented.
  • Signed source/declaration/binding commits and CI/syntax enrollment.
  • Inline contract and authored files below 1,000 lines.
  • Connect actual host-script/root producers and exercise retained output lifetimes.
## Summary and rationale Keep a recipe compiler output's original file capture alive across native retirement. Each receiver is enrolled before opening the file and reads fresh bytes through its original descriptor and directory edge under the existing stage counter. ## Tracking and scope Part of [the build-script design](https://git.erikinkinen.fi/erix/integration/issues/663), based on #665 and #674. Implements the retained output-file receiver. Connecting genuine host-script and root producers, with file mutation and cleanup controls, remains in progress. ## Architecture, authority and failure behavior Admission requires the actual stage, completed compiler producer and original positively retired delegated caller/forest. A snapshot or digest cannot establish those owners. After native retirement, reads use the original source lifetime; they cannot restart native work. Physical reads remain accounted when descriptor postchecks fail, retaining the raw failure first. Cleanup drains the saved original capturer despite public-view loss; copied receivers cannot close it. Executable/object format interpretation remains with the defining compiler and link producers. ## Validation evidence Two receiver-admission controls and four stage-admission controls pass. The maintained syntax suite, five pinned runner controls and 197 Markdown files pass. The complete 414-helper/input-owner inventory is regenerated and checked, all three defining runner fields are bound, and native seven/bootstrap are unchanged. These are admission and source checks; genuine produced-file lifetime acceptance and current CI remain pending. ## Review checklist - [x] Original receiver enrollment, bounded reads and independent cleanup implemented. - [x] Signed source/declaration/binding commits and CI/syntax enrollment. - [x] Inline contract and authored files below 1,000 lines. - [ ] Connect actual host-script/root producers and exercise retained output lifetimes.
erikinkinen added this to the Alpha 1 milestone 2026-11-10 13:07:13 +01:00
Keep completed compiler output custody with the defining recipe stage across native retirement. Enroll receivers before file admission, verify original descriptor and directory occupations on fresh bounded reads, and retain original cleanup captures independently of mutable public views.
Retain physical read charges even when descriptor borrow exit refuses the original occupation. Keep that raw refusal first and record an independent accounting failure without replacing it, including the EOF probe.
Derive file reads from the retained receiver and defining stage rather than accepting a capturer or work counter as an additional operand. Refuse reads outside the original file extent while preserving its bounded EOF probe.
Check each physical read against the original counter, including the possible byte returned by the EOF probe. Reserve the known worst-case read geometry before the complete file walk without changing any authored work allowance.
Cover every resource entry and failed constructor reentry with zero operand callbacks. Keep these admission refusals distinct from real stage, file capture and native producer acceptance.
Raise the retained first failure before stage callbacks, descriptor checks or direct physical reads. Keep original cleanup available so the same receiver can drain its actual capture after a refusal.
Connect retained recipe output receivers to the actual graph-born stage and its original native or source work counters. Preserve distinct compiler and source provenance while completing file lifetime integration.
Construct the maintained scripts environment from literal package, target, profile and temporary-directory selections. Keep host lookup and credential fields out, and preserve the original stage and executable caller as the sources of custody.
build: Compose the original script stage environment boundary
Some checks failed
Markdown / markdown (push) Successful in 25s
CI / rust (push) Failing after 1m12s
CI / native_sources (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 / host_zero (push) Has been skipped
CI / integration (push) Has been skipped
CI / cargo_publications (push) Failing after 1m28s
Coreutils provider graph / coreutils (push) Failing after 1m48s
711ad33cf4
Retain the original graph stage and complete syntax enrollment alongside the fixed script runtime mapping. Actual compiler and executable caller integration remains in the parent feature.

# Conflicts:
#	.github/workflows/ci.yml
#	scripts/check-python-host-syntax.sh
#	tests/fixtures/python-host-syntax-commands.json
fix: Compose original compiler storage issuer dispatch
Some checks failed
Markdown / markdown (push) Successful in 28s
CI / cargo_publications (pull_request) Has been skipped
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
Coreutils provider graph / coreutils (push) Failing after 4m47s
CI / cargo_publications (push) Failing after 6m0s
CI / rust (push) Failing after 6m5s
CI / native_sources (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_two (push) Has been skipped
CI / integration (push) Has been skipped
CI / host_three (push) Has been skipped
CI / host_zero (push) Has been skipped
c1a91fa12e
Preserve genuine Cargo and executable code issuers alongside strict original Scope code receivers. Keep the fixed environment mapping on the same coherent stage and caller implementation.
Retain the native source-borrow journal in the graph registered stage birth and install that same list on the actual native Scope before installation or captures. Later source borrowers cannot select a replacement journal.
Match new recipe native producers against the actual Scope retained in the original graph birth as well as the current phase view, before allocating counters or effects for that producer.
Normally compose the independently published data-only environment builder and its complete selection controls. Actual script execution remains with the recipe producer and retains its original source and native lifetimes.
Run the original receiver admission controls in CI and the maintained syntax gate. Document bounded original file reads, physical accounting, source lifetime retention and independent cleanup duties.
Preserve existing Cargo and executable activation routes while retaining strict original receiver checks. Keep recipe product files on the coherent graph stage and complete syntax enrollment.
Bind fixed recipe product admission to the actual producer, delegated inputs, original caller/channel and positively retired grants and native forest. Completion flags and file census data alone cannot admit a compiler product.
Reject foreign or copied compiler producers before consulting their registrations and retain original producer or delegated-input binding loss on the actual recipe stage.
Extend the pinned runner argument inventory with the retained product receiver and its guard tests, preserving the complete parent prefix.
Require the original delegated compiler caller and positively retired forest before admitting product bytes. Compose the stage source journal and explicit script environment while preserving independent file custody.

# Conflicts:
#	scripts/check-python-host-syntax.sh
#	tests/fixtures/python-host-syntax-commands.json
Bind stage admission to its constructor scope and reject foreign producer scopes before callbacks. Preserve the actual original caller and process forest as required witnesses for output admission.
Declare the complete reachable helper graph including original recipe output custody. Preserve the fixed native owner bodies and bootstrap while selecting the actual product receiver code.
Derive the complete input-owner code inventory from the immutable recipe product source tree. Keep hashes as integrity constraints while original stages, callers and descriptors retain custody.
build: Bind original callers to recipe product input declarations
Some checks failed
Markdown / markdown (push) Successful in 24s
CI / cargo_publications (pull_request) Has been skipped
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 / cargo_publications (push) Failing after 4m56s
CI / rust (push) Failing after 4m49s
CI / native_sources (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_three (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_two (push) Has been skipped
CI / integration (push) Has been skipped
Coreutils provider graph / coreutils (push) Successful in 5m35s
1829039618
Select the immutable complete input-owner declaration in the maintained runner source, declaration and body-reference fields. Keep actual original native and file owners responsible for production, retirement and cleanup.
Some checks failed
Markdown / markdown (push) Successful in 24s
CI / cargo_publications (pull_request) Has been skipped
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 / cargo_publications (push) Failing after 4m56s
CI / rust (push) Failing after 4m49s
CI / native_sources (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_three (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_two (push) Has been skipped
CI / integration (push) Has been skipped
Coreutils provider graph / coreutils (push) Successful in 5m35s
This pull request has changes conflicting with the target branch.
  • scripts/native_input_owner_cohort.py
  • scripts/run-owned-input.py
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-recipe-product-files:feature/native-recipe-product-files'
git switch 'feature/native-recipe-product-files'

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/native-build-script-producers'
git merge --no-ff 'feature/native-recipe-product-files'
git switch 'feature/native-recipe-product-files'
git rebase 'feature/native-build-script-producers'
git switch 'feature/native-build-script-producers'
git merge --ff-only 'feature/native-recipe-product-files'
git switch 'feature/native-recipe-product-files'
git rebase 'feature/native-build-script-producers'
git switch 'feature/native-build-script-producers'
git merge --no-ff 'feature/native-recipe-product-files'
git switch 'feature/native-build-script-producers'
git merge --squash 'feature/native-recipe-product-files'
git switch 'feature/native-build-script-producers'
git merge --ff-only 'feature/native-recipe-product-files'
git switch 'feature/native-build-script-producers'
git merge 'feature/native-recipe-product-files'
git push origin 'feature/native-build-script-producers'
Sign in to join this conversation.
No description provided.