Skip to content

Add verify_field: read a field back and confirm the typed value#437

Merged
JE-Chen merged 1 commit into
devfrom
feat/verify-field-batch
Jun 25, 2026
Merged

Add verify_field: read a field back and confirm the typed value#437
JE-Chen merged 1 commit into
devfrom
feat/verify-field-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 25, 2026

Copy link
Copy Markdown
Member

Summary

Second feature of the ROUND-15 input-fidelity lane. field_entry types into a control and hopes it landed — a slow IME, focus steal, input mask or auto-format can silently mangle or drop characters, and nothing reads the field back. Distinct from action_effect (any near-target change) and postcondition.text_present (text anywhere on screen) — neither confirms this field equals this value.

  • Headless core utils/verify_field/: compare_field_value (pure comparator — exact/trim/ci/normalized NFKC reusing text_normalize/contains), verify_field_value (read via injectable reader + compare), fill_and_verify (type via injectable filler, read back, retry — optionally clearing first — until match or attempts run out; returns the result + attempts count).
  • 5 layers wired: facade __all__; AC_compare_field_value (pure) / AC_verify_field_value (reads the control's value via the accessibility backend) executor commands; matching read-only ac_* MCP tools; Script Builder under Flow. fill_and_verify (wraps a typing callable) is the Python-API surface.
  • Docs: EN + Zh v210_features_doc.rst + WHATS_NEW.md.

Test

test/unit_test/headless/test_verify_field_batch.py — pure compare (exact/trim/ci/contains/normalized NFC-vs-NFD/None-as-empty), verify via injected reader, fill_and_verify first-try / retry-until-match / give-up-after-attempts with injected filler+reader+clear, plus facade + executor/MCP/builder wiring. All 13 green; ruff + bandit + radon clean; no float ==; package stays Qt-free.

field_entry types and hopes — a slow IME, focus steal, input mask or
auto-format can silently drop characters and nothing reads the field
back. Distinct from action_effect (any near-target change) and
postcondition.text_present (text anywhere). compare_field_value is the
pure comparator (exact/trim/ci/normalized/contains); verify_field_value
reads via an injectable reader; fill_and_verify types, reads back and
retries until it matches.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 31 complexity · 0 duplication

Metric Results
Complexity 31
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 59ac066 into dev Jun 25, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/verify-field-batch branch June 25, 2026 22:24
@sonarqubecloud

Copy link
Copy Markdown

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