Repository navigation
feat(agent): add durable JSONL trace foundation - #94
Merged
Pepps233 merged 4 commits intoAug 23, 2026
Merged
Conversation
- Persists telemetry spans and session ranges without transcript payloads - Keeps recorder failures passive and marks incomplete invocations with missing footers
- Runs the shared telemetry adapter contract against durable JSONL output - Protects ordering, crash markers, exclusive creation, and passive failure behavior
- Separates immutable producer identity from session and harness changes - Validates recoverable JSONL streams without importing runtime packages
- Locks coding-agent and AgentHarness cursor formats to portable fixtures - Protects diagnostics for transitions, truncation, writer failure, and corrupt structure
Pepps233
marked this pull request as ready for review
August 19, 2026 05:24
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
Adds a private, runtime-neutral JSONL trace foundation that implements the existing callback-based telemetry contract.
One trace can now represent a complete Diffex process invocation across session bindings and live harness activations without importing either runtime or requiring AgentHarness completion.
Runtime wiring, transcript materialization, analysis, and evolution changes remain out of scope for this PR.
Reasoning
Immutable producer identity belongs in the trace header, while session and harness state can change during one process invocation and must be represented as ordered records.
Format-specific cursors preserve truthful durability boundaries without coupling the trace package to coding-agent or AgentHarness internals.
A streaming validator makes incomplete and corrupted traces diagnostically useful by retaining valid records while reporting structural failures.
Exclusive per-invocation files, serialized writes, and passive post-creation failures keep tracing isolated from application behavior.
Changes
@earendil-works/diffex-harness-tracepackage with only the telemetry package as a runtime dependency.session_attachrecords with stable binding IDs, session identity, path, format metadata, and attachment reasons.harness_activaterecords for initial activation and live harness switching.session_segmentrecords using coding-agent v3 entry cursors or AgentHarness durable sequence bounds.flush(), idempotentclose(), missing-footer crash detection, and passive writer degradation.Testing
node ../../node_modules/vitest/dist/cli.js --run test/harness-trace.test.tsfrompackages/harness-trace- 34 tests passed.npm run check