]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - docs/slice-10-validation.md
Implement XTM association reification with native conformance evidence
[topic-maps.git] / docs / slice-10-validation.md
1 # Slice 10 — DateTime Occurrences: validation
2
3 Base: `2ad41cd1a945a4ce97824464de40646bb899259e`, clean
4 `codex/ctm-slice-9`; created `codex/ctm-slice-10` directly from that commit.
5 No HyperDoc change, server, deployment or Slice 11 work.
6
7 The normative investigation was recorded before implementation in
8 `reading-datetime-occurrences.md`. CTM 3.4.1, TMDM 4.3–4.4/5.6/6.5,
9 CXTM 3.16/4.9, XSD Second Edition 3.2.7.1–3.2.7.3 and D.1 apply.
10 Two normative baseline discrepancies are retained explicitly:
11
12 | Original case | Actual normative-subset result | Contract status |
13 |---|---|---|
14 | occurrence-datetime.ctm | 1976-09-19T12:01:01; 370 exact CXTM bytes | PASS |
15 | occurrence-datetime2.ctm | 1976-09-19T12:02:00; baseline retains :60 | **FAIL**, documented D.1 following-minute interpretation |
16 | occurrence-datetime-fractional.ctm | 2011-01-01T00:00:00.001; 677 exact CXTM bytes | PASS |
17 | occurrence-datetime-timezone.ctm | 2011-01-01T00:00:00Z; 674 exact CXTM bytes | PASS |
18 | occurrence-datetime-timezone2.ctm | Conversion to 2010-12-31T22:00:00Z required; not implemented | NOT-RUN; specific unsupported partial-read probe is separate |
19
20 Seconds 60 are lexically allowed in XSD 1.0. D.1's noncandidate-day rule means
21 September 19 does not justify an unchanged canonical :60. The implementation
22 follows that value interpretation and exposes the mismatch, rather than altering
23 the baseline. Candidate-day UTC leap seconds at 23:59:60 are supported; ambiguous
24 local leap contexts remain explicitly unsupported. No actual IERS-history
25 validation is claimed. No XSD 1.1 leap-second prohibition is imported.
26
27 Bare supported literals use the established canonical stored-string policy.
28 Qualified/API strings retain their valid lexical strings. Same-map equality and
29 merging remain based on stored properties; equal canonical XML does not merge
30 distinct lexical values. Zero offsets and Z produce Z; absent timezone stays
31 absent. Fractions and year rollover use character arithmetic; Date validation
32 and its qualified BCE interpretation are reused. No floating point, OS calendar
33 or local timezone is used. Serialization never mutates objects or retained handles.
34
35 ## Full regression results per runtime
36
37 | Suite | SBCL 2.5.4 | SBCL 2.4.10 relocated |
38 |---|---:|---:|
39 | Foundation | 54 | 54 |
40 | Topic Identity | 123 | 123 |
41 | Topic Merging | 646 | 646 |
42 | Associations/Roles | 657 | 657 |
43 | Retained CXTM | 445 | 445 |
44 | Occurrences | 1101 | 1101 |
45 | Prefix/explicit datatypes | 150 | 150 |
46 | Integers | 665 | 665 |
47 | Decimals | 715 | 715 |
48 | Dates | 1806 | 1806 |
49 | DateTimes | 215 | 215 |
50 | **Total assertions** | **6577** | **6577** |
51 | Regression assertion failures | 0 | 0 |
52 | Python infrastructure tests | 2 | 2 |
53 | Independent NFC comparisons | 16294 | 16294 |
54 | Independent Integer / Decimal / Date probes | 143 / 157 / 396 | 143 / 157 / 396 |
55 | Independent DateTime probes | 45 | 45 |
56
57 The known original CXTM contract FAIL is not erased by green regression
58 assertions. `validation.json` counts imported outcomes; `cxtm.json` additionally
59 has explicit contractCounts. Local assertion counters are separately identified.
60
61 | Imported contracts | PASS | FAIL | UNSUPPORTED | NOT-RUN |
62 |---|---:|---:|---:|---:|
63 | Positive CXTM, 231 total | 54 | 1 | 0 | 176 |
64 | Negative CTM, 42 total | 8 | 0 | 0 | 34 |
65 | **All 273** | **62** | **1** | **0** | **210** |
66
67 All previous 51 positive outputs and model observations, and eight negative
68 contracts are retained. One previous NOT-RUN contract is now FAIL, three become
69 PASS. Nonzero-offset original remains NOT-RUN, even though a separate partial
70 read confirms the specific unsupported condition. Recognized unsupported
71 constructs are distinct from unexecuted imported outcomes and baseline conflicts.
72
73 Both complete runs use fresh SBCL processes, ignore inherited ASDF configuration
74 and user/system initialization, and run under sandbox-exec deny-network policy.
75 The 2.4.10 run uses a copied checkout without .git. All eleven generated report
76 pairs are byte-identical. Corpus, baselines, locks and existing references are
77 unchanged. Original input bytes including the datetime2 BOM are preserved.
78 The public Lisp DESCRIBE example executes successfully under the same policy.
79
80 DateTime assertions cover malformed hours/minutes/seconds/fractions/zones,
81 24:00:00 and Gregorian rollover, no year zero, negative and extended years,
82 10,000-digit fractions/years, explicit/bare/API values, real Parent/Type object
83 references, datatype locators without new Topics, duplicate replacement and
84 identifier union, retained handles, construction order, lexical sorting and
85 purity. Old exclusion fixtures are adapted one-for-one to still-excluded offsets
86 or the now-specific invalid DateTime rejection; old suite counts are preserved.
87 Initial development failures (test-form delimiter, obsolete excluded fixture,
88 empty fraction validation, QName separator in a new fixture) were corrected
89 before the final full runs; they are not conflated with the known baseline FAIL.
90
91 ## Reproduction
92
93 ```sh
94 python3 scripts/validate-slice-10.py \
95 --sbcl-254 /nix/store/hlsiblxpxr1hax3dw9x8znd6zy097ddj-sbcl-2.5.4/bin/sbcl \
96 --sbcl-2410 /nix/store/y96nx8571mpdvjd40krkdim2av0in972-sbcl-2.4.10/bin/sbcl \
97 --output /private/tmp/topic-maps-slice-10-reproduction
98 ```
99
100 Final committed evidence is under `reports/slice-10`; execution.json records
101 versions, exact commands/exit codes, result totals, report and actual-XML hashes.
102 The driver verifies both retained outputs and the known mismatch explicitly;
103 its success means implementation checks PASS with one disclosed imported FAIL,
104 not complete upstream-suite or ISO conformity.
105
106 Nonzero DateTime offset conversion, Date timezone canonicalization, ambiguous
107 local leap contexts, CTM *, Variants, nonempty Scope, Reification, Templates,
108 cross-document merging and HyperDoc integration remain outside this slice.