chore(polish): migrate model alias to claude-sonnet-4-6 (deadline 2026-06-15)#22
Merged
Merged
Conversation
…6-06-15)
Anthropic deprecated `claude-sonnet-4-20250514` with EOL
2026-06-15 (V2/V3 verification probes on 2026-05-08 surfaced
the deprecation warning). Bumps the polish-model alias from
the dated checkpoint to the family alias `claude-sonnet-4-6`,
matching attune-rag's existing `ClaudeProvider.DEFAULT_MODEL`
pin and Anthropic's recommended migration path.
Audit found two hard-coded model pins, both bumped:
- polish.py:_POLISH_MODEL — drives every polish call (sync + batch)
- doc_gen/config.py:DocGenConfig.model — drives `attune-author docs`
Test fixtures pinning the old name in 3 files also bumped
(test_cli_batch.py, test_maintenance_batch.py,
test_polish_improvements.py).
Cache invalidation is automatic: _POLISH_MODEL participates in
the polish cache key, so existing entries become orphaned
(remain on disk, never match the new key namespace) and the
existing 30-day TTL prune reaps them organically. First regen
post-upgrade is a cold-cache miss for every feature; subsequent
regens behave normally. Users wanting immediate disk reclaim
can run `attune-author cache clear` (optional, documented in
CHANGELOG).
New `tests/test_polish_smoke.py` (5 tests) pins the wire-level
model name across both code paths so the next deprecation
fires a clear "wire contract is stale" signal at CI time. No
API spend (mocks at the SDK boundary).
Verification (live, ~$0.04 total):
- Synchronous regen: 10 features, 30 polish calls all 200 OK.
- Batch path: submit + resume cycle for 1 stale feature, 3/3
succeeded, templates spliced correctly.
- Cache invalidation: cache went 23→53 entries; 30 new under
new SHA-key namespace, 23 old remain for TTL prune.
- Full suite: 675 pass, 32 skipped (live + skill-export
integration). Ruff clean.
Spec: specs/polish-model-migration/{requirements,design,tasks}.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates attune-author's pinned polish model from the deprecated dated alias
claude-sonnet-4-20250514(EOL 2026-06-15) to the family aliasclaude-sonnet-4-6. Aligns with attune-rag's existingClaudeProvider.DEFAULT_MODELpin and Anthropic's recommended migration path.Top 3 #1 from the 2026-05-08 Monday briefing. Hard deadline 2026-06-15.
Spec:
specs/polish-model-migration/{requirements,design,tasks}.md(in the workspace).Audit findings
grep -RIn "claude-sonnet-4-20250514"across the workspace surfaced two production hard-coded pins (vs the one anticipated in requirements):src/attune_author/polish.py:54(_POLISH_MODEL)src/attune_author/doc_gen/config.py:27(DocGenConfig.model)attune-author docssubcommand.Plus 3 test fixtures in 3 files (
test_cli_batch.py,test_maintenance_batch.py,test_polish_improvements.py).Out of scope (left as historical artifacts):
attune-rag/scripts/probe_v2_cache_control.pyreferences the old alias verbatim — V2/V3 verification record.What landed
tests/test_polish_smoke.py(5 tests) — pins the wire-level model name across both code paths via mocked SDK calls. Catches the next deprecation immediately at CI time. No API spend.[0.11.1]— documents the rename, the cold-cache caveat, and the optionalattune-author cache clearfor users who want immediate disk reclaim.0.11.0 → 0.11.1(patch — model rename, not API change).Verification (live, ~$0.04 total)
msgbatch_01JtqmPQMyTfEsHCwceKuGVYended cleanly: 3/3 succeeded. Templates spliced correctly.Cache-key behavior
_POLISH_MODELparticipates in the polish cache key, so this bump cleanly invalidates old entries (they remain on disk until the existing 30-day TTL prune reaps them). No manual nuke needed for correctness; users wanting immediate disk reclaim can runattune-author cache clear.Test plan
🤖 Generated with Claude Code