Skip to content

fix: doctor enrichers INFO + find multi-match diagnostic#22

Merged
anilcancakir merged 2 commits into
masterfrom
fix/doctor-info-and-find-multimatch
Jun 25, 2026
Merged

fix: doctor enrichers INFO + find multi-match diagnostic#22
anilcancakir merged 2 commits into
masterfrom
fix/doctor-info-and-find-multimatch

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

Fixes REPORT friction items #9, #15, #16.

TDD. analyze 0, format 0-diff, flutter test 793 pass. Frozen contracts (RefRegistry, navigate typedef) untouched.

…match diagnostic

Enrichers are opt-in, so zero registered is a valid state rather than a warning; dusk:doctor now emits INFO instead of WARN (#9). dusk:find detects when a semantics label matches more than one node and returns a diagnostic so agents can disambiguate with --text/--contains or a q-handle, while still resolving the first match (#15, #16). Adds skill and doc guidance on e-ref staleness versus q-handles.
Copilot AI review requested due to automatic review settings June 24, 2026 23:47
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/src/extensions/ext_find.dart 88.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces false alarms in dusk:doctor by downgrading the “no enrichers registered” check from WARN to INFO (since enrichers are opt-in), and improves ext.dusk.find by surfacing ambiguity when --semanticsLabel / --text match multiple semantics nodes via matchCount plus an optional diagnostic field. It also updates tests and agent-facing docs/skill guidance around multi-match disambiguation and e-ref staleness vs q-handles.

Changes:

  • dusk:doctor check 3 now emits INFO (not WARN) when zero enrichers are registered.
  • ext.dusk.find now returns matchCount on success and adds a diagnostic string when ambiguous matches occur, while still returning the first match (backward compatible).
  • Tests, docs, skill, and changelog updated to reflect the new ambiguity diagnostic and ref-handling guidance.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
lib/src/commands/dusk_doctor_command.dart Downgrades “no enrichers” output from WARN to INFO.
test/src/commands/dusk_doctor_command_test.dart Updates doctor tests to expect INFO messaging for empty enrichers.
lib/src/extensions/ext_find.dart Adds matchCount + optional diagnostic for multi-match label/text queries.
test/src/extensions/ext_find_test.dart Adds widget tests asserting multi-match diagnostics and single-match behavior.
doc/commands/dusk-find.md Documents matchCount and ambiguity diagnostics + disambiguation strategies.
skills/fluttersdk-dusk/SKILL.md Adds guidance on e-ref staleness and --semanticsLabel over-match handling.
skills/fluttersdk-dusk/references/actionability-and-refs.md Adds a dedicated section on semanticsLabel over-match + mitigation strategies.
CHANGELOG.md Records the new ext.dusk.find fields and the doctor INFO change under Unreleased.

Comment thread test/src/extensions/ext_find_test.dart
Comment thread skills/fluttersdk-dusk/SKILL.md Outdated
Comment thread lib/src/extensions/ext_find.dart Outdated
Comment thread lib/src/extensions/ext_find.dart
Comment thread lib/src/extensions/ext_find.dart
Comment thread skills/fluttersdk-dusk/references/actionability-and-refs.md Outdated
Comment thread skills/fluttersdk-dusk/references/actionability-and-refs.md
Comment thread doc/commands/dusk-find.md
Comment thread doc/commands/dusk-find.md Outdated
Comment thread CHANGELOG.md Outdated
…ng tearDown

- Replace 'refine with --text/--contains or use a q-handle' with
  'refine with --key, --text, or --contains' across all locations:
  ext_find.dart (both diagnostic builders), doc/commands/dusk-find.md
  (both example blocks), skills refs/actionability-and-refs.md
  (diagnostic example), and CHANGELOG.md ([Unreleased] entry).
  The old wording was self-contradictory: dusk:find already returns a
  q-handle, so 'use a q-handle' confused agents. The new wording
  focuses on predicate refinement and surfaces --key first (the most
  precise disambiguator).

- Reword resolveQueryWithCount docstring to accurately describe
  matchCount semantics: 1 on a single match, 0 on no match (the old
  text claimed key/text-only paths 'always report 1', which contradicted
  the (null, 0, null) return on no-match).

- Remove 'silently' from SKILL.md and actionability-and-refs.md:
  dusk:find no longer silently picks the first node on ambiguity; it
  now surfaces matchCount and diagnostic.

- Add tearDown(RefRegistry.resetForTesting) to the multi-match test
  group in ext_find_test.dart to prevent q/e token state from leaking
  into later tests (repo test guideline requires both setUp and tearDown
  when RefRegistry state is touched).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Comment thread lib/src/extensions/ext_find.dart
Comment thread lib/src/extensions/ext_find.dart
Comment thread doc/commands/dusk-find.md
Comment thread doc/commands/dusk-find.md
Comment thread skills/fluttersdk-dusk/references/actionability-and-refs.md
Comment thread skills/fluttersdk-dusk/SKILL.md
Comment thread CHANGELOG.md
@anilcancakir anilcancakir merged commit 7c4d1fc into master Jun 25, 2026
3 checks passed
@anilcancakir anilcancakir deleted the fix/doctor-info-and-find-multimatch branch June 25, 2026 10:54
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.

2 participants