@@ -165,6 +165,7 @@ async function writeNativeVitestReport(
165165
166166async function writeScriptProducerEvidence ( params : {
167167 outputDir : string ;
168+ producerId ?: string ;
168169 scenarioId ?: string ;
169170 status : "blocked" | "fail" | "pass" ;
170171 failureReason ?: string ;
@@ -184,7 +185,7 @@ async function writeScriptProducerEvidence(params: {
184185 {
185186 test : {
186187 kind : "script-producer-check" ,
187- id : "script-producer.web-ui.smoke" ,
188+ id : params . producerId ?? "script-producer.web-ui.smoke" ,
188189 title : "Script producer: web-ui smoke" ,
189190 source : { path : "scripts/evidence-producer.ts" } ,
190191 } ,
@@ -1408,6 +1409,35 @@ describe("qa test file scenario runner", () => {
14081409 } ) ;
14091410 } ) ;
14101411
1412+ it ( "suppresses a failed-script fallback row already owned by producer scenario evidence" , async ( ) => {
1413+ const repoRoot = await makeTempRepo ( "qa-script-duplicate-scenario-evidence-" ) ;
1414+ const outputDir = path . join ( repoRoot , ".artifacts" , "qa-e2e" , "scenario-script-duplicate" ) ;
1415+ const result = await runQaTestFileScenarios ( {
1416+ repoRoot,
1417+ outputDir,
1418+ providerMode : "mock-openai" ,
1419+ primaryModel : "mock-openai/gpt-5.6-luna" ,
1420+ scenarios : [ makeTestFileScenario ( "script" , "scripts/evidence-producer.ts" ) ] ,
1421+ runCommand : async ( ) => {
1422+ await writeScriptProducerEvidence ( {
1423+ outputDir,
1424+ producerId : "scenario-script" ,
1425+ status : "fail" ,
1426+ failureReason : "producer recorded the script failure" ,
1427+ } ) ;
1428+ return { exitCode : 1 , stdout : "" , stderr : "script failed\n" } ;
1429+ } ,
1430+ env : { OPENCLAW_QA_REF : "scenario-ref" } as NodeJS . ProcessEnv ,
1431+ } ) ;
1432+
1433+ expect ( result . results [ 0 ] ) . toMatchObject ( { status : "fail" } ) ;
1434+ expect ( result . evidence . entries ) . toHaveLength ( 1 ) ;
1435+ expect ( result . evidence . entries [ 0 ] ) . toMatchObject ( {
1436+ test : { id : "scenario-script" } ,
1437+ result : { failure : { reason : "producer recorded the script failure" } , status : "fail" } ,
1438+ } ) ;
1439+ } ) ;
1440+
14111441 it ( "fails script scenario results when imported producer evidence fails" , async ( ) => {
14121442 const repoRoot = await makeTempRepo ( "qa-script-producer-fail-" ) ;
14131443 const result = await runQaTestFileScenarios ( {
0 commit comments