Skip to content

refactor(form-tx): move the wizard next-button words to a JSON word list - #2506

Draft
abrichr wants to merge 3 commits into
claude/form-preset-entity-kindsfrom
claude/form-preset-wizard-words
Draft

abrichr wants to merge 3 commits into
claude/form-preset-entity-kindsfrom
claude/form-preset-wizard-words

Conversation

@abrichr

@abrichr abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member

What this does

Fourth of the form_tx preset moves (stacked on the entity-kinds PR). induce_form_pack used r"next|continue" as its default next-button pattern, which is English UI vocabulary. The words now come from form_tx/presets/words/next_button.json. pack_compiler.NEXT_BUTTON_PATTERN joins them, each escaped, with |.

No behaviour change

A test checks that the default is still exactly next|continue.

Tests

  • tests/test_form_tx_presets.py: 9 passed.
  • ruff is clean.

induce_form_pack's default next-button pattern (next|continue) is English
UI vocabulary. It now comes from form_tx/presets/words/next_button.json and
is the same string as before.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Gemini (gemini-3.1-pro-preview), round 1
Reviewed-Head: e6017b8

Sent the full diff of this PR's own files, those files in full, and any earlier findings.

This is a clean and straightforward PR that successfully extracts the hardcoded English vocabulary for the "next" button into a data file, adhering to the engine generality rule.

I have reviewed the changes for correctness, fail-open paths, unintended behavior changes, and test gaps.

  • Correctness & Behavior: The new NEXT_BUTTON_PATTERN dynamically builds the regex by escaping the words from the JSON and joining them with |. Since the words are exactly "next" and "continue", the resulting string is exactly "next|continue", which is identical to the old raw string r"next|continue". There is zero change in runtime behavior.
  • Fail-Open / Gate-Direction: Because the evaluated default argument is character-for-character identical to the old one, no new inputs will pass or skip where the old code stopped.
  • Tests: The author correctly identified that the old value was a function signature default (not a module constant) and wrote a targeted test (test_the_next_button_default_is_unchanged) to assert that the new module constant and the function signature default both evaluate to exactly r"next|continue". This perfectly covers the change and prevents any silent regressions.

There are no blockers, should-fixes, or nits.

APPROVE

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: c696491

Author declaration. I wrote this change and checked it at the head above. Everything here is synthetic; no real app was run.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 597d598

Author declaration at the head above. Synthetic tests only; no real app was run.

This branch has not been deployed

No deployments
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