Skip to content

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

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

abrichr wants to merge 4 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.

@abrichr
abrichr marked this pull request as ready for review November 23, 2026 22:41
@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: c59f3e4

Author declaration for the new head.

  • Merged the updated parent branch claude/form-preset-entity-kinds (now 2861a2bae) into this branch. There were no conflicts. I did not rebase or force-push.
  • The net diff against the parent is unchanged from before the merge: 3 files, +31/-1. It covers presets/words/next_button.json, pack_compiler.py reading it, and a test.
  • Checks run locally: ruff check and ruff format --check on the changed files; mypy on pack_compiler.py (clean); pytest -p no:xdist on every test_form_tx_*.py except the e2e and Playwright suites (264 passed).

@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: c59f3e4

I checked the live head with gh and reviewed this PR's own diff against its base claude/form-preset-entity-kinds (2861a2b).

Blocking

  1. The new word list is not in the public artifact inventory. check_release_consistency.py lists openadapt_flow/form_tx/presets/words/next_button.json as unregistered, alongside the files from the lower PRs. That gate is flow core lint → ci.

Behavior parity: OK

  • NEXT_BUTTON_PATTERN (pack_compiler.py:110) is "|".join(re.escape(w) for w in ["next", "continue"]), which equals the old literal r"next|continue" exactly. The default argument (:660) is that same string, and the matching flags are unchanged.
  • Note: because of re.escape, future list entries are literals, not regex. That's reasonable, and the JSON about text says so.
  • This PR inherits refactor(form-tx): move the primary entity kinds to a JSON word list #2505's pack-format issue until that is fixed below it.

Generality

The words are generic UI vocabulary. check_engine_generality.py: OK. The file ships in the wheel (built and listed at #2511).

Tests (at this head, on the box)

pytest tests/test_form_tx*.py:

ruff and format: clean.

CI at review time

ci, packages-gate and run-ci failed at the draft guard, from a run while the PR was a draft. Protected-path evidence failed, and 11 checks were skipped. No real CI has run at this head.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Architectural pivot (founder Option 1, 2026-11-23): freezing the hand-written form-tx DOM heuristic and word-list stack to focus on openadapt wrap + demonstration-derived CheckpointSpec + Cross-Tab Entity Ledger + GUI-to-API/MCP promotion. Branch preserved for reference.

@abrichr abrichr closed this Nov 24, 2026
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