fix: typed steer/abort rejection codes + status-list truncation marker (#84) - #94
Merged
Merged
Conversation
#84) SessionRejectionError (src/engine/session-rejection.ts) carries a reason discriminant (steer-unsupported | already-processing | already-aborted). The two deterministic throw sites (toLiveHandle, wrapPiSession) now throw it with UNCHANGED message text; RpcServer.steerVerb/abortVerb match on the type first and keep the message-substring checks as a back-compat fallback for third-party ChildSession implementations. Frozen error enum untouched. statusVerb adds "truncated": N to the reply ONLY when the registry exceeds LIST_CAP (additive field; absent when everything fits). Single- runId lookups never carry it.
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.
Closes #84. Both items are contract-safe additions to the frozen RPC surface (zero new error codes, no renames).
Typed steer/abort rejections
SessionRejectionError(src/engine/session-rejection.ts) with areasondiscriminant:steer-unsupported | already-processing | already-aborted.toLiveHandle,wrapPiSession) throw it with byte-identical message text — anything matching on strings keeps working.steerVerb/abortVerbmatch on the type first; the substring checks ("not supported"/"already") survive as a back-compat fallback for third-partyChildSessionimplementations bubbling bareErrors.Status-list truncation marker
statuslist replies add"truncated": Nonly when the registry exceedsLIST_CAP=25(absent at ≤25 — at-cap boundary pinned); single-runId lookups never carry it.Verification
803/803 tests (+5), typecheck clean. Review: approve (typed-first order verified adversarial-wording-safe; census clean; boundary pinned per review NIT).