Files
ARCADIA-Studio/harness/experiments/traceability-view-17f1f89-20260923/native/supplement-source-bundle-v2

Bundle capture v2 — preparation only, not yet accepted or compiled

This replaces the rejected supplement-source-bundle proposal without modifying it or any frozen recipe. It converts a copied saved-source bundle through existing oa_core APIs to real self-contained source, then invokes the unchanged check.py and frozen attachment_snapshot binary against that source. Frozen complete B/P expectations and first P identity/position binding remain unchanged.

bundle_converter.rs loads the copied entry with source_files::load_project, rejects Error-severity loader/lint diagnostics and reports warnings, verifies loaded raw text equals disk expectations, compiles its reachable bundle, refuses any changed bundle/UUID stabilization/migration, validates the Project, formats with language::format, and reparses that formatted source to require complete Project equality. Only then does it create_new the output. Engineering warnings are printed to stdout (the unchanged fixture already has model warnings); they are not confused with loader errors. Converter output is actual single-file Arcadia source, not renamed JSON or hand-flattened include text.

The wrapper snapshots all eight saved .arcadia files (entry plus seven direct modules), rejecting extra files, missing/nested includes, unsafe paths and symlink/junction/reparse entries. Destination ancestors from the supplement root are checked before creation and after processing; resolved containment is required. Original and copied bundle inventories must remain exact before/after conversion and inner comparison, except the declared converted.arcadia and state.arcadia outputs. Do not edit/save while capture is running. Source entry naming does not affect the Project oracle.

Inner receipt success alone is insufficient. Only accepted=true in bundle-receipt.json accepts the checkpoint. Outer failure permanently writes UNACCEPTED.json; any inner-created binding remains retained and unaccepted, never deleted/relearned. Future invocations refuse that marker and require an existing binding's first successful outer receipt. Receipt-write failures also attempt permanent quarantine. Retain failed directories unchanged.

Required build/admission before invocation

No compiler or executable was run to prepare these files. Parent must review and explicitly build this new auxiliary evaluator, independently from final03, then create converter-admission.json with approved=true, source_commit=17f1f89fef4a6bf520f4b09a2116548b967d030e, binary={path,bytes,sha256}, and records=[{path,bytes,sha256},...]. Records must bind converter source, wrapper, this plan, preserved admitted LLVM libunwind.dll, compiler/build command/raw logs/result, exact oa_core rlib and linked dependencies/provenance. Preserve converter and runtime in a dedicated package here; do not bind mutable target artifacts as permanent execution inputs.

Candidate compile command shape (not executed): source the existing env.ps1, then rustc --edition=2024 bundle_converter.rs --crate-name traceability_bundle_converter --extern oa_core=PRESERVED_EXACT_CORE_RLIB -L dependency=PRESERVED_DEPENDENCIES -C linker=clang.exe -o PACKAGE/bundle_converter.exe. A direct Rust executable needs the admitted LLVM runtime adjacent to it or an explicitly bound child PATH. This converter uses only oa_core and std directly; serde_json is not a new direct dependency.

Do not choose an rlib solely by timestamp: five oa_core rlibs exist in shared target. Parent must resolve the candidate using the final03 attachment_snapshot dependency/fingerprint records and source pin. .d currently names the traceability-view checkout, but that alone does not identify all binary dependencies. Preserve/hash the chosen compiler, rlib and dependencies before compilation, record exact argv/cwd/environment/output hashes, and disclose any provenance limits. Source/core tree equality to the admitted pin is necessary; this is a new auxiliary build, not a retroactive final03 result. If exact attribution cannot be established, use a separately reviewed isolated source-pinned utility build instead.

After admission and independent review:

python NATIVE_ROOT/supplement-source-bundle-v2/capture_bundle.py --expected B --checkpoint 00-baseline
python NATIVE_ROOT/supplement-source-bundle-v2/capture_bundle.py --expected P --checkpoint 01-place --calibration PRE_INPUT_CALIBRATION.json

Each checkpoint is fresh. The converter reads only its copied bundle; the frozen checker reads only converted.arcadia. Launch/capture/normal-close default working hashes attest only to the original entry, not included modules. These supplemental full inventories and source-derived Project comparisons supply full saved-bundle evidence. Native actions and closure still need separate observation. Pre/post hashes do not claim an atomic filesystem snapshot or detect transient byte changes restored before recheck.

Reviewed-runner preparation update

build_converter.py is now the concrete build-only entry point. It requires exact clean 17f1 source and the admitted environment, then runs cargo build -p oa-core --lib --locked --offline --message-format=json. It selects exactly one oa_core compiler-artifact from that checkout's Cargo.toml and the final successful build-finished message; it never chooses the newest rlib. This resolves the earlier artifact-selection uncertainty for the new supplemental build. Cargo may reuse its cache; the raw fresh flag is retained rather than inventing a rebuild claim.

It records full source inventories/configs/selected environment before and after, preserves the returned rlib, hashes all candidate dependency libraries plus Rust target libraries/compiler DLLs and linker before/after rustc, records command/stdout/stderr/exits, and produces a fresh build-NN/package converter plus admitted runtime. Library hashes are recorded; all dependency bytes are not duplicated. The helper is not executed by this runner. No converter admission is automatically approved. Parent must inspect successful results and independently review the final artifact records before writing admission.

Invocation after parent authorization: source .local/toolchain/env.ps1, set CARGO_TARGET_DIR to the repository root target, then python NATIVE_ROOT/supplement-source-bundle-v2/build_converter.py --attempt build-01. This is the planned small auxiliary build, distinct from the earlier product/evaluator gates. A failed attempt is retained and a new build number is required. Source, frozen gate records, frozen native recipes and the running GUI are not modified by the script. No GUI input should occur during this build.

Independent source review corrected a diagnostic-policy bug before any compilation: DiskProject.diagnostics contains engineering warnings as well as loading diagnostics. The converter now rejects Error severity and reports the remaining diagnostics; it still rejects any raw-byte rewrite, missing buffer, migration or stabilization. The wrapper also binds explicit converter argv/cwd and both converter/checker stdout/stderr hashes in the outer receipt.