]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - docs/slice-12a-validation.md
test: prove CTM/XTM anyType equivalence (slice 22T)
[topic-maps.git] / docs / slice-12a-validation.md
1 # Slice 12A — validation and acceptance evidence
2
3 Base: `6a2f8446afca0915882f0d4a06cb891ccfcdc96d`.
4 Branch: `codex/ctm-slice-12a`.
5
6 ## Change
7
8 The public `topic-maps.tmdm:add-name` accepts an optional `:type` Topic.
9 `add-default-name` delegates without that keyword. The reader uses its existing
10 identity resolver for local, IRI, QName, explicit Item Identifier and Subject
11 Locator type references. No new identity model or information-item class.
12 The existing Name merging and CXTM implementation remain unchanged.
13
14 Normative references and actual inputs/properties are in
15 `docs/reading-typed-topic-names.md`: CTM 3.11 and its Topic-reference rules;
16 TMDM 5.4, 6.2 and 6.3; CXTM 3.6 and 4.7. TMDM 6.4 is reviewed but does not
17 apply to this no-Variants subset.
18
19 ## Executed validation
20
21 The full existing Slice 0–11 suite plus the new typed-name tests ran offline,
22 in a fresh SBCL 2.5.4 process in the primary checkout. Network operations were
23 denied by `sandbox-exec`. No extra SBCL-version run, checkout relocation or
24 FASL-cache management was performed for this slice.
25
26 | Group | Passed assertions |
27 | --- | ---: |
28 | Infrastructure | 54 |
29 | Identity | 123 |
30 | Topic/Name merging | 646 |
31 | Associations/Roles | 657 |
32 | Retained CXTM | 445 |
33 | Occurrences | 1101 |
34 | Prefixes/datatypes | 150 |
35 | Integer | 665 |
36 | Decimal | 715 |
37 | Date | 1806 |
38 | DateTime | 217 |
39 | DateTime timezone | 1944 |
40 | Explicitly typed Names | 106 |
41 | **Total** | **8629** |
42
43 The 106 new assertions cover object identity, no unnecessary default Topic,
44 identity-category resolution, malformed input diagnostics/source positions,
45 undefined prefixes, different types for equal text, Type identity merging,
46 Parent/Type merge orders, retained Name and Topic handles, foreign/NIL types,
47 mutation-free refusal, self-typing, canonical sorting and pure serialization.
48 Previously valid-but-unsupported typed-name assertions were adapted; missing
49 name values remain specific CTM-REJECTIONs. The retained identity/prefix groups
50 keep their assertion counts and original model observations.
51
52 The Python checks independently decode all reports, verify original bytes,
53 model-property observations and XML reference integrity. Existing independent
54 numeric/calendar/Unicode checks also pass. The documented DESCRIBE example was
55 executed separately in a fresh, offline SBCL process and passed.
56
57 | Selected original contract | Byte-exact CXTM |
58 | --- | --- |
59 | `ctm/in/name.ctm` | PASS |
60 | `ctm/in/name2.ctm` | PASS |
61 | `ctm/in/name-type.ctm` | PASS |
62 | `ctm/in/name-duplicate.ctm` | PASS |
63
64 There are 56 positive byte-exact contracts, 8 specific negative PASS contracts,
65 2 known positive baseline-discrepancy FAILs, 0 UNSUPPORTED and 207 NOT-RUN.
66 Only `name-type.ctm` and `name2.ctm` transition from NOT-RUN to PASS. All 56
67 previously executed CXTM outputs are unchanged, including both FAIL outputs.
68 The protected corpus and reference files are byte-identical before/after.
69
70 `reports/slice-12a/execution.json` records runtime, UTC timestamps, exact
71 command, executed-source SHA256 values and artifact hashes. It identifies the
72 base plus the tested working source hashes; it does not pretend the precommit
73 execution took place at a future commit. `typed-names.json` contains actual
74 model observations; `cxtm.json` separately records actual/expected canonical
75 bytes and contract outcomes. `tests.log` and `describe.log` are execution logs.
76
77 ## Reproduction
78
79 From the repository root, use the existing development SBCL:
80
81 ```sh
82 PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate-slice-12a.py --sbcl "$(command -v sbcl)" --output /private/tmp/ctm-12a-review
83 ```
84
85 The recorded execution used:
86
87 ```sh
88 PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate-slice-12a.py --sbcl /nix/store/hlsiblxpxr1hax3dw9x8znd6zy097ddj-sbcl-2.5.4/bin/sbcl
89 ```
90
91 For only the existing full regression entry point and its independent checks:
92
93 ```sh
94 /usr/bin/sandbox-exec -p '(version 1)(allow default)(deny network*)' /usr/bin/env PYTHONDONTWRITEBYTECODE=1 SBCL="$(command -v sbcl)" TOPIC_MAPS_REPORT=/private/tmp/ctm-12a-report.json ./scripts/test.sh
95 ```
96
97 ## Limits
98
99 No Embedded Topics, Scope, Reification, Variants, Templates, cross-map merging
100 or HyperDoc integration. The two DateTime baseline conflicts are preserved,
101 not counted as successful canonical comparisons. No additional conformance
102 cases are promoted merely on the basis of earlier exploratory byte equality.