Artifact ca528b7d3387cea47f71c2ae468dde2c0ce31e416c3e8d2ce97082b2b3d1b0ee:
- File docs/archive/2026-11-s0/s1-results.md — part of check-in [d66dc3f8af] at 2026-11-21 11:05:58 on branch docs-reorg — docs: short README; manual, reference, dev, design and archive under docs/; AGENTS.md; docs.sh checks docs against code; changelog.inc built at build time (user: dmestas, size: 3529) [annotate] [blame] [check-ins using] [more...]
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:
- COMMIT: all changes survive closing/reopening the database.
- Explicit ROLLBACK: none of the attempted changes survives reopen.
- Duplicate-key statement failure followed by explicit ROLLBACK: both sides remain at the prior committed version.
- 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: 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.