@@ -578,21 +578,21 @@ export function validateBaseImagePublicationGate(workflow: OperationsWorkflow):
578578 "base-image-publication job must preserve its exact trusted-mode classifier, minimal permissions, pinned checkout, and verifier boundary" ,
579579 ) ;
580580 }
581- if ( ! needs ( workflow . jobs [ "generate-matrix" ] ?? { } ) . includes ( "base-image-publication" ) ) {
582- errors . push ( "generate-matrix must wait for base-image-publication" ) ;
581+ const matrix = workflow . jobs [ "generate-matrix" ] ?? { } ;
582+ if ( needs ( matrix ) . includes ( "base-image-publication" ) ) {
583+ errors . push ( "generate-matrix must not wait for base-image-publication" ) ;
583584 }
584- const matrixOutputs = workflow . jobs [ "generate-matrix" ] ?. outputs ?? { } ;
585- if (
586- matrixOutputs . dcode_base_contract !==
587- "${{ needs.base-image-publication.outputs.dcode_base_contract }}" ||
588- matrixOutputs . dcode_base_ref !== "${{ needs.base-image-publication.outputs.dcode_base_ref }}"
589- ) {
590- errors . push ( "generate-matrix must preserve the immutable Deep Agents Code base outputs" ) ;
585+ const matrixOutputs = matrix . outputs ?? { } ;
586+ if ( "dcode_base_contract" in matrixOutputs || "dcode_base_ref" in matrixOutputs ) {
587+ errors . push ( "generate-matrix must not relay Deep Agents Code base outputs" ) ;
591588 }
592589 const live = workflow . jobs . live ?? { } ;
590+ if ( ! sameMembers ( needs ( live ) , [ "base-image-publication" , "generate-matrix" ] ) ) {
591+ errors . push ( "live E2E must wait for matrix generation and base-image publication" ) ;
592+ }
593593 if (
594594 live . env ?. NEMOCLAW_LANGCHAIN_DEEPAGENTS_CODE_SANDBOX_BASE_IMAGE_REF !==
595- "${{ needs.generate-matrix .outputs.dcode_base_ref }}"
595+ "${{ needs.base-image-publication .outputs.dcode_base_ref }}"
596596 ) {
597597 errors . push ( "live DCode must use the selected immutable base reference" ) ;
598598 }
@@ -601,13 +601,17 @@ export function validateBaseImagePublicationGate(workflow: OperationsWorkflow):
601601 const liveSteps = live . steps ?? [ ] ;
602602 if (
603603 evidence . if !== "${{ matrix.id == 'ubuntu-repo-cloud-langchain-deepagents-code' }}" ||
604- evidence . env ?. BASE_CONTRACT !== "${{ needs.generate-matrix.outputs.dcode_base_contract }}" ||
604+ evidence . env ?. BASE_CONTRACT !==
605+ "${{ needs.base-image-publication.outputs.dcode_base_contract }}" ||
605606 ! String ( evidence . run ?? "" ) . includes ( "dcode-base-image.json" ) ||
606607 liveSteps . indexOf ( evidence ) >= liveSteps . indexOf ( findStep ( live , "Run live E2E tests" ) ) ||
607608 ! String ( upload . with ?. path ?? "" ) . includes ( "dcode-base-image.json" )
608609 ) {
609610 errors . push ( "live DCode must record its immutable base contract before E2E execution" ) ;
610611 }
612+ if ( ! sameMembers ( needs ( workflow . jobs [ "staging-brev-launchable" ] ?? { } ) , [ "generate-matrix" ] ) ) {
613+ errors . push ( "staging-brev-launchable must wait only for generate-matrix" ) ;
614+ }
611615 return errors ;
612616}
613617
0 commit comments