Skip to content

integrations: Chronicle record/replay + unbiased overhead benchmark - #1

Merged
tishachawla-jg merged 1 commit into
mainfrom
feat/chronicle-integration
Jul 29, 2026
Merged

integrations: Chronicle record/replay + unbiased overhead benchmark#1
tishachawla-jg merged 1 commit into
mainfrom
feat/chronicle-integration

Conversation

@tishachawla-jg

Copy link
Copy Markdown
Contributor

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 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: ChronicleClient wraps any LLMClient, 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:

python integrations/chronicle/benchmark.py --json out.json --tex table.tex

Neutral suite (11) and the agnostic test both pass. workers.py gains tool-neutral doc comments only (no imports). No em/en dashes.

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>
@tishachawla-jg
tishachawla-jg merged commit cc0efea into main Jul 29, 2026
0 of 3 checks passed
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