Skip to content

Commit 1de2e6b

Browse files
hyperpolymathclaude
andcommitted
chore: v0.2.0 CHANGELOG + just demo-admissibility recipe
Add [0.2.0] 2026-06-13 entry to CHANGELOG.adoc covering the July-1 credibility work: at_time reconstruction, 501 TXN endpoints, ZKP honest names, auth documentation, burn/CHANGELOG cleanup, R-tree→haversine corrections, and VCLTGate wiring + async Resolver fixes. Add `just demo-admissibility` recipe and scripts/demo-admissibility.sh: builds, locates, and runs the vclt-gate binary from the sibling vcl-ut repo to demonstrate the admit/reject/gate-failed protocol. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent af892b1 commit 1de2e6b

3 files changed

Lines changed: 158 additions & 0 deletions

File tree

CHANGELOG.adoc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,49 @@ All notable changes to VeriSimDB are documented here. This project uses https://
99

1010
== [Unreleased]
1111

12+
== [0.2.0] — 2026-06-13
13+
14+
=== Added — July-1 credibility: honesty over fake success (2026-06-13)
15+
16+
==== VCLTGate — admissibility gate (C)
17+
- *`VeriSim.Query.VCLTGate`*: new Elixir module; reads `VERISIM_VCLT_GATE` env var, writes JSON payload to a temp file, invokes the gate binary via `sh -c`, and maps exit codes: 0 → `:admit`, 1 → `{:reject, reasons}`, 2 → `{:error, :gate_failed}`. 5 s timeout per call.
18+
- *`VCLExecutor.gate_check/1`*: wired into `execute_string/2`; mutations (INSERT/UPDATE/DELETE prefixed statements) bypass the gate; all other statements are gate-checked before reaching the store.
19+
- *`just demo-admissibility`* recipe and `scripts/demo-admissibility.sh` demonstrate the admit/reject/gate-failed protocol using the `vclt-gate` binary from the sibling `vcl-ut` repo.
20+
21+
==== `at_time` temporal reconstruction (A1)
22+
- *`OctadTemporalStore::at_time`*: now reconstructs a full `Octad` from the `OctadSnapshot` stored at the requested timestamp — previously returned the current state with a patched version number. Modality flags in `ModalityStatus` gate which modality arms are reconstructed. Tensor `dtype` defaults to `Float64`; semantic properties become `TypedLiteral` XSD strings; geometry types are parsed from the stored string field.
23+
- Regression test `test_at_time_returns_historical_not_current` verifies that querying between two writes returns the first version's document, not the current one.
24+
25+
=== Fixed — Honest gaps: 501s, removed fakes, correct docs (2026-06-13)
26+
27+
==== HTTP API — honest 501 (A2)
28+
- Transaction endpoints (`POST /tx/begin`, `POST /tx/commit`, `POST /tx/rollback`, `GET /tx/{id}`) now return `501 Not Implemented` with a JSON error body. Previously returned 200 with fake success objects. Documented in KNOWN-ISSUES #30.
29+
30+
==== ZKP / sanctify surface — honest names (A3)
31+
- `verify_proof` Commitment arm error changed from `ZkpError::InvalidWitness` to `ZkpError::NotImplemented` with a message explaining that the commitment scheme is not yet implemented.
32+
- zkp_bridge `verifyProof` returns `{:error, "commitment scheme not yet implemented"}` instead of fake success.
33+
34+
==== Auth documentation (A4)
35+
- README `Run` section now carries an explicit `WARNING`: HTTP API has no authentication; never expose to untrusted networks.
36+
- KNOWN-ISSUES #29 added: HTTP API has no authentication (open).
37+
- KNOWN-ISSUES #31 added: `at_time` returns partial data for multi-update entities (snapshot design).
38+
39+
==== Dependency cleanup (A5, A6)
40+
- `burn = "0.21"` removed from workspace (unused after Tier 2 test work removed the only consumer).
41+
- Duplicate root-level `CHANGELOG.md` deleted; `CHANGELOG.adoc` is the canonical file.
42+
43+
==== Documentation accuracy (A7)
44+
- README, CLAUDE.md, `docs/papers/verisimdb-federated-consistency.adoc`, and `docs/papers/verisimdb-idaptik-case-study.adoc` corrected: spatial index described as "Haversine brute-force (R-tree planned)" — previously claimed "R-tree index".
45+
- CLAUDE.md `Machine-Readable Artefacts` section updated to match the actual `.machine_readable/` directory layout (was listing non-existent `.scm` files).
46+
47+
==== Elixir infrastructure
48+
- `Resolver.register_peer` and `Resolver.deregister_peer` now notify the Rust core asynchronously (`Task.start`) so a blocked/absent core cannot freeze the GenServer.
49+
- Timed-out `Task.yield_many` tasks killed without blocking: `Process.unlink` + `Process.demonitor([:flush])` + `Process.exit(:kill)` instead of `Task.shutdown(:brutal_kill)`.
50+
- `RustClient.normalize/1` return branch corrected from `{:ok, _}` to `:ok` in `EntityServer`; `delete_octad/1` branch similarly corrected in `VCLExecutor`.
51+
- `rust_core_timeout` lowered to 2 s in test env (was 5 s, racing with the 5 s GenServer.call default timeout).
52+
- `bolt_sips` removed from deps (unused; OTP-25-incompatible Poison.Encoder protocol compilation); related unused transitive deps unlocked from mix.lock.
53+
- `parse_trans` bumped to 3.4.2 (override) to pick up upstream fixes.
54+
1255
=== Fixed — Main-branch reds + workspace license (2026-06-02)
1356

1457
==== PR #99 — five root-cause main fixes

justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ serve-otp:
8080
demo-consonance:
8181
scripts/demo-consonance.sh
8282

83+
# VCLTGate admissibility — show admit / reject paths before any query reaches the store
84+
# Requires vclt-gate from vcl-ut; set VCLT_GATE=/path/to/binary or build it first:
85+
# cd vcl-ut/src/interface/parse && cargo build --bin vclt-gate
86+
demo-admissibility:
87+
scripts/demo-admissibility.sh
88+
8389
# ── Container ──────────────────────────────────────────────────
8490

8591
# Build container image with Podman

scripts/demo-admissibility.sh

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: MPL-2.0
3+
# Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
#
5+
# demo-admissibility.sh — VCLTGate admissibility check, end to end.
6+
#
7+
# Shows the gate protocol: statements that parse cleanly are admitted;
8+
# structurally malformed statements are rejected before touching the store.
9+
# The gate is a pure function: no network, no filesystem side effects.
10+
#
11+
# Usage:
12+
# scripts/demo-admissibility.sh # finds vclt-gate in PATH or sibling repo
13+
# VCLT_GATE=/path/to/vclt-gate scripts/demo-admissibility.sh
14+
#
15+
# The vclt-gate binary lives in vcl-ut:
16+
# cd vcl-ut/src/interface/parse && cargo build --bin vclt-gate
17+
18+
set -euo pipefail
19+
20+
GATE="${VCLT_GATE:-}"
21+
22+
say() { printf '\n\033[1m== %s ==\033[0m\n' "$*"; }
23+
ok() { printf '\033[32m ✓ %s\033[0m\n' "$*"; }
24+
bad() { printf '\033[31m ✗ %s\033[0m\n' "$*"; }
25+
show() { printf ' %s\n' "$*"; }
26+
showjq() { echo "$1" | jq -C . 2>/dev/null || echo "$1"; }
27+
28+
# ── Locate gate binary ────────────────────────────────────────────────────────
29+
if [ -z "$GATE" ]; then
30+
# Try sibling vcl-ut repo first
31+
SIBLING="$(dirname "$(dirname "$(readlink -f "$0")")")"
32+
VCLT_BUILD="${SIBLING}/../vcl-ut/src/interface/parse/target/debug/vclt-gate"
33+
if [ -x "$VCLT_BUILD" ]; then
34+
GATE="$(realpath "$VCLT_BUILD")"
35+
elif command -v vclt-gate &>/dev/null; then
36+
GATE="vclt-gate"
37+
fi
38+
fi
39+
40+
if [ -z "$GATE" ] || [ ! -x "$GATE" ]; then
41+
printf '\033[33mvclt-gate not found.\033[0m\n'
42+
printf 'Build it with:\n'
43+
printf ' cd vcl-ut/src/interface/parse && cargo build --bin vclt-gate\n'
44+
printf 'Then re-run or export VCLT_GATE=/path/to/binary.\n'
45+
exit 1
46+
fi
47+
48+
say "Gate binary"
49+
show "path: $GATE"
50+
show "version probe:"
51+
echo '{"schema_version":1,"statement":"SELECT GRAPH FROM HEXAD probe","schema":{}}' \
52+
| "$GATE" | jq -r '" certified_level=\(.certified_level) admissible=\(.admissible)"'
53+
54+
# ── Helper: run one statement through the gate ────────────────────────────────
55+
run_gate() {
56+
local label="$1"; local stmt="$2"
57+
local payload; payload=$(jq -n --arg s "$stmt" '{"schema_version":1,"statement":$s,"schema":{}}')
58+
local out code=0
59+
out=$(echo "$payload" | "$GATE" 2>/dev/null) || code=$?
60+
local level; level=$(echo "$out" | jq -r '.certified_level // -1')
61+
local reasons; reasons=$(echo "$out" | jq -r '.reasons[]? // empty' | head -3)
62+
if [ "$code" -eq 0 ]; then
63+
ok "$label → admit (level $level)"
64+
elif [ "$code" -eq 1 ]; then
65+
bad "$label → reject (level $level)"
66+
while IFS= read -r r; do show " $r"; done <<< "$reasons"
67+
else
68+
bad "$label → gate_failed (exit $code)"
69+
fi
70+
}
71+
72+
# ── Admitted: well-formed VCL statements ────────────────────────────────────
73+
say "Admitted statements"
74+
75+
run_gate "SELECT GRAPH" \
76+
"SELECT GRAPH FROM HEXAD drone007"
77+
78+
run_gate "SELECT multi-modality" \
79+
"SELECT DOCUMENT, GRAPH FROM HEXAD drone007"
80+
81+
run_gate "SELECT with explicit LIMIT" \
82+
"SELECT GRAPH FROM HEXAD drone007 LIMIT 100"
83+
84+
run_gate "SELECT VECTOR" \
85+
"SELECT VECTOR FROM HEXAD sensor42"
86+
87+
# ── Rejected: structurally malformed or unsafe statements ────────────────────
88+
say "Rejected statements (gate exits 1 — never reach the store)"
89+
90+
run_gate "Trailing-token injection" \
91+
"SELECT GRAPH FROM HEXAD abc; DROP TABLE hexads"
92+
93+
run_gate "Chained OR injection" \
94+
"SELECT GRAPH FROM HEXAD abc WHERE id == '1' OR '1'=='1'"
95+
96+
run_gate "Non-integer LIMIT" \
97+
"SELECT GRAPH FROM HEXAD abc LIMIT not_a_number"
98+
99+
run_gate "Missing source identifier" \
100+
"SELECT GRAPH FROM HEXAD"
101+
102+
# ── Summary ──────────────────────────────────────────────────────────────────
103+
say "Protocol summary"
104+
show "exit 0 → :admit (statement is structurally safe)"
105+
show "exit 1 → {:reject, reasons} (violation detected before execution)"
106+
show "exit 2 → {:error, :gate_failed} (gate itself failed)"
107+
show ""
108+
show "Set VERISIM_VCLT_GATE=<path> to wire this gate into VeriSimDB's"
109+
show "VCL executor (queries bypass gate; mutations always pass through)."

0 commit comments

Comments
 (0)