Skip to content

feat(spine): report integrity, governance, and ground truth, and verify a record file#172

Merged
ion-alpha-dev merged 1 commit into
mainfrom
feat/verify-all-tiers-and-file
Jun 29, 2026
Merged

feat(spine): report integrity, governance, and ground truth, and verify a record file#172
ion-alpha-dev merged 1 commit into
mainfrom
feat/verify-all-tiers-and-file

Conversation

@ion-alpha-dev

Copy link
Copy Markdown
Collaborator

What

flynn spine verify now reports a record tier by tier in one pass: integrity (the events rebuild the signed Merkle root), governance (no action ran without a preceding admission), and ground truth (a claimed success is backed by a passing check, or is not asserted). A record that fails any tier is reported in full and the command exits non-zero. Adds flynn spine verify --file <path> to verify a record read from a file rather than the durable store, with --key <hex> for a record signed by a key that is not self-certifying.

Why

Verification previously printed a single line for one tier and only worked against a run stored locally. A record carries more than integrity: it carries whether the run was governed and whether its success was grounded in a check. Reporting all three in one command makes what a record does and does not prove legible at a glance, and exiting non-zero on any failure lets the command gate a script. Verifying a file (not just a stored run) lets a record be checked after it has been exported or handed to a third party, which is the point of a portable, self-verifying record.

How to verify

go build ./..., go test ./cmd/flynn/, go vet ./cmd/flynn/, and golangci-lint run ./cmd/flynn/ pass. TestVerifyRecordReportsTiers asserts the three-tier report on a clean record; TestVerifyRecordCatchesTamper asserts a flipped byte is caught; TestVerifyRecordGroundTruth asserts a passing check reports grounded and a failing one reports not grounded; TestVerifyRecordExternalKey asserts a non-self-certifying record needs --key and then verifies.

…fy a record file

`flynn spine verify` now reports a record tier by tier in one pass: integrity (the events rebuild the signed Merkle root), governance (no action ran without a preceding admission), and ground truth (a claimed success is backed by a passing check, or is not asserted). A record that fails any tier is reported in full and the command exits non-zero, so it can gate a script.

Add `flynn spine verify --file <path>` to verify a record read from a file rather than the durable store, so an exported record can be checked anywhere. A record whose signer is self-certifying needs nothing further; one signed by another key (a published conformance vector) takes that key in hex via `--key`.

Tested: a clean record reports verified, governed, and not-asserted; a tampered record is caught; a run grounded by a passing check reports grounded while one whose check failed reports not grounded; a record signed by a non-self-certifying key needs `--key` and then verifies.
@ion-alpha-dev ion-alpha-dev merged commit 624954c into main Jun 29, 2026
12 checks passed
@ion-alpha-dev ion-alpha-dev deleted the feat/verify-all-tiers-and-file branch June 29, 2026 17:30
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant