Skip to content

feat(mcp): enumerate_choices + apply_selections (remplissage de choix par lot)#4

Merged
Destynova2 merged 1 commit into
mainfrom
feat/batch-choices
Jun 30, 2026
Merged

feat(mcp): enumerate_choices + apply_selections (remplissage de choix par lot)#4
Destynova2 merged 1 commit into
mainfrom
feat/batch-choices

Conversation

@Destynova2

Copy link
Copy Markdown
Contributor

Résumé

Deux nouvelles primitives MCP pour remplir un modal / une page de choix scrollable sans l'aller-retour par option (aujourd'hui ~70 appels pour ~14 champs). Implémente le LLD docs/design/LLD-batch-choice-enumeration-selection.md.

enumerate_choices

  • Énumère toute la surface de choix en une passe (hit_targets(include_latent=true)), groupes avec sémantique single-select / multi-select, requis/optionnel, id + coords par choix.
  • Read-only par défaut ; scroll_scan=true fait un balayage restituant la position (coordonné comme scan_chart, non gated).

apply_selections(plan, expected_epoch)

  • Applique tous les picks en un lot sous UNE seule approbation (BatchApprovalContext borné, réutilise la grant map/TTL existante).
  • Garde epoch à 2 niveaux : expected_epoch au dispatch (refus de plan périmé) + re-check fingerprint en vol → re-scan uniquement sur reflow (disclosure progressive), caps MAX_RESCANS/MAX_BATCH_PICKS.
  • Résolution fail-closed par HitTarget.id (fallback label/group/bbox) ; étapes non résolues rapportées, jamais devinées ; vérif consolidée finale.

Détails

  • Nouvelle ToolRoute::Batch pour apply_selections ; catalogue d'outils 70 → 72.
  • 3 invariants CONTRACTS + ~16 tests (engine choices/selections, catalog, dispatcher).
  • Réutilise hit_targets / ui_epoch.fingerprint / expected_epoch / l'approve gating existants.

Validation locale

cargo build ✅ · cargo clippy --workspace --all-targets -- -D warnings ✅ · cargo test ✅ (175+ tests).

1ʳᵉ PR au format « grob » : ciblée, 1 seul commit sur main (#3 déjà mergée), passe par la merge-queue + auto-merge.

… par lot)

Implemente le LLD docs/design/LLD-batch-choice-enumeration-selection.md.
- enumerate_choices: enumere toute une surface de choix scrollable en une passe (groupes single/multi-select, requis/optionnel, id+coords) ; read-only par defaut, scroll_scan optionnel
- apply_selections: applique tous les picks en UN lot sous UNE seule approbation ; garde epoch a 2 niveaux (expected_epoch au dispatch + fingerprint en vol -> re-scan uniquement sur reflow) ; resolution fail-closed par id (fallback label/group/bbox) ; verif consolidee finale
- nouvelle ToolRoute::Batch ; catalogue d'outils 70 -> 72 ; invariants CONTRACTS + ~16 tests
@Destynova2 Destynova2 added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit 823fb3c Jun 30, 2026
19 checks passed
@Destynova2 Destynova2 deleted the feat/batch-choices branch June 30, 2026 06:16
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