feat(trace): host execution trace + replay oracles (contextgraph-trace, sketch)#45
Merged
Merged
Conversation
…e, sketch) The provider conformance suite holds a provider honest; nothing holds the host-side agent loop honest. This adds the missing half at sketch stage: - docs/sketches/host-trace.md — an append-only NDJSON journal a harness (or a Harbor-adapter-style shim observing one) emits while it works, reusing the protocol identity spine (FrameId, wire Verdict), carrying no frame bodies. - contextgraph-trace (new unpublished workspace crate, deps: contextgraph-types + serde only) — the journal wire types and eight pure replay oracles: sequence-integrity, turn-loop-pairing, assembly-budget-honesty, staleness-at-use, citation-at-use, deterministic-composition, effect-exactly-once, resume-integrity. - Adversarial fixtures in the --misbehave tradition: two golden journals that pass, and one fixture per check that trips exactly that check. No wire shape or SPEC.md change; nothing here is normative.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
macanderson
marked this pull request as ready for review
July 23, 2026 20:21
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.
What
The provider conformance suite holds a provider honest; nothing holds the host-side agent loop honest. This PR adds the protocol-side substrate for benchmarking that loop, at sketch stage:
docs/sketches/host-trace.md— a design sketch (non-normative, in thepush-invalidation.mdtradition) for an append-only NDJSON journal a harness — or a Harbor-adapter-style shim observing one — emits while it works: turns, prompt assemblies, tool-call pairing,context/verifyobservations, side effects, crashes and resumes. The journal reuses the protocol's identity spine (FrameId, wireVerdict) and no frame body ever travels in it — identities and costs only, the same economycontext/verifyruns on.contextgraph-trace— a new unpublished workspace crate (deps:contextgraph-types+ serde only) with the journal wire types and eight pure replay oracles, in the conformance suite's vocabulary (named checks, pass/fail/skip, evidence naming exactseqnumbers):sequence-integrityturn-loop-pairingassembly-budget-honestyreferenceframesstaleness-at-usestale/goneverdict (§4 V2 — citing dead evidence)citation-at-usedeterministic-compositioncomposition_digesteffect-exactly-oncegit pushbug)resume-integrityAdversarial fixtures in the
--misbehavetradition: two golden journals (clean run; crash + lossless resume) that pass, and one fixture per check that trips exactly that check — asserted by the integration suite.Why here
Per the design discussion: the protocol repo defines the measurable surface (trace vocabulary + oracles, portable to any CGEP host); the benchmark runner (chaos scheduling, scripted-model cassettes, task generators, memory-ablation arms) lives with the system under test and is deliberately absent. Where that runner lands — internal vs. a public agent-agnostic runner with per-harness adapters — is an open question recorded in the sketch, and the journal contract is designed so either works.
Notes
SPEC.mdchange; nothing here is normative. The crate inheritspublish = false.cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test --workspaceall green locally (21 new tests).