]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - docs/slice-14-validation.md
feat(xtm): support resource references on name variants
[topic-maps.git] / docs / slice-14-validation.md
1 # Slice 14 — Variants: acceptance evidence
2
3 Branch: `codex/ctm-slice-14`. Parent/base:
4 `aeb017e4f4846f2e6a701e581d20eef84a8b83d9` (Slice 13).
5 The checkout and index were clean before creating the branch. No HyperDoc
6 repository, image, View or Work Topic was modified.
7
8 ## Executed final validation
9
10 ```sh
11 python3 scripts/validate-slice-14.py \
12 --sbcl /nix/store/hlsiblxpxr1hax3dw9x8znd6zy097ddj-sbcl-2.5.4/bin/sbcl
13 ```
14
15 The script invokes the existing `scripts/test.sh` in a new SBCL 2.5.4 process
16 under `/usr/bin/sandbox-exec -p '(version 1)(allow default)(deny network*)'`.
17 No network, server, HyperDoc, relocation, alternate SBCL or cache-management
18 work was used. Output files are execution evidence, not new upstream baselines.
19
20 Final result: **9,246 Lisp checks PASS**, zero assertion failures:
21
22 | Suite | Passed |
23 |---|---:|
24 | Foundation | 54 |
25 | Identity | 123 |
26 | Topic merging | 646 |
27 | Associations/Roles | 657 |
28 | Retained CXTM checks | 445 |
29 | Occurrences | 1,101 |
30 | Prefixes/datatypes | 150 |
31 | Integers | 665 |
32 | Decimals | 715 |
33 | Dates | 1,806 |
34 | DateTime | 217 |
35 | Timezone | 1,944 |
36 | Typed Names | 106 |
37 | Scope | 293 |
38 | Variants | 324 |
39
40 The two retained Python infrastructure fixtures, corpus integrity verification,
41 all existing independent report checkers, the new Variant JSON/XML checker and
42 16,294 independent NFC oracle comparisons also passed. The reading document's
43 Lisp inspection example ran successfully in a separate fresh offline process.
44
45 Machine-readable execution context, exact commands/times, source hashes, suite
46 totals, protected-corpus checks and artifact hashes are in
47 `reports/slice-14/execution.json`; full output is `tests.log` in that directory.
48 The tested revision is the stated base plus the hashed source changes, later
49 committed together with this evidence. No permanent Lisp object addresses are
50 claimed by the report ordinals.
51
52 ## Actual new original contracts
53
54 | Case | Result | Actual CXTM bytes |
55 |---|---|---:|
56 | `ctm/in/variant.ctm` | PASS, byte-exact | 592 |
57 | `ctm/in/variants.ctm` | PASS, byte-exact | 857 |
58 | `ctm/in/variant-duplicate.ctm` | PASS, byte-exact | 592 |
59 | `ctm/invalid/variant-no-scope.ctm` | PASS, specific CTM rejection | — |
60
61 The negative condition is exactly `CTM-REJECTION`, code
62 `:EXPECTED-VARIANT-SCOPE`, character offset 28, line 3, column 22.
63
64 Only those four imported statuses changed from NOT-RUN to PASS. Full corpus:
65 **71 PASS = 62 exact positive CXTM contracts + 9 specific rejections;
66 2 FAIL; 0 recorded UNSUPPORTED; 200 NOT-RUN**. Unsupported diagnostic probes do
67 not promote the unexecuted contracts. The previous 61 executed CXTM outputs and
68 outcomes compare exactly to Slice 13's evidence. Corpus/reference files remain
69 byte-identical; the pin is `cd165b150176c1d6842b37be9cc9051b40d4996b`.
70
71 The two FAILs remain `occurrence-datetime2.ctm` (leap-second baseline) and
72 `occurrence-datetime-timezone2.ctm` (timezone baseline). A green regression suite
73 does not convert those documented normative discrepancies into PASS.
74
75 ## Model and merge evidence
76
77 `variants.json` records source text, Document IRI, actual Topic identity
78 properties, Name Parent/Type/Scope references and Variant Value/Datatype/Scope
79 with direct and stored Parent checks. Python independently compares these
80 objects, by their identity-property sets, with the unchanged baselines.
81
82 Direct Lisp tests prove:
83
84 - Name-to-Variant containment, actual same-map Theme objects, unordered Scope
85 equality and defensive copies; invalid arguments leave the model unchanged.
86 - Explicit CTM Scope is unioned with nonempty Parent Scope; a nonempty written
87 Scope that contributes no additional theme is rejected.
88 - Value/Datatype/Scope/Parent equality, duplicate replacement and retained
89 canonical Variant handles. Qualified lexical values remain stored unchanged.
90 - Parent-Topic, Name-Type and Name-Scope merges union Name children and replace
91 stored Variant Parent references. Subsequent Variant duplicates merge.
92 - Theme merges update actual Scope references and can merge Variants. Scope
93 cardinality may shrink while proper containment remains true.
94 - Explicit, II-, SI- and SL-triggered merges that would destroy proper
95 containment are refused before changing identifiers, objects or forward links.
96 A separate transitive normalization test checks full-closure preflight.
97 - 120 Variant construction orders produce the same CXTM, with independent XML
98 checks of Value/Datatype/Scope ordering, numbering and reference integrity.
99 Serialization leaves current objects and retained handles unchanged.
100
101 ## Boundaries
102
103 Normative sources and exact clauses are in `docs/reading-variants.md`: TMDM
104 §§5.4–5.5/6.1–6.4; CTM §§3.4.1/3.11–3.12; CXTM §§3.6–3.7/3.12–3.21/4.2–4.8.
105 Atomic rejection of an incompatible merge is the documented local API policy
106 preserving the proper-superset invariant, not a normative recovery algorithm.
107
108 Variant Reification and explicit Variant Item Identifiers are not implemented.
109 Reifier remains null and identifiers empty. Embedded Topics, Templates, CTM `*`,
110 cross-document merging and previously excluded datatype/calendar contexts remain
111 unsupported. The reifier/embedded/template original contracts stay NOT-RUN.
112 No extra features were added to improve imported counts. No Slice 15 was started.