π€ Auto-filed as prerequisite sub-issue for checkpoint-evidence schema.
Repo: WasmAgent/wasmagent-protocol
Milestone: Milestone 4 β Evidence types beyond execution
Problem
The checkpoint-evidence.schema.json implementation is blocked because it references domain concepts that lack established definitions:
checkpoint_id - what constitutes a checkpoint identifier?
parent_run_id - relationship to execution runs?
fork_of - how are forks identified and tracked?
state_digest - what state is being digested?
Approach
Create the foundational architecture documentation and type definitions that checkpoint-evidence.schema.json will depend on.
1. Create checkpoint/fork architecture design document
Create docs/design/checkpoint-fork-architecture.md with:
Checkpoint Definition:
- What a checkpoint represents in the WasmAgent protocol (e.g., a snapshot of execution state at a specific point)
- When checkpoints are created (e.g., at explicit agent checkpoints, after tool executions, at intervals)
- What checkpoint state includes (e.g., memory, registers, linear memory, stack)
Fork Definition:
- What constitutes a fork (e.g., divergence from a parent execution path)
- When forks occur (e.g., branching decisions, parallel exploration, replay with different inputs)
- How forks relate to checkpoints (fork originates from a checkpoint)
Relationships:
- Checkpoint β Run: many-to-one (a checkpoint belongs to one run; a run can have multiple checkpoints)
- Fork β Checkpoint: one-to-one (a fork originates from exactly one checkpoint)
- Fork β Run: one-to-one (a fork creates a new run with the forked execution)
2. Define core data structure formats
Add type definitions to docs/design/checkpoint-fork-architecture.md:
checkpoint_id: String with format checkpoint:{run_id}:{sequence_number}
- Example:
checkpoint:run-abc123:5 (5th checkpoint of run run-abc123)
- MUST be unique within a protocol instance
- Sequence number increments monotonically within a run
parent_run_id: String reference to existing run_id from execution model
- Format: Matches existing run_id format (e.g.,
run-{uuid} or as defined in execution schema)
- References the run that created this checkpoint
fork_of: Optional string with format checkpoint:{checkpoint_id}
- Present only when this run is a fork of another execution
- References the checkpoint from which the fork originated
- Null for root/non-forked runs
state_digest: String (cryptographic hash)
- Algorithm: SHA-256 (default) or as specified in
digest_algorithm field
- Computed over: serialized checkpoint state including:
- Linear memory contents
- Stack state
- Global variables
- Any additional Wasm state
- Format:
{algorithm}:{hex_digest} (e.g., sha256:abcd1234...)
3. Evidence model documentation
Add to docs/design/checkpoint-fork-architecture.md:
What checkpoint-evidence asserts:
- A specific checkpoint existed at a specific point in execution
- The checkpoint state digest is as claimed
- The checkpoint was created by the claimed run
- (Optional) The checkpoint is signed by the execution environment
Who signs checkpoint-evidence:
- The execution environment/runtime that captured the checkpoint
- Signature proves the checkpoint was created by a trusted environment
Verification requirements:
- Verify signature against trusted execution environment key
- Verify checkpoint_id format validity
- Verify parent_run_id references an existing run
- Verify fork_of references an existing checkpoint (if present)
- Verify state_digest format and re-compute if checkpoint state available
4. Create prerequisite schemas (if needed)
If checkpoints or forks need their own schemas (beyond what checkpoint-evidence provides), create:
schemas/aep/checkpoint.schema.json (if checkpoints are independent artifacts)
schemas/aep/fork.schema.json (if forks are independent records)
If these are only referenced within checkpoint-evidence, document that they are inline types defined in checkpoint-evidence.schema.json rather than standalone schemas.
Files
docs/design/checkpoint-fork-architecture.md - CREATE (new file)
schemas/aep/checkpoint.schema.json - CREATE (only if checkpoints are independent artifacts)
schemas/aep/fork.schema.json - CREATE (only if forks are independent records)
schemas/aep/checkpoint-evidence.schema.json - NOT in this issue (blocked, unblocked by this issue)
Acceptance Criteria
Unblocks
π€ Auto-filed as prerequisite sub-issue for checkpoint-evidence schema.
Repo: WasmAgent/wasmagent-protocol
Milestone: Milestone 4 β Evidence types beyond execution
Problem
The
checkpoint-evidence.schema.jsonimplementation is blocked because it references domain concepts that lack established definitions:checkpoint_id- what constitutes a checkpoint identifier?parent_run_id- relationship to execution runs?fork_of- how are forks identified and tracked?state_digest- what state is being digested?Approach
Create the foundational architecture documentation and type definitions that checkpoint-evidence.schema.json will depend on.
1. Create checkpoint/fork architecture design document
Create
docs/design/checkpoint-fork-architecture.mdwith:Checkpoint Definition:
Fork Definition:
Relationships:
2. Define core data structure formats
Add type definitions to
docs/design/checkpoint-fork-architecture.md:checkpoint_id: String with format
checkpoint:{run_id}:{sequence_number}checkpoint:run-abc123:5(5th checkpoint of run run-abc123)parent_run_id: String reference to existing
run_idfrom execution modelrun-{uuid}or as defined in execution schema)fork_of: Optional string with format
checkpoint:{checkpoint_id}state_digest: String (cryptographic hash)
digest_algorithmfield{algorithm}:{hex_digest}(e.g.,sha256:abcd1234...)3. Evidence model documentation
Add to
docs/design/checkpoint-fork-architecture.md:What checkpoint-evidence asserts:
Who signs checkpoint-evidence:
Verification requirements:
4. Create prerequisite schemas (if needed)
If checkpoints or forks need their own schemas (beyond what checkpoint-evidence provides), create:
schemas/aep/checkpoint.schema.json(if checkpoints are independent artifacts)schemas/aep/fork.schema.json(if forks are independent records)If these are only referenced within checkpoint-evidence, document that they are inline types defined in checkpoint-evidence.schema.json rather than standalone schemas.
Files
docs/design/checkpoint-fork-architecture.md- CREATE (new file)schemas/aep/checkpoint.schema.json- CREATE (only if checkpoints are independent artifacts)schemas/aep/fork.schema.json- CREATE (only if forks are independent records)schemas/aep/checkpoint-evidence.schema.json- NOT in this issue (blocked, unblocked by this issue)Acceptance Criteria
docs/design/checkpoint-fork-architecture.mdexists and contains:schemas/aep/checkpoint.schema.jsonand/orschemas/aep/fork.schema.jsonexist with valid JSON Schemaschemas/aep/checkpoint-evidence.schema.jsonUnblocks
schemas/aep/checkpoint-evidence.schema.json(issue [milestone Milestone 4 ] Addschemas/aep/checkpoint-evidence.schema.jsonβ signed checkpoint/fork rec...Β #78)