Skip to content

Add anchor ordinal (Nth match) + anchor_locate_all#334

Merged
JE-Chen merged 1 commit into
devfrom
feat/anchor-ordinal-batch
Jun 22, 2026
Merged

Add anchor ordinal (Nth match) + anchor_locate_all#334
JE-Chen merged 1 commit into
devfrom
feat/anchor-ordinal-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

Summary

Round-11, automation-core (locate lane). anchor_locate always returned the single nearest match — no way to pick "the 2nd row below the header" or enumerate every matching row.

Layers

  • Headless core: extends je_auto_control/utils/anchor_locator/locator.pyordinal param on anchor_locate (1-based; ordinal=1 = nearest, backward-compatible) and new anchor_locate_all returning every match sorted by distance. Shared pure _ranked helper (filter by relation, sort by distance). No PySide6.
  • Facade: anchor_locate_all re-exported + __all__; anchor_locate gains ordinal.
  • Executor: AC_anchor_locate ordinal param, new AC_anchor_locate_all → {count, matches}.
  • MCP: ac_anchor_locate ordinal, new ac_anchor_locate_all.

Tests / docs

  • test/unit_test/headless/test_anchor_ordinal_batch.py — 8 headless tests (ordinal Nth selection, out-of-range, locate-all sorted, empty-on-missing-anchor, relation-filters-before-ordinal + wiring + facade) via monkeypatched candidates. Existing anchor tests still pass (29 total).
  • EN/Zh feature docs v124_features_doc.rst + toctrees; 3 WHATS_NEW entries.

Note: anchor commands have no Script Builder spec (Locator objects don't fit the flat field model — consistent with the base feature). Codacy may show action_required from its coverage gate only (issues=0).

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

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 649c8b8 into dev Jun 22, 2026
15 of 16 checks passed
@JE-Chen JE-Chen deleted the feat/anchor-ordinal-batch branch June 22, 2026 18:14
@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