Files
ARCADIA-Studio/harness/experiments/delete-native-f7-20260912/oracle-preparation.md
T

6.9 KiB

Native deletion oracle preparation — 2026-09-12

Owned by /root/delete_native_oracle; root owns Gitea, integration, compilation and native acceptance. Read applicable AGENTS.md, PROJECT_GOAL.md completion criteria and current harness/STATE.md. Only these two .local files were written. No Git, Gitea, compiler, formatter, Cargo, native app or Linux/WSL action occurred. The source and all self-checks below are prepared, not compiled or executed.

Source: .local/delete-native-oracle.rs; SHA256: FBC001A3C14D075FA9D5FCE90188CC06055C12B02D4C5929818AC4325FB82C5E.

The binary imports only oa_core plus std. removed BASE_ENTRY ACTUAL_ENTRY TARGET_UUID prepares exactly Command::Delete(target) from baseline, obtains the complete candidate Project and identity map, and performs the ordinary update_bundle_with_identity_map patch. Only then is actual loaded. Full Project equality and complete reachable SourceBundle equality include every field, surviving UUID, geometry, source path, comment and UTF-8 byte. same BASE ACTUAL enforces exact restoration, suitable for Undo and reopening a saved checkpoint. Input requiring migration, missing includes, discovery errors or detached discovered buffers is rejected. Source filenames must remain the same across copied checkpoints; entry rename/Save As relocation is outside this evaluator.

This is independent of the desktop dispatch/planner and does not borrow fields from produced output; it deliberately treats the verified core Delete and source updater as the semantic oracle. It does not independently prove core deletion semantics or validate screen usability, focus, selection or one-step history depth. Compare consecutive frozen before/after checkpoints; do not overwrite the baseline with native output. Unreachable arbitrary files outside the loaded bundle, profile data and JSON sidecars are outside Project/SourceBundle equality.

Prepared self-checks cover exact source/model roundtrip; no-op and wrong-object deletion rejection; unrelated rename rejection; comment and CRLF/LF byte-change rejection; missing include rejection; exact baseline restoration; activity semantic deletion versus placement-only removal; all-view placement cascade and allocation removal; lifeline cross-reference clearing; and Entry row relation deletion versus deletion of its target function.

generate NEW_DIR refuses any existing destination, uses standard language::format and compile_bundle, writes project.arcadia and a CRLF Unicode notes.arcadia, then reloads and compares both exactly. Parent directory must exist. This yields two OA architecture Allocation views with the same entity/activity and allocation, a separate unmodified activity and scenario/lifeline reference, and one SA machine/region/Ready state with a typed Entry function row. Geometry is hand-authored for a compact native smoke and needs actual UI inspection. IDs are deterministic; generator prints key IDs. Root subsequently generated compact-baseline; see correction status below.

All fixture IDs are UUID base de1e7e00-0000-4000-8000-000000000000 plus the following DECIMAL offsets (convert offset to hex in the final UUID): target activity10, untouched activity11, OA Dispatch team12, allocation13; scenario20, referring lifeline21; first view30/activity placement31/entity placement32; second view40/activity placement41/entity placement42; SA Initialize controller function50, machine51, region52, Ready state53, Entry relation54; state view60, machine placement61, region placement62, Ready placement63. Example target activity UUID is de1e7e00-0000-4000-8000-00000000000a; Entry relation is de1e7e00-0000-4000-8000-000000000036.

After root's build writer gate, initialize the established toolchain environment and identify the matching verified oa_core rlib/deps/linker, then run (placeholders must be resolved; do not select an arbitrary newest rlib):

rustc --edition 2024 -D warnings --crate-name delete_native_oracle .local/delete-native-oracle.rs --extern "oa_core=$deleteCore" -L "dependency=$deleteDeps" -C "linker=$deleteLinker" -o .local/native-qa/delete-native-oracle.exe
& .local/native-qa/delete-native-oracle.exe self-check
& .local/native-qa/delete-native-oracle.exe generate .local/native-qa/delete-20260912/compact-baseline
& .local/native-qa/delete-native-oracle.exe same BASE_ENTRY UNDO_ENTRY
& .local/native-qa/delete-native-oracle.exe removed BASE_ENTRY DELETED_ENTRY TARGET_UUID
& .local/native-qa/delete-native-oracle.exe same DELETED_ENTRY REDO_ENTRY

Root must preserve generated compact-baseline before opening a separate working copy. Existing prepared scenario/process fixtures can be used immediately with removed/same after compilation. Record source/rlib/executable SHA256 and actual command results before claiming acceptance. No corrected-revision runtime pass is claimed here.

Disk admission correction

Root reports the prior source revision compiled with warnings denied and passed its in-memory self-check against full425 core artifact SHA prefix145180. Generator wrote .local/native-qa/delete-20260912/compact-baseline, then failed its reload because the checker incorrectly required an empty diagnostics list. Core legitimately reports model-completeness Warning diagnostics (missing_system, unallocated_leaf, empty_sequence). This was an oracle-policy defect, not failed model/source generation.

Corrected source SHA256: FBC001A3C14D075FA9D5FCE90188CC06055C12B02D4C5929818AC4325FB82C5E. The corrected revision has not been compiled or executed by this worker. Existing compact-baseline files were not touched.

try_load now rejects every Severity::Error from disk source discovery, reports every admitted non-error diagnostic on stderr, and retains full compile_bundle admission, no-migration/no-normalization byte equality, validate_candidate, and rejection of detached/invalid discovered buffers. There is no diagnostic-code allowlist and no error suppression. Model-completeness warnings therefore remain visible while allowing exactly the model/source admissibility supported by the core APIs. load propagates contextual rejection through the existing fatal checker behavior.

The self-check now also writes the deterministic fixture into a new PID+timestamp directory under the process temporary directory. It requires at least one Warning to prove the regression is exercised, reloads and compares the complete Project/SourceBundle, removes the included notes file and requires rejection, restores it and writes malformed entry syntax and requires rejection, then removes only its exact owned files and empty directory. No existing fixture is modified or recursively removed. A failed assertion can leave the unique directory for diagnosis. Disk self-checks are prepared, not executed. Recompile and run self-check; validate existing immutable compact-baseline with same <compact-baseline/project.arcadia> <compact-baseline/project.arcadia> rather than rerunning generate into the existing directory.