Repository navigation
test(mothership): drive a draft run past a wait slice through the real controller - #9475
Merged
Merged
Conversation
…l controller A live case for the worker's sliced synchronous `workflows run` (#9464, #9469): a draft with Wait blocks totalling 500 s runs through runCopilotLifecycle, the sim_cli handler, the embedded CLI and the v2 execute and runs routes against the worker's scripted draft-run probe. With workflow-run-wait-timeout declared it checks the detached first slice, the `workflows runs wait` slices, the output read-back, that no call holds the run and no slice row is failed, and that the model receives the run's output. Without the capability it checks one held call as before, and a model's own --wait-timeout 5 reaches the model as exit 4 with the running receipt. The controller fixture now pins direct Sim transport, since self-hosted defaults to checkpoint delivery and its run control went unanswered, and the fixture plan's execution timeout is per case so a run can outlast a slice.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Contributor
[Low impact] The changes affect an opt-in live test, not production behavior. Satisfy the repository's shared-helper and non-null assertion requirements before merging; the startup deadline is a non-blocking improvement. Findings
SummaryAdds an opt-in live test that runs a draft workflow through the real controller.
|
Uses sleep from @sim/utils/helpers, guards the last wait slice instead of a non-null assertion, gives the probe's startup its own ten-second deadline like the neighbouring controller case, and tells knip the probe path lives in the worker checkout.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a live acceptance case to
saved-run-read.live.test.ts: a long draft test run goes through the real controller against the worker's sliced synchronousworkflows run. It builds on #9464 (workflows run --wait-timeoutand theworkflow-run-wait-timeoutcapability) and #9469 (a still-running slice settles as done).The draft is Start → Wait 300 s → Wait 200 s → Function returning
{invoice: 42, settled: "after-waits"}. It runs throughrunCopilotLifecycle, the sim_cli handler, the embedded CLI, and the v2 execute and runs routes, against the worker's scripted probe (tools/probes/src/draft-run-slices.ts).The case has three variants:
workflows runs waitslices, and is read back withworkflows runs get --include-output. No call holds the run (each under 250 s), no slice row isfailed, and the model receives the run's real output.workflows run --manualwith no--wait-timeout, exit 0, with the output.--wait-timeout 5reaches it as exit 4, with the running receipt and the "Keep waiting" hint.Two fixture changes make the controller cases runnable on a self-hosted default:
Opt-in like the other controller cases:
SIM_HELPERS_SMOKE=1,MSHIP_TEST_DATABASE_URL,MSHIP_WORKER_ROOT. OptionallyMSHIP_PROBE_REDIS_URL, andMSHIP_SLICES_REPORT_PATHfor the JSON evidence. It takes about nine minutes.Companion: simstudioai/mothership#872
Type of Change
Testing
Ran at this head against the worker branch
feat/slice-draft-test-runs(70d213247), 09:55–10:04 PT. All three variants pass:The case only adds a test and fixture knobs; no production code changes.
Checklist