test: account for structural index frame peak

This commit is contained in:
2026-09-24 14:46:58 -07:00
parent 1d02206c57
commit 93eb6117f9
2 changed files with 13 additions and 2 deletions
@@ -48,7 +48,11 @@ fn entire_authored_index_oa_sa_original_and_unicode_crlf() {
assert_eq!(indexed.project(), &rich_model(layer));
assert_eq!(indexed.warnings(), warnings);
assert!(std::ptr::eq(indexed.bundle(), &bundle));
assert_eq!(indexed.resolved.syntax.budget.usage, usage);
// Root plus Left/Argument(1)/Argument(1) is four structural frames.
// Index verification may raise this peak without reparsing input.
let mut expected_usage = usage;
expected_usage.deepest_frame = expected_usage.deepest_frame.max(4);
assert_eq!(indexed.resolved.syntax.budget.usage, expected_usage);
assert_eq!(indexed.resolved.syntax.budget.numeric_units(), numeric);
assert_eq!(indexed.resolved.static_limits, static_limits);
assert_eq!(indexed.resolved.static_usage, static_usage);
@@ -7,7 +7,14 @@ The first Windows strict core all-target Clippy attempt at `a18b7966` returned
101 for the test's `6 | 7 | 8` pattern (`manual_range_patterns`); all 545 source
inputs remained unchanged. Its receipt/log are preserved. The successor uses
`6..=8` with the same cases and no production change. No test body ran in that
attempt; corrected strict and runtime gates are still required.
attempt. At `1d02206c`, strict lint passes and the actual listing has 216 names.
The seven new tests initially yield six passed and one failed: the full fixture
incorrectly required the old lexical frame peak (three) to remain unchanged.
The contract explicitly permits structural depth checks to raise that peak;
root plus Left/Argument(1)/Argument(1) has four frames. Independent review
confirmed this test defect. The successor expects that exact maximum while
still comparing every other usage field, numeric work and static metadata.
Both original failures remain recorded; current-source runtime gates are pending.
The accepted contract/review are published at
`7cfdd13d3a1472e63fd34b0080b2cfc4b921b23e:harness/analysis-mixed-index-contract-20260924.md`.
Independent exhaustive fixture data and its raw-byte checker are at