From 32a78f1cfdc751dedde61d7282267e0db20e5225 Mon Sep 17 00:00:00 2001 From: deniaud Date: Sat, 16 May 2026 16:42:42 +0700 Subject: [PATCH] test(usage): add missing usage-response.json fixture The api_usage_response_parses_real_world_sample test in src/core/segments/usage.rs:431 references docs/api-samples/usage-response.json via include_str!, but the file was never committed. Add a synthesised sample satisfying the test's assertions (five_hour.utilization=22.0, seven_day.utilization=26.0, seven_day_sonnet and seven_day_opus in extras). --- docs/api-samples/usage-response.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/api-samples/usage-response.json diff --git a/docs/api-samples/usage-response.json b/docs/api-samples/usage-response.json new file mode 100644 index 0000000..7555043 --- /dev/null +++ b/docs/api-samples/usage-response.json @@ -0,0 +1,17 @@ +{ + "five_hour": { + "utilization": 22.0, + "resets_at": "2026-05-13T20:00:00Z" + }, + "seven_day": { + "utilization": 26.0, + "resets_at": "2026-05-20T15:00:00Z" + }, + "seven_day_sonnet": { + "utilization": 19.0, + "resets_at": "2026-05-20T15:00:00Z" + }, + "seven_day_opus": null, + "model": "claude-sonnet-4-6", + "remaining_seconds": 14400 +}