Skip to content

refactor: 0.5.0 cleanup batch — CONFIRM gap + expansion unification - #34

Merged
silversurfer562 merged 1 commit into
mainfrom
chore/0-5-0-cleanup-batch
Aug 17, 2026
Merged

refactor: 0.5.0 cleanup batch — CONFIRM gap + expansion unification#34
silversurfer562 merged 1 commit into
mainfrom
chore/0-5-0-cleanup-batch

Conversation

@silversurfer562

Copy link
Copy Markdown
Member

Summary

Three of the four items queued at the 0.5.0 post-merge review (the fourth — the submit-script DOM switch — was chair-ruled into its own PR with browser verification and an atomic attune-ai mirror re-sync):

  1. Direct-built CONFIRM options gap (Fixed)FormQuestion.__post_init__ defaults a CONFIRM's options to ["Approve", "Abort"] on every construction path; previously only form_from_dict defaulted them, and a confirm built directly in Python rendered a gate with no options. CONFIRM_DEFAULT_OPTIONS single-sourced in models.
  2. Triage-expansion unification (Changed)expansion_items / suggested_pick / item_context in models are now the one iteration, suggested-lookup, and context-join for TRIAGE + ASSUMPTION_REVIEW rows, consumed by all five surfaces and both validators. Output byte-identical — the 621-test suite pins every surface.
  3. Helper dedup + the hardening it bought (Fixed) — the union-typed suggested isinstance guard now lives in exactly one place; a direct-built question carrying a list where a mapping belongs degrades to "no suggestion" instead of crashing the elicitation schema (verified: the old triage path raised AttributeError on exactly this).

tests/test_expansion_helpers.py pins all three. CHANGELOG [Unreleased] re-opened.

Verification

  • 621 passed (610 existing — all byte-identical behavior — + 10 new + 1)
  • pre-commit green on every touched file

🤖 Generated with Claude Code

Three of the four queued items (chair ruled the submit-script DOM
switch into its own PR):

- FormQuestion.__post_init__ defaults a CONFIRM's options to the
  two-way gate on EVERY construction path — a directly-built confirm
  previously rendered a gate nothing could approve.
  CONFIRM_DEFAULT_OPTIONS single-sourced in models; bridge imports it.
- expansion_items / suggested_pick / item_context (models): the one
  iteration + suggested lookup + context join for item-keyed
  constructs, consumed by AskUserQuestion expansion, the elicitation
  schema, markdown rows + skeleton, the widget rows, and both
  validators. Output byte-identical (621-test suite as the net);
  presentation stays per-surface.
- Hardening the dedup bought: a direct-built question with a
  list-shaped `suggested` on an item-keyed construct degrades to
  "no suggestion" everywhere — the elicitation triage path previously
  crashed on exactly that (unguarded .get on a list).

CHANGELOG [Unreleased] re-opened. tests/test_expansion_helpers.py
pins all three; 621 tests total.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@silversurfer562
silversurfer562 merged commit 8366fe1 into main Aug 17, 2026
7 checks passed
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