Skip to content

fix(frontseat-daemon): GH-272 name every candidate in an ambiguous ref - #273

Open
joaodinissf wants to merge 1 commit into
mainfrom
fix/272-ambiguous-entity-message
Open

fix(frontseat-daemon): GH-272 name every candidate in an ambiguous ref#273
joaodinissf wants to merge 1 commit into
mainfrom
fix/272-ambiguous-entity-message

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

resolveEntityRef recorded the first name match and errored on the second, so with three candidates it named whichever pair map iteration reached first and never mentioned the third.

This workspace's own catalog names a Domain, a System and a Component frontseat, so frontseat assemble //frontseat said:

ambiguous entity "frontseat": matches system:default/frontseat and domain:default/frontseat (use full ref)

It omitted component:default/frontseat — the only candidate that can be built — while advising the reader to use a full ref. Now:

ambiguous entity "frontseat": matches component:default/frontseat, domain:default/frontseat, system:default/frontseat (use a full ref)

Erroring remains correct here: this is a user-typed selector and refusing to guess is right. Only the message needed to be complete and reproducible.

The resolver had no tests; this adds them, including one that asserts the message is byte-identical across 50 resolutions of the same ambiguous name. That test fails against the previous code with exactly the truncated message above.

Relates to #272 — which also floats preferring a Component when the other matches are groupings. That is a behaviour change and deliberately not part of this.

This pull request was published with assistance from Claude.

@joaodinissf
joaodinissf requested a review from jbadeau July 30, 2026 10:08
resolveEntityRef recorded the first name match and errored on the second,
so with three candidates it named whichever pair map iteration reached
first and never mentioned the third. In this workspace a Domain, a System
and a Component are all called "frontseat", and the message routinely
omitted the Component — the only one that can actually be built — while
telling the reader to use a full ref.

Collect every match and report them sorted. Erroring stays correct for a
user-typed selector; only the message needed to become complete and
reproducible.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@joaodinissf
joaodinissf force-pushed the fix/272-ambiguous-entity-message branch from ba3aaf1 to 8120f6f Compare August 1, 2026 20:25
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