Skip to content

[18/36] Add OC-080 runtime lifecycle and OC-110 task setup - #51

Open
cjohnsto-nz wants to merge 6 commits into
supervisor/build-install-scriptfrom
supervisor/add-runtime-authoring-ux-task
Open

[18/36] Add OC-080 runtime lifecycle and OC-110 task setup#51
cjohnsto-nz wants to merge 6 commits into
supervisor/build-install-scriptfrom
supervisor/add-runtime-authoring-ux-task

Conversation

@cjohnsto-nz

@cjohnsto-nz cjohnsto-nz commented Jun 14, 2026

Copy link
Copy Markdown
Owner

@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/oc-050-090-100-audit branch from d88319d to 8f8545a Compare June 14, 2026 22:47
@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/add-runtime-authoring-ux-task branch from 49adf6e to e5bd5d3 Compare June 14, 2026 22:47
@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/oc-050-090-100-audit branch from 8f8545a to b0c2755 Compare June 14, 2026 22:50
@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/add-runtime-authoring-ux-task branch from e5bd5d3 to 1ef759a Compare June 14, 2026 22:50
@cjohnsto-nz cjohnsto-nz changed the title supervisor/add-runtime-authoring-ux-task [17/21] Add OC-080 runtime lifecycle and OC-110 task setup Jun 14, 2026
@cjohnsto-nz cjohnsto-nz changed the title [17/21] Add OC-080 runtime lifecycle and OC-110 task setup [17/27] Add OC-080 runtime lifecycle and OC-110 task setup Jun 15, 2026
@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/add-runtime-authoring-ux-task branch from 1ef759a to c6c652c Compare June 15, 2026 07:49
@cjohnsto-nz
cjohnsto-nz changed the base branch from supervisor/oc-050-090-100-audit to supervisor/build-install-script June 15, 2026 08:04
@cjohnsto-nz cjohnsto-nz changed the title [17/27] Add OC-080 runtime lifecycle and OC-110 task setup [18/36] Add OC-080 runtime lifecycle and OC-110 task setup Jun 15, 2026
@APKiwi

APKiwi commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Verdict: approve with nits. The runtime generalization is clean and the error-to-synthetic-response design (status 0 so after-response scripts still run, cancellations rethrown) is sensible.

  • Minor: streaming gRPC runtime is silently dropped. The lifecycle wrap gates on grpcMethodType === 'unary' (requestExecutionService.ts ~227), so a streaming request carrying scripts/assertions/actions falls through to plain send with zero feedback. The schema now permits runtime on any gRPC request and the OC-110 PR exposes the Runtime authoring tab on streaming requests, so users can author runtime that silently never executes. OC-080 scoping to unary is fine, silence isn't: emit a diagnostic like the other unsupported paths. No test covers this either.
  • Minor: isCancellationError string-matches /request cancelled/i on error.message (~316). Works today because both clients throw exactly that string, but any future client with different wording gets its cancellation swallowed into a status-0 response and the send resolves instead of rejecting. Use a typed sentinel error.
  • Nit: buildProtocolErrorResponse copies err.message into an x-missio-error-message header, multi-line messages would be malformed as a header value. Internal-only object, harmless.

Tests: strong coverage of WS and unary gRPC lifecycles including sandbox denial before the transport opens and cancellation cleanup. The streaming-with-runtime gap is the missing case.

Deps: none added.

@cjohnsto-nz

Copy link
Copy Markdown
Owner Author

Fixed in 9b5ab9f57b2b383a317d386d598d308e6054f4fb.

  • Streaming gRPC requests with runtime scripts, assertions, tests, actions, or runtime variables now fail before the transport opens. The diagnostic identifies OC-080, states that streaming runtime is unsupported, and explicitly states that the request was not sent. Plain streaming requests remain supported.
  • WebSocket and gRPC cancellation paths now emit RequestCancelledError with the stable MISSIO_REQUEST_CANCELLED code. Runtime execution recognizes that structured sentinel rather than matching message text, so cancellation wording can change without being converted into a synthetic status-0 response.
  • Added regression tests proving that streaming runtime never calls the gRPC client and that a typed cancellation with the unrelated message Stopped by caller is still rethrown.

I am not changing x-missio-error-message. buildProtocolErrorResponse constructs an internal HttpResponse object; those headers are response metadata consumed by Missio and are never serialized onto an HTTP, WebSocket, or gRPC wire. The full error, including line breaks, is intentionally preserved in the JSON body. A multi-line string therefore cannot create an outbound malformed header.

Validation:

  • PR51 tree: npm run compile, all 423 tests, and npm run build pass.
  • PR49 + PR51 + current rework tip composed tree: compile, all 499 tests, and production build pass.
  • Final PR51→PR52 and PR51→rework merge-tree checks are both STACK_CLEAN.
  • After pushing, GitHub reports PR52 MERGEABLE/CLEAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants