You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Symptom
tests/integration/openbuilt.postman_collection.json→ "GET the manifest endpoint after publish (newman-roundtrip)" fails: afterPUT /apps/openregister/api/objects/openbuilt/application/{uuid}with{status:"published", ...},GET /apps/openbuilt/api/applications/{slug}/manifestreturns 404 (3 of the 22 assertions in that collection).Root cause
GET .../{slug}/manifestresolves{slug}→BuiltAppRoute→ Application. The route is supposed to be created by the Application schema'spublishtransition (on_transition.upsert_relationinlib/Settings/openbuilt_register.json). Since OR's lifecycle engine doesn't execute that action,ApplicationVersionSnapshotListeneris the PHP fallback — but it only fires onObjectTransitionedEvent, and a plainPUTthat setsstatus: publisheddoes not currently make OR dispatchObjectTransitionedEvent(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
ObjectTransitionedEventwhen a generic object PUT changes the lifecycle field from a validfromto a validtostate. Most correct — makes the declarativex-openregister-lifecycleactually drive behaviour regardless of which write path is used. Filed againstConductionNL/openregisteronce confirmed.b. OpenBuilt adds a
POST /api/applications/{slug}/publishendpoint 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