]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - docs/slice-20b-negative-registration.md
Register final Variant Reification original for Slice 22B
[topic-maps.git] / docs / slice-20b-negative-registration.md
1 # Slice 20B: seven negative original CTM contracts
2
3 Parent: `9044114749dedc72f190f4aa9ba0443dfe7860b5`.
4 Branch: `codex/ctm-slice-20b`. The initial branch, HEAD, empty index and clean
5 worktree were observed before any edit. The initial registered CTM result is
6 **245 PASS, 4 FAIL, 24 NOT-RUN**. All seven candidates initially have NOT-RUN
7 status, no actual outcome and no CXTM baseline, as expected for invalid inputs.
8
9 ## Sources and normative review
10
11 Original files come unchanged from `vendor/cxtm/ctm/invalid/`. The pinned
12 `vendor/cxtm/README` defines invalid inputs as rejection contracts;
13 `ctm/STATUS.txt` dates the corpus to the 2010-03-31 CTM draft. There are no
14 individual prose descriptions for these seven beyond their source text and
15 the identifier comment. No historical exploratory rejection is counted here.
16
17 The consulted reference is
18 [ISO/IEC 13250-6:2010 CTM text](https://www.isotopicmaps.org/ctm/ctm.html),
19 reviewed on 2026-10-19; published ISO standards remain the normative authority.
20
21 | Original filename | Applicable clause / productions | Reviewed cause |
22 | --- | --- | --- |
23 | `occurrence-double-positive-infinity.ctm` | 3.4.1 [28]–[34]; 3.10 [56] | Bare `INF` is not a literal. |
24 | `occurrence-double-negative-infinity.ctm` | 3.4.1 [28]–[34]; 3.10 [56] | Bare `-INF` is not a literal. |
25 | `qname-hyphen.ctm` | 3.3.4 [9]–[11]; 3.3.6 [14]–[16] | Hyphen cannot start the local part. |
26 | `string-unbalanced.ctm` | 3.4.1 [37]–[40]; 3.4.2 [41] | Escaped quote leaves the string unclosed. |
27 | `string-unicode.ctm` | 3.4.2 [42] | Uppercase `U` requires six digits, not four. |
28 | `string-unicode2.ctm` | 3.4.2 [42]–[43] and decoding prose | `G` is not hexadecimal. |
29 | `topic-id-illegal.ctm` | 3.3.6 [14]–[16] | U+0361 is a continuation character, not a start. |
30
31 The printed [43] class includes all letters. For `string-unicode2`, this review
32 relies on 3.4.2's hexadecimal decoding requirement; the printed class alone
33 would not reject `G`. This qualification is retained in each result.
34
35 ## Actual cause evidence
36
37 The reader reports `ctm-rejection`, not `ctm-unsupported`, for every candidate in
38 the preliminary fresh-process investigation. The durable execution must repeat
39 those observations through public `deserialize-file`, with each existing Case
40 Record's Document IRI and original source name. Positions are zero-based Unicode
41 character offsets; lines and columns are one-based. The
42 [actual result table](../reports/slice-20b/contracts.md) records every condition,
43 code, offset, line and column. `current.negative.json` preserves full messages,
44 two repeated original calls, token observations and actual control models.
45
46 The QName error is generic: `unexpected-token` at the colon, offset 38, rather
47 than a dedicated invalid-QName condition. Actual tokens are identifier `ex`,
48 colon, hyphen. The valid `ex:issue` sibling resolves the declared prefix. This
49 establishes the malformed local-part boundary rather than an undefined prefix
50 or unavailable IRI resource. The test requires that token evidence as well as
51 the exact reader condition.
52
53 Each candidate also has an explicit valid sibling generated only in memory:
54
55 - `INF` / `-INF` become `1` / `-1`, with actual integer Occurrence values,
56 datatypes, Parent and Type references checked.
57 - `ex:-issue` becomes `ex:issue`, with the resolved Subject Identifier checked.
58 - The unclosed string receives its missing closing quote; the Name value is
59 checked as `Foo` followed by a quotation mark.
60 - The four-digit uppercase escape uses lowercase `u`; the malformed six-digit
61 escape becomes `\U000041`. Both actual Name values must be `A`.
62 - The leading U+0361 moves after `a`; the accepted local Item Identifier is checked.
63
64 These controls are separate calls to `deserialize-string`; original bytes are
65 never corrected, replaced or fed through a workaround. Exact source spelling,
66 source/baseline hashes and all existing contract identities are checked.
67
68 ## Registration and execution
69
70 The same `tests/ctm-registered-originals.lisp` package, `check`, `binary`,
71 `identity-fields`, `case-state`, model helpers and shared corpus from 20A are
72 reused. The existing positive implementation remains unchanged except for two
73 new exported entry points. The ASDF secondary system
74 `topic-maps/ctm/registered-negative-tests` depends on the existing original-test
75 system and invokes `run-negative-tests`. `scripts/fresh-sbcl.lisp` calls it after
76 the 20A snapshot; tests are executed, not merely loaded.
77
78 Only an exact intended syntax condition, exact location and source, absent
79 nested cause/context, reproducible original rejection, source witness and
80 accepted control can register `ctm-rejection` through existing `record-result`.
81 Other outcomes are documented separately and leave the original Case Record
82 NOT-RUN. The validator writes that evidence before failing acceptance if any
83 candidate lacks the required cause. It does not correct the reader.
84
85 All prior Case Records, specification-clause identities, positive CXTM
86 observations and the four known DateTime/Include FAILs remain unchanged.
87 Normative review metadata is attached to the new execution evidence rather
88 than retrospectively changing historical case metadata.
89
90 ## Full offline validation
91
92 Run from the repository with an unused output directory:
93
94 ```sh
95 python3 scripts/validate-slice-20b.py \
96 --sbcl /nix/store/hlsiblxpxr1hax3dw9x8znd6zy097ddj-sbcl-2.5.4/bin/sbcl \
97 --output /tmp/topic-maps-20b-review
98 ```
99
100 The unchanged 20A validator invokes the unchanged 19D2 qualification/regression
101 chain. Network is denied for fresh SBCL 2.5.4 XML, XTM, full CTM/TMDM/CXTM and
102 inspection processes. Preparation uses offline Nix evaluation, verified existing
103 Store sources and unchanged XML patches. No dependency downloads occur.
104 The new negative suite runs in the same fresh regression process after the forty
105 20A comparisons. Independent Python checks verify actual codes, character
106 locations, control model observations, exact status changes, corpus integrity
107 and byte-identical historical reports. A full Nix rebuild remains NOT-RUN.
108
109 [Execution evidence](../reports/slice-20b/execution.json) records actual totals;
110 **252 PASS, 4 FAIL, 17 NOT-RUN** is accepted only if all seven intended causes
111 were proved during that run. Separate XTM remains **6 PASS, 0 FAIL, 118 NOT-RUN**.
112
113 Evidence includes:
114
115 - `current.validation.json`: final existing Case Records and totals.
116 - `current.negative.json`: actual conditions, causes, positions, controls and checks.
117 - `current.cxtm.json`: retained positive comparisons, with no invented negative baselines.
118 - `candidates.json` and `contracts.md`: all seven actual statuses and source hashes.
119 - `remaining.json`: unexecuted original records.
120 - `retained-20a/`: complete fresh 20A and earlier regression evidence.
121 - `integrity.json`: protected source/baseline and historical-report SHA-256 hashes.
122
123 No CTM/TMDM/XTM/CXTM semantics, original sources, baselines or historical reports
124 are changed. No HyperDoc changes, push, deployment or later slice are included.