- Co-Authored-By
- Claude Fable 5 <noreply@anthropic.com>
- Claude-Session
- https://claude.ai/code/session_01GoYpb8FEmdxVErsv7ABCYi
Measure the prefix reuse a transcript actually has
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
bench/adapters/openagents_coder.py -
added
bench/fixtures/weka-trace-v1-transcript.json -
modified
bench/replay_weka.py -
modified
bench/test_replay_weka.py
Diff
4 files changed, +107 -12
bench/adapters/openagents_coder.py modified +19 -1
@@ -33,7 +33,25 @@ from harbor.agents.installed.base import BaseInstalledAgent, with_prompt_templat
| 33 | 33 |
|
| 34 | 34 |
|
| 35 | 35 |
|
| 36 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 37 | 55 |
|
| 38 | 56 |
|
| 39 | 57 |
|
bench/fixtures/weka-trace-v1-transcript.json added +10
@@ -0,0 +1,10 @@
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
bench/replay_weka.py modified +46 -8
@@ -132,9 +132,25 @@ def _blocks_for_event(ev: Dict[str, Any]) -> List[Any]:
| 132 | 132 |
|
| 133 | 133 |
|
| 134 | 134 |
|
| 135 |
|
|
| 135 |
|
|
| 136 |
|
|
| 137 |
|
|
| 138 |
|
|
| 139 |
|
|
| 140 |
|
|
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
|
|
| 145 |
|
|
| 146 |
|
|
| 147 |
|
|
| 148 |
|
|
| 149 |
|
|
| 150 |
|
|
| 136 | 151 |
|
| 137 | 152 |
|
| 153 |
|
|
| 138 | 154 |
|
| 139 | 155 |
|
| 140 | 156 |
|
@@ -142,10 +158,20 @@ def _analyze_session(events: List[Dict[str, Any]]) -> Dict[str, Any]:
| 142 | 158 |
|
| 143 | 159 |
|
| 144 | 160 |
|
| 145 |
|
|
| 146 |
|
|
| 147 |
|
|
| 148 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 149 | 175 |
|
| 150 | 176 |
|
| 151 | 177 |
|
@@ -272,7 +298,7 @@ def _build_output(results: List[Dict[str, Any]], corpus: Dict[str, Any]) -> Dict
| 272 | 298 |
|
| 273 | 299 |
|
| 274 | 300 |
|
| 275 |
|
|
| 301 |
|
|
| 276 | 302 |
|
| 277 | 303 |
|
| 278 | 304 |
|
@@ -289,7 +315,7 @@ def process_paths(paths: List[Path]) -> Tuple[List[Dict[str, Any]], List[str]]:
| 289 | 315 |
|
| 290 | 316 |
|
| 291 | 317 |
|
| 292 |
|
|
| 318 |
|
|
| 293 | 319 |
|
| 294 | 320 |
|
| 295 | 321 |
|
@@ -306,9 +332,21 @@ def main(argv: Optional[List[str]] = None) -> int:
| 306 | 332 |
|
| 307 | 333 |
|
| 308 | 334 |
|
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 343 |
|
|
| 344 |
|
|
| 345 |
|
|
| 346 |
|
|
| 309 | 347 |
|
| 310 | 348 |
|
| 311 |
|
|
| 349 |
|
|
| 312 | 350 |
|
| 313 | 351 |
|
| 314 | 352 |
|
bench/test_replay_weka.py modified +32 -3
@@ -28,7 +28,9 @@ def _run(args: List[str]) -> subprocess.CompletedProcess:
| 28 | 28 |
|
| 29 | 29 |
|
| 30 | 30 |
|
| 31 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 32 | 34 |
|
| 33 | 35 |
|
| 34 | 36 |
|
@@ -40,13 +42,36 @@ def test_sample_reuse_ratio() -> None:
| 40 | 42 |
|
| 41 | 43 |
|
| 42 | 44 |
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 43 | 68 |
|
| 44 | 69 |
|
| 45 | 70 |
|
| 46 | 71 |
|
| 47 | 72 |
|
| 48 | 73 |
|
| 49 |
|
|
| 74 |
|
|
| 50 | 75 |
|
| 51 | 76 |
|
| 52 | 77 |
|
@@ -59,7 +84,11 @@ def test_malformed_and_empty_do_not_block_valid() -> None:
| 59 | 84 |
|
| 60 | 85 |
|
| 61 | 86 |
|
| 62 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 63 | 92 |
|
| 64 | 93 |
|
| 65 | 94 |
|