Files
ARCADIA-Studio/harness/analysis-mixed-cli-interface-20260925.md
T

66 lines
4.1 KiB
Markdown

# Mixed CLI read interface
Implements the selected `harness/analysis-mixed-cli-contract-20260925.md` contract
in the integration owner's root records. Local implementation checkpoint;
initial execution evidence and remaining acceptance boundaries are recorded below.
`oa_cli::check_mixed(&Path) -> Report` loads `MixedSourceSnapshot`, checks its
borrowed original bundle only when discovery diagnostics are empty, and copies
only returned diagnostics into the existing format-1 report. It never constructs
`Prepared`, compiles ordinary source, stabilizes identities, migrates or saves.
The closed `Dispatch` enum separates `CheckMixed` from `Editable { operation,
write }`; `Operation` and `prepare` retain their existing ordinary semantics.
Reports preserve input locations and explicit object IDs. Successful warnings
are retained. Source errors use `invalid`/1, loader missing/path/journal diagnostic
refusals use `invalid`/3, and direct `SourceFileError` retains the existing
`rejected`/3 mapping. Fixed fields are empty changes/notes, false written, zero
identity stabilization, and null migration. Human output names a mixed source8
check, with no edit-candidate summary. `--write`, unknown/repeated options and
wrong arity cannot enter either loader or preparation through mixed dispatch.
Six external `mixed_cli` tests execute the real Cargo-provided binary. The rich
OA/SA fixtures reuse previously authored ordinary/typed literals and independently
constructed public model values, with an explicit SA System, reordered call
labels, escaped include paths, decoy include comments, Unicode and LF/CRLF.
Their complete returned models and four ordered leaf warnings are checked before
complete CLI report comparison. The four warnings represent two leaf declarations
(allocation then coverage); they do not replace the earlier one-leaf oracle.
Other cases cover all four missing-UUID classes, schema refusal, cross-file
semantic failure, missing/cyclic/escaping includes, invalid UTF-8, pending journal,
reserved root, human output and option refusal. Each subprocess compares complete
file bytes and directory inventory before/after, including unrelated files.
Platform-specific OS missing-file text is obtained from an independent filesystem
metadata error; no parser, formatter or CLI output generates expected reports.
The parent owns compilation/runtime acceptance. This source note does not imply
Linux coverage, full mixed editing, GUI adoption or an atomic disk snapshot.
## Initial execution and narrow test corrections
Parent-run source `f2324822936374c5b9092518b986375233dc7882` passed all five
`mixed_source_files` external tests and all six `mixed_cli` executable tests.
The mixed test import nevertheless produced `hidden_glob_reexports` because
`std::process::Command` shadowed the public core `Command` re-export used by the
independent model helper. The local name is now `ProcessCommand`; behavior and
expectations are unchanged.
The initial existing `source_cli` suite completed 10 passes and two failures:
`complete_alarm_example_preview_then_write_and_fixed_point` compared the whole
ID-stripped output against an unchanged schema7 header, and
`rename_shows_missing_identity_and_separate_source_migration` expected target
schema7. Ordinary source has already selected schema8. The correction preserves
the original alarm fixture, explicitly asserts its schema7 prefix and compares
all stripped bytes against exactly one header-token replacement to schema8.
It also asserts the preview's 7→8 migration report. The 40 identities, unchanged
preview, complete saved text and repeated-save fixed-point assertions remain.
The rename fixture still originates at schema5; only its expected migration
target and added diff line change to schema8. No production changes accompany
these evaluator corrections.
Original logs/receipts remain under the integration owner's
`.local/analysis-mixed-cli-gates-20260925/`, including
`mixed-cli-integration-suite-source_cli-f232482-1.*`. This records actual initial
failures rather than claiming they passed; corrected-source reruns and final
acceptance remain the parent's responsibility.