Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
This repository was archived by the owner on May 29, 2026. It is now read-only.

Publishing an Application via a raw PUT doesn't create its BuiltAppRoute (manifest endpoint 404s) #19

Description

@rubenvdlinde

Symptom

tests/integration/openbuilt.postman_collection.json → "GET the manifest endpoint after publish (newman-roundtrip)" fails: after PUT /apps/openregister/api/objects/openbuilt/application/{uuid} with {status:"published", ...}, GET /apps/openbuilt/api/applications/{slug}/manifest returns 404 (3 of the 22 assertions in that collection).

Root cause

GET .../{slug}/manifest resolves {slug}BuiltAppRoute → Application. The route is supposed to be created by the Application schema's publish transition (on_transition.upsert_relation in lib/Settings/openbuilt_register.json). Since OR's lifecycle engine doesn't execute that action, ApplicationVersionSnapshotListener is the PHP fallback — but it only fires on ObjectTransitionedEvent, and a plain PUT that sets status: published does not currently make OR dispatch ObjectTransitionedEvent (the transition machinery is only exercised via OR's dedicated transition path, not a field-value change on a generic object PUT). #18 added the route-upsert half of the fallback, but the event still has to fire for it to run.

Options (pick one, probably (a) + adjust the test)

a. OR fires ObjectTransitionedEvent when a generic object PUT changes the lifecycle field from a valid from to a valid to state. Most correct — makes the declarative x-openregister-lifecycle actually drive behaviour regardless of which write path is used. Filed against ConductionNL/openregister once confirmed.
b. OpenBuilt adds a POST /api/applications/{slug}/publish endpoint that drives the transition (and thus the route + snapshot) — explicit, but duplicates what the declarative lifecycle is supposed to do.
c. The Newman collection publishes via OR's transition endpoint instead of a raw PUT — fixes the test but not the underlying "raw PUT doesn't transition" surprise for real callers.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions