integrations: Chronicle record/replay + unbiased overhead benchmark - #1
Merged
Conversation
Attaches Chronicle to the two neutral MAS from the outside, via the LLMClient seam. Nothing in src/testbench imports Chronicle; the code lives under integrations/ so the tool-agnostic CI rule (tests/test_agnostic.py) stays green. - integrations/chronicle/chronicle_client.py: a ChronicleClient that wraps any LLMClient and records each model call as an envelope, replaying it on stub. - demo.py / demo_loop.py: record -> replay -> cut-point on the orchestrator and the looping evaluator-optimizer MAS. - benchmark.py: unbiased recording-overhead + determinism harness. Because the workload cannot import Chronicle, this overhead cannot be tuned to flatter the tool. Recording adds ~28-300 us per crossing (median ~163 us, under 0.1% of a 300 ms model call); replay is deterministic with zero real model calls. - test_replay_regression.py + test_overhead_benchmark.py: assert detection, determinism, and zero model calls for both MAS. - workers.py: doc comments naming each agent and the model-call seam (tool neutral, no imports). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Tisha Chawla <tisha.chawla2020@vitalum.ac.in>
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.
Attaches Chronicle to the two neutral MAS from the outside, via the
LLMClientseam. Nothing insrc/testbenchimports Chronicle; the code lives underintegrations/, so the tool-agnostic guarantee (tests/test_agnostic.py) stays green (verified).Why this belongs here (and not in Chronicle)
The value is an unbiased overhead number. Because this workload cannot import Chronicle, the recording overhead measured here cannot be tuned to flatter the tool. It complements Chronicle's own incident benchmark, which measures fault detection.
What's added (all under
integrations/chronicle/)chronicle_client.py:ChronicleClientwraps anyLLMClient, records each model call as an envelope, and serves it back on replay. The MAS is unchanged.demo.py/demo_loop.py: record → replay → cut-point on the orchestrator MAS and the looping evaluator-optimizer MAS.benchmark.py: unbiased overhead + determinism harness.test_replay_regression.py,test_overhead_benchmark.py: correctness (detection, determinism, zero model calls) for both MAS.Result
Recording adds ~28-300 µs per crossing (median ~163 µs, under 0.1% of a 300 ms model call) on a realistic MAS, replay is deterministic with zero real model calls. Numbers via:
Neutral suite (11) and the agnostic test both pass.
workers.pygains tool-neutral doc comments only (no imports). No em/en dashes.