]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - docs/slice-15-validation.md
Support arbitrary absolute XTM resourceData datatypes (Slice 22D)
[topic-maps.git] / docs / slice-15-validation.md
1 # Slice 15 — Wildcards and Embedded Topics: validation
2
3 Branch `codex/ctm-slice-15`, base/parent
4 `4f7b4d26d40f8f5566594aa2e3ad6296d44fc4c3`. The starting index and working tree
5 were clean. Implementation, tests, documentation and execution evidence are
6 committed together. No HyperDoc repository or persistent Lisp image was changed.
7
8 ## Reproduction and final result
9
10 ```sh
11 python3 scripts/validate-slice-15.py \
12 --sbcl /nix/store/hlsiblxpxr1hax3dw9x8znd6zy097ddj-sbcl-2.5.4/bin/sbcl
13 ```
14
15 The validator runs `scripts/test.sh` in fresh SBCL 2.5.4 under
16 `/usr/bin/sandbox-exec -p '(version 1)(allow default)(deny network*)'`.
17 The exact subprocess command, runtime, times, source hashes and evidence hashes
18 are recorded in `reports/slice-15/execution.json`. Full output is `tests.log`.
19 The validated source is the base plus the recorded hashes, subsequently committed
20 together. No extra SBCL version, checkout relocation or cache-management work was
21 performed. No server or network access was used.
22
23 Final complete regression: **9,484 Lisp checks PASS, zero assertion failures**.
24
25 | Suite | Passed |
26 |---|---:|
27 | Foundation | 54 |
28 | Identity | 123 |
29 | Topic merging | 646 |
30 | Associations/Roles | 657 |
31 | Retained CXTM checks | 445 |
32 | Occurrences | 1,101 |
33 | Prefix/datatypes | 150 |
34 | Integers | 665 |
35 | Decimals | 715 |
36 | Dates | 1,806 |
37 | DateTime | 217 |
38 | Timezone | 1,944 |
39 | Typed Names | 106 |
40 | Scope | 293 |
41 | Variants | 324 |
42 | Topic references | 238 |
43
44 The two Python infrastructure fixtures, complete pinned corpus integrity check,
45 all retained independent report checkers, the new reference graph checker and
46 16,294 independent NFC oracle comparisons passed. The documented Lisp inspection
47 example passed in a separate fresh offline SBCL process.
48
49 ## Imported contracts
50
51 Twenty-one new positive original inputs match unchanged CXTM baseline bytes.
52 Their exact list, source text, final counter and object graphs are in
53 `references.json`; actual XML bytes are saved under `actual/`. The four wildcard
54 cases and seventeen Embedded Topic cases cover recursive Name/Occurrence/
55 Association/Role Types, Role Players, Scopes, Variants and identity-triggered
56 merging. See `docs/reading-topic-references.md` for the complete list and clauses.
57
58 `ctm/invalid/embedded-topic-global-scope.ctm` is specifically rejected as
59 `CTM-REJECTION`, `:EMBEDDED-TOPIC-AT-TOP-LEVEL`, at source EOF. The diagnostic
60 retains the original case identity and character/line/column position.
61
62 Exactly those 22 contracts changed from NOT-RUN to PASS. Full corpus:
63 **93 PASS = 83 byte-exact positive contracts + 10 specific rejections;
64 2 FAIL; 0 recorded UNSUPPORTED; 178 NOT-RUN**.
65
66 Both DateTime baseline discrepancies remain FAIL: `occurrence-datetime2.ctm`
67 and `occurrence-datetime-timezone2.ctm`. Previous 64 executed CXTM outputs and
68 outcomes compare exactly with Slice 14. All retained case model observations
69 and timezone probes are unchanged. Corpus and references remain byte-identical.
70 The 40 independent earlier positive probes were not registered by this slice.
71
72 ## Object and boundary evidence
73
74 Direct Lisp checks establish:
75
76 - Per-parse named wildcard reuse and anonymous uniqueness; exact `#$__N[.name]`
77 Item Identifiers, preserved case/Unicode, 100-digit counters and independent
78 Document/Wildcard IRIs. The file API forwards the same environment and returns
79 its final counter; invalid environment arguments fail before file I/O.
80 - Named wildcard lookup after Topic replacement, using cached locator strings
81 and the existing TMDM interner rather than cached obsolete object handles.
82 - Named Wildcards at all supported Type/Player/Scope positions share one
83 environment. Explicit Name Types do not create an unnecessary default Type.
84 - Embedded Topic nesting to depth 40, preorder counter allocation and actual
85 Type chains. Numeric/date/dateTime tokens stop correctly before `]`.
86 - Shared SI merging during Embedded Tails unions generated identifiers and
87 updates stored Parent/Type/Player/Scope references. All live references point
88 to actual current same-map Topics.
89 - Subsequent Topic/Name/Variant merging preserves retained canonical handles
90 and Role references. Theme merges can reduce scope cardinality; loss of a
91 Variant's additional scope still fails atomically.
92 - Deterministic, mutation-free CXTM, including retained forward links; specific
93 malformed-Embedded/invalid-position diagnostics and preserved Role whitespace
94 rules. Empty Embedded Topics are rejected because their Tail is required.
95
96 The independent Python checker compares full observed Topic identity-property
97 sets and all Name/Variant/Occurrence/Association/Role relationships with original
98 baselines. It also verifies complete generated identifier/counter sequences.
99 Observation ordinals are local evidence references, not persistent Subjects.
100
101 Old assertions that excluded newly supported references now use still-excluded
102 reified forms; their suite sizes and existing model/baseline results are retained.
103 Variant-scope Embedded probes now expect deserialization while leaving their
104 imported status NOT-RUN until the reference suite executes the full contracts.
105
106 ## Scope retained
107
108 No TMDM source or canonicalization algorithm changed. The CXTM docstring was
109 corrected to acknowledge existing Variants. CTM's public reader gains optional
110 `:wildcard-iri` and `:wildcard-counter` and a secondary return value; existing
111 primary-value callers continue to receive the same Topic Map representation.
112
113 Reification, Templates, Include/Mergemap, `isa`/`ako`, more than two CTM Roles,
114 CTM `*`, cross-document merging and excluded datatype contexts remain outside
115 this slice. Template-dependent negatives remain NOT-RUN rather than being
116 promoted for an unrelated parser failure. No Slice 16 was started.