Type Alias: TransitionRequest
ts
type TransitionRequest =
| {
expectedDigest: string;
from: "editable";
to: "reviewable";
}
| {
expectedDigest: string;
from: "reviewable";
to: "editable";
}
| {
approval: ApprovalRecord;
expectedDigest: string;
from: "reviewable";
to: "executable";
};Defined in: src/batteries/orchestration/store.ts:201
The transition request, as a DISCRIMINATED UNION over the legal pairs — so an illegal target genuinely is a type error at the call site, rather than a claim the signature does not back. expected.state is fixed per variant (it is implied by from), and approval is required exactly where it is meaningful. A BYO store receiving a malformed request over a wire still answers illegal_transition at runtime; the type is the first line, not the only one.