pendingGateAt ( state : { branch : string ; budget : | null | { cost_limit_usd : null | number ; cost_spent_usd : null | number ; [ key : string ]: unknown ; } ; closure : | null | { as : "already-delivered" | "superseded" | "obsolete" | "abandoned" ; at : null | string ; by : null | string ; reason : null | string ; [ key : string ]: unknown ; } ; escalations : { at : null | string ; disposition : null | "re-review" | "return-to-implement" | "re-plan" ; from_role : null | string ; reason : string ; resolution : null | string ; resolved : boolean ; resolved_at : null | string ; resolved_by : null | string ; [ key : string ]: unknown ; } [] ; gates : { G0 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; G1 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; G2 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; G3 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; } ; paused_reason : null | string ; phase : | "spec" | "plan" | "implement" | "integrate" | "release" | "done" | "paused" | "closed" ; profile : "patch" | "standard" | "full" ; run : string ; tasks : { id : string ; review_rounds : number ; status : string ; [ key : string ]: unknown ; } [] ; } , phase : | "spec" | "plan" | "implement" | "integrate" | "release" | "done" | "paused" | "closed" , ) : null | "G0" | "G1" | "G2" | "G3" Parameters state : { branch : string ; budget : | null | { cost_limit_usd : null | number ; cost_spent_usd : null | number ; [ key : string ]: unknown ; } ; closure : | null | { as : "already-delivered" | "superseded" | "obsolete" | "abandoned" ; at : null | string ; by : null | string ; reason : null | string ; [ key : string ]: unknown ; } ; escalations : { at : null | string ; disposition : null | "re-review" | "return-to-implement" | "re-plan" ; from_role : null | string ; reason : string ; resolution : null | string ; resolved : boolean ; resolved_at : null | string ; resolved_by : null | string ; [ key : string ]: unknown ; } [] ; gates : { G0 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; G1 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; G2 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; G3 : { approved : boolean ; at : null | string ; burden : null | "confirmation" | "light-correction" | "heavy-correction" ; by : null | string ; notes : null | string ; [ key : string ]: unknown ; } ; } ; paused_reason : null | string ; phase : | "spec" | "plan" | "implement" | "integrate" | "release" | "done" | "paused" | "closed" ; profile : "patch" | "standard" | "full" ; run : string ; tasks : { id : string ; review_rounds : number ; status : string ; [ key : string ]: unknown ; } [] ; } phase : | "spec" | "plan" | "implement" | "integrate" | "release" | "done" | "paused" | "closed" Returns null | "G0" | "G1" | "G2" | "G3"
Which gate, if any, is on the table when the run stands at
phase.The frontier is the profile's first un-approved gate: every gate before it is signed, so it is the only gate a decision can honestly be about. It is on the table when
phaseis one of the phases that gate is decided in and nobody has decided it yet — a declined gate is a decided gate until a resume re-opens it.One definition, two readers. The readiness rules draw a gate card from it (
view-model/readiness.ts) andplanDecisionrefuses a decision that is not about it (#344). Two implementations of "pending" is how the card a human is shown and the write the API accepts drift apart.