Skip to content

test(frontseat-pipeline): pin the export-registry contract for image entities - #274

Open
joaodinissf wants to merge 1 commit into
mainfrom
test/export-collision-contract
Open

test(frontseat-pipeline): pin the export-registry contract for image entities#274
joaodinissf wants to merge 1 commit into
mainfrom
test/export-collision-contract

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

A contract test, no behaviour change. Green on main.

An entity root can hold both a language manifest and an image manifest — a Go service with an apko.yaml beside it — and that shape has to reach a plan. It is the ordinary way to ship a service as a container, and the registry is built to allow it: named exports stack, and exactly one plugin declares the unnamed default.

Both halves of that contract have been broken in turn:

The second is the tempting fix for the first, which is why this is a test rather than a comment. It fails with duplicate export "" against that change and passes on main — verified both directions.

Two things the tests also pin, both of which I got wrong before running them:

  • The ambiguity is cross-plugin. One plugin may stack its own named exports; the rejection only fires when two different plugins each supply a named export and neither declares a default.
  • A shared export name trips the duplicate check first, so it never reaches the ambiguity path at all.

Opened separately from #240 so the contract lands regardless of how that PR is resolved. If #271 replaces the export registry, this goes red and has to be consciously ported — which is the point: a bullet in an issue can be skimmed, a red test cannot.

This pull request was published with assistance from Claude.

…entities

An entity root can hold both a language manifest and an image manifest — a
Go service with an apko.yaml beside it — and that shape has to reach a plan.
It is the ordinary way to ship a service as a container, and the registry
allows it: named exports stack, and exactly one plugin declares the default.

Both halves have been broken in turn. A plugin claiming no default leaves
the primary ambiguous; a plugin claiming it unconditionally collides with
the language plugin that already owns it — and the second is the tempting
fix for the first, which is why this is a test rather than a comment.

Also pins that the ambiguity is cross-plugin: one plugin may stack its own
named exports, and two plugins sharing an export name trip the duplicate
check before ambiguity is ever reached.

Relates to #131
Relates to #199

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@joaodinissf
joaodinissf force-pushed the test/export-collision-contract branch from 830cca6 to 421d505 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