Skip to content

[codex] evidence provenance fabric#10

Merged
EP93 merged 2 commits into
mainfrom
codex/evidence-provenance-fabric
Jun 25, 2026
Merged

[codex] evidence provenance fabric#10
EP93 merged 2 commits into
mainfrom
codex/evidence-provenance-fabric

Conversation

@EP93

@EP93 EP93 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR implements the evidence provenance fabric slice in the OSS Veritio repo. The problem was that Veritio had strong audit records and graph edges, but no portable commit-level manifest tying heterogeneous evidence records into a verifiable batch, and the examples/workbench did not yet demonstrate governed changes end to end across SDKs, storage, browser UI, Docker examples, and hosted ingest/read proof.

The effect on users was a product gap: they could see isolated audit rows or graph edges, but not a clear proof path from a governed application change through SDK-generated evidence, local verification, example runtime behavior, and production hosted visibility. That made the proof of concept look like local seed data rather than a real application flow.

Root Cause

The root cause was that the protocol lacked an EvidenceCommit primitive and the examples were not wired as first-class evidence producers. Storage and Workbench code could verify event and edge chains, but could not record a stable commit manifest for a group of records. The browser examples also needed production-like smoke coverage so changes could be validated as an integrated user-visible workflow rather than only as unit tests.

Changes

This PR adds a language-neutral EvidenceCommit schema and conformance fixture, then implements matching create/hash/verify behavior in TypeScript, Python, and Go. The commit algorithm uses canonical JSON, sha256-qualified member hashes, ordered member indexes, duplicate rejection, commit hash-chain verification, and fail-closed behavior for malformed manifests.

It adds governed-change helpers across TypeScript, Python, and Go so examples can derive audit records, revision evidence, and graph relations from a declared change. It extends the file evidence store and local Workbench/server with batch recording, commit listing, commit verification, export support, HTTP routes, and MCP tools. The Workbench UI now exposes a denser evidence surface with events, changes, commits, graph summary, verification status, export files, and browser-tested responsive behavior.

It upgrades the Next.js, FastAPI, and Gin examples so CRUD and governed lifecycle scenarios generate real SDK evidence. The Docker examples now verify audit, edge, and commit chains after exercising their HTTP routes. Browser smoke scripts cover the Next.js governed-change flow and the local Workbench on desktop and mobile Chromium.

It also documents the split-repo routing and updates public OSS docs around architecture, AI integration, release checks, examples, and repository boundaries.

Validation

Verified locally after the commit with:

  • bun run verify:split

Earlier in the same rollout, the exact implemented tree was also verified with:

  • bun run verify
  • bun run verify:examples:browser
  • bun run verify:examples:docker

Production proof was run against https://console.getveritio.com after deploying veritio-cloud version 118f7a01-8b74-4e7d-9db2-6acfd67d35e3. Using real production scoped keys, I ingested evidence generated by the Dockerized FastAPI and Gin governed CRUD examples. Each example generated 11 audit records, 13 edge records, and 4 local EvidenceCommit records with all local verifiers returning ok: true; the hosted ingest accepted the generated audit and edge records, and the hosted read API/dashboard showed the resulting production evidence rows.

One hosted gap remains intentionally outside this OSS PR: Veritio Cloud currently ingests and displays audit records and graph edges, but does not yet expose EvidenceCommit ingest/list UI as a first-class hosted surface. The OSS protocol and local storage/workbench pieces are ready for that follow-up.

@EP93 EP93 marked this pull request as ready for review June 25, 2026 06:44
…verned change

Adversarial review found a confirmed cross-SDK divergence: the governed-change
occurredAt was parsed three different ways for a timezone-naive timestamp
(Python -> UTC, TypeScript -> host-LOCAL/non-deterministic, Go -> rejected).
occurredAt is hashed evidence, so the same governed change recorded via
different SDKs produced different hashes or a hard error.

- TypeScript (governed-change.ts): a timezone-naive ISO string is interpreted as
  UTC (append Z), never host-local; Date inputs unchanged.
- Go (governed_change.go): fall back to a naive layout parsed as UTC instead of
  rejecting offset-less timestamps.
- Python (governed_change.py): raise the same typed "occurredAt must be a valid
  date" error instead of leaking the stdlib ValueError text; update the test
  that pinned that leaky message.

All three now produce byte-identical output for naive / offset / Z inputs
(... -> 2026-06-23T10:18:00.000Z) and the identical typed error for invalid
input, verified by a 3-language reproduction.

Also import mongodb lazily in the storage live-databases test (the eager
top-level import crashes bson under Bun), matching the fix already on the
stacked PR so this branch's gate is green standalone.

bun run verify: green (TS/Python/Go SDKs, storage, adapters, server, cli).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@EP93 EP93 merged commit 9688afb into main Jun 25, 2026
1 check passed
@EP93 EP93 deleted the codex/evidence-provenance-fabric branch June 25, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant