]> dreyeck.freedombox.rocks Git - topic-maps.git/blob - README.md
test(topic-maps): establish pinned CTM test foundation
[topic-maps.git] / README.md
1 # Common Lisp Topic Maps — Slice 0
2
3 An independent foundation for implementing ISO/IEC 13250-6:2010 (CTM) in
4 Common Lisp. **There is no CTM reader, TMDM model or CXTM canonicalizer yet.**
5 HyperDoc may become a client later; it is neither the codebase nor a dependency.
6
7 Only `topic-maps` (the actual test foundation) and `topic-maps/tests` exist.
8 The future `topic-maps/tmdm`, `topic-maps/ctm` and `topic-maps/cxtm` systems are
9 not defined. Loading the foundation does not pretend they are available.
10 Runtime dependencies: Common Lisp, ASDF/UIOP. Integrity/acquisition tooling
11 uses Python 3's standard library and Git. No Quicklisp packages are required.
12
13 ## Load and inspect
14
15 In a new Common Lisp process, with this checkout selected:
16
17 ```lisp
18 (require :asdf)
19 (asdf:initialize-source-registry
20 '(:source-registry :ignore-inherited-configuration))
21 (asdf:load-asd #p"/Users/rgb/workspace/topic-maps/topic-maps.asd")
22 (asdf:load-system "topic-maps")
23 (defparameter *corpus* (topic-maps.test-foundation:discover-corpus))
24 (topic-maps.test-foundation:summarize-corpus *corpus*)
25 (topic-maps.test-foundation:select-cases *corpus* :category :invalid)
26 (topic-maps.test-foundation:select-cases *corpus* :id "ctm/in/simple.ctm")
27 (asdf:test-system "topic-maps/tests")
28 (topic-maps.test-foundation:write-validation-report
29 *corpus* #p"/tmp/topic-maps-inventory.json")
30 ```
31
32 Change only the checkout pathname when using another machine. The case's
33 Document IRI remains independent of that pathname. Records are inspectable
34 Common Lisp structures, with actual source/baseline pathnames and explicit
35 contracts, results, statuses, diagnostics and reviewed clauses.
36
37 ## Offline verification
38
39 ```sh
40 # SBCL must already be installed. No network is used by this command.
41 TOPIC_MAPS_REPORT=/tmp/topic-maps-validation.json ./scripts/test.sh
42 ```
43
44 Set `SBCL=/absolute/path/to/sbcl` if needed. The launcher starts a new process,
45 ignores system/user initialization, clears inherited ASDF source configuration
46 and writes FASLs outside the repository. It runs byte-integrity fixtures,
47 Common Lisp infrastructure checks and an independent JSON-schema/content check
48 when a report pathname is supplied. `nix develop path:.` supplies a minimal,
49 pinned SBCL/Python/Git environment; initial environment provisioning may need
50 network access, while test execution after provisioning does not.
51
52 The complete upstream corpus is already vendored, unchanged. If absent in a
53 source distribution, acquire it once:
54
55 ```sh
56 python3 scripts/corpus.py acquire
57 python3 scripts/corpus.py verify
58 ```
59
60 Acquisition uses the exact commit and archive digest in
61 [corpus-lock.json](references/corpus-lock.json), refuses to merge over existing
62 contents and verifies every file. Verification is offline. Valid CTM inputs
63 are selected only under `ctm/in`, invalid ones only under `ctm/invalid`, and
64 CXTM baselines only under `ctm/baseline`. Auxiliary files are reported separately.
65
66 ## Recorded result and authority
67
68 The pinned corpus has 231 valid CTM inputs, 42 invalid inputs, 231 CXTM baselines
69 and 22 auxiliary files in its CTM subtree, with no unmatched/missing baseline.
70 All 273 imported CTM cases are **NOT-RUN**; none passes a nonexistent reader.
71 Infrastructure fixtures exercise PASS, FAIL, UNSUPPORTED and NOT-RUN separately.
72
73 The upstream CTM suite targets the **draft dated 2010-03-31**. Passing that suite
74 alone would not establish full ISO/IEC 13250-6:2010 conformity. Published ISO
75 standards are normative; this corpus and Ontopia are independent evidence.
76
77 See [inventory and provenance](docs/inventory.md),
78 [coverage and the first five proposed Slice 1 cases](docs/coverage.md),
79 [architecture and Document-IRI policy](docs/architecture.md), and
80 [execution evidence](docs/validation.md).
81 The [machine-readable report](reports/validation.json) records actual imported
82 case contracts and the passing infrastructure check names, without claiming
83 CTM implementation. Nothing from Slice 1 is automatically started.