@@ -497,6 +497,11 @@ test("exact event review hands immutable artifacts to the queue-bounded publishe
497497 assert . match ( deferredRoute . if ?? "" , / p u b l i s h - e v e n t - r e s u l t \. o u t c o m e = = ' s u c c e s s ' / ) ;
498498 assert . match ( deferredRoute . if ?? "" , / r o u t i n g _ d e f e r r e d = = ' t r u e ' / ) ;
499499 assert . match ( deferredRoute . run ?? "" , / r e p a i r - c o m m e n t - r o u t e r \. y m l / ) ;
500+ assert . equal (
501+ deferredRoute . env ?. ITEM_NUMBER ,
502+ "${{ steps.publication-context.outputs.item_number }}" ,
503+ ) ;
504+ assert . match ( deferredRoute . run ?? "" , / - f i t e m _ n u m b e r s = " \$ I T E M _ N U M B E R " / ) ;
500505 const drift = step ( publisher , "Queue fresh review after source drift" ) ;
501506 assert . match ( drift . if ?? "" , / r e q u e u e _ l a t e s t = = ' t r u e ' / ) ;
502507 assert . match ( drift . if ?? "" , / l e g a c y - e x a c t - a r t i f a c t \. o u t p u t s \. l e g a c y _ t u p l e l e s s = = ' t r u e ' / ) ;
@@ -1913,6 +1918,21 @@ test("trusted comment router owns command ledger capacity retries", () => {
19131918 assert . match ( routerWorkflow , / - - w a i t - f o r - c a p a c i t y / ) ;
19141919} ) ;
19151920
1921+ test ( "deferred exact verdict routers cannot replace each other's pending runs" , ( ) => {
1922+ const workflow = readText ( ".github/workflows/repair-comment-router.yml" ) ;
1923+ const concurrency = workflow . slice ( workflow . indexOf ( "concurrency:" ) , workflow . indexOf ( "\njobs:" ) ) ;
1924+
1925+ // GitHub keeps only one pending run per group even when cancel-in-progress is false.
1926+ // Binding exact workflow dispatches to their item preserves both handoffs under load.
1927+ assert . match ( concurrency , / g i t h u b \. e v e n t _ n a m e = = ' w o r k f l o w _ d i s p a t c h ' / ) ;
1928+ assert . match ( concurrency , / g i t h u b \. e v e n t \. i n p u t s \. i t e m _ n u m b e r s ! = ' ' / ) ;
1929+ assert . match (
1930+ concurrency ,
1931+ / f o r m a t \( ' r e p a i r - c o m m e n t - r o u t e r - \{ 0 \} - i t e m s - \{ 1 \} ' [ \s \S ] * g i t h u b \. e v e n t \. i n p u t s \. i t e m _ n u m b e r s / ,
1932+ ) ;
1933+ assert . match ( concurrency , / c a n c e l - i n - p r o g r e s s : f a l s e / ) ;
1934+ } ) ;
1935+
19161936test ( "comment commands keep the router-to-sweep dispatch contract" , ( ) => {
19171937 const routerWorkflow = readText ( ".github/workflows/repair-comment-router.yml" ) ;
19181938 const sweepWorkflow = readText ( ".github/workflows/sweep.yml" ) ;
0 commit comments