prod 500s after B1+B2 deploy — /api/builder/scenarios + /api/events?type=deadline failing #154

Open
opened 2026-05-27 22:36:32 +00:00 by mAi · 0 comments
Collaborator

Regression on main 88c03e9 (post-B1+B2 deploy)

m reported live on paliad.de right after the B1+B2 deploy:

Failed to load resource: the server responded with a status of 500 ()
procedures.js:101 Uncaught (in promise) TypeError:
    Cannot read properties of null (reading 'filter')
        at D (procedures.js:101:761)
        at a (procedures.js:101:6050)
        at async M8 (procedures.js:101:7515)

Followed by:

GET https://paliad.de/api/events?type=deadline&status=pending  500
GET https://paliad.de/api/events?type=deadline&status=overdue  500

m's words: "It does not really work, cant set anything... you should fix it with a tester. Or is it not done yet?!"

What broke

  • Builder UI unusable: /tools/procedures loads the chrome (page header / scenario picker / matter picker / search / overview / event / from-matter / side panel), but interaction dies on the null.filter JS error. Likely first fetch (GET /api/builder/scenarios?status=active) returns 500 → fetchJSON swallows to null → downstream state.active.proceedings.filter(...) throws.
  • Dashboard deadline endpoints (existing feature) also 500: /api/events?type=deadline&status=pending and ?status=overdue. These are NOT new code from B0/B1/B2 — they were working before tonight's deploy. This points at mig 157 (B0) breaking something at the schema / RLS layer, or a service-init regression from the new wirings.

Train context

Tonight's session shipped (in order):

main SHA What
1844df3 B0 Scenario DB foundation (newton) — mig 157 + scenario_builder service + minimal API
1b4b2e4 submission-md placeholder underscores fix (head)
0c85702 Engine semantics — suppress optional + respect trigger_event_id (pasteur)
6c1d8cc B1 commit (galileo) — Litigation Builder shell + cold-open
46dc4ec B2 commit (galileo) — multi-triplet + spawn + per-event state
88c03e9 Current main (B1+B2 merged)

The /api/events regression is the loud signal — that endpoint isn't touched by any of the new code. mig 157's paliad.projects.origin_scenario_id column / RLS changes are the most likely culprit, but needs log investigation.

Assigned fixer

brunel running on t-paliad-344 — investigation order: pull Dokploy logs first (look at the SQL panic / error message for the /api/events?type=deadline&status=pending path), then verify mig 157 applied cleanly, then service init, then frontend null-guards. Verification via mai-tester (Playwright) before commit. Do NOT revert main without head approval.

Acceptance

  • /api/events?type=deadline&status=pending returns 200 with the deadline list (m's dashboard works)
  • /api/events?type=deadline&status=overdue returns 200
  • /api/builder/scenarios?status=active returns 200 with an array (possibly empty)
  • /tools/procedures loads without JS errors and the New Scenario CTA works through to a saved scratch scenario
## Regression on main `88c03e9` (post-B1+B2 deploy) m reported live on paliad.de right after the B1+B2 deploy: ``` Failed to load resource: the server responded with a status of 500 () procedures.js:101 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'filter') at D (procedures.js:101:761) at a (procedures.js:101:6050) at async M8 (procedures.js:101:7515) ``` Followed by: ``` GET https://paliad.de/api/events?type=deadline&status=pending 500 GET https://paliad.de/api/events?type=deadline&status=overdue 500 ``` m's words: "It does not really work, cant set anything... you should fix it with a tester. Or is it not done yet?!" ## What broke - **Builder UI unusable**: `/tools/procedures` loads the chrome (page header / scenario picker / matter picker / search / overview / event / from-matter / side panel), but interaction dies on the `null.filter` JS error. Likely first fetch (`GET /api/builder/scenarios?status=active`) returns 500 → `fetchJSON` swallows to `null` → downstream `state.active.proceedings.filter(...)` throws. - **Dashboard deadline endpoints (existing feature) also 500**: `/api/events?type=deadline&status=pending` and `?status=overdue`. These are NOT new code from B0/B1/B2 — they were working before tonight's deploy. This points at mig 157 (B0) breaking something at the schema / RLS layer, or a service-init regression from the new wirings. ## Train context Tonight's session shipped (in order): | main SHA | What | |---|---| | `1844df3` | B0 Scenario DB foundation (newton) — mig 157 + scenario_builder service + minimal API | | `1b4b2e4` | submission-md placeholder underscores fix (head) | | `0c85702` | Engine semantics — suppress optional + respect trigger_event_id (pasteur) | | `6c1d8cc` | B1 commit (galileo) — Litigation Builder shell + cold-open | | `46dc4ec` | B2 commit (galileo) — multi-triplet + spawn + per-event state | | `88c03e9` | Current main (B1+B2 merged) | The `/api/events` regression is the loud signal — that endpoint isn't touched by any of the new code. mig 157's `paliad.projects.origin_scenario_id` column / RLS changes are the most likely culprit, but needs log investigation. ## Assigned fixer brunel running on t-paliad-344 — investigation order: pull Dokploy logs first (look at the SQL panic / error message for the `/api/events?type=deadline&status=pending` path), then verify mig 157 applied cleanly, then service init, then frontend null-guards. Verification via mai-tester (Playwright) before commit. Do NOT revert main without head approval. ## Acceptance - `/api/events?type=deadline&status=pending` returns 200 with the deadline list (m's dashboard works) - `/api/events?type=deadline&status=overdue` returns 200 - `/api/builder/scenarios?status=active` returns 200 with an array (possibly empty) - `/tools/procedures` loads without JS errors and the New Scenario CTA works through to a saved scratch scenario
mAi self-assigned this 2026-05-27 22:36:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: m/paliad#154
No description provided.