Artifact 43c28fdc15c45d3f45cb9758397b41805b195baf6f5d5fab9d4e808ad585ece6:
- File
docs/s1-results.md
— part of check-in
[11f47eadde]
at
2026-11-18 11:58:22
on branch trunk
— Record S0/S1 qualification groundwork before product code
Contract maps and pinned Pi reference, local C qualification fixtures, MC/DC and Fil-C remote lifecycle tooling, and the context transaction substrate probe. No product harness code yet. (user: dmestas, size: 3516) [annotate] [blame] [check-ins using]
# S1 storage-substrate proof Status: **PASS for the isolated substrate probe; API extraction remains a proposal.** No context source was modified and no production harness API was introduced. ## What actually ran `make test-context` / `make test-context-sanitize` use a fixed allowlist of current context C/schema/Makefile inputs copied into private qualification snapshots. They compile the actual vendored SQLite/libfossil and current context code through its existing `CTX_NO_MAIN` testing seam. They do not borrow upstream objects or use the real context database. The C probe mutates a real embedded Fossil technote, real context capture state, and a host fixture row in one outer SQLite transaction. It checks: 1. COMMIT: all changes survive closing/reopening the database. 2. Explicit ROLLBACK: none of the attempted changes survives reopen. 3. Duplicate-key statement failure followed by explicit ROLLBACK: both sides remain at the prior committed version. 4. Negative control: COMMIT substituted for ROLLBACK must fail the technote-body oracle, not merely fail for an unrelated setup reason. Normal and full ASan/UBSan builds passed. Leak detection is not claimed. Every temporary HOME, database, Fossil/XDG configuration, and scratch directory was removed. Main independently reran both modes and checked that no `private.*` directories remained. The unit also received independent review. ## Evidence Main's verified runs: - `build/qualification/context/run.vom3KR` — normal. - `build/qualification/context/run.eATJks` — ASan/UBSan. Independent review runs: - `build/qualification/context/run.1DRKc9` — normal. - `build/qualification/context/run.u44xdK` — ASan/UBSan. Each retains source/schema snapshots and hashes, compiler/argv logs, the probe and deliberately incorrect mutant binary, binary hashes, proof logs, and private-path cleanup evidence. `latest-run.txt` identifies the latest invocation, not necessarily a production-qualified source revision. The wrapper preserves GATED exit2 for missing inputs/tools or invalid modes. Local source snapshots are deliberate retained evidence, not live databases. The probe runs with an empty inherited environment and private HOME/CTX_DB/Fossil/XDG paths. ## What this does not prove This is not a power-loss/crash simulation, concurrent writer test, migration/rebuild preservation test, CLI-wide regression suite, or Fil-C qualification of the whole context engine. Remote Fil-C in S0 covered the small qualification fixtures/corpus, not this SQLite/libfossil probe. All production harness contracts remain NOT RUN. It also does not make `archive_batch()` composable: that function still owns its BEGIN/COMMIT. A production embedding requires a deliberate change in context itself, not copied consumer-side archive code. ## Recommended next boundary Review [the API proposal](context-api-proposal.md): one host-owned SQLite connection and outer transaction, with context borrowing a connection-scoped handle. Preparation/migration/repository opening happens explicitly outside active writes; context operations return errors rather than exiting, and the host owns commit/rollback and publication. The key unresolved decision is integrity/lifetime policy: libfossil currently requires foreign_keysOFF, initialization has process-global components, and runtime relationships cannot silently depend on SQLite REFERENCES enforcement. Do not implement the public API or runtime schema until that boundary and its tests are approved.