feat(runtime): implement signed checkpoint lineage (Task 13)#18
Merged
simonovic86 merged 1 commit intomainfrom Mar 5, 2026
Merged
feat(runtime): implement signed checkpoint lineage (Task 13)#18simonovic86 merged 1 commit intomainfrom
simonovic86 merged 1 commit intomainfrom
Conversation
Add cryptographic agent identity (Ed25519 keypairs) and signed checkpoint hash chains, enabling verifiable checkpoint authenticity and divergent lineage detection without trusting the executing node. New packages: - pkg/identity/: agent Ed25519 keypair generation, serialization, persistence - pkg/lineage/: checkpoint signing, verification, content hashing (CID-compatible) Checkpoint format v0x04 (209-byte header) extends v0x03 with: - 32-byte PrevHash (SHA-256 chain to previous checkpoint) - 32-byte AgentPubKey (Ed25519 public key) - 64-byte Signature (covers header + state, excluding signature slot) Key changes: - Refactor ParseCheckpointHeader from 8 return values to CheckpointHeader struct - Extend storage Provider with SaveIdentity/LoadIdentity/DeleteIdentity - Migration protocol carries agent identity in AgentPackage - Inspector displays lineage fields and verifies signatures - CLI generates/loads agent identity on startup Derives from: EI-3 (Checkpoint Lineage Integrity), EI-11 (Divergent Lineage Detection), OA-1 (Canonical Logical Identity) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
Implements cryptographic signed checkpoint lineage enabling verifiable checkpoint authenticity and divergent lineage detection without trusting the executing node.
Key Changes
New Packages
pkg/identity/— Agent Ed25519 keypair generation, serialization, and persistent storagepkg/lineage/— Signed checkpoint types, content hashing (SHA-256), Ed25519 signing/verification, and signing domain constructionCheckpoint Format v0x04
PrevHash[32]byte — SHA-256 of previous checkpoint (hash chain)AgentPubKey[32]byte — Agent's Ed25519 public keySignature[64]byte — Ed25519 signature over header + stateSignature Protocol
checkpoint[0:145] || stateAgent Identity Management
<agentID>.identityAgentPackage.AgentIdentityStorage Provider Extension
SaveIdentity(ctx, agentID, data)— Persist agent identityLoadIdentity(ctx, agentID)— Load persisted identityInstance Changes
AgentIdentityandPrevCheckpointHashfieldsbuildCheckpoint()handles v3 (no lineage) and v4 (signed) formatsParseCheckpointHeader()refactored to returnCheckpointHeaderstructInvariant Support
Documentation
docs/runtime/SIGNED_LINEAGE.mdwith protocol, format, signing flow, and security considerationsTesting & CLI
cmd/igordto load/generate identity vialoadOrGenerateIdentity()initLocalAgent()helper for local agent setupCheckpointHeaderstruct