feat(ci): verify-ledger GitHub Action — verify AI work as a CI gate#102
Merged
Conversation
A reusable composite Action that recomputes a korgex receipt/journal's hash-chain
(+ causal DAG + Ed25519 signature) in CI and FAILS the build if anything was
tampered — zero trust in the tool that produced the ledger. Turns the verifiable-
cognition moat into a one-line check any repo can adopt:
- uses: New1Direction/korgex/.github/actions/verify-ledger@main
with: { path: '.korg/journal.json' } # or '**/*.korgreceipt.json'
- verify_ledger.py: resolves a verifier (KORG_VERIFY_BIN override · npx
@korgg/ledger-verify · cargo-installed korg-verify [default]) — all three impls
emit the same --json verdict — globs the path, verifies each, writes a markdown
verdict to . Exit 0 all-valid / 1 any-invalid / 2 setup error.
No-match fails loudly (no silent pass with nothing verified). Optional --pubkey
pins the signer.
- action.yml: composite; caches the korg-verify binary.
- Self-test workflow proves it on real CI: an intact frozen vector passes the gate,
a tampered one fails it (asserted).
Logic LIVE-validated locally against the committed conformance vectors with the real
korg-verify binary: intact->exit0, tampered->exit1 (exact seq error), missing->exit2,
glob handled, step-summary table rendered.
New1Direction
added a commit
that referenced
this pull request
Jun 6, 2026
The verify-ledger Action (#102) is the adoption vector for verifiable cognition, but an unadvertised action won't get used. Add a 'Gate it in CI' snippet next to the receipt section so the agent -> ledger -> CI-verify loop is discoverable. Co-authored-by: ares <285551516+New1Direction@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the verifiable-cognition moat into a one-line CI check any repo can adopt: recompute a korgex receipt/journal's hash-chain (+ causal DAG + Ed25519 signature) and fail the build if anything was tampered — zero trust in the tool that produced the ledger.
How it works
verify_ledger.pyresolves a verifier —KORG_VERIFY_BINoverride ·npx @korgg/ledger-verify(JS) ·korg-verifyfrom crates.io (default, installed if absent). All three implementations emit the same--jsonverdict, so parsing is uniform. Globs the path, verifies each file, writes a markdown verdict table to$GITHUB_STEP_SUMMARY.0all valid ·1any invalid (the gate) ·2setup error. A no-match fails loudly — no silent pass with nothing verified.action.ymlis a composite action (caches thekorg-verifybinary).Why here / why now
Placed in-repo (
uses: …/korgex/.github/actions/verify-ledger@…) so there's no new repo to stand up; it can be promoted to a standalone Marketplace action later. It directly leverages everything just shipped:korg-verify(crates.io), the receipt format, and the three independent verifiers.Verification
steps.*.outcome).korg-verifybinary against the committed vectors: intact → exit 0, tampered → exit 1 (exactseqerror), missing → exit 2, glob handled, step-summary table rendered..github/, no existing code touched.