P0 verification report¶
Date: 2026-10-19. SPEC: v1.4.1. Platform: Darwin arm64,
rustc 1.95.0 (59807616e 2026-04-14), aarch64-apple-darwin.
P0 Gate passed: implementation, local checks, independent review and remote
Linux/macOS CI all passed. P1 has not started. No failed check was waived or
threshold relaxed. CI run 39364257458 verified implementation commit
73789ef96efc3d385cefe78ae7c3b6aa1ec4980d (push on main).
| Remote job | Result | Completed (UTC) |
|---|---|---|
| Rust 1.95.0 / ubuntu-latest | Success: full checks + CLI smoke | 2026-10-20 03:29:23 |
| Rust 1.95.0 / macos-latest | Success: full checks + CLI smoke | 2026-10-20 03:28:01 |
Gate results¶
| Layer | Result | Evidence |
|---|---|---|
| G0 Spec | Local pass | SPEC v1.4.1, ADR 0001–0003, SEMANTICS complete SD/admission/input mapping |
| G1 Build/lint | Local and remote Linux/macOS pass | scripts/check.sh exit 0; fmt, all-target/all-feature Clippy -D warnings, workspace tests, dependency graph, cargo-deny, isolated DD fmt/check |
| G2 Golden | Pass | 26 golden groups, 3 wire tests, 1 policy hash test, 3 compile-fail checks |
| G3 Oracle/model | Pass | 1,000 fixed ChaCha8 seeds, 12,000 transactions, 0 mismatches |
| G4–G7 | Not applicable to P0 | No concurrency/crash, performance, dogfood, prior semantic phase, mutation or exhaustive-search claim |
| G8 Docs | Pass | README, IMPLEMENTATION_STATUS, CHANGELOG, SEMANTICS, EVENTLOG, gate checklist/report |
| Independent review | Pass | Separate agent /root/p0_review; no blocking findings; independently reran core/model/testkit suites |
34 Rust tests/checks pass: 26 golden groups + 3 wire + 1 hash + 1 property suite + 3 compile-fail doctests. Seven Python dependency-policy negative tests also pass. The API example successfully retracts a root and reports both L0 flips.
Reproduction (Rust 1.95.0, Python 3.11+, cargo-deny 0.20.2):
bash scripts/check.sh
cargo test -p contextdb-testkit --test properties --locked -- --nocapture
cargo run --locked -p contextdb-core --example basic
Local cargo-deny installation and advisory data were isolated in /tmp for the
sandbox. Equivalent check used PATH including /tmp/contextdb-dev-tools/bin and
CARGO_HOME=/tmp/contextdb-cargo-check. No machine-specific path is required by CI.
The gate-report CLI belongs to later product work; this report is manually compiled
from actual command results, not presented as generated by an implemented command.
Golden traceability¶
All grouped golden tests are in crates/contextdb-testkit/tests/p0.rs.
Each Rig transaction compares independent input validators, full Jacobi/Kahn
snapshots and all error fields. Every rejection checks digest, epoch, inputs,
indexes and topology. Handwritten expectations additionally pin counters, witnesses,
statuses, paths, indexes, local allocations and diff sets for their scenarios.
| Required IDs | Test evidence |
|---|---|
| T01–T03 | t01_t02_t03_conjunction_alternatives_and_canonical_witness |
| T04 | t04_chain_exact_flips_and_alternative_save |
| T06a/b/c | t06abc_cur_sem_and_alternative_why_not |
| T07a/c, T63 | t07ac_t63_refs_are_non_supporting_and_why_lists_all |
| T09a–d | t09abcd_canonical_strength_versions_and_duplicate_disabled |
| T09e/f/g/h/o | t09efgho_rule_admission_and_error_precedence |
| T09i | t09i_evidence_immutable_before_cas_and_dedup |
| T09j | t09j_summary_sem_only (includes Summary Ref rejection) |
| T09k/l | t09kl_metadata_and_import_artifact_do_not_change_derivation; model compile-fail for payload Op |
| T09m/v | t09mv_policy_final_batch_enabled_and_no_base |
| T09n | t09n_rebind_errors_atomicity_and_enabled_preservation; t09n_t29_successful_rebind_and_mutable_column_undo |
| T09p/q | t09pq_local_refs_dedup_and_id_rollback |
| T09r/s | t09rs_keys_policy_hash_and_channel_errors; core canonical JSON hash golden |
| T09t | t09t_observer_anchor_delete_and_watermark_cas |
| T09u | t09u_artifact_local_binding_and_resolve |
| T10/T11/T25 | t10_t11_t25_cycle_disabled_rollback_and_motik_lfp; t10_cycle_path_and_csr_index_ids_are_exact |
| T12/T64 | t12_t64_sequential_cas_heads_do_not_retract_base |
| T15/b/c/d, T16b-sem | t15bc_t15d_t16b_sem_transitivity_validation_sem_head_and_aba |
| T15e/T26 | t15e_t26_virtual_sem_cycles_and_revision_dag |
| T24 | t24_pin_strict_cur_and_evidence |
| T28 | core compile-fail: no mutable database input API; model compile-fail: logical cannot be rule conclusion |
| T29 | every Rig reject; t29_epoch_overflow_and_watermark_capacity_are_atomic; mutable-column undo golden |
| T62 oracle | t62_cert_oracle_does_not_observe_epoch |
| S13-rows-fn | s13_rows_fn_summary_precedence_and_semantic_witness; s13_failed_incidence_order_and_sem_head_pending |
Randomized verification¶
Seeds 0–999 use ChaCha8. Every trace is generated twice to check determinism and round-tripped through EventLog v0. Bounds are asserted: <=6 logicals, <=14 revisions, <=10 rules, 1–3 supporting premises on accepted rules, <=12 batches, 1–5 Ops per batch. Kinds include Evidence and Summary. Raw edge selection is Pin 40%, Cur 25%, Sem 20%, Ref 15%. Errors, Rebind, validation, head/base and enable operations occur.
Every accepted/rejected transaction checks I1 input equality, full error equivalence,
full Jacobi/Kahn snapshot equality (PROP8), L2 subset L1 subset L0, rollback, snapshot
codec round trips, and exact l0_flips/status_diff sets. Failure traces are exported
under ignored results/ for reproduction. No failures needed shrinking.
| Metric | Count |
|---|---|
| Seeds | 1,000 |
| Transactions | 12,000 |
| Accepted | 5,096 |
| Rejected | 6,904 |
| Input / error / snapshot / rollback mismatches | 0 |
These are P0 descriptive counters, not claims of reaching P1's mix/alternative/ cycle/CAS/PK coverage thresholds. P1 requires 10,000 seeds, coverage thresholds, bounded exhaustive exploration, mutation and performance work.
| Attempted Op | Count |
|---|---|
| CreateLogical | 6,730 |
| AddRevision | 4,640 |
| SetHead | 5,360 |
| AssertBase | 3,321 |
| RetractBase | 8,325 |
| AddRule | 6,010 |
| SetRuleEnabled | 1,102 |
| Rebind | 814 |
| RecordValidation | 788 |
| First rejection | Count |
|---|---|
| UnknownRef | 3,225 |
| InvalidRule | 2,005 |
| InvalidRebind | 488 |
| ImmutableKind | 455 |
| NoSemIncidence | 397 |
| CycleDetected | 177 |
| HeadConflict | 78 |
| CurvecMoved | 55 |
| DuplicateRule | 24 |
Independent review and closure¶
Reviewer /root/p0_review did not implement or edit project files. It inspected
the SPEC/gate against source, independently reran all relevant suites, considered
counterexamples to layer semantics, error priority, rollback and canonicalization,
and examined the expanded handwritten expectations.
| Review point | Resolution |
|---|---|
| No blocking correctness findings | Independent implementation review passed |
| Generator CreateLogical revision bound | Guard explicitly requires n<14; all generation bounds asserted |
| Canonical collection decoding | Unsorted/duplicate set/map inputs rejected; wire regression added |
| Metadata/Rebind/PENDING/cycle-path clarifications | SPEC v1.4.1 + ADR 0003 reviewed as compatible P0 details |
| Test precision | Exact cycle/CSR, successful Rebind + enabled undo, failed-incidence order, Sem-head Pending and Summary Ref expectations inspected and rerun |
| Certificate scope | P0 explicit-entry verdict only; P3 closure/strict-history/recertification explicitly deferred |
| Query execution wording | README/status corrected: oracle rebuilds cached snapshot on commit; queries read the snapshot |
All implementation review concerns are closed. Remote CI evidence above closes the remaining G1 requirement; every applicable P0 Gate layer has passed.
Limits and next phase¶
P0 is an in-memory oracle-backed Rust API, MAIN-only and single subject. It has no incremental counting, durable acknowledgements, full certificate issuance, daemon, MCP server, filesystem observer, multi-branch isolation, ACL or erasure. Conflict is None; synthetic future summary dimensions are pure-function tests only.
No performance claim is made. P0 is complete; P1 can implement the Maintainer facade, counting, Pearce–Kelly, exact-mode regression, coverage thresholds, exhaustive/mutation checks and specified performance budgets.