Repository navigation
improvement(mothership): use the synced replay-end frame contract - #10352
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummarySyncs the worker contracts and uses their replay-end constants in the replay reader.
Reviews (2) · Last reviewed commit: "improvement(mothership): use the synced ..." · Reviewed by Greptile |
Sync the worker contracts: model-router candidate ids now start and end with a letter or digit and are not trimmed, and the replay-end frame's payload, kind, reasons and envelope live in mothership-stream-v1 as MothershipStreamV1ReplayEnd* instead of protocol's StreamReplayEnd. The run replay reader validates the frame against the synced kind and reason constants instead of a hand-kept copy, and logs a malformed frame with its zod issue paths. The frame stays outside the live run kinds; a contract test pins that the live parser rejects it. A model-router test runs the request body Sim builds through the synced ModelRouterRequest, so a tier id the worker would reject fails here first.
waleedlatif1
force-pushed
the
improvement/mship-contract-sync
branch
from
November 23, 2026 20:17
557daf8 to
debce56
Compare
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously 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
mothership-stream-v1asMothershipStreamV1ReplayEnd*, replacingprotocol'sStreamReplayEnd.run-replay.tsvalidates the replay-end frame against the synced kind and reason constants instead of a hand-kept copy, and logs a malformed frame with its zod issue paths. Behaviour is unchanged: an unknown reason or missing length still ends the read asclosedModelRouterRequest, so a tier id the worker would refuse fails in Sim's tests first. Sim's ids (1,2,3) pass the stricter ruleType of Change
Testing
check:contract-syncwith this branch asSIM_REPO_PATH)tsc --noEmitandbun run lintclean; vitest forlib/mothership/request/sessionandlib/model-routerpass; test-pattern and test-type audits passChecklist
Companion: simstudioai/mothership#1006