Skip to content

docs(runtime): sync all docs with implementation, add SDK encoding helpers#20

Merged
simonovic86 merged 1 commit intomainfrom
claude/elated-keller
Mar 5, 2026
Merged

docs(runtime): sync all docs with implementation, add SDK encoding helpers#20
simonovic86 merged 1 commit intomainfrom
claude/elated-keller

Conversation

@simonovic86
Copy link
Owner

Summary

Sync documentation across all runtime modules to reflect current implementation state through Phase 5 (Hardening) and Task 15. Add new SDK encoding helpers for fixed-size checkpoint serialization.

Changes

Documentation Updates

  • CLAUDE.md: Update phase/task status, add make demo target, clarify adaptive tick loop (1 Hz default, 10ms fast path), expand architecture section with new internal packages
  • IMPLEMENTATION_STATUS.md: Update checkpoint format to v0x04 (209-byte header), mark lease-based authority (Task 12) and signed lineage (Task 13) as implemented, note divergence detection requires Task 15
  • DEVELOPMENT.md: Update Go requirement to 1.25+, increase cyclomatic complexity limit to 20, expand directory structure with new packages (authority, eventlog, hostcall, inspector, pricing, registry, replay, runner, settlement, simulator, timeline, wasmutil, budget, identity, lineage, receipt)
  • AGENT_LIFECYCLE.md: Document 5 WASM exports (add return value to agent_tick), detail v0x04 checkpoint header (209 bytes with lease/lineage metadata), update cost calculation to nanosecond precision, provide v0x04 counter example
  • ARCHITECTURE.md: Update hostcall table with implementation status, clarify metering precision and overflow guards, detail full v0x04 checkpoint structure with lease and lineage fields
  • IMPROVEMENTS.md: Mark improvements feat(agent): checkpoint v2 with persisted tick number #3fix(runtime): enforce manifest policies and fix replay timeout safety bug #10 as complete (Observation-Weighted Retention, Multi-Tick Chain Verification, Replay Failure Escalation, Adaptive Tick Rate, SDK Checkpoint Serialization, Event Log Allocation Optimization), describe implementation details for each

SDK Enhancements

  • encoding.go: Add Raw(b []byte) method for fixed-size fields without length prefix, add FixedBytes(n int) decoder, add ReadInto(dst) convenience method for array fields
  • encoding_test.go: Add 8 new tests: TestEncoder_Raw_RoundTrip, TestDecoder_ReadInto, TestDecoder_FixedBytes_ShortRead, TestDecoder_ReadInto_ShortRead, TestEncoder_Raw_Empty, TestRaw_vs_Bytes_SizeComparison plus helper test

Notes

  • No code logic changes; purely documentation alignment + SDK API additions for fixed-size encoding
  • Raw and FixedBytes improve ergonomics for checkpoint serialization patterns like [16]byte arrays
  • Full test coverage for new encoding helpers

…lpers

Update stale documentation across 6 files to match current code:
- CLAUDE.md: update phase status, packages, CLI flags, SDK description
- IMPLEMENTATION_STATUS.md: fix version byte, header size, authority/lineage status, file reference
- DEVELOPMENT.md: Go 1.22→1.25, cyclomatic max 15→20, add 12 missing packages to project structure
- ARCHITECTURE.md: fix capability table status, header size, cost formula (Nanoseconds), byte layout
- AGENT_LIFECYCLE.md: 4→5 exports, Tick() returns bool, cost formula, checkpoint format v0x04
- IMPROVEMENTS.md: mark all 10 items DONE with implementation details

Add SDK encoding helpers for fixed-size fields:
- Encoder.Raw(b) appends bytes without length prefix
- Decoder.FixedBytes(n) reads exactly n bytes into new slice
- Decoder.ReadInto(dst) reads len(dst) bytes into existing slice
- 7 new tests covering round-trips, short reads, and size comparison

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@simonovic86 simonovic86 merged commit 74ee5bc into main Mar 5, 2026
@simonovic86 simonovic86 deleted the claude/elated-keller branch March 5, 2026 17:43
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