54 lines
4.9 KiB
Markdown
54 lines
4.9 KiB
Markdown
# Independent correction: rich/four-file retained warnings
|
||
|
||
Initial4872141 focused evidence reports9 passes and two failing empty-warning expectations. These are evaluator errors; my precompile review also missed them. Preserve that attempt, original reviewed hash and failed assertions. This correction is derived from validator/mapper source and independently authored expected output literals, not from runtime diagnostic contents. No parser/test/compiler executed for the oracle.
|
||
|
||
## Exactly two ordered warnings
|
||
|
||
Both fixture families contain one unallocated leaf Work, ID`00000000-0000-0000-0000-000000000002`, with no same-kind child, allocation, process/chain or scenario inclusion. Rich SA additionally contains a system, so missing_system does not apply. All names are nonempty; calculations/properties do not introduce another work element; no capabilities/missions/exchanges/scenarios exist. Diagrams do not count as behavior inclusion.
|
||
|
||
`validation.rs:434–445` emits the ordinary leaf allocation warning. Then, after successful structural validation, `validation.rs:1043–1045` invokes coverage.validate. `validation/coverage.rs:65–77` emits the advisory behavior-context warning for the same ungrouped/unincluded work. This second warning must not be omitted. `validation.rs:30–33` converts its empty field argument to None. Existing `project/tests.rs:167+` independently retains both warnings for these same work-model semantics, corroborating rather than replacing this source derivation.
|
||
|
||
Expected warning array order:
|
||
|
||
| Position | code | field | exact message |
|
||
| --- | --- | --- | --- |
|
||
|0|unallocated_leaf|Some("allocation")|Allocate leaf 'Work' to a performer.|
|
||
|1|work_without_behavior_context|None|Include this leaf activity/function in a process/chain or scenario through a work action or exchange occurrence.|
|
||
|
||
Both have severityWarning, object_idSome(ID2), empty related, and the same complete ordinary Work declaration location listed below. They are not sorted alphabetically. Mapper field_span falls back to owner.span because allocation is not authored; None also uses owner.span (`mixed/project.rs:668–687`). The ordinary span includes the closing brace, but excludes following line ending. Renaming aliases does not change the warning's display-name Work.
|
||
|
||
## Exact output locations
|
||
|
||
| Expected literal family | path | span | line | column |
|
||
| --- | --- | --- | ---: | ---: |
|
||
| Rich OA LF |main.arcadia|338..403|6|1|
|
||
| Rich SA LF |main.arcadia|338..403|6|1|
|
||
| Rich OA Unicode/CRLF |main.arcadia|351..416|7|1|
|
||
| Rich SA Unicode/CRLF |main.arcadia|351..416|7|1|
|
||
| Four-file cross-family swap |b.arcadia|25..90|2|1|
|
||
|
||
Rich work line is exactly `oa_activity p "Work" id "00000000-0000-0000-0000-000000000002" {}` or the equal-length `sa_function` variant. Unicode mode prepends `// 雨\r\n` (8 UTF-8 bytes) and converts every LF toCRLF. Five preceding LF replacements plus the8-byte prefix shift the work start by13 and line by1. Four-file b begins `// f and w are comments\r\n` (25 bytes), followed by the65-byte activity declaration with aliasf, thenCRLF. Positions were independently checked by raw-byte substring arithmetic on the expected literals, not a production token scanner.
|
||
|
||
## Exact W and final O+W
|
||
|
||
First warning: code16 + field10 + message36 =62 bytes before path. Second: code29 + field0 + message112 =141 bytes before path. Each owns its own path string, even though both paths are equal.
|
||
|
||
- Rich: path12 each; W.text=(12+62)+(12+141)=227, W.entries2, occurrences0.
|
||
- Four-file: path9 each; W.text=(9+62)+(9+141)=221, W.entries2, occurrences0.
|
||
|
||
| Family | Existing actual output O | New expected final accepted O+W |
|
||
| --- | --- | --- |
|
||
| OA LF |(3,0,942)=900+42 text|(5,0,1169)|
|
||
| OA Unicode/CRLF |(3,0,985)=943+42|(5,0,1212)|
|
||
| SA LF |(3,0,1016)=974+42|(5,0,1243)|
|
||
| SA Unicode/CRLF |(3,0,1059)=1017+42|(5,0,1286)|
|
||
| Four files |(4,0,526)|(6,0,747)|
|
||
|
||
These are destination retained counts, not resolver/equality peaks. Roomy inherited policies in these tests already distinguish this content correction from a new boundary selection. No production change or cap increase is justified by empty-warning assertion failures.
|
||
|
||
## Required test correction
|
||
|
||
Replace emptiness assertions with the entire ordered two-element SourceDiagnostic array, including every owned/scalar field and exact literal locations. Update final retained counts by W above. Keep full expected bundle/model/source preservation assertions unchanged, and preserve the initial9/2 attempt. Do not merely assert warning count/code or use actual validator output to build expected warnings. A helper may construct these two independently authored records from fixed path/span/line arguments.
|
||
|
||
The first proposed one-warning correction would still be incomplete: it would omit coverage's second advisory diagnostic and undercount each destination by one entry plus153 rich/150 four-file bytes. This oracle explicitly rejects that alternative before any repair run.
|