6.2 KiB
Independent unnamed-project warning oracle
Authored from existing mapper/catalog/index/emission logic at2941713 (relevant behavior unchanged from97a8703), not parser or runtime output. This is a prospective acceptance evaluator, not a passing execution claim. Literal-only Python checked lengths, hashes and offsets; no compiler/parser/binary ran.
Exact original and output
Single file/entry main.arcadia (12 UTF-8 bytes each). Original71-byte source, including final LF:
arcadia 8;
project p "" id "00000000-0000-0000-0000-000000000001" {
}
Original SHA256 68b9215285d622c77b46df105839f65c40fb76f2ba7c55a6a9cbbc1fc4576146. Rename only project aliasp→next; physical original alias span19..20. Output74-byte literal:
arcadia 8;
project next "" id "00000000-0000-0000-0000-000000000001" {
}
Output SHA256 dbde19f06d6bde26c16b4672dcc43036dec693fb04ebc23de76e4faa369dd81f. O=(entries1, occurrences0, text98), since74+12+12=98. Exact inherited entries18 and bytes161 are the proposed unchanged positive policy; bytes160 is the proposed late-refusal sibling, with all other limits roomy and unchanged throughout each pipeline. Original parsing must be the supported legacy uncarried route because changed emission rejects carried syntax.
Complete expected Project and warning
Actual accepted Project must have schema_version8, UUID00000000-0000-0000-0000-000000000001, aliasnext, name"", description"", and all six maps empty: definitions, elements, relations, diagrams, artifact_links, traces. Original Project differs only in aliasp. No expressions or lowered occurrences exist, so E_actual=0 for equality.
Exactly one mapped diagnostic is expected:
- path
main.arcadia; related empty; - severityWarning; code
unnamed; object_idSome(ID1); fieldSome(name); - message
Give the project a descriptive name.(36 bytes); - output span11..69, line2, column1.
validation.rs:325–333 emits that warning for empty trimmed project name. project.rs:666+ falls back to the project header for the name field; empty name does not manufacture a field span. Header start11 is unchanged, opening brace69 ends the output header. Original warning instead spans11..66. The returned warning must be the output warning, not one moved from original admission.
Current mapper project.rs:594–649 makes W=(entries1, occurrences0, text59): path12 + code7 + field4 + message36. Scalar span/UUID/severity/line/column add no string bytes. Final accepted O+W=(2,0,157). Model payload remains the established excluded domain; this is not its physical memory size.
Verification peak, with catalog lifetime
Output U1/M11/T4: one project syntax event, F1+ten significant tokens, aliasnext4 and empty name/description. Work bytes74, raw tokens19, references0, numeric units0. Combined retained syntax is entries13/text102=O98+T4. Scanner temporary36 fits134; grammar project UUID temporary36 overlaps alias4, requiring138. No ordinary positions, value maps or typed syntax exist.
Catalog creation reserves alias/owner2 entries with alias4 text, then table2 entries with another alias4 (project.rs:240–325). Its peak is entries17/text110. project.rs:521–524 drops aliases before lowering; 557–560 drops tables before warning mapping. Thus neither extra alias copy remains at the warning reservation. The owner table remains one entry, no text, through mapping, and drops afterward (655).
Immediately before warning mapping: entries14=syntax13+owner1, text102. The mapped warning reserve adds1/59, reaching entries15/text161. At bytes160 the exact refusal is Source8 index/output byte limit exceeded., codeinvalid_source, pathmain.arcadia, span11..69, line2column1, no related diagnostics. This typed mapper failure preserves the full header span; it is not the ordinary parser's one-byte transport. Bytes161 admits this reservation. Owner table then drops, leaving resolver entries14/text161 =O + U/M/T + W. EqualityE0 adds nothing. After syntax drops, retained accepted inventory is entries2/text157.
The final O+W check is not itself the161-byte peak and must not be called the site of160 refusal. It rechecks the smaller eventual retained subset. The intended negative occurs before warning destination allocation while original output-owned C is still live.
Original predecessor clearance under the same policy
Original uncarried syntax has U1/M11/T1. Its name is empty; original mapped warning has the same59-byte string inventory. Catalog peaks at syntax12+4=16 entries and text3; at warning mapping it retains syntax12+owner1+warning1=14 entries/text60. Owner release leaves13 entries/text60. Typed index adds one retained global-name entry/text1, giving14/text61. Ordinary authored index adds one header occurrence entry; its one-global reverse map is temporary, so final authored state15/text61. No expression/occurrence/field work adds another slot.
Plan stores one changed-name entry and one physical edit entry; replacements borrow desired and add no owned text. Its final state is17 entries/text61. Collision-check one-element namespace occurs before the edit exists, so it does not exceed17. E0 adds no equality scratch. Old emitted-output overlap is17+O1=18 entries and61+98=159 text. Both bytes160 and161 therefore clear old parser/resolver/index/plan/emission; source/output byte lengths71/74 also fit. Emission drops old owner/warning before verification, so the old59 warning bytes do not coexist with the new warning map.
This derivation agrees with the existing named empty emission envelope after removing seven old name bytes and adding one59-byte/one-entry original warning. It is nevertheless an independently traceable source calculation, not a runtime result. Do not introduce a default policy, a newly tightened pending owner, or a borrowed numeric baseline to make the negative pass earlier stages.
Expected real end-to-end distinction: identical entries18 and other policies, bytes161 succeeds with exact output/Project/warning/O+W; bytes160 reaches actual-output warning mapping and refuses there. If runtime rejects earlier, investigate actual source/lifetime/count differences rather than changing the oracle from observed output. Additional copy/reservation introduced by the future acceptance implementation must be disclosed and independently justified before claiming this cap.