Skip to content

fix(frontseat-plugin-sdk): resolve a published package to its Component - #269

Open
joaodinissf wants to merge 1 commit into
mainfrom
fix/publisher-entity-kind
Open

fix(frontseat-plugin-sdk): resolve a published package to its Component#269
joaodinissf wants to merge 1 commit into
mainfrom
fix/publisher-entity-kind

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

EntityRefFor matched on metadata.name alone and returned whichever entity Go's randomised map iteration reached first. A Backstage catalog conventionally names its Domain and System after the product, so three entities answer to frontseat here:

Component  service  frontseat     ← 7 tasks: the real build and ship work
Domain              frontseat
System              frontseat

The publishers bound to a different one on each call — homebrew:publish landed on system:default/frontseat and scoop:publish on component:default/frontseat in the same run.

The wrong match is worse than no match. An entity is shippable when len(Tasks) > 0, so attaching a publish task to a grouping does not merely miss the release plan — it manufactures a release unit that then gets its own version and tag.

Components only. Domain and System own no build artifact, so a name shared with them was never ambiguous, only wrong. The survivors are sorted so two Components sharing a name across namespaces resolve the same way every run.

A tie is deliberately not an error: discover.go warn-and-continues on a Tasks() error, so raising one would surface as a release that published nothing, which is the failure this is removing. A deterministic choice arrives as a reviewable pull request on the tap instead.

TestEntityRefForIgnoresGroupingKinds includes an api: entity on purpose — it sorts before component:, so ordering alone would return the API and the test would not otherwise prove the filter does anything.

Relates to #259

This pull request was published with assistance from Claude.

EntityRefFor matched on metadata.name alone and returned whichever entity
Go's randomised map iteration reached first. A Backstage catalog names its
Domain and System after the product, so "frontseat" answers for three
entities here, and the publishers bound to a different one on each call —
homebrew to the System and scoop to the Component in a single run.

The wrong match is worse than no match. An entity is shippable when it has
tasks, so attaching a publish task to a grouping manufactures a release unit
that then gets its own version and tag.

Match Components only. Domain and System own no build artifact, so a name
shared with them was never ambiguous, only wrong. Sort the survivors so that
two Components sharing a name across namespaces still resolve the same way
every run; the tie is not an error because the host warn-and-continues on a
Tasks() error, which would read as a release that published nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@joaodinissf
joaodinissf force-pushed the fix/publisher-entity-kind branch from a58f7dc to e30907d Compare August 1, 2026 20:23
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