Commit 4ffa6b2
feat(cli): polish-summaries — Batch-API LLM upgrade of workspace summaries.json (#90)
* feat(cli): polish-summaries — Batch-API LLM upgrade of workspace summaries.json
New attune-author polish-summaries subcommand: rewrites mechanically
seeded one-line summaries in a workspace's path-keyed
.help/summaries.json via the Anthropic Batch API on the capable tier
(fable pins swap to opus-4-8 — Batch rejects fallbacks). Provenance
in .help/summaries.meta.json (polished_at/model/source_hash/
summary_hash); hand-edited entries always win; cost gate aborts
above --max-usd (default $2); --dry-run/--force/--resume. 23
mock-only tests.
Spec: specs/summaries-polish (attune workspace repo), task 1.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(anthropic): return first TEXT block — fable responses lead with thinking blocks
call_anthropic read response.content[0].text; live fable responses
can lead with a BetaThinkingBlock (no .text) even though explicit
thinking params are rejected, crashing the polish path
('BetaThinkingBlock' object has no attribute 'text' — hit by the
commit regen hook 2026-07-10). Walk content for the first text
block instead; only-thinking responses return ''.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test(polish-summaries): cover codecov patch gaps
JSON error paths (unreadable/non-object sidecar), _source_hash body
fallback, apply_results truncation branch + meta flag, and the CLI
--resume happy path (poll + apply + state cleared, no resubmit).
summaries_polish.py 93% -> 99%; new CLI handler fully covered.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 107c3af commit 4ffa6b2
5 files changed
Lines changed: 810 additions & 2 deletions
File tree
- src/attune_author
- doc_gen
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
408 | 446 | | |
409 | 447 | | |
410 | 448 | | |
| |||
438 | 476 | | |
439 | 477 | | |
440 | 478 | | |
| 479 | + | |
441 | 480 | | |
442 | 481 | | |
443 | 482 | | |
| |||
1261 | 1300 | | |
1262 | 1301 | | |
1263 | 1302 | | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1264 | 1380 | | |
1265 | 1381 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| |||
0 commit comments