test("both valid states retain a discriminant",["basic"],({decideState,describeState})=>{for(const state of ["ok","failed"]){const d=decideState(state);checkEq(d,{kind:"valid",state});checkEq(describeState(d),"state: "+state);}});
test("unknown does not coerce or widen",["boundary"],({decideState})=>{for(const value of [null,[],{},0,true,"OK","pending"]){checkEq(decideState(value),{kind:"invalid",reason:"state must be ok or failed"});}});
test("invalid branch has its own payload",["invariant"],({describeState})=>checkEq(describeState({kind:"invalid",reason:"diagnostic"}),"diagnostic"));
