Skip to content

feat(cli): polish-summaries — Batch-API LLM upgrade of workspace summaries.json#90

Merged
silversurfer562 merged 3 commits into
mainfrom
feat/polish-summaries
Jul 10, 2026
Merged

feat(cli): polish-summaries — Batch-API LLM upgrade of workspace summaries.json#90
silversurfer562 merged 3 commits into
mainfrom
feat/polish-summaries

Conversation

@silversurfer562

Copy link
Copy Markdown
Member

Implements task 1 of specs/summaries-polish/ (attune workspace repo; follow-up to attune-ai PR #1300's mechanical seed).

  • attune-author polish-summaries --help-dir .help [--max-usd 2.0] [--dry-run] [--force] [--resume]
  • Capable tier via resolve_model("capable"); fable pins swapped for opus-4-8 (Batch API rejects fallbacks)
  • Reuses doc_gen._anthropic_batch submit/poll; state file enables --resume after timeout
  • Provenance sidecar .help/summaries.meta.json — hand edits detected by summary-hash mismatch and never overwritten
  • Cost gate: estimate printed, abort >--max-usd; measured full-corpus estimate for attune-ai is ~$0.55
  • One-line normalization: keeps last line of narrating responses, sentence-boundary truncation at 200 chars flagged in meta
  • 23 mock-only tests per testing-conventions.md; suite 1241 green

🤖 Generated with Claude Code

silversurfer562 and others added 2 commits July 10, 2026 00:03
…aries.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>
…hinking 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>
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.44751% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/attune_author/summaries_polish.py 99.24% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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>
@silversurfer562 silversurfer562 merged commit 4ffa6b2 into main Jul 10, 2026
13 of 14 checks passed
silversurfer562 added a commit that referenced this pull request Jul 10, 2026
Version bump + changelog for the summaries-polish release
(PRs #90, #91, #92). See CHANGELOG 0.25.0 section.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant