@@ -3,8 +3,17 @@ import {
33 QA_AGENTIC_PARITY_SCENARIO_TITLES ,
44 QA_AGENTIC_PARITY_TOOL_BACKED_SCENARIO_TITLES ,
55} from "./agentic-parity.js" ;
6- import type { RuntimeId , RuntimeParityDrift , RuntimeParityResult } from "./runtime-parity.js" ;
7- import { isRuntimeParityResultPass , runtimeParityCellStatus } from "./runtime-parity.js" ;
6+ import type {
7+ RuntimeId ,
8+ RuntimeParityDrift ,
9+ RuntimeParityResult ,
10+ RuntimeParityUsagePolicy ,
11+ } from "./runtime-parity.js" ;
12+ import {
13+ isRuntimeParityResultPass ,
14+ resolveRuntimeParityUsagePolicy ,
15+ runtimeParityCellStatus ,
16+ } from "./runtime-parity.js" ;
817
918type QaParityReportStep = {
1019 name : string ;
@@ -57,6 +66,7 @@ export type QaRuntimeParitySuiteSummary = Omit<QaParitySuiteSummary, "scenarios"
5766type QaRuntimeParityScenarioReport = {
5867 name : string ;
5968 status : "pass" | "fail" ;
69+ runtimeParityUsage : RuntimeParityUsagePolicy ;
6070 drift : RuntimeParityDrift | "missing" ;
6171 driftDetails ?: string ;
6272 openclawStatus : "pass" | "fail" | "missing" ;
@@ -651,6 +661,7 @@ export function buildQaRuntimeParityReport(params: {
651661 return {
652662 name : scenario . name ,
653663 status : scenario . status === "pass" ? "pass" : "fail" ,
664+ runtimeParityUsage : resolveRuntimeParityUsagePolicy ( undefined ) ,
654665 drift : "missing" ,
655666 driftDetails : scenario . details ,
656667 openclawStatus : "missing" ,
@@ -667,9 +678,11 @@ export function buildQaRuntimeParityReport(params: {
667678 const openclawStatus = runtimeParityCellStatus ( openclawCell ) ;
668679 const codexStatus = runtimeParityCellStatus ( codexCell ) ;
669680 const parityStatus = isRuntimeParityResultPass ( parity ) ? "pass" : "fail" ;
681+ const runtimeParityUsage = resolveRuntimeParityUsagePolicy ( parity . runtimeParityUsage ) ;
670682 const reportScenario = {
671683 name : scenario . name ,
672684 status : parityStatus ,
685+ runtimeParityUsage,
673686 drift : parity . drift ,
674687 driftDetails : parity . driftDetails ,
675688 openclawStatus,
@@ -684,9 +697,10 @@ export function buildQaRuntimeParityReport(params: {
684697 `${ scenario . name } drift=${ parity . drift } ${ parity . driftDetails ? ` (${ parity . driftDetails } )` : "" } .` ,
685698 ) ;
686699 }
687- const usageFailure = requiresLiveUsage
688- ? describeLiveUsageFailure ( scenario . name , reportScenario )
689- : undefined ;
700+ const usageFailure =
701+ requiresLiveUsage && runtimeParityUsage . expectation === "assistant-message-required"
702+ ? describeLiveUsageFailure ( scenario . name , reportScenario )
703+ : undefined ;
690704 if ( usageFailure ) {
691705 failures . push ( usageFailure ) ;
692706 return { ...reportScenario , status : "fail" } ;
@@ -755,15 +769,21 @@ export function renderQaRuntimeParityMarkdownReport(report: QaRuntimeParityRepor
755769
756770 lines . push ( "## Scenario Comparison" , "" ) ;
757771 for ( const scenario of report . scenarios ) {
772+ const usageNotApplicable = scenario . runtimeParityUsage . expectation === "not-applicable" ;
773+ const openclawTokens = usageNotApplicable ? "N/A" : String ( scenario . openclawTokens ) ;
774+ const codexTokens = usageNotApplicable ? "N/A" : String ( scenario . codexTokens ) ;
758775 lines . push ( `### ${ scenario . name } ` , "" ) ;
759776 lines . push ( `- status: ${ scenario . status } ` ) ;
760777 lines . push ( `- drift: ${ scenario . drift } ` ) ;
761778 lines . push (
762- `- openclaw: ${ scenario . openclawStatus } (${ scenario . openclawToolCalls } tool calls, ${ scenario . openclawTokens } tokens)` ,
779+ `- openclaw: ${ scenario . openclawStatus } (${ scenario . openclawToolCalls } tool calls, ${ openclawTokens } tokens)` ,
763780 ) ;
764781 lines . push (
765- `- codex: ${ scenario . codexStatus } (${ scenario . codexToolCalls } tool calls, ${ scenario . codexTokens } tokens)` ,
782+ `- codex: ${ scenario . codexStatus } (${ scenario . codexToolCalls } tool calls, ${ codexTokens } tokens)` ,
766783 ) ;
784+ if ( scenario . runtimeParityUsage . expectation === "not-applicable" ) {
785+ lines . push ( `- assistant-message usage: N/A (${ scenario . runtimeParityUsage . reason } )` ) ;
786+ }
767787 if ( scenario . driftDetails ) {
768788 lines . push ( `- details: ${ scenario . driftDetails } ` ) ;
769789 }
0 commit comments