[BUG] Native C producer cannot use the current command-owner cohort #767

Open
opened 2026-11-12 04:01:36 +01:00 by erikinkinen · 1 comment
Owner

Summary

The source-backed native C memory build stops before assembler execution because LibCstd still selects an older command-owner cohort. Updating those hashes alone also leaves the current shared custody core outside the producer’s private snapshot.

Reproduction

Use Integration 1b7396d1c50fadbcd4d5d5a7b6c7f51c6f3d2924 and LibCstd dba0cbee50ad8a87c5c4718fe2fe74aeeb832da5 (feature/native-c-owner-input-cohort). Run the native C runtime producer with the current Integration owner:

python3 -E -S -B scripts/build-c-runtime.py   --source /absolute/lib-cstd --output /absolute/fresh-output   --assembler /usr/bin/llvm-mc --archiver /usr/bin/llvm-ar   --process-owner /absolute/integration/scripts/owned_command.py   --component memory --policy hidden --target x86_64-unknown-none   --hard-seconds 60 --stall-seconds 30 --log-bytes 4194304 --input-bytes 536870912

The connected Integration adapter reaches the same producer initialization failure.

Expected and actual behavior

The producer should retain the complete selected command code and use the same actual native classes and registries in its caller and helper. Instead, load_owner → Cohort.__init__ raises process-owner input differs from the reviewed original before producing a C object/archive. The refusal is correct: the producer pins an earlier monolithic owner while the current implementation uses native_command_custody.py.

Environment and identity

  • x86-64 Linux; Python 3.14; explicitly selected LLVM assembler/archiver, Git and Bash.
  • Native source-backed memory component, hidden policy and x86_64-unknown-none; no guest/image acceptance is claimed.
  • Integration’s complete owner/helper/outer code declarations have been refreshed. LibCstd’s producer still names Integration 90552e251d4db3efb6272f1ae17e0eca24d72a3a.
  • The original source and command owners remain responsible for real files, processes and retirement. Code identities and receipts cannot supply those rights.

Evidence and prior checks

The real adapter selected the original LibCstd source and reached the producer cohort check. Its selected owner declaration predates the shared custody module. The current command facade also imports Cargo-specific lifetime enrollment, which cannot be an ambient dependency of a private C command cohort.

Proposed repair

Factor one shared pure command execution boundary. Keep Source/Cargo/Stage enrollment in the high-level facade, including retention of the actual Scope before its constructor and of its initialized lifetime history before native effects. The pure executor accepts only the same genuine unused Scope through a fixed typed handoff, with independently retained constructor and once-only invocation associations. It never accepts a cleanup receipt, caller flag or callback as an ownership proof.

Both pure callers and source-backed callers use the same execution and retirement implementation. Preserve the original argument checks, clock starts and bounds, native signal admission, physical file/process/forest checks and raw-first failure behavior. The C producer snapshots the complete fixed pure module family, checks every selected body before initialization and keeps repository imports inside that family in caller and helper. It must refuse missing/changed bodies and substituted module families rather than falling back to ambient Cargo code.

Tracking

  • Introduce the shared pure runner and fixed original Scope handoff.
  • Preserve pre-constructor Source/Stage enrollment and complete retirement checks.
  • Update the complete Integration and LibCstd code cohorts and closed imports.
  • Cover genuine current-owner initialization/run and refusal/replay cases.
  • Demonstrate a real source-backed native C memory object/archive.

Related: Integration #766, Integration #690.

## Summary The source-backed native C memory build stops before assembler execution because LibCstd still selects an older command-owner cohort. Updating those hashes alone also leaves the current shared custody core outside the producer’s private snapshot. ## Reproduction Use Integration `1b7396d1c50fadbcd4d5d5a7b6c7f51c6f3d2924` and LibCstd `dba0cbee50ad8a87c5c4718fe2fe74aeeb832da5` (`feature/native-c-owner-input-cohort`). Run the native C runtime producer with the current Integration owner: ```sh python3 -E -S -B scripts/build-c-runtime.py --source /absolute/lib-cstd --output /absolute/fresh-output --assembler /usr/bin/llvm-mc --archiver /usr/bin/llvm-ar --process-owner /absolute/integration/scripts/owned_command.py --component memory --policy hidden --target x86_64-unknown-none --hard-seconds 60 --stall-seconds 30 --log-bytes 4194304 --input-bytes 536870912 ``` The connected Integration adapter reaches the same producer initialization failure. ## Expected and actual behavior The producer should retain the complete selected command code and use the same actual native classes and registries in its caller and helper. Instead, `load_owner → Cohort.__init__` raises `process-owner input differs from the reviewed original` before producing a C object/archive. The refusal is correct: the producer pins an earlier monolithic owner while the current implementation uses `native_command_custody.py`. ## Environment and identity - x86-64 Linux; Python 3.14; explicitly selected LLVM assembler/archiver, Git and Bash. - Native source-backed memory component, hidden policy and `x86_64-unknown-none`; no guest/image acceptance is claimed. - Integration’s complete owner/helper/outer code declarations have been refreshed. LibCstd’s producer still names Integration `90552e251d4db3efb6272f1ae17e0eca24d72a3a`. - The original source and command owners remain responsible for real files, processes and retirement. Code identities and receipts cannot supply those rights. ## Evidence and prior checks The real adapter selected the original LibCstd source and reached [the producer cohort check](https://git.erikinkinen.fi/erix/lib-cstd/src/commit/dba0cbee50ad8a87c5c4718fe2fe74aeeb832da5/scripts/runtime_owner_cohort.py#L34). Its [selected owner declaration](https://git.erikinkinen.fi/erix/lib-cstd/src/commit/dba0cbee50ad8a87c5c4718fe2fe74aeeb832da5/scripts/build-c-runtime.py#L29) predates the [shared custody module](https://git.erikinkinen.fi/erix/integration/src/commit/1b7396d1c50fadbcd4d5d5a7b6c7f51c6f3d2924/scripts/native_command_custody.py). The current [command facade](https://git.erikinkinen.fi/erix/integration/src/commit/1b7396d1c50fadbcd4d5d5a7b6c7f51c6f3d2924/scripts/owned_command.py#L136) also imports Cargo-specific lifetime enrollment, which cannot be an ambient dependency of a private C command cohort. ## Proposed repair Factor one shared pure command execution boundary. Keep Source/Cargo/Stage enrollment in the high-level facade, including retention of the actual Scope before its constructor and of its initialized lifetime history before native effects. The pure executor accepts only the same genuine unused Scope through a fixed typed handoff, with independently retained constructor and once-only invocation associations. It never accepts a cleanup receipt, caller flag or callback as an ownership proof. Both pure callers and source-backed callers use the same execution and retirement implementation. Preserve the original argument checks, clock starts and bounds, native signal admission, physical file/process/forest checks and raw-first failure behavior. The C producer snapshots the complete fixed pure module family, checks every selected body before initialization and keeps repository imports inside that family in caller and helper. It must refuse missing/changed bodies and substituted module families rather than falling back to ambient Cargo code. ## Tracking - [ ] Introduce the shared pure runner and fixed original Scope handoff. - [ ] Preserve pre-constructor Source/Stage enrollment and complete retirement checks. - [ ] Update the complete Integration and LibCstd code cohorts and closed imports. - [ ] Cover genuine current-owner initialization/run and refusal/replay cases. - [ ] Demonstrate a real source-backed native C memory object/archive. Related: [Integration #766](https://git.erikinkinen.fi/erix/integration/pulls/766), [Integration #690](https://git.erikinkinen.fi/erix/integration/pulls/690).
erikinkinen added this to the Alpha 1 milestone 2026-11-12 04:01:36 +01:00
Author
Owner

The complete source-backed C artifact matrix now builds all six admitted components under both public and hidden export policies. The resulting 12 objects and archives pass the target/export checks, covering 150 C aliases. The original command owners confirm process-tree retirement.

The shared runner also preserves the connected compiler effect and completion boundaries. The maintained matrix gate is being added separately; this does not establish a complete EriX image or an in-guest rebuild.

The complete source-backed C artifact matrix now builds all six admitted components under both public and hidden export policies. The resulting 12 objects and archives pass the target/export checks, covering 150 C aliases. The original command owners confirm process-tree retirement. The shared runner also preserves the connected compiler effect and completion boundaries. The maintained matrix gate is being added separately; this does not establish a complete EriX image or an in-guest rebuild.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/integration#767
No description provided.