Skip to content

chore(polish): migrate model alias to claude-sonnet-4-6 (deadline 2026-06-15)#22

Merged
silversurfer562 merged 1 commit into
mainfrom
feat/polish-model-migration
May 9, 2026
Merged

chore(polish): migrate model alias to claude-sonnet-4-6 (deadline 2026-06-15)#22
silversurfer562 merged 1 commit into
mainfrom
feat/polish-model-migration

Conversation

@silversurfer562
Copy link
Copy Markdown
Member

Summary

Migrates attune-author's pinned polish model from the deprecated dated alias claude-sonnet-4-20250514 (EOL 2026-06-15) to the family alias claude-sonnet-4-6. Aligns with attune-rag's existing ClaudeProvider.DEFAULT_MODEL pin 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):

File Role
src/attune_author/polish.py:54 (_POLISH_MODEL) Drives every polish call (synchronous + batch path).
src/attune_author/doc_gen/config.py:27 (DocGenConfig.model) Default model for attune-author docs subcommand.

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.py references the old alias verbatim — V2/V3 verification record.

What landed

  • Two production constants bumped (polish.py + config.py).
  • Three test fixtures bumped to match.
  • New 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.
  • CHANGELOG [0.11.1] — documents the rename, the cold-cache caveat, and the optional attune-author cache clear for users who want immediate disk reclaim.
  • Version bump 0.11.0 → 0.11.1 (patch — model rename, not API change).

Verification (live, ~$0.04 total)

Check Result
Synchronous regen (10 features, 30 polish calls) All 200 OK. New templates landed with coherent content.
Batch submit + resume (1 stale feature, 3 templates) msgbatch_01JtqmPQMyTfEsHCwceKuGVY ended cleanly: 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. Exactly per design.
Full test suite 675 passed, 32 skipped (live + skill-export integration).
Ruff Clean on all touched files.

Cache-key behavior

_POLISH_MODEL participates 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 run attune-author cache clear.

Test plan

  • CI green on all matrix rows (Linux/macOS/Windows × Python 3.10–3.13)

🤖 Generated with Claude Code

…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>
@silversurfer562 silversurfer562 merged commit fd25541 into main May 9, 2026
12 checks passed
@silversurfer562 silversurfer562 deleted the feat/polish-model-migration branch May 9, 2026 01:23
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