Correct CLI migration test expectations for source8
This commit is contained in:
@@ -7,7 +7,7 @@ use std::{
|
||||
collections::BTreeMap,
|
||||
fs,
|
||||
path::{Path, PathBuf},
|
||||
process::{Command, Output},
|
||||
process::{Command as ProcessCommand, Output},
|
||||
};
|
||||
#[path = "../../oa-core/src/language/analysis_source/model_oracle.rs"]
|
||||
mod independent_model;
|
||||
@@ -65,7 +65,7 @@ impl Fixture {
|
||||
}
|
||||
fn run(&self, options: &[&str]) -> Output {
|
||||
let before = self.inventory();
|
||||
let result = Command::new(env!("CARGO_BIN_EXE_arcadia"))
|
||||
let result = ProcessCommand::new(env!("CARGO_BIN_EXE_arcadia"))
|
||||
.arg("check-mixed")
|
||||
.arg(self.entry())
|
||||
.args(options)
|
||||
@@ -473,7 +473,7 @@ fn mixed_cli_direct_disk_error_uses_existing_operation_error_envelope() {
|
||||
f.put(".arcadia-save-reserved.arcadia", document(""));
|
||||
let before = f.inventory();
|
||||
let entry = f.0.join(".arcadia-save-reserved.arcadia");
|
||||
let output = Command::new(env!("CARGO_BIN_EXE_arcadia"))
|
||||
let output = ProcessCommand::new(env!("CARGO_BIN_EXE_arcadia"))
|
||||
.arg("check-mixed")
|
||||
.arg(&entry)
|
||||
.arg("--json")
|
||||
|
||||
@@ -69,6 +69,8 @@ fn complete_alarm_example_preview_then_write_and_fixed_point() {
|
||||
let source = include_str!(
|
||||
"../../../harness/experiments/textual-authoring-20260911/alarm-response.arcadia"
|
||||
);
|
||||
assert!(source.starts_with("arcadia 7;"));
|
||||
let migrated_source = source.replacen("arcadia 7;", "arcadia 8;", 1);
|
||||
fixture.put("project.arcadia", source);
|
||||
let (code, check) = fixture.cli(&["check"]);
|
||||
assert_eq!(code, 0);
|
||||
@@ -76,6 +78,8 @@ fn complete_alarm_example_preview_then_write_and_fixed_point() {
|
||||
let (code, preview) = fixture.cli(&["stabilize"]);
|
||||
assert_eq!(code, 0);
|
||||
assert_eq!(preview["identities_to_stabilize"], 40);
|
||||
assert_eq!(preview["migration"]["from_schema"], 7);
|
||||
assert_eq!(preview["migration"]["to_schema"], 8);
|
||||
assert_eq!(preview["status"], "preview");
|
||||
assert_eq!(fixture.read("project.arcadia"), source);
|
||||
assert!(
|
||||
@@ -94,7 +98,10 @@ fn complete_alarm_example_preview_then_write_and_fixed_point() {
|
||||
for (id, _) in project.identities() {
|
||||
stripped = stripped.replace(&format!(" id \"{id}\""), "");
|
||||
}
|
||||
assert_eq!(stripped, source, "only identity clauses may be inserted");
|
||||
assert_eq!(
|
||||
stripped, migrated_source,
|
||||
"only identity clauses and the schema 7→8 header token may change"
|
||||
);
|
||||
let (code, again) = fixture.cli(&["stabilize", "--write"]);
|
||||
assert_eq!(code, 0);
|
||||
assert_eq!(again["changes"], serde_json::json!([]));
|
||||
@@ -306,9 +313,9 @@ fn rename_shows_missing_identity_and_separate_source_migration() {
|
||||
let report = candidate.report();
|
||||
assert_eq!(report.identities_to_stabilize, 2);
|
||||
assert_eq!(report.migration.as_ref().unwrap().from_schema, 5);
|
||||
assert_eq!(report.migration.as_ref().unwrap().to_schema, 7);
|
||||
assert_eq!(report.migration.as_ref().unwrap().to_schema, 8);
|
||||
assert!(report.changes[0].diff.contains("-arcadia 5;"));
|
||||
assert!(report.changes[0].diff.contains("+arcadia 7;"));
|
||||
assert!(report.changes[0].diff.contains("+arcadia 8;"));
|
||||
assert!(report.changes[0].after.contains("oa_entity crew"));
|
||||
assert_eq!(fixture.read("project.arcadia"), old);
|
||||
assert_eq!(candidate.write().exit_code, 0);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# 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; no
|
||||
runtime claim is made by this note.
|
||||
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
|
||||
@@ -35,3 +35,31 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user