test(source): distinguish ordinary eight admission from typed refusal

This commit is contained in:
2026-09-24 20:43:40 -07:00
parent 520e50ce62
commit 0c07f53ab5
5 changed files with 59 additions and 8 deletions
@@ -380,7 +380,7 @@ fn missing_id_metadata_is_stable_and_parameter_ids_are_owner_scoped() {
}
#[test]
fn inherited_version_root_and_short_word_contracts_do_not_enable_public8() {
fn inherited_version_root_and_short_word_contracts_do_not_enable_public_typed8() {
let source = "oa_check c \"C\" { predicate unbound; }";
for version in [1, 2, 3, 4, 5, 6, 7, 9] {
let mut budget = budget();
@@ -431,8 +431,12 @@ fn inherited_version_root_and_short_word_contracts_do_not_enable_public8() {
let contextual =
declaration("calculation unit \"C\" { input and : Number; result Number; body $and; }");
assert_eq!(contextual.header.alias.name, "unit");
assert!(crate::language::parse("arcadia 8; project p \"P\" {}").is_err());
for version in 3..=7 {
let ordinary = crate::language::parse_with_report("arcadia 8; project p \"P\" {}").unwrap();
assert!(ordinary.migration.is_none());
assert_eq!(ordinary.project.schema_version, 8);
assert_eq!(ordinary.project.alias, "p");
assert_eq!(ordinary.project.name, "P");
for version in 3..=8 {
assert!(
crate::language::parse(&format!(
"arcadia {version}; project p \"P\" {{ {source} }}"
@@ -96,7 +96,16 @@ fn staged_oa_and_sa_lowering_match_complete_independent_17_uuid_oracles() {
assert_eq!(actual, expected);
admit(&actual); // the complete model's one semantic admission
}
assert!(crate::language::parse(&ORDINARY_OA.replacen("arcadia 7", "arcadia 8", 1)).is_err());
for (ordinary_source, typed_source) in [(ORDINARY_OA, OA), (ORDINARY_SA, SA)] {
let current = ordinary_source.replacen("arcadia 7", "arcadia 8", 1);
let decoded = crate::language::parse_with_report(&current).unwrap();
assert!(decoded.migration.is_none());
assert_eq!(decoded.project, ordinary(ordinary_source));
assert!(
crate::language::parse(&format!("arcadia 8; project p \"P\" {{ {typed_source} }}"))
.is_err()
);
}
}
#[test]
@@ -522,8 +522,18 @@ fn partial_wide_and_deep_input_cleanup_does_not_poison_a_fresh_parse() {
}
#[test]
fn public_source_headers_and_existing_numeric_token_controls_are_unchanged() {
assert!(crate::language::parse("arcadia 8; project p \"P\" {}").is_err());
fn public_ordinary_source8_preserves_typed_refusal_and_numeric_controls() {
let ordinary = crate::language::parse_with_report("arcadia 8; project p \"P\" {}").unwrap();
assert!(ordinary.migration.is_none());
assert_eq!(ordinary.project.schema_version, 8);
assert_eq!(ordinary.project.alias, "p");
assert_eq!(ordinary.project.name, "P");
assert!(
crate::language::parse(
"arcadia 8; project p \"P\" { calculation c \"C\" { result Number; body 1; } }"
)
.is_err()
);
for accepted in ["-1.5", "1e-2", "0", "-0"] {
let tokens = crate::language::tokenize(accepted);
assert_eq!(tokens.len(), 1);
@@ -133,6 +133,16 @@ fn typed_oa_sa_canonical_roundtrips_match_independent_projects() {
);
}
let text = canonical(&expected);
let ordinary8 = ordinary_source.replacen("arcadia 7", "arcadia 8", 1);
let ordinary_decoded = crate::language::parse_with_report(&ordinary8).unwrap();
assert!(ordinary_decoded.migration.is_none());
assert_eq!(
ordinary_decoded.project,
crate::language::parse(ordinary_source).unwrap()
);
assert!(
crate::language::parse(&format!("arcadia 8; project p \"P\" {{ {text} }}")).is_err()
);
let actual = parse_typed(crate::language::parse(ordinary_source).unwrap(), &text);
assert_eq!(actual, expected);
a::admit(&actual, a::AdmissionLimits::REFERENCE).unwrap();
@@ -147,7 +157,6 @@ fn typed_oa_sa_canonical_roundtrips_match_independent_projects() {
assert!(text.contains(&format!("{prefix}_{word} ")));
}
}
assert!(crate::language::parse("arcadia 8; project p \"P\" {}").is_err());
}
#[test]
@@ -64,3 +64,22 @@ review also identified the actual short case spellings oa_analysis/sa_analysis;
both now appear in the ordinary refusal table alongside the invalid case aliases.
Production and the other evaluators are unchanged. These corrections are not a
runtime pass claim; the initial five-pass/one-failure record remains preserved.
## Obsolete private header assertions after full execution
Parent's full run at 520e50ce completed 298 tests: 294 passed and four failed.
All 16 previously header-masked ordinary workflows passed. The four failures
were private analysis tests that still expected an empty ordinary schema8
project to be rejected. The scoped repair accepts ordinary8 with no migration,
compares complete ordinary OA/SA projects where the existing fixed-ID fixtures
provide that oracle, and explicitly embeds actual typed source or canonical
text in schema8 to preserve public typed refusal. Declaration refusal coverage
now includes versions3 through8. Existing numeric/lowering/model assertions stay.
Only these evaluator names change:
- inherited_version_root_and_short_word_contracts_do_not_enable_public8 ->
inherited_version_root_and_short_word_contracts_do_not_enable_public_typed8
- public_source_headers_and_existing_numeric_token_controls_are_unchanged ->
public_ordinary_source8_preserves_typed_refusal_and_numeric_controls
Production is unchanged. The initial 294-pass/four-failure evidence remains;
repaired outcomes require the parent's next runtime gate.