@@ -152,7 +152,6 @@ const ArtifactList = type({
152152 runId : "string > 0" ,
153153 role : "string > 0" ,
154154 status : "'deployed' | 'running'" ,
155- "state?" : "'working' | 'waiting' | 'approval'" ,
156155 "concept?" : "string > 0" ,
157156 } ) . array ( ) ,
158157 preferences : Preferences ,
@@ -162,21 +161,20 @@ type Ref = typeof SourceRef.infer;
162161// A coordinator on 2026-11-05 often read a bare approval as still pending and started nothing, so
163162// an approval of a document names the step it unblocks: the document after the last filed one, once
164163// every filed document before it is approved and no writer is at work, or the design while none of
165- // it is under way. A specialist that filed its work stays parked, waiting, and is not at work.
164+ // it is under way. A writer's run ends with its one task, so one in flight is at work.
166165function unblockedStep (
167166 documents : readonly { kind : string } [ ] ,
168167 byKind : ReadonlyMap < string , Ref > ,
169168 approved : ReadonlyMap < string , number > ,
170- inFlight : readonly { role : string ; state ?: string } [ ] ,
169+ inFlight : readonly { role : string } [ ] ,
171170 designOptions : boolean ,
172171) : string | undefined {
173172 const approving = ( kind : string ) =>
174173 documents . some ( ( doc ) => doc . kind === kind ) ;
175174 if ( ! DOCUMENT_ORDER . some ( approving ) ) return undefined ;
176175 const index = DOCUMENT_ORDER . findLastIndex ( ( kind ) => byKind . has ( kind ) ) + 1 ;
177176 const next = DOCUMENT_ORDER [ index ] ;
178- const atWork = ( role : string ) =>
179- inFlight . some ( ( run ) => run . role === role && run . state !== "waiting" ) ;
177+ const atWork = ( role : string ) => inFlight . some ( ( run ) => run . role === role ) ;
180178 if ( next === undefined || atWork ( "writer" ) ) return undefined ;
181179 if ( next === "design" && ( designOptions || atWork ( "designer" ) ) )
182180 return undefined ;
0 commit comments