diff --git a/docs/test-results/token-usage/bug23-blocked-g00000282-20261121.json b/docs/test-results/token-usage/bug23-blocked-g00000282-20261121.json new file mode 100644 index 0000000..ef50a19 --- /dev/null +++ b/docs/test-results/token-usage/bug23-blocked-g00000282-20261121.json @@ -0,0 +1,1973 @@ +{ + "case_id": "BUG-000023", + "package_id": "api-3e26d1d655b21d2f7272d66be0badf3794639e7be28b73bb61d5f6fab24912e6", + "analysis_revision": 1, + "package_generation": 282, + "package_sha256": "f19d09ff0e8773912e8e9b4ed1f576ce8835271a8570a4a693119046703c365f", + "snapshot_date": "2026-11-21", + "state": "BLOCKED", + "routing": { + "destination": "inbox", + "reason": "INVALID_LLM_RESPONSES", + "retry_count": 5, + "retry_not_before": "2026-11-20T11:59:08.137195+00:00" + }, + "blocking_code": "BUDGET_TERMINAL", + "scope": "All rounds through generation 282. H1 pending result would exhaust budget after settlement; proposed next tools were wrongly classified as invalid responses three times. No new model calls.", + "accounting": "Output already includes reasoning. Clean retains regular calls including rejected first attempts; excludes explicitly marked correction calls. Unknown classifications are not guessed.", + "unknown_classification_calls": 0, + "pricing": { + "currency": "USD", + "basis": "Rates reconstructed from archived per-call token and cost metadata; not a fresh provider price lookup.", + "input_per_million": 0.75, + "cached_input_per_million": 0.075, + "output_including_reasoning_per_million": 3.75, + "recorded_at": "2026-11-19", + "cache_storage": "Archived estimates only; actual billed lifetime unknown." + }, + "billing_eur": { + "status": "unknown", + "before": null, + "after": null + }, + "total": { + "calls": 57, + "input_tokens": { + "known_sum": 283627, + "unknown_calls": 0 + }, + "output_tokens": { + "known_sum": 52445, + "unknown_calls": 0 + }, + "reasoning_tokens": { + "known_sum": 39333, + "unknown_calls": 2 + }, + "cached_input_tokens": { + "known_sum": 135626, + "unknown_calls": 9 + }, + "uncached_input_tokens": { + "known_sum": 64367, + "unknown_calls": 9 + }, + "elapsed_seconds": { + "known_sum": 742.5713930000002, + "unknown_calls": 0 + }, + "cache_created_tokens": { + "known_sum": 63632, + "unknown_calls": 5 + }, + "estimated_input_cost": { + "known_sum": 0.04827525, + "unknown_calls": 9 + }, + "estimated_cached_input_cost": { + "known_sum": 0.01017195, + "unknown_calls": 9 + }, + "estimated_output_cost": { + "known_sum": 0.19666875, + "unknown_calls": 0 + }, + "estimated_cost": { + "known_sum": 0.21139470000000002, + "unknown_calls": 9 + }, + "estimated_cache_storage_cost": { + "known_sum": 0.0026513333333333337, + "unknown_calls": 5 + }, + "calculated_generation_estimate": { + "lower_usd": 0.2613885, + "upper_usd": 0.31784145, + "cache_storage_excluded": true + } + }, + "clean": { + "calls": 34, + "input_tokens": { + "known_sum": 176378, + "unknown_calls": 0 + }, + "output_tokens": { + "known_sum": 35358, + "unknown_calls": 0 + }, + "reasoning_tokens": { + "known_sum": 29058, + "unknown_calls": 2 + }, + "cached_input_tokens": { + "known_sum": 81056, + "unknown_calls": 5 + }, + "uncached_input_tokens": { + "known_sum": 38898, + "unknown_calls": 5 + }, + "elapsed_seconds": { + "known_sum": 545.029653, + "unknown_calls": 0 + }, + "cache_created_tokens": { + "known_sum": 54989, + "unknown_calls": 3 + }, + "estimated_input_cost": { + "known_sum": 0.029173499999999998, + "unknown_calls": 5 + }, + "estimated_cached_input_cost": { + "known_sum": 0.0060792000000000025, + "unknown_calls": 5 + }, + "estimated_output_cost": { + "known_sum": 0.13259249999999997, + "unknown_calls": 0 + }, + "estimated_cost": { + "known_sum": 0.14747145000000003, + "unknown_calls": 5 + }, + "estimated_cache_storage_cost": { + "known_sum": 0.0022912083333333335, + "unknown_calls": 3 + }, + "calculated_generation_estimate": { + "lower_usd": 0.172077, + "upper_usd": 0.21016320000000002, + "cache_storage_excluded": true + } + }, + "by_phase": { + "INTERPRETING_CASE": { + "total": { + "calls": 3, + "input_tokens": { + "known_sum": 58654, + "unknown_calls": 0 + }, + "output_tokens": { + "known_sum": 5362, + "unknown_calls": 0 + }, + "reasoning_tokens": { + "known_sum": 826, + "unknown_calls": 2 + }, + "cached_input_tokens": { + "known_sum": 0, + "unknown_calls": 3 + }, + "uncached_input_tokens": { + "known_sum": 0, + "unknown_calls": 3 + }, + "elapsed_seconds": { + "known_sum": 178.792322, + "unknown_calls": 0 + }, + "cache_created_tokens": { + "known_sum": 0, + "unknown_calls": 0 + }, + "estimated_input_cost": { + "known_sum": 0, + "unknown_calls": 3 + }, + "estimated_cached_input_cost": { + "known_sum": 0, + "unknown_calls": 3 + }, + "estimated_output_cost": { + "known_sum": 0.0201075, + "unknown_calls": 0 + }, + "estimated_cost": { + "known_sum": 0, + "unknown_calls": 3 + }, + "estimated_cache_storage_cost": { + "known_sum": 0.0, + "unknown_calls": 0 + }, + "calculated_generation_estimate": { + "lower_usd": 0.02450655, + "upper_usd": 0.064098, + "cache_storage_excluded": true + } + }, + "clean": { + "calls": 2, + "input_tokens": { + "known_sum": 44449, + "unknown_calls": 0 + }, + "output_tokens": { + "known_sum": 612, + "unknown_calls": 0 + }, + "reasoning_tokens": { + "known_sum": 0, + "unknown_calls": 2 + }, + "cached_input_tokens": { + "known_sum": 0, + "unknown_calls": 2 + }, + "uncached_input_tokens": { + "known_sum": 0, + "unknown_calls": 2 + }, + "elapsed_seconds": { + "known_sum": 143.672393, + "unknown_calls": 0 + }, + "cache_created_tokens": { + "known_sum": 0, + "unknown_calls": 0 + }, + "estimated_input_cost": { + "known_sum": 0, + "unknown_calls": 2 + }, + "estimated_cached_input_cost": { + "known_sum": 0, + "unknown_calls": 2 + }, + "estimated_output_cost": { + "known_sum": 0.002295, + "unknown_calls": 0 + }, + "estimated_cost": { + "known_sum": 0, + "unknown_calls": 2 + }, + "estimated_cache_storage_cost": { + "known_sum": 0.0, + "unknown_calls": 0 + }, + "calculated_generation_estimate": { + "lower_usd": 0.005628675, + "upper_usd": 0.035631750000000004, + "cache_storage_excluded": true + } + } + }, + "INVESTIGATING_HYPOTHESES": { + "total": { + "calls": 54, + "input_tokens": { + "known_sum": 224973, + "unknown_calls": 0 + }, + "output_tokens": { + "known_sum": 47083, + "unknown_calls": 0 + }, + "reasoning_tokens": { + "known_sum": 38507, + "unknown_calls": 0 + }, + "cached_input_tokens": { + "known_sum": 135626, + "unknown_calls": 6 + }, + "uncached_input_tokens": { + "known_sum": 64367, + "unknown_calls": 6 + }, + "elapsed_seconds": { + "known_sum": 563.7790709999999, + "unknown_calls": 0 + }, + "cache_created_tokens": { + "known_sum": 63632, + "unknown_calls": 5 + }, + "estimated_input_cost": { + "known_sum": 0.04827525, + "unknown_calls": 6 + }, + "estimated_cached_input_cost": { + "known_sum": 0.01017195, + "unknown_calls": 6 + }, + "estimated_output_cost": { + "known_sum": 0.17656124999999998, + "unknown_calls": 0 + }, + "estimated_cost": { + "known_sum": 0.21139470000000002, + "unknown_calls": 6 + }, + "estimated_cache_storage_cost": { + "known_sum": 0.0026513333333333337, + "unknown_calls": 5 + }, + "calculated_generation_estimate": { + "lower_usd": 0.23688194999999998, + "upper_usd": 0.25374345, + "cache_storage_excluded": true + } + }, + "clean": { + "calls": 32, + "input_tokens": { + "known_sum": 131929, + "unknown_calls": 0 + }, + "output_tokens": { + "known_sum": 34746, + "unknown_calls": 0 + }, + "reasoning_tokens": { + "known_sum": 29058, + "unknown_calls": 0 + }, + "cached_input_tokens": { + "known_sum": 81056, + "unknown_calls": 3 + }, + "uncached_input_tokens": { + "known_sum": 38898, + "unknown_calls": 3 + }, + "elapsed_seconds": { + "known_sum": 401.35725999999994, + "unknown_calls": 0 + }, + "cache_created_tokens": { + "known_sum": 54989, + "unknown_calls": 3 + }, + "estimated_input_cost": { + "known_sum": 0.029173499999999998, + "unknown_calls": 3 + }, + "estimated_cached_input_cost": { + "known_sum": 0.0060792000000000025, + "unknown_calls": 3 + }, + "estimated_output_cost": { + "known_sum": 0.13029749999999998, + "unknown_calls": 0 + }, + "estimated_cost": { + "known_sum": 0.14747145000000003, + "unknown_calls": 3 + }, + "estimated_cache_storage_cost": { + "known_sum": 0.0022912083333333335, + "unknown_calls": 3 + }, + "calculated_generation_estimate": { + "lower_usd": 0.166448325, + "upper_usd": 0.17453145, + "cache_storage_excluded": true + } + } + } + }, + "calls": [ + { + "result_ref": "llm/operations/6c0a36f93bea41b87241a30769bd92bb6dc387869b46d3a013ec595cfc7e9548/round-0001.json", + "phase": "INTERPRETING_CASE", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "d6d05640c1923dc48da827791bd41341b6c03c6ee636e87a6a2238b129569e65", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "entity_resolution_plan_v4", + "model": "gemini-3.8-flash", + "input_tokens": 20909, + "output_tokens": 182, + "reasoning_tokens": null, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 138.946965, + "cache_created_tokens": 0, + "cache_status": "below_minimum", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.0006825, + "estimated_cost": null, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0022506749999999997, + "upper_usd": 0.01636425, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/88adb8b462df2c473b421f617b086dd65351532f28e81a7a1052e1f24da87dea/round-0001.json", + "phase": "INTERPRETING_CASE", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "6ba8d0b54b6b755a96799bec692268c99f07a551dc1d0f6581f708dde5ad9d69", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "entity_resolution_assessment_v4", + "model": "gemini-3.8-flash", + "input_tokens": 23540, + "output_tokens": 430, + "reasoning_tokens": null, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 4.725428, + "cache_created_tokens": 0, + "cache_status": "below_minimum", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.0016125, + "estimated_cost": null, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003378, + "upper_usd": 0.0192675, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/572afccbd4034d9c5485045cb4bb28b61fdd40e48dc8a3fab67cfc17e997cd65/round-0001.json", + "phase": "INTERPRETING_CASE", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "dbc4761bcaeab38bd745eb7df87d925cc2af492c6775787785c0a659ef70e200", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "case_plan_v2", + "model": "gemini-3.8-flash", + "input_tokens": 14205, + "output_tokens": 4750, + "reasoning_tokens": 826, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 35.119929, + "cache_created_tokens": 0, + "cache_status": "below_minimum", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.0178125, + "estimated_cost": null, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.018877875, + "upper_usd": 0.02846625, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/ca6cdff81de3cbae0492c26802daa287b11bf4fabefad477a9b64f1b6db30112/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "9afcb6210f358c0ed82f2aeddf7a04ff0abd219d8c08425de4f75e6fa5c03a13", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_startup_v1", + "model": "gemini-3.8-flash", + "input_tokens": 3088, + "output_tokens": 563, + "reasoning_tokens": 463, + "cached_input_tokens": 2816, + "uncached_input_tokens": 272, + "elapsed_seconds": 8.233087, + "cache_created_tokens": 2816, + "cache_status": "created", + "estimated_input_cost": 0.000204, + "estimated_cached_input_cost": 0.00021119999999999998, + "estimated_output_cost": 0.00211125, + "estimated_cost": 0.00252645, + "estimated_cache_storage_cost": 0.00011733333333333333, + "calculated_generation_estimate": { + "lower_usd": 0.00252645, + "upper_usd": 0.00252645, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/d844b0d123ece7c9861dbe282539f7879e6e6a21b3d1d4575c6e559fd5044aae/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "c6d6f75ee93980839f0fc4a62f7b9f9345c6e11fb1ca7e63c79547bf9d4d40c2", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_startup_v1", + "model": "gemini-3.8-flash", + "input_tokens": 3101, + "output_tokens": 502, + "reasoning_tokens": 443, + "cached_input_tokens": 2816, + "uncached_input_tokens": 285, + "elapsed_seconds": 6.044376, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00021375, + "estimated_cached_input_cost": 0.00021119999999999998, + "estimated_output_cost": 0.0018825, + "estimated_cost": 0.00230745, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.00230745, + "upper_usd": 0.00230745, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/54ef9b495e10fe49a2ffad5909c89efdbfe7ef7645b601865d12e5223b0651bc/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "d7cf436ae5e8cca7d960adf7e7e038c4324b9d436892d3e5bc70c722e4e53972", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_startup_v1", + "model": "gemini-3.8-flash", + "input_tokens": 3766, + "output_tokens": 533, + "reasoning_tokens": 453, + "cached_input_tokens": 2816, + "uncached_input_tokens": 950, + "elapsed_seconds": 6.940787, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0007125, + "estimated_cached_input_cost": 0.00021119999999999998, + "estimated_output_cost": 0.00199875, + "estimated_cost": 0.00292245, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.00292245, + "upper_usd": 0.00292245, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/71fd77c20b2af9bb2d842927c7a39cc8e1cf3e15541f387a26054fdb1047b6e4/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "8d72e4291a48bfde5d927e9db0487ca2964147f9e299462414409acb8034ab05", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_startup_v1", + "model": "gemini-3.8-flash", + "input_tokens": 4631, + "output_tokens": 525, + "reasoning_tokens": 403, + "cached_input_tokens": 2816, + "uncached_input_tokens": 1815, + "elapsed_seconds": 5.88865, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00136125, + "estimated_cached_input_cost": 0.00021119999999999998, + "estimated_output_cost": 0.00196875, + "estimated_cost": 0.0035412, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0035412, + "upper_usd": 0.0035412, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/0270771b422d04af95c20c38558476ded170af96569985af436406482d8d043a/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "0a5ff36679379bf067129d509209a2d21003d316c6e9e4602f44daae66c45888", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_startup_review_v1", + "model": "gemini-3.8-flash", + "input_tokens": 3208, + "output_tokens": 2930, + "reasoning_tokens": 2327, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 26.290713, + "cache_created_tokens": null, + "cache_status": "fallback", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.0109875, + "estimated_cost": null, + "estimated_cache_storage_cost": null, + "calculated_generation_estimate": { + "lower_usd": 0.011228100000000001, + "upper_usd": 0.013393500000000001, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/a4ed5334e4125ed14bcbca18629a561513bba48ef92afecc570c14d9e90e05cc/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "6231eecffd8190bc6db6ab81a9cacb2e139b9ee971ef0628b22eb3e296af480f", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3330, + "output_tokens": 452, + "reasoning_tokens": 295, + "cached_input_tokens": 2873, + "uncached_input_tokens": 457, + "elapsed_seconds": 7.848876, + "cache_created_tokens": 2873, + "cache_status": "created", + "estimated_input_cost": 0.00034275, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.001695, + "estimated_cost": 0.0022532249999999998, + "estimated_cache_storage_cost": 0.00011970833333333333, + "calculated_generation_estimate": { + "lower_usd": 0.0022532249999999998, + "upper_usd": 0.0022532249999999998, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/23e886f4a2c5eeadfea37a9114a2282780ab8a12c14b970fdcc26da184fc793b/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "af00c708144b848d4781ffc468ad889718a35c8dba1615028e00587a8399b5c1", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3663, + "output_tokens": 402, + "reasoning_tokens": 265, + "cached_input_tokens": 2885, + "uncached_input_tokens": 778, + "elapsed_seconds": 8.320289, + "cache_created_tokens": 2885, + "cache_status": "created", + "estimated_input_cost": 0.0005835, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.0015075, + "estimated_cost": 0.002307375, + "estimated_cache_storage_cost": 0.00012020833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.002307375, + "upper_usd": 0.002307375, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/90894bde812875d10dcc9a11218c864322aa1f10e8f2c0ee7db07eaa21a4a687/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "a3ec5df6a8ec2d88e7e7e2233cf21acf11c6ba915e6c2b622a066e9cc3e7df96", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4566, + "output_tokens": 634, + "reasoning_tokens": 390, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1681, + "elapsed_seconds": 7.95629, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00126075, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.0023775, + "estimated_cost": 0.0038546249999999995, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0038546249999999995, + "upper_usd": 0.0038546249999999995, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/db5a590ab945f036b4703f8ddcf783cdcf7f28e6cf9d9dfcff02dfdce55bc98b/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "d2fc3e0a89e91105af32e2a3d4c0c934f32201320bddf6a5e34f8ad45fd07e07", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4579, + "output_tokens": 393, + "reasoning_tokens": 229, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1694, + "elapsed_seconds": 5.796668, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0012705, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00147375, + "estimated_cost": 0.0029606249999999997, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0029606249999999997, + "upper_usd": 0.0029606249999999997, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/a2f620fa28477d1e6d7a3cae9bb5b91b52f60988324993e14e7cece5fc547429/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "e8ffa7bdcf70a06be1bb4e749f79f389871df54ac7a92b7e562d05061f58fd93", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4579, + "output_tokens": 658, + "reasoning_tokens": 442, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1694, + "elapsed_seconds": 7.2397, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0012705, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.0024675, + "estimated_cost": 0.0039543749999999996, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0039543749999999996, + "upper_usd": 0.0039543749999999996, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/bbf03137db61614a7898353127aae3d114e56606ca757881038446b590a4cc21/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "e8108d130bea7a422b923f7062cbb8a4ff049b03d7087adcd8ceb80dd0081f6a", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3362, + "output_tokens": 1535, + "reasoning_tokens": 1199, + "cached_input_tokens": 2301, + "uncached_input_tokens": 1061, + "elapsed_seconds": 15.460203, + "cache_created_tokens": 2301, + "cache_status": "created", + "estimated_input_cost": 0.00079575, + "estimated_cached_input_cost": 0.00017257499999999998, + "estimated_output_cost": 0.00575625, + "estimated_cost": 0.006724575, + "estimated_cache_storage_cost": 9.5875e-05, + "calculated_generation_estimate": { + "lower_usd": 0.006724575, + "upper_usd": 0.006724575, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/b7f2e84e7ce1ab15fea771e71ef5c71f3321d1b419eefa7f3f69f110b5c356c6/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "e68a86c6985e83db1c9a86281b26fdd7e3c21d0bbd38598c194cc4138d5db5ac", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3373, + "output_tokens": 352, + "reasoning_tokens": 223, + "cached_input_tokens": 2873, + "uncached_input_tokens": 500, + "elapsed_seconds": 5.430929, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.000375, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.00132, + "estimated_cost": 0.001910475, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.001910475, + "upper_usd": 0.001910475, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/1704c36027e9e7cb8b3d1ec6c6ce478bbf9541e4a8d6a85ebe0c63fbb951d4ca/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "c6a611b89447c7db035da6845b607548f1f78dbfd82f133967554bae1875326c", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3678, + "output_tokens": 389, + "reasoning_tokens": 234, + "cached_input_tokens": 2885, + "uncached_input_tokens": 793, + "elapsed_seconds": 5.422091, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00059475, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00145875, + "estimated_cost": 0.002269875, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.002269875, + "upper_usd": 0.002269875, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/5f1d1465d80c74cdf8ba600d62a21e8b2c5797399b72f77a358900a8fc384843/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "d371d86fe64bff2c60be8715f87136d8b007aaed5bec86d31d458dd875276629", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3691, + "output_tokens": 326, + "reasoning_tokens": 168, + "cached_input_tokens": 2885, + "uncached_input_tokens": 806, + "elapsed_seconds": 6.049123, + "cache_created_tokens": 2885, + "cache_status": "created", + "estimated_input_cost": 0.0006045, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.0012225, + "estimated_cost": 0.002043375, + "estimated_cache_storage_cost": 0.00012020833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.002043375, + "upper_usd": 0.002043375, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/803fd739ff81c2bc48facdcc42ee3136ae246cf9e421165c25e8b144bcadc8db/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "d371d86fe64bff2c60be8715f87136d8b007aaed5bec86d31d458dd875276629", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3691, + "output_tokens": 317, + "reasoning_tokens": 157, + "cached_input_tokens": 2885, + "uncached_input_tokens": 806, + "elapsed_seconds": 4.462063, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0006045, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00118875, + "estimated_cost": 0.002009625, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.002009625, + "upper_usd": 0.002009625, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/ce832a57a14cb384dc883f85330dd494750a55427de579f7bad75f956466c699/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "abf4f08331a13571e3ce2549f59abb72c4efce76b87a57d9f4973333a1d64ba4", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3758, + "output_tokens": 335, + "reasoning_tokens": 217, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 13.494263, + "cache_created_tokens": null, + "cache_status": "fallback", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.00125625, + "estimated_cost": null, + "estimated_cache_storage_cost": null, + "calculated_generation_estimate": { + "lower_usd": 0.0015381, + "upper_usd": 0.00407475, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/d1f0925c8c965af48b7ece664c0ccdaae59563eefb9825b0cc704660eb7a858f/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "7a8bc85e43d519dc691082edf0b1215620b749d26ec5d9cfd587d547f5a19db6", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4170, + "output_tokens": 446, + "reasoning_tokens": 256, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 16.537045, + "cache_created_tokens": null, + "cache_status": "fallback", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.0016725, + "estimated_cost": null, + "estimated_cache_storage_cost": null, + "calculated_generation_estimate": { + "lower_usd": 0.00198525, + "upper_usd": 0.0048000000000000004, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/380b7dd01cdcda45e7b2199227eccb966d88cb56db9f20193bf85daa46398517/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "d3fb3bb0385beb7d1b6d4b11668e4fb27dcaf8fcab215167a72ad840b84a9ebd", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4242, + "output_tokens": 618, + "reasoning_tokens": 511, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 6.708031, + "cache_created_tokens": 0, + "cache_status": "fallback", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.0023175, + "estimated_cost": null, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0026356500000000002, + "upper_usd": 0.005499, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/d4d693a4107be85a623890f5a885cb6236f0d0c8ffacb456b8514f611632bb48/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "60e425ab04d0931cfee7d39bc22b914e33861baeadbc12df9e0b8f1931e040aa", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3716, + "output_tokens": 8379, + "reasoning_tokens": 7994, + "cached_input_tokens": 2301, + "uncached_input_tokens": 1415, + "elapsed_seconds": 72.494922, + "cache_created_tokens": 2301, + "cache_status": "created", + "estimated_input_cost": 0.00106125, + "estimated_cached_input_cost": 0.00017257499999999998, + "estimated_output_cost": 0.03142125, + "estimated_cost": 0.032655075, + "estimated_cache_storage_cost": 9.5875e-05, + "calculated_generation_estimate": { + "lower_usd": 0.032655075, + "upper_usd": 0.032655075, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/a09bbc2809c3c4c27143c827eea878b7ad373176b40e77eb6e102f2c24db0bff/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "53e8722a98aa5c801bb6c6b7e87e1c621b26e55254c36b1a6c899db782dd8a75", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3733, + "output_tokens": 2043, + "reasoning_tokens": 1733, + "cached_input_tokens": 2301, + "uncached_input_tokens": 1432, + "elapsed_seconds": 16.957576, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.001074, + "estimated_cached_input_cost": 0.00017257499999999998, + "estimated_output_cost": 0.00766125, + "estimated_cost": 0.008907825, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.008907825, + "upper_usd": 0.008907825, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/c619a7901de5674f54e8371759fba596a7746f67d62499b198780813912e5c31/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "fdc81f7446c807bf06cab03f4656d24d0c648d3a8f3c03d23bc6e16ed15530eb", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3402, + "output_tokens": 230, + "reasoning_tokens": 176, + "cached_input_tokens": 2873, + "uncached_input_tokens": 529, + "elapsed_seconds": 5.496911, + "cache_created_tokens": 2873, + "cache_status": "created", + "estimated_input_cost": 0.00039675, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.0008625, + "estimated_cost": 0.001474725, + "estimated_cache_storage_cost": 0.00011970833333333333, + "calculated_generation_estimate": { + "lower_usd": 0.001474725, + "upper_usd": 0.001474725, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/4320ec1c595687fe2a7d869d4d58f58bd864fbed100cf6fe5d32218d0b35ada0/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "823897d59a04538ec34113118778dd6c8fbd518fc5794b358702c8158bb74a98", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3482, + "output_tokens": 269, + "reasoning_tokens": 212, + "cached_input_tokens": 2873, + "uncached_input_tokens": 609, + "elapsed_seconds": 5.539993, + "cache_created_tokens": 2873, + "cache_status": "created", + "estimated_input_cost": 0.00045675, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.00100875, + "estimated_cost": 0.0016809750000000001, + "estimated_cache_storage_cost": 0.00011970833333333333, + "calculated_generation_estimate": { + "lower_usd": 0.0016809750000000001, + "upper_usd": 0.0016809750000000001, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/e49ff8c908d0a6a9d0bfbde2189f858fa88aa9b634af9f2496cfdc5e56d20ae2/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "71bc2dec84f6745d5559a7c125166aa7e2d1d2e136cc407ff339b67a8e5c0b3f", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3482, + "output_tokens": 209, + "reasoning_tokens": 148, + "cached_input_tokens": 2873, + "uncached_input_tokens": 609, + "elapsed_seconds": 3.192396, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00045675, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.00078375, + "estimated_cost": 0.001455975, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.001455975, + "upper_usd": 0.001455975, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/b5de43dfa1122fa86decfa538047ee813621839eded8ed15356d341f3439e383/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "601b656bcc15d190cbcdc7dd20d991b83089adbd6b8a85801e34e2adbf014c83", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4105, + "output_tokens": 524, + "reasoning_tokens": 376, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1220, + "elapsed_seconds": 6.866803, + "cache_created_tokens": 2885, + "cache_status": "created", + "estimated_input_cost": 0.000915, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.001965, + "estimated_cost": 0.003096375, + "estimated_cache_storage_cost": 0.00012020833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.003096375, + "upper_usd": 0.003096375, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/eab2fd8c33f57337c6061e06495fda080ccbde40a5d1f671fc105b5fc3f48332/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "7e1396f38cffa0cd7a84dca4848a880c9d2da671858b84e90b6f1c2ce0a39dd9", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4148, + "output_tokens": 507, + "reasoning_tokens": 410, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1263, + "elapsed_seconds": 5.562874, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00094725, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00190125, + "estimated_cost": 0.003064875, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003064875, + "upper_usd": 0.003064875, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/6849c974442865e5ca3e8f146ef4520c275f2e37a25fb7caa498f17089ed6dc1/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "2866210a499eb47185a40fa92ff1d6f82c6931ba6dd69b88d52b6cae4767d211", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3738, + "output_tokens": 316, + "reasoning_tokens": 198, + "cached_input_tokens": 2885, + "uncached_input_tokens": 853, + "elapsed_seconds": 3.942876, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00063975, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.001185, + "estimated_cost": 0.002041125, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.002041125, + "upper_usd": 0.002041125, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/475d5f458554c35131f24fc92fb2e762c69a8d9c6d4ab9d6426fbd72e6303af3/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "81b082cdaf720332510ddabfdfdc2a6c611f35ce1609d28ea39b94bb288769f9", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 3244, + "output_tokens": 3791, + "reasoning_tokens": 3400, + "cached_input_tokens": 2301, + "uncached_input_tokens": 943, + "elapsed_seconds": 32.226618, + "cache_created_tokens": 2301, + "cache_status": "created", + "estimated_input_cost": 0.00070725, + "estimated_cached_input_cost": 0.00017257499999999998, + "estimated_output_cost": 0.01421625, + "estimated_cost": 0.015096075, + "estimated_cache_storage_cost": 9.5875e-05, + "calculated_generation_estimate": { + "lower_usd": 0.015096075, + "upper_usd": 0.015096075, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/8f58f73379896f4edda417f564668be151dea6f1dd75d1872c8aeb64d0cef5ce/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "807b295a95178ed1fd53f5fbca81a184c5eb96813e53b2b072ad688abe4e4398", + "status": "ERROR", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4500, + "output_tokens": 355, + "reasoning_tokens": 302, + "cached_input_tokens": 2873, + "uncached_input_tokens": 1627, + "elapsed_seconds": 6.247584, + "cache_created_tokens": 2873, + "cache_status": "created", + "estimated_input_cost": 0.00122025, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.00133125, + "estimated_cost": 0.0027669749999999996, + "estimated_cache_storage_cost": 0.00011970833333333333, + "calculated_generation_estimate": { + "lower_usd": 0.0027669749999999996, + "upper_usd": 0.0027669749999999996, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/6ccfd3edde468aa5c42f40ec7c75c2117ae13bf79c3eddd91eb4335ab02d4482/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "70ac79ec6a6688996ee56b1534b072551464e625f6774f5306f7cca85458b972", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4552, + "output_tokens": 585, + "reasoning_tokens": 485, + "cached_input_tokens": 2873, + "uncached_input_tokens": 1679, + "elapsed_seconds": 7.054466, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00125925, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.00219375, + "estimated_cost": 0.003668475, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003668475, + "upper_usd": 0.003668475, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/4115b3b2b3e209ed778e9ec0c51f6e5ce3a4249e00f87c89aeeedead0841f6a2/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "95be11f6114bf029b70b22d3c002baafca83e7392d26ad519c71483620c2abd3", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4580, + "output_tokens": 325, + "reasoning_tokens": 249, + "cached_input_tokens": 2873, + "uncached_input_tokens": 1707, + "elapsed_seconds": 3.993967, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00128025, + "estimated_cached_input_cost": 0.000215475, + "estimated_output_cost": 0.00121875, + "estimated_cost": 0.002714475, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.002714475, + "upper_usd": 0.002714475, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/9d94a56f71b21f01a9b59e1f935e199a9e59dd72e2ab77b517fb5e2b1bdd864e/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "5db1a109d3ba0c6617653be000bc3324c2ebfa40c273bcb3559d9080a5d91b62", + "status": "ERROR", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4642, + "output_tokens": 415, + "reasoning_tokens": 264, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1757, + "elapsed_seconds": 6.988132, + "cache_created_tokens": 2885, + "cache_status": "created", + "estimated_input_cost": 0.00131775, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00155625, + "estimated_cost": 0.003090375, + "estimated_cache_storage_cost": 0.00012020833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.003090375, + "upper_usd": 0.003090375, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/f312162a57b4add0d8cceb9efc246aa7d4bcad5e2a69117c22937d8293e9704e/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "5d6cdf40a8ea2eda5aa23f4bb166eaecf577702a1be6f9d7619c32ad09c76ff0", + "status": "ERROR", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4733, + "output_tokens": 217, + "reasoning_tokens": 133, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1848, + "elapsed_seconds": 4.570233, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.001386, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00081375, + "estimated_cost": 0.002416125, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.002416125, + "upper_usd": 0.002416125, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/67408eb8469db583d37c1341e26f0531b8f260ef2c14ddc73fb16b5598c2b2ff/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "a20d2b191ae77861fe9baa715c8b5b10a1b755c84fc00cce3ce3e8ed4481e628", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4694, + "output_tokens": 225, + "reasoning_tokens": 132, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1809, + "elapsed_seconds": 4.319073, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00135675, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00084375, + "estimated_cost": 0.002416875, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.002416875, + "upper_usd": 0.002416875, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/963abba804f84c3bb7ea78258345e462784d328f46415ba8bf34887c22ca0656/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "f93d99000ec96c8a2281f6c1b850c86592f53308b810ebc5b18c4fe3c84aa2f4", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4722, + "output_tokens": 339, + "reasoning_tokens": 221, + "cached_input_tokens": 2885, + "uncached_input_tokens": 1837, + "elapsed_seconds": 6.035502, + "cache_created_tokens": 2885, + "cache_status": "created", + "estimated_input_cost": 0.00137775, + "estimated_cached_input_cost": 0.000216375, + "estimated_output_cost": 0.00127125, + "estimated_cost": 0.002865375, + "estimated_cache_storage_cost": 0.00012020833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.002865375, + "upper_usd": 0.002865375, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/bd995d70152b17dd3e3393452b3abc945da427e85f3ede9b1fcbad909c06b3da/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "ccccfc974a3862f29ac0e2822f913ba5f186790b5897615c6ed38337ecbd275b", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 5005, + "output_tokens": 523, + "reasoning_tokens": 378, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 15.892736, + "cache_created_tokens": null, + "cache_status": "fallback", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.00196125, + "estimated_cost": null, + "estimated_cache_storage_cost": null, + "calculated_generation_estimate": { + "lower_usd": 0.0023366249999999997, + "upper_usd": 0.005715, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/ba23de00b87dde357a659990150f6c36eef21e4cff573f4b4ee4be6dd16c2446/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "e23fa46842916c63f448ce3fbe80ce48c60e34c17c80d787bc510edddd2e65af", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4077, + "output_tokens": 1058, + "reasoning_tokens": 784, + "cached_input_tokens": 2397, + "uncached_input_tokens": 1680, + "elapsed_seconds": 11.889701, + "cache_created_tokens": 2397, + "cache_status": "created", + "estimated_input_cost": 0.00126, + "estimated_cached_input_cost": 0.000179775, + "estimated_output_cost": 0.0039675, + "estimated_cost": 0.005407275, + "estimated_cache_storage_cost": 9.987499999999999e-05, + "calculated_generation_estimate": { + "lower_usd": 0.005407275, + "upper_usd": 0.005407275, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/e9ebe331ccfea690913e97129c6c8906760fc14e445eafa01a30924eb040ed4e/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "33c220d711b9bef9de83eb65ccc33d9ed76a0e0020f6d53bac6dfd5a36a54759", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4810, + "output_tokens": 2782, + "reasoning_tokens": 2723, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1841, + "elapsed_seconds": 28.87591, + "cache_created_tokens": 2969, + "cache_status": "created", + "estimated_input_cost": 0.00138075, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.0104325, + "estimated_cost": 0.012035925000000001, + "estimated_cache_storage_cost": 0.00012370833333333334, + "calculated_generation_estimate": { + "lower_usd": 0.012035925000000001, + "upper_usd": 0.012035925000000001, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/1380b43663a13f859f4340f18311e1da621f0278d65d9db8a816c6468a56e074/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "09d824c841368c1faa959a22b3c2c87bf62758c94da62d2da6f6aaeaf0ae38ef", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4489, + "output_tokens": 480, + "reasoning_tokens": 419, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1520, + "elapsed_seconds": 5.948534, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00114, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.0018, + "estimated_cost": 0.0031626749999999998, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003162675, + "upper_usd": 0.003162675, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/97fd3ebe3705d6e44ef75054ecfa47919ceda5f78610190b01f149d5963f2649/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "87d8d870d0074c72c70dd102e289ce3181c0ea77290222e387338ca7c5c3e742", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4699, + "output_tokens": 589, + "reasoning_tokens": 529, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1730, + "elapsed_seconds": 7.082922, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0012975, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.00220875, + "estimated_cost": 0.003728925, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003728925, + "upper_usd": 0.003728925, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/9ca4b010c7ebc9e0ae40a106866bbb196dd23366b2e453b50c4a6e629b9f6874/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "9402563570eed70a6d8b6498a35151037ad0c061418423379586244707beeab1", + "status": "ERROR", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4688, + "output_tokens": 265, + "reasoning_tokens": 139, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1719, + "elapsed_seconds": 4.084677, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00128925, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.00099375, + "estimated_cost": 0.0025056749999999997, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0025056749999999997, + "upper_usd": 0.0025056749999999997, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/1ee80d0e9b0de9dfb8c8b92cf67de5db6007c769b0b5fe9b0e676f7f6f758b1e/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "fc9182cc2657b02a2e0f9cfd0a1488768ff781bb92ed87ad3155a87b8dc24c16", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4755, + "output_tokens": 626, + "reasoning_tokens": 505, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1786, + "elapsed_seconds": 6.904339, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0013395, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.0023475, + "estimated_cost": 0.003909675, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003909675, + "upper_usd": 0.003909675, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/224d9f1bd039c45d5d91315d847f421fa0dcdeda31cea6416ffd8b342941b46d/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "e0e0a0a2a58225fafab29338ebc30d7d7c0d8a8b6a16d46151a98c9d494c0a53", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4082, + "output_tokens": 385, + "reasoning_tokens": 259, + "cached_input_tokens": 2981, + "uncached_input_tokens": 1101, + "elapsed_seconds": 6.184283, + "cache_created_tokens": 2981, + "cache_status": "created", + "estimated_input_cost": 0.00082575, + "estimated_cached_input_cost": 0.000223575, + "estimated_output_cost": 0.00144375, + "estimated_cost": 0.002493075, + "estimated_cache_storage_cost": 0.00012420833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.002493075, + "upper_usd": 0.002493075, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/4772d275e44a565620ecea49c136cdd9734d83653a63bf1bdb47a9eeb0220b25/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "2fd85fdc5b2ae731b2fa34308c20a26a7bc0b9623858237032a564fef39893ae", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4142, + "output_tokens": 620, + "reasoning_tokens": 483, + "cached_input_tokens": 2981, + "uncached_input_tokens": 1161, + "elapsed_seconds": 7.593713, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00087075, + "estimated_cached_input_cost": 0.000223575, + "estimated_output_cost": 0.002325, + "estimated_cost": 0.003419325, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.003419325, + "upper_usd": 0.003419325, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/befe1c89171fc467713bb086768810344f2b1cb3f016f3b226a791ad3b1eedc5/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "b01328034335c45fbc92e9c5fcd09c11c7d4ab7881c304ae6027e6c050947af3", + "status": "ERROR", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4942, + "output_tokens": 638, + "reasoning_tokens": 556, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1973, + "elapsed_seconds": 8.111785, + "cache_created_tokens": 2969, + "cache_status": "created", + "estimated_input_cost": 0.00147975, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.0023925, + "estimated_cost": 0.004094925, + "estimated_cache_storage_cost": 0.00012370833333333334, + "calculated_generation_estimate": { + "lower_usd": 0.004094925, + "upper_usd": 0.004094925, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/043c039f019acc57005dfe77a5cdc0803360f393757f0ef5a39ac92fa1b4d825/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "e25083b2f493c30611b5a89292d58d6d3a6e4aa963ebce0d4908ad95c2e9f9cb", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 5009, + "output_tokens": 1198, + "reasoning_tokens": 1050, + "cached_input_tokens": 2969, + "uncached_input_tokens": 2040, + "elapsed_seconds": 9.865206, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.00153, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.0044925, + "estimated_cost": 0.006245175, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.006245175, + "upper_usd": 0.006245175, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/b3d1db614f4500542553d128d3b5bebc6554589ed38bc0c2a54f48eb8ad964ef/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "f4e94458a1c43f546a0993993f29360211bd11e44a5c16bce9a8656b9c116e74", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4943, + "output_tokens": 754, + "reasoning_tokens": 548, + "cached_input_tokens": 2981, + "uncached_input_tokens": 1962, + "elapsed_seconds": 10.142039, + "cache_created_tokens": 2981, + "cache_status": "created", + "estimated_input_cost": 0.0014715, + "estimated_cached_input_cost": 0.000223575, + "estimated_output_cost": 0.0028275, + "estimated_cost": 0.004522575, + "estimated_cache_storage_cost": 0.00012420833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.004522575, + "upper_usd": 0.004522575, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/84d56c408544d2f6546fbbfb36c506be7e13e24d116656da50e2cf1fa912d4f9/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "4ced91bbec80f9f5da57948287698932e5abc595532d0351ee380f2c2a05880d", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4965, + "output_tokens": 628, + "reasoning_tokens": 329, + "cached_input_tokens": 2397, + "uncached_input_tokens": 2568, + "elapsed_seconds": 8.458827, + "cache_created_tokens": 2397, + "cache_status": "created", + "estimated_input_cost": 0.001926, + "estimated_cached_input_cost": 0.000179775, + "estimated_output_cost": 0.002355, + "estimated_cost": 0.004460775, + "estimated_cache_storage_cost": 9.987499999999999e-05, + "calculated_generation_estimate": { + "lower_usd": 0.004460775, + "upper_usd": 0.004460775, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/ae381af9ba7159373be9f85e41541871264c3db6e4161ce25d7f6c59272c80ef/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "f166f42c29e9ca1f558bf92cd2509ff2755a55a554dded76b406927a086bdbaf", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4128, + "output_tokens": 454, + "reasoning_tokens": 338, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1159, + "elapsed_seconds": 6.265107, + "cache_created_tokens": 2969, + "cache_status": "created", + "estimated_input_cost": 0.00086925, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.0017025, + "estimated_cost": 0.002794425, + "estimated_cache_storage_cost": 0.00012370833333333334, + "calculated_generation_estimate": { + "lower_usd": 0.0027944249999999997, + "upper_usd": 0.0027944249999999997, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/556156d2c13af5a559227e34c5efb594efd729c83e4b6b7f7adda92157a66312/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "8f992e5459d4c6de5da7516c314d14fbda62ecb6223ccdee96867eb64f28632e", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4597, + "output_tokens": 1445, + "reasoning_tokens": 1301, + "cached_input_tokens": null, + "uncached_input_tokens": null, + "elapsed_seconds": 25.714849, + "cache_created_tokens": null, + "cache_status": "fallback", + "estimated_input_cost": null, + "estimated_cached_input_cost": null, + "estimated_output_cost": 0.00541875, + "estimated_cost": null, + "estimated_cache_storage_cost": null, + "calculated_generation_estimate": { + "lower_usd": 0.005763525, + "upper_usd": 0.0088665, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/eb01f48aa16d271caf9586e00822f42a6a05fd165bc84466643a1885b5e108df/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "afc8adde176cc6d5fc89e4c4636a3e146791cec8be54e77dadbf79786696cfb5", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4429, + "output_tokens": 1601, + "reasoning_tokens": 1280, + "cached_input_tokens": 2383, + "uncached_input_tokens": 2046, + "elapsed_seconds": 16.295205, + "cache_created_tokens": 2383, + "cache_status": "created", + "estimated_input_cost": 0.0015345, + "estimated_cached_input_cost": 0.000178725, + "estimated_output_cost": 0.00600375, + "estimated_cost": 0.007716975000000001, + "estimated_cache_storage_cost": 9.929166666666668e-05, + "calculated_generation_estimate": { + "lower_usd": 0.007716975, + "upper_usd": 0.007716975, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/e1b36cc95813be4b60f3e2cd50f8041a728294fda6861ab60c5cfb3a98bff7d0/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "06db5a48c3aad79e675509f7eb85e3a6c72c04a7284c1e1ee34b7fafb4f82ecf", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4727, + "output_tokens": 399, + "reasoning_tokens": 281, + "cached_input_tokens": 2969, + "uncached_input_tokens": 1758, + "elapsed_seconds": 6.46419, + "cache_created_tokens": 2969, + "cache_status": "created", + "estimated_input_cost": 0.0013185, + "estimated_cached_input_cost": 0.00022267499999999998, + "estimated_output_cost": 0.00149625, + "estimated_cost": 0.003037425, + "estimated_cache_storage_cost": 0.00012370833333333334, + "calculated_generation_estimate": { + "lower_usd": 0.003037425, + "upper_usd": 0.003037425, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/427143f74021f8dd19add9b5c55bb5bcfa654fefe416fa699ff5e79937fd419c/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "0e6541d408e8c68c84bc1657302b8b4421f9eb496a32cfce7d46369b44f6a1bd", + "status": "SUCCESS", + "classification": "regular", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4171, + "output_tokens": 497, + "reasoning_tokens": 354, + "cached_input_tokens": 2981, + "uncached_input_tokens": 1190, + "elapsed_seconds": 7.246425, + "cache_created_tokens": 2981, + "cache_status": "created", + "estimated_input_cost": 0.0008925, + "estimated_cached_input_cost": 0.000223575, + "estimated_output_cost": 0.00186375, + "estimated_cost": 0.002979825, + "estimated_cache_storage_cost": 0.00012420833333333335, + "calculated_generation_estimate": { + "lower_usd": 0.002979825, + "upper_usd": 0.002979825, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/74c3baa510ef3a806f27f3b32f3a47eaaaa0faf5598e3b3f45e4dbcc6558d423/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "30d553daee778d2a9357002d31ed674f1b15427bb3fc37a2ef08f226a4feca17", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4183, + "output_tokens": 1135, + "reasoning_tokens": 914, + "cached_input_tokens": 2981, + "uncached_input_tokens": 1202, + "elapsed_seconds": 10.173066, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0009015, + "estimated_cached_input_cost": 0.000223575, + "estimated_output_cost": 0.00425625, + "estimated_cost": 0.005381324999999999, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.005381324999999999, + "upper_usd": 0.005381324999999999, + "cache_storage_excluded": true + } + }, + { + "result_ref": "llm/operations/2bffb8b5542053fd6b4819175e76af0034dbaa63dfd555607c997e7b594e689f/round-0001.json", + "phase": "INVESTIGATING_HYPOTHESES", + "config_hash": "692c8bac07efc915a44a89ac8aab1b4caa3e125d8619745f13c2ee570cb9e054", + "input_request_hash": "30d553daee778d2a9357002d31ed674f1b15427bb3fc37a2ef08f226a4feca17", + "status": "SUCCESS", + "classification": "correction", + "prompt_version": "investigation_project_v20", + "model": "gemini-3.8-flash", + "input_tokens": 4183, + "output_tokens": 367, + "reasoning_tokens": 229, + "cached_input_tokens": 2981, + "uncached_input_tokens": 1202, + "elapsed_seconds": 4.972447, + "cache_created_tokens": 0, + "cache_status": "reused", + "estimated_input_cost": 0.0009015, + "estimated_cached_input_cost": 0.000223575, + "estimated_output_cost": 0.00137625, + "estimated_cost": 0.002501325, + "estimated_cache_storage_cost": 0.0, + "calculated_generation_estimate": { + "lower_usd": 0.0025013250000000004, + "upper_usd": 0.0025013250000000004, + "cache_storage_excluded": true + } + } + ] +} diff --git a/src/viano_bug_analysis/analysis/investigator.py b/src/viano_bug_analysis/analysis/investigator.py index 03c22cf..70cc22e 100644 --- a/src/viano_bug_analysis/analysis/investigator.py +++ b/src/viano_bug_analysis/analysis/investigator.py @@ -714,7 +714,11 @@ class Investigator: else: operation="testing.request_human" if next_action["executor"]=="human" else "testing.request_automated" if operation not in context["budget_policy"]["action_costs"]:raise InvestigationError("INVESTIGATION_TEST_COST") - budget_apply(projected,{"operation":"reserve","hypothesis_id":hid,"action_id":self._action_id(state),"action":operation},context["budget_policy"]) + # Settlement can legitimately end the account. The controller owns + # that transition; it must not reject the valid final assessment + # merely because the model also proposed another research action. + if projected['accounts'][hid]['status'] not in TERMINAL: + budget_apply(projected,{"operation":"reserve","hypothesis_id":hid,"action_id":self._action_id(state),"action":operation},context["budget_policy"]) def _upgrade_database_context(self,state,context,operation): if (context.get('database_access_version') != 1 and not context.get('response_repair') @@ -892,6 +896,12 @@ class Investigator: assessment=decision["assessment"] budget.settle(case_id,package_id,hid,previous["record"]["action_id"],semantic_score=assessment["semantic_score"],reason=assessment["reason"]) next_action=decision["next"];kind=next_action["kind"] + terminal_status=budget.snapshot(case_id,package_id).state['accounts'][hid]['status'] + skipped_action = kind in {'tool','test'} and terminal_status in TERMINAL + if skipped_action: + # Keep the frozen response intact for auditing. Only execution is + # suppressed, after durable, idempotent settlement of the result. + kind='defer' action_id=self._action_id(state) if kind in {"tool","test"}: operation=next_action["operation"] if kind=="tool" else "testing.request_human" if next_action["executor"]=="human" else "testing.request_automated" @@ -959,7 +969,7 @@ class Investigator: if snap.state["accounts"][hid]["status"] not in TERMINAL: if kind=="reject":budget.reject(case_id,package_id,hid,reason=next_action["reason"]) else:budget.complete(case_id,package_id,hid,reason=next_action["reason"]) - h["disposition"]=kind + h["disposition"]=snap.state['accounts'][hid]['status'] if snap.state['accounts'][hid]['status'] in TERMINAL else kind if kind != 'recall' and context.get('prompt_version') not in {'investigation_project_v15','investigation_project_v16','investigation_project_v17','investigation_project_v18'}: state.get('recalled_evidence', {}).pop(hid, None) if kind != 'recall' and context['policy'].get('prompt_window_version') in {1,2}: @@ -989,6 +999,8 @@ class Investigator: if q["id"] in update["resolve_questions"]:q["resolved"]=True for text in update["add_questions"]:h["questions"].append({"id":f"Q{len(h['questions'])+1:04d}","text":text,"resolved":False}) note={"kind":"assessment","text":update["note"],"llm_ref":active["llm_ref"]} + if skipped_action: + note['text'] += f" [Controller: proposed research not executed; {terminal_status}.]" if 'causal_review' in update: note.update(causal_review=copy.deepcopy(update['causal_review']), requested_confidence=update['confidence'],effective_confidence=h['confidence']) diff --git a/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/analysis.md b/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/analysis.md new file mode 100644 index 0000000..0d7684b --- /dev/null +++ b/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/analysis.md @@ -0,0 +1,5 @@ +# BUG-000023: budget boundary misclassified as invalid response + +Generation 282, revision 1, H1 iteration 21. H1 has 1 remaining unit and an awaiting-assessment action costing 10. Policy max_reward_bps=8000 caps its refund at 8, so no legal assessment can fund a new tool (minimum action cost 10). The controller projects settlement, obtains budget_exhausted, then rejects the proposed next action with BUDGET_TERMINAL. It fails to commit the valid pending assessment and transitions through three LLM correction attempts to INVALID_LLM_RESPONSES. This is controller budget/scheduling behavior, not a malformed reply or database outage. H2 and H3 retain 83 and 82 units. Expected behavior: safely settle pending evidence once, consolidate H1 without new research if needed, let the scheduler continue eligible hypotheses. Never reset the budget, turn exhaustion into causal refutation, or grant semantic refunds without evidence. + +Implemented recovery: full response validation still applies, but no projected reservation is attempted after terminal settlement. Execution durably settles the pending result and suppresses the proposed tool/test when the account is terminal. The frozen response stays unchanged, the skipped execution is recorded in the assessment note, and provisional lean observations are consolidated through the existing scheduler. Terminal budget disposition survives final consolidation. Regression coverage includes this saved ledger at semantic scores 0, 20, 40 and 100, and complete bounded-loop runs with a crash immediately after durable settlement. diff --git a/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/budget-context.json b/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/budget-context.json new file mode 100644 index 0000000..42bf43b --- /dev/null +++ b/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/budget-context.json @@ -0,0 +1,322 @@ +{ + "budget": { + "accounts": { + "H1": { + "actions": { + "INV-1-H1-1": { + "action": "project.query", + "assessment_reason": "The table schema listing only catalogs table names matching 'item' without examining item 60678 or associated spell scripts.", + "cost": 10, + "evidence_sha256": "5ce1005b912a48bbc394400e12a76fd7a834fb487ab758f778f900ad44831316", + "failed": false, + "information_score": 25, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000003.json", + "reward": 2, + "semantic_score": 25, + "status": "settled" + }, + "INV-1-H1-12": { + "action": "project.query", + "assessment_reason": "Querying cata_hotfixes.item_sparse for ID 60678 returned no rows, indicating item 60678 is either not in this table or stored under a different column/table structure.", + "cost": 10, + "evidence_sha256": "e1452bb8dea90e8adde1a5f26361f0ad824443e78ce0dd82172218421b3af983", + "failed": false, + "information_score": 40, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000047.json", + "reward": 3, + "semantic_score": 40, + "status": "settled" + }, + "INV-1-H1-14": { + "action": "project.query", + "assessment_reason": "Line 926 in 114_western_plaguelands.sql confirms creature 44360 has aura 82880 (Shadowflame State), but does not reveal item 60678 or its spell ID. Searching the codebase for item 60678 will identify how the grenade item or its spell is defined.", + "cost": 10, + "evidence_sha256": "67c42ccc8d9e1646c8a795c32f399de6461f75ba3e11deb925062a46a8f319c1", + "failed": false, + "information_score": 40, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000050.json", + "reward": 3, + "semantic_score": 40, + "status": "settled" + }, + "INV-1-H1-15": { + "action": "project.query", + "assessment_reason": "Search results on 60678 in git history did not immediately identify the item definition on page 0; recalling quest_template record E000006 will verify quest items and objective details for quest 26922.", + "cost": 10, + "evidence_sha256": "6638e56f0c505e309872f7926b1aadd195bbd55e4409218da0dd7b5c6b253c49", + "failed": false, + "information_score": 45, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000053.json", + "reward": 3, + "semantic_score": 45, + "status": "settled" + }, + "INV-1-H1-17": { + "action": "project.query", + "assessment_reason": "E000018 confirmed cata_hotfixes.item_sparse exists and began listing columns, but was truncated before reaching the item spell columns.", + "cost": 10, + "evidence_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "failed": false, + "information_score": 0, + "novelty_score": 0, + "result_ref": "analysis/budgets/0001/events/00000056.json", + "reward": 0, + "semantic_score": 75, + "status": "settled" + }, + "INV-1-H1-2": { + "action": "project.query", + "assessment_reason": "PROJECT_DATABASE_TABLE_UNKNOWN", + "cost": 10, + "failed": true, + "information_score": 0, + "reward": 0, + "semantic_score": 0, + "status": "settled" + }, + "INV-1-H1-2-recovery-1": { + "action": "project.query", + "assessment_reason": "E000010 identified item-related tables including cata_world.item_script_names and cata_hotfixes.item_sparse.", + "cost": 10, + "evidence_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "failed": false, + "information_score": 0, + "novelty_score": 0, + "result_ref": "analysis/budgets/0001/events/00000032.json", + "reward": 0, + "semantic_score": 50, + "status": "settled" + }, + "INV-1-H1-20": { + "action": "project.query", + "cost": 10, + "evidence_sha256": "5b15b0f4fd0dd130a792a2d320ecc50c956e23f1f675134b68aa934a800fb632", + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000059.json", + "status": "awaiting_assessment" + }, + "INV-1-H1-3": { + "action": "project.query", + "assessment_reason": "Retrieved schema for item_script_names with primary key Id and ScriptName column.", + "cost": 10, + "evidence_sha256": "02b6d1ac5f61550b54c612aecaf3b6179c3fb27c7cb79e99830646fd38f9ac90", + "failed": false, + "information_score": 85, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000035.json", + "reward": 6, + "semantic_score": 85, + "status": "settled" + }, + "INV-1-H1-4": { + "action": "project.query", + "assessment_reason": "Confirmed item 60678 has no registered script in item_script_names, but this does not verify whether the item triggers a spell that requires spell_script_names handling.", + "cost": 10, + "evidence_sha256": "36c50a23dd511bae9ac2ccfffc5477e3457b862108fff660b7ec476a027e1812", + "failed": false, + "information_score": 45, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000038.json", + "reward": 3, + "semantic_score": 45, + "status": "settled" + }, + "INV-1-H1-6": { + "action": "project.query", + "assessment_reason": "Source search for 60678 yielded unrelated coordinates and broadcast text in historical SQL updates. Checking cata_hotfixes.item_sparse will directly provide the spell ID and properties associated with item 60678.", + "cost": 10, + "evidence_sha256": "09fe37930f201790e118dc5f22459753b164e5d0e3d7f88ba2199b0ed7681914", + "failed": false, + "information_score": 20, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000041.json", + "reward": 1, + "semantic_score": 20, + "status": "settled" + }, + "INV-1-H1-7": { + "action": "project.query", + "assessment_reason": "The schema query confirms that cata_hotfixes.item_sparse exists and is accessible, but the fragment cuts off before spell-related columns are displayed.", + "cost": 10, + "evidence_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "failed": false, + "information_score": 0, + "novelty_score": 0, + "result_ref": "analysis/budgets/0001/events/00000044.json", + "reward": 0, + "semantic_score": 45, + "status": "settled" + } + }, + "initial": 100, + "low_information_steps": 1, + "remaining": 1, + "rewarded": 21, + "spent": 120, + "status": "investigating" + }, + "H2": { + "actions": { + "INV-1-H2-1": { + "action": "project.query", + "assessment_reason": "The creature spawn context confirms that creature 44329 has 0 rows in the creature spawn table, validating the absence of static spawns.", + "cost": 10, + "evidence_sha256": "28dff3c9925c9ae043ab572897e037402ac54217d273e677ba4885d96c38ff88", + "failed": false, + "information_score": 75, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000005.json", + "reward": 6, + "semantic_score": 75, + "status": "settled" + }, + "INV-1-H2-2": { + "action": "project.query", + "assessment_reason": "smart_scripts query confirmed neither creature 44360 nor 44329 has SmartAI scripting defined.", + "cost": 10, + "evidence_sha256": "7dcfb2f4adabe40f0e00eac145dcae09243c8f8163977412411d57d34ebb3ca4", + "failed": false, + "information_score": 85, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000012.json", + "reward": 6, + "semantic_score": 85, + "status": "settled" + }, + "INV-1-H2-3": { + "action": "project.query", + "assessment_reason": "Partial search results for 44360 show SQL updates configuring unit_flags and an aura/addon (82880), but more pages or targeted queries are needed to inspect quest details.", + "cost": 10, + "evidence_sha256": "ea2e60c77197d41f6f7318d90858e9b931cd60225d66c56725d817c2a608dcbd", + "failed": false, + "information_score": 65, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000015.json", + "reward": 5, + "semantic_score": 65, + "status": "settled" + }, + "INV-1-H2-4": { + "action": "project.query", + "assessment_reason": "E000006 confirms quest 26922 requires 1 kill of creature 44360 (Scourge Bone Animus Bunny) and 5 kills of creature 44329 (Stickbone Berserker).", + "cost": 10, + "evidence_sha256": "f7b6b03cad31f791569974f1dc55423059f3bd0141b5a47f69f6f3ebb90b7bbb", + "failed": false, + "information_score": 75, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000018.json", + "reward": 6, + "semantic_score": 75, + "status": "settled" + } + }, + "initial": 100, + "low_information_steps": 0, + "remaining": 83, + "rewarded": 23, + "spent": 40, + "status": "investigating" + }, + "H3": { + "actions": { + "INV-1-H3-1": { + "action": "project.query", + "assessment_reason": "Directly confirms creature_template attributes for entry 44360, showing flags and blank script fields.", + "cost": 10, + "evidence_sha256": "cba7755e2b00cb5c67eb0158e2e31fde1510e5dfe61fa727f9c44337c5343258", + "failed": false, + "information_score": 85, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000007.json", + "reward": 6, + "semantic_score": 85, + "status": "settled" + }, + "INV-1-H3-2": { + "action": "project.query", + "assessment_reason": "smart_scripts query for 44360 returned no rows, proving creature 44360 has no SmartAI script entries.", + "cost": 10, + "evidence_sha256": "de6516394c2854ab1e79817c5eafd7805299a4a1fd0104263d1a7695e87bae61", + "failed": false, + "information_score": 85, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000021.json", + "reward": 6, + "semantic_score": 85, + "status": "settled" + }, + "INV-1-H3-3": { + "action": "project.query", + "assessment_reason": "Retrieved list of tables matching 'item', showing item definitions are divided between cata_hotfixes and cata_world.", + "cost": 10, + "evidence_sha256": "4143046d447d15a99af4c955671873aa9b0d79894d0668ca039d5c37f20952a8", + "failed": false, + "information_score": 70, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000024.json", + "reward": 5, + "semantic_score": 70, + "status": "settled" + }, + "INV-1-H3-4": { + "action": "project.query", + "assessment_reason": "E000009 provides the schema for cata_hotfixes.item_sparse, but the columns listing spell triggers and effects are truncated on page 0.", + "cost": 10, + "evidence_sha256": "41e758ef162f977f692ad7c67ab372f0ea597e7a3cda8432a0e56c2547b17c49", + "failed": false, + "information_score": 65, + "novelty_score": 100, + "result_ref": "analysis/budgets/0001/events/00000027.json", + "reward": 5, + "semantic_score": 65, + "status": "settled" + } + }, + "initial": 100, + "low_information_steps": 0, + "remaining": 82, + "rewarded": 22, + "spent": 40, + "status": "investigating" + } + }, + "seen_evidence": [ + "5ce1005b912a48bbc394400e12a76fd7a834fb487ab758f778f900ad44831316", + "28dff3c9925c9ae043ab572897e037402ac54217d273e677ba4885d96c38ff88", + "cba7755e2b00cb5c67eb0158e2e31fde1510e5dfe61fa727f9c44337c5343258", + "7dcfb2f4adabe40f0e00eac145dcae09243c8f8163977412411d57d34ebb3ca4", + "ea2e60c77197d41f6f7318d90858e9b931cd60225d66c56725d817c2a608dcbd", + "f7b6b03cad31f791569974f1dc55423059f3bd0141b5a47f69f6f3ebb90b7bbb", + "de6516394c2854ab1e79817c5eafd7805299a4a1fd0104263d1a7695e87bae61", + "4143046d447d15a99af4c955671873aa9b0d79894d0668ca039d5c37f20952a8", + "41e758ef162f977f692ad7c67ab372f0ea597e7a3cda8432a0e56c2547b17c49", + "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "02b6d1ac5f61550b54c612aecaf3b6179c3fb27c7cb79e99830646fd38f9ac90", + "36c50a23dd511bae9ac2ccfffc5477e3457b862108fff660b7ec476a027e1812", + "09fe37930f201790e118dc5f22459753b164e5d0e3d7f88ba2199b0ed7681914", + "e1452bb8dea90e8adde1a5f26361f0ad824443e78ce0dd82172218421b3af983", + "67c42ccc8d9e1646c8a795c32f399de6461f75ba3e11deb925062a46a8f319c1", + "6638e56f0c505e309872f7926b1aadd195bbd55e4409218da0dd7b5c6b253c49", + "5b15b0f4fd0dd130a792a2d320ecc50c956e23f1f675134b68aa934a800fb632" + ] + }, + "policy": { + "action_costs": { + "testing.request_human": 40 + }, + "default_action_cost": 10, + "format": "viano-budget-policy", + "format_version": 1, + "low_information_threshold": 20, + "max_low_information_steps": 3, + "max_reward_bps": 8000, + "new_evidence_score": 100, + "unit": "investigation_units" + }, + "hypothesis_id": "H1", + "pending_action_id": "INV-1-H1-20" +} diff --git a/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/rejected-answers.json b/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/rejected-answers.json new file mode 100644 index 0000000..f957aa2 --- /dev/null +++ b/tests/fixtures/llm_rejections/20261121/bug23-budget-terminal/rejected-answers.json @@ -0,0 +1,69 @@ +[ + { + "llm_ref": "llm/operations/427143f74021f8dd19add9b5c55bb5bcfa654fefe416fa699ff5e79937fd419c/round-0001.json", + "controller_code": "BUDGET_TERMINAL", + "answer": { + "assessment": { + "reason": "Querying cata_hotfixes.item_sparse for ID 60678 yielded zero rows, indicating the item is either not present in hotfixes or defined elsewhere.", + "semantic_score": 40 + }, + "next": { + "arguments": { + "case_sensitive": false, + "kind": "source.search", + "limit": 10, + "offset": 0, + "path_prefix": "", + "text": "60678" + }, + "kind": "tool", + "operation": "project.query" + }, + "observation": "cata_hotfixes.item_sparse contains no record for ID 60678; searching repository codebase for references to item 60678 to determine its spell or script association." + } + }, + { + "llm_ref": "llm/operations/74c3baa510ef3a806f27f3b32f3a47eaaaa0faf5598e3b3f45e4dbcc6558d423/round-0001.json", + "controller_code": "BUDGET_TERMINAL", + "answer": { + "assessment": { + "reason": "cata_hotfixes.item_sparse returned 0 rows for item ID 60678, indicating the item entry is not stored under that ID in item_sparse or item definitions reside elsewhere.", + "semantic_score": 20 + }, + "next": { + "arguments": { + "case_sensitive": false, + "kind": "source.search", + "limit": 10, + "offset": 0, + "path_prefix": "", + "text": "60678" + }, + "kind": "tool", + "operation": "project.query" + }, + "observation": "cata_hotfixes.item_sparse contains no record for item ID 60678. Searching the codebase for references to item 60678 or quest 26922 to identify the spell or script used by the grenade." + } + }, + { + "llm_ref": "llm/operations/2bffb8b5542053fd6b4819175e76af0034dbaa63dfd555607c997e7b594e689f/round-0001.json", + "controller_code": "BUDGET_TERMINAL", + "answer": { + "assessment": { + "reason": "Query for ID 60678 in cata_hotfixes.item_sparse returned 0 rows, meaning item 60678 is not in cata_hotfixes.item_sparse or stored under another item table.", + "semantic_score": 40 + }, + "next": { + "arguments": { + "kind": "database.tables", + "limit": 20, + "offset": 0, + "text": "item" + }, + "kind": "tool", + "operation": "project.query" + }, + "observation": "cata_hotfixes.item_sparse returned no rows for ID 60678. Listing item tables in cata_world to locate where item definitions are stored." + } + } +] diff --git a/tests/test_bounded_contract_v2.py b/tests/test_bounded_contract_v2.py index 553858c..5ea21cb 100644 --- a/tests/test_bounded_contract_v2.py +++ b/tests/test_bounded_contract_v2.py @@ -229,3 +229,74 @@ def test_v2_completion_after_checkpoints(tool_case): result = run(loop_for(tool_case, Finish()), steps=20) assert result.status == 'COMPLETED' assert PackageValidator().validate(result.package).valid + + +@pytest.mark.parametrize('crash_after_settlement',[False,True]) +def test_terminal_settlement_preserves_observation_and_skips_followup(tool_case,monkeypatch,crash_after_settlement): + from viano_bug_analysis.budget import BudgetConfig + class Continue(Adapter): + async def generate(self, config, request, **kwargs): + body=json.loads(request['messages'][1]['content']) + if body['task'] in {'startup_choose_query','review_initial_hypotheses'}: + return await super().generate(config,request,**kwargs) + self.calls.append(body) + previous=body['input']['previous_result'] + assessment={'semantic_score':50,'reason':'Scoped result assessed.'} if previous else None + if body['task']=='investigate_one_step': + out={'assessment':assessment,'observation':'Preserve this last observation.', + 'next':{'kind':'tool','operation':'project.query','arguments':rows()}} + else: + out={'assessment':assessment,'confidence':'plausible','findings':[], + 'uncertainties':['Cause remains unconfirmed.'],'next_question':None, + 'retire':[],'next':{'kind':'finish','reason':'No further funded research.'}} + return ProviderResponse(out,'fixture',100,50) + adapter=Continue() + config=BudgetConfig(default_action_cost=40) + loop=loop_for(tool_case,adapter) + loop.config=InvestigationConfig(lean_loop=True,lean_protocol=2,startup_batch_review=True,lean_checkpoint_steps=0, + prompt_window_version=2,response_recovery_version=1) + loop.budget_config=config + if crash_after_settlement: + original=BudgetManager.settle + def interrupted(manager,*args,**kwargs): + result=original(manager,*args,**kwargs) + if result.state['accounts'][args[2]]['status']=='budget_exhausted': + raise RuntimeError('simulated crash after durable settlement') + return result + with monkeypatch.context() as patch: + patch.setattr(BudgetManager,'settle',interrupted) + with pytest.raises(InvestigationError,match='INVESTIGATION_INPUT'): + run(loop,steps=30) + result=run(loop,steps=30) + assert result.status=='COMPLETED' + accounts=BudgetManager(tool_case[0],config).snapshot(*CASE).state['accounts'] + for account in accounts.values(): + assert account['status']=='budget_exhausted' + assert 2 <= len(account['actions']) <= 3 + assert all(a['status']=='settled' for a in account['actions'].values()) + assert all(h['invalid_responses']==0 and h['disposition']=='budget_exhausted' + for h in state(result)['hypotheses'].values()) + assert all(any('proposed research not executed; budget_exhausted' in n['text'] for n in h['notes']) + for h in state(result)['hypotheses'].values()) + checkpoints=[b for b in adapter.calls if b['task']=='consolidate_investigation_session'] + assert len(checkpoints)==3 + assert all('Preserve this last observation.' in json.dumps(b) for b in checkpoints) + count=len(adapter.calls) + assert run(loop).package==result.package and len(adapter.calls)==count + assert PackageValidator().validate(result.package).valid + + +@pytest.mark.parametrize('score',[0,20,40,100]) +def test_bug23_saved_pending_result_always_exhausts_budget(score): + from viano_bug_analysis.budget.engine import apply + fixture=Path(__file__).parent/'fixtures/llm_rejections/20261121/bug23-budget-terminal/budget-context.json' + context=json.loads(fixture.read_text(encoding='utf-8')) + before=copy.deepcopy(context['budget']) + after=apply(before,{'operation':'settle','hypothesis_id':context['hypothesis_id'], + 'action_id':context['pending_action_id'],'semantic_score':score,'reason':'Regression assessment'},context['policy']) + account=after['accounts']['H1'] + assert account['status']=='budget_exhausted' + assert 1 <= account['remaining'] <= 9 + assert account['actions'][context['pending_action_id']]['status']=='settled' + assert after['accounts']['H2']==before['accounts']['H2'] + assert after['accounts']['H3']==before['accounts']['H3']