Commit 47cc9a5
committed
test(kiro): cover the real upstream shape that omits tokenUsage
CodeWhisperer does not report per-turn cache detail. Proven statically
without credentials: parseTokenUsage reads totalTokens as required, so a
parsed authoritative frame always yields usage.totalTokens, and no recent
Kiro usage row carries it (or any cache field) in a 5691-row live sample.
The 4736 rows that DO carry a large usage.totalTokens all fall in a
06-30..07-01 window, from when 7374c3a wrote contextUsagePercentage x
contextWindow straight into totalTokens. That figure later moved to the
dedicated contextTotalTokens field, which persistence dropped — which is
why the large numbers disappeared from Logs.
This test pins the live shape: contextUsagePercentage present, tokenUsage
absent. The turn stays estimated, invents no cache split, and still
reports a contextTotalTokens checkpoint larger than the per-turn total.
The cache read/write parser stays in place, so if upstream ever starts
reporting the split it surfaces with no further code change.1 parent d24c523 commit 47cc9a5
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1242 | 1242 | | |
1243 | 1243 | | |
1244 | 1244 | | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1245 | 1266 | | |
1246 | 1267 | | |
1247 | 1268 | | |
| |||
0 commit comments