quilt_emit: vessel lifecycle events β quilt 5-opcode WAL (first quilt-native fleet agent) - #1
Merged
Merged
Conversation
β¦t-native fleet agent) git-agent's vessel already emits structured lifecycle events (session start, worklog, task outcomes, career promotions, fences, skills, snapshots, heartbeats, session end) but nothing turned them into durable, verifiable records. This adds the missing translation + validation layer: - git_agent/quilt_emit.py β QuiltEmitter: validate -> map -> append to an fnv1a hash-chained JSONL WAL (default ~/.git-agent/quilt.jsonl); replay() reconstructs reducer state from the WAL alone; verify() catches tampering (hash recompute), truncation (chain linkage + seq continuity), and replay divergence. Invalid events raise QuiltValidationError with the precise missing/invalid field β never silently dropped, never crash the ingest loop. Duplicate event_id delivery is idempotent (at-least-once ingest -> exactly-once WAL). - git_agent/schemas/event.schema.json β canonical JSON Schema, shipped with the producer per fleet doctrine (schemas belong with the producer). - tests/fixtures/*.json β REAL event payloads captured from a live VesselManager via tests/_capture_fixtures.py (kept for regeneration). - tests/test_quilt_emit.py β 25 behavioral checks, FAIL-first. Opcode mapping: session_start->BIND(identity), worklog->LINK, task_completion /promotion/fence->EFFECT, skill->BIND(skills), snapshot->VIEW, heartbeat->TICK, session_end->FORGET(archived). Suite: 259 passed (234 prior + 25 new), 4.14s.
This was referenced Sep 26, 2026
Merged
SuperInstance
added a commit
that referenced
this pull request
Sep 26, 2026
Grand Quilt P0.2+P0.3: Jev judgment gate + the captain's VIEW (stacked on #1)
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.
Why
git-agent's vessel already produces structured lifecycle events (session start, worklog, task outcomes, career promotions, fences, skills, snapshots, heartbeats, session end) β but nothing turned them into durable, verifiable records. The fleet's quilt kernel (BIND/LINK/EFFECT/VIEW/TICK/FORGET) is the natural spine, and the org audit found the exact same gap shape everywhere: events exist, the WAL doesn't receive them, nothing checks them.
What
git_agent/quilt_emit.pyβQuiltEmitter:QuiltValidationErrorwith the precise field, never silently dropped, never crash the loop~/.git-agent/quilt.jsonl)event_idtwice β one WAL entry)git_agent/schemas/event.schema.jsonβ canonical schema shipped with the producer (fleet doctrine: schemas belong with the producer, not the linter).Fixtures are real captured payloads from a live
VesselManager(tests/_capture_fixtures.py, kept for regeneration) β no invented shapes.Verification
python3 -m pytest tests/test_quilt_emit.py -qβ 25 passed (FAIL-first: written against the absent module, watched them fail at import, built until green)python3 -m pytest tests -qβ 259 passed (234 prior + 25 new), 4.14s β the existing suite untouched and greenNext (not in this PR)
Wiring the emitter into the agent runtime (one import + one
ingestper lifecycle hook), then feeding tidepool/gauge real data instead of fixtures.