fix: restore back-compat import shim + Run redirects to /plays/{sid} #35

Merged
timur merged 1 commit from fix/runtime-compat-importer-and-play-redirect into development 2026-05-14 10:53:34 +00:00
Owner

Two post-#32 regressions the user hit on Play:

  1. ModuleNotFoundError: model_call — stored service_agent (and any flow created pre-#32) uses from model_call import model_call. The importer #32 removed was load-bearing for stored workflows. Restored as a back-compat shim that delegates to _resolve_flow_entry (same resolver flow.invoke uses) — same spans/memoization/semantics, different author surface.

  2. Bottom-bar island invisible after Run — Run redirected to /workflows/{wf}/edit?play={sid} (embedded overlay, no island). Changed to /plays/{sid} so users land on the page with Logs / Pending resumes / Events tabs and the Expand-to-failures toolbar.

Verified:

  • service_agent runs end-to-end (no import crash); fails deep in the flow on a generic prompt, which is the correct runtime outcome.
  • GET /plays/{sid} rendering includes hl-island, Pending resumes, Expand to failures.
Two post-#32 regressions the user hit on Play: 1. **`ModuleNotFoundError: model_call`** — stored `service_agent` (and any flow created pre-#32) uses `from model_call import model_call`. The importer #32 removed was load-bearing for stored workflows. Restored as a back-compat shim that delegates to `_resolve_flow_entry` (same resolver `flow.invoke` uses) — same spans/memoization/semantics, different author surface. 2. **Bottom-bar island invisible after Run** — Run redirected to `/workflows/{wf}/edit?play={sid}` (embedded overlay, no island). Changed to `/plays/{sid}` so users land on the page with Logs / Pending resumes / Events tabs and the Expand-to-failures toolbar. Verified: - service_agent runs end-to-end (no import crash); fails deep in the flow on a generic prompt, which is the correct runtime outcome. - `GET /plays/{sid}` rendering includes `hl-island`, `Pending resumes`, `Expand to failures`.
Two post-#32 regressions the user hit when pressing Play on a stored
service_agent workflow:

1. **ModuleNotFoundError: 'model_call'**
   Stored workflows still use 'from model_call import model_call' —
   syntax that worked via the meta-path importer the issue
   recommended removing. Removing it broke every existing workflow
   whose source has those imports.

   Restored the importer as a back-compat shim. It now delegates to
   _resolve_flow_entry (same resolver flow.invoke uses) so the
   semantics are identical — same spans, same memoization, same RPC
   resolver. The shim exists only for stored workflows; new flows
   should use flow.invoke().

2. **Bottom-bar island not visible after Run**
   The workflow editor's Run button redirected to the embedded
   overlay view (/workflows/{wf}/edit?play={sid}) which doesn't have
   the bottom-bar island (Logs / Pending resumes / Events). The
   island only lives on the dedicated /plays/{sid} page.

   Run now redirects to /plays/{sid} directly. Users land on the
   page that has the pause/resume forms, live log feed, and Expand-
   to-failures toolbar.

Verified end-to-end:
- service_agent run lands at status=failed *deep in the flow*
  (model didn't parse) instead of crashing at import — proves the
  shim works.
- /plays/{sid} response includes hl-island, Pending resumes,
  Expand to failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
timur merged commit b674159720 into development 2026-05-14 10:53:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_logic!35
No description provided.