Files
ARCADIA-Studio/harness/analysis-mixed-index-implementation-20260924.md
T

64 lines
4.1 KiB
Markdown

# Private mixed typed occurrence index
Source checkpoint on `codex/analysis-mixed-index-956atf-20260924`, based on
`aaec78fcc9b273d1485497126392afdd1fb2e54e`. This records implemented structure;
compilation and runtime acceptance have not yet occurred at this checkpoint.
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. 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
`ae6df4fa1f103ff9b14963731b2edd84e38738b1:harness/analysis-mixed-index-20260924/`.
`ResolvedMixedProject::index` consumes the sealed complete-Project witness.
`IndexedMixedProject` owns it and shared `IndexData`; read-only methods expose
the Project, warnings, original bundle/canonical files, names and typed maps.
It has no conversion to the legacy numeric-source Index or its updater. The
constructor-only adapter keeps its file table private, so shared verification
does not accept caller-fabricated mixed source/token ownership.
Shared verification preserves original token, owner, structural child-path,
qualified call-label and physical occurrence checks. Mixed catalog construction
streams complete Project globals and scoped parameters once. It does not
reparse, relower, duplicate model records or repeat admission. Ordinary globals
are names/targets here; ordinary source occurrences are not indexed by this view.
Complete non-expression occurrence emission remains the sealed lowerer's
invariant, checked by an independent exhaustive output oracle.
Mixed allocations reserve against the retained aggregate ledger before growth.
New map/vector/set/Path entries charge entry slots; retained raw lowerer
occurrences keep occurrence slots. New names charge copied UTF-8 bytes. Owner
and physical-token scratch drop after occurrence checks; path/call scratch drop
before syntax-edge traversal. Shared Path nodes remain retained while map keys
own them. Legacy typed-only construction retains its original local policy.
Precompile independent review found stale diagnostic file attribution in two
late verification loops and unsafe fallback for invalid file/UTF-8 spans. The
source now updates attribution for each checked record and maps invalid
locations explicitly to a safe start span, retaining a valid file when known.
Regression cases are authored; no passing runtime result is implied.
Seven new tests cover complete OA/SA names/maps/model and Unicode/CRLF variants,
qualified corruption cases, inherited-plus-new storage and copied-name byte
boundaries, original provenance/admission metadata, and small-stack success and
late rejection. Existing rich fixture/model construction is factored without
removing its original full arena test. Actual test inventory, strict core lint,
focused checks, full private-library dispositions and formatting still require
current-source execution. Prior private source8 failures are not suppressed.
The working agreement is synchronized to current main blob
`e76647f49913b314e1543c4464f6199533909bae`. This source remains separate from the
Windows prerelease. Public source8, ordinary occurrence composition, source
updates/output admission, migration, checked save/history, GUI and API parity
remain required subsequent work.