This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(listener): upsert BuiltAppRoute on Application publish#18
Merged
Conversation
The Application schema's `publish` transition declares
`on_transition.upsert_relation` for the BuiltAppRoute (slug →
applicationUuid) — the index GET /api/applications/{slug}/manifest uses
to resolve a virtual app. OR's lifecycle engine does not execute that
action (ADR-031 §Exceptions(1)), and the existing
ApplicationVersionSnapshotListener only implemented the sibling
`create_relation` (the version snapshot), so user-created apps published
through OR never got a route — only the hello-world seed (which
SeedHelloWorld creates the route for explicitly) was reachable.
ApplicationVersionSnapshotListener now also find-or-creates the
BuiltAppRoute on the draft→published ObjectTransitionedEvent, mirroring
SeedHelloWorld's logic. Idempotent: an existing route already pointing at
this Application is left untouched. Tests updated + a route-skip case
added.
Note: a plain PUT that sets status=published does not currently make OR
fire ObjectTransitionedEvent — see follow-up issue — so this is the
correct fallback for when the transition fires, not a complete fix for
publishing-via-raw-PUT.
Contributor
Quality Report — ConductionNL/openbuilt @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 430/430 | |||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ |
Coverage: 0% (0/19 statements)
Quality workflow — 2026-05-12 08:19 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the Application
publishtransition's declarative fallback.ApplicationVersionSnapshotListeneralready implemented theon_transition.create_relationhalf (version snapshot); this adds theon_transition.upsert_relationhalf (the BuiltAppRoute slug → applicationUuid index thatGET /api/applications/{slug}/manifestresolves). Without it, only the hello-world seed (whose route SeedHelloWorld creates explicitly) was reachable — user-created apps published through OR got no route. Idempotent. Tests updated + route-skip case added.Quality gates green (phpcs/phpmd/psalm/phpstan). PHPUnit/Newman CI reds are pre-existing (#11). See follow-up issue for the remaining publish-path gap (a raw PUT setting status=published doesn't make OR fire ObjectTransitionedEvent).