refactor: 0.5.0 cleanup batch — CONFIRM gap + expansion unification - #34
Merged
Conversation
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>
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
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):
FormQuestion.__post_init__defaults a CONFIRM's options to["Approve", "Abort"]on every construction path; previously onlyform_from_dictdefaulted them, and a confirm built directly in Python rendered a gate with no options.CONFIRM_DEFAULT_OPTIONSsingle-sourced inmodels.expansion_items/suggested_pick/item_contextinmodelsare 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.suggestedisinstance 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 raisedAttributeErroron exactly this).tests/test_expansion_helpers.pypins all three. CHANGELOG[Unreleased]re-opened.Verification
🤖 Generated with Claude Code