@@ -128,15 +128,15 @@ foreach ($verdict in $results.verdicts) {
128128 # roll-up across all scenarios and must NOT be used here — each datapoint
129129 # should reflect only its own scenario's activation result).
130130 $notActivated = $false
131- if ( $scenario .skillActivation -and -not $scenario .skillActivation.activated ) {
132- # Only flag as not-activated if activation was expected (expect_activation defaults to true)
133- $ expectActivation = $true
134- if ( $scenario .PSObject.Properties [ ' expectActivation' ] -and $scenario .expectActivation -eq $ false) {
135- $expectActivation = $false
136- }
137- if ($expectActivation ) {
138- $notActivated = $true
139- }
131+ # Determine whether activation is expected (defaults to true)
132+ $expectActivation = $ true
133+ if ( $scenario .PSObject.Properties [ ' expectActivation ' ] -and $scenario . expectActivation -eq $false ) {
134+ $ expectActivation = $ false
135+ }
136+ # Support both old (skillActivation) and new (skillActivationIsolated) JSON schemas
137+ $sa = if ($scenario .PSObject.Properties [ ' skillActivationIsolated ' ] ) { $scenario .skillActivationIsolated } else { $scenario .skillActivation }
138+ if ( $sa -and -not $sa .activated -and $expectActivation ) {
139+ $notActivated = $true
140140 }
141141
142142 # Check per-scenario timeout state
@@ -184,12 +184,18 @@ foreach ($verdict in $results.verdicts) {
184184 }
185185 }
186186
187+ # Support both old (withSkill) and new (skilledIsolated) JSON schemas
188+ $skilled = if ($scenario.PSObject.Properties [' skilledIsolated' ]) { $scenario.skilledIsolated } else { $scenario.withSkill }
189+
190+ # Plugin run (may not exist for older results or utility methods)
191+ $plugin = if ($scenario.PSObject.Properties [' skilledPlugin' ]) { $scenario.skilledPlugin } else { $null }
192+
187193 # Quality scores (from judge results, scale 0-5 mapped to 0-10 for dashboard)
188- if ($null -ne $scenario .withSkill .judgeResult.overallScore ) {
194+ if ($null -ne $skilled .judgeResult.overallScore ) {
189195 $benchEntry = @ {
190196 name = " $testName - Skilled Quality"
191197 unit = " Score (0-10)"
192- value = [float ]$scenario .withSkill .judgeResult.overallScore * 2
198+ value = [float ]$skilled .judgeResult.overallScore * 2
193199 }
194200 if ($notActivated ) {
195201 $benchEntry.notActivated = $true
@@ -203,6 +209,26 @@ foreach ($verdict in $results.verdicts) {
203209 }
204210 $qualityBenches.Add ($benchEntry )
205211 }
212+ if ($null -ne $plugin -and $null -ne $plugin.judgeResult.overallScore ) {
213+ $pluginBenchEntry = @ {
214+ name = " $testName - Plugin Quality"
215+ unit = " Score (0-10)"
216+ value = [float ]$plugin.judgeResult.overallScore * 2
217+ }
218+ # Plugin activation check
219+ $saPlugin = if ($scenario.PSObject.Properties [' skillActivationPlugin' ]) { $scenario.skillActivationPlugin } else { $null }
220+ if ($saPlugin -and -not $saPlugin.activated -and $expectActivation ) {
221+ $pluginBenchEntry.notActivated = $true
222+ }
223+ if ($scenarioTimedOut ) {
224+ $pluginBenchEntry.timedOut = $true
225+ }
226+ if ($overfittingSeverity ) {
227+ $pluginBenchEntry.overfitting = $overfittingSeverity
228+ $pluginBenchEntry.overfittingScore = $overfittingScore
229+ }
230+ $qualityBenches.Add ($pluginBenchEntry )
231+ }
206232 if ($null -ne $scenario.baseline.judgeResult.overallScore ) {
207233 $qualityBenches.Add (@ {
208234 name = " $testName - Vanilla Quality"
@@ -211,12 +237,12 @@ foreach ($verdict in $results.verdicts) {
211237 })
212238 }
213239
214- # Efficiency metrics (from with-skill run)
215- if ($null -ne $scenario .withSkill .metrics.wallTimeMs ) {
240+ # Efficiency metrics (from with-skill isolated run)
241+ if ($null -ne $skilled .metrics.wallTimeMs ) {
216242 $effBenchEntry = @ {
217243 name = " $testName - Skilled Time"
218244 unit = " seconds"
219- value = [math ]::Round([float ]$scenario .withSkill .metrics.wallTimeMs / 1000 , 1 )
245+ value = [math ]::Round([float ]$skilled .metrics.wallTimeMs / 1000 , 1 )
220246 }
221247 if ($notActivated ) {
222248 $effBenchEntry.notActivated = $true
@@ -230,11 +256,11 @@ foreach ($verdict in $results.verdicts) {
230256 }
231257 $efficiencyBenches.Add ($effBenchEntry )
232258 }
233- if ($null -ne $scenario .withSkill .metrics.tokenEstimate ) {
259+ if ($null -ne $skilled .metrics.tokenEstimate ) {
234260 $tokenBenchEntry = @ {
235261 name = " $testName - Skilled Tokens In"
236262 unit = " tokens"
237- value = [float ]$scenario .withSkill .metrics.tokenEstimate
263+ value = [float ]$skilled .metrics.tokenEstimate
238264 }
239265 if ($notActivated ) {
240266 $tokenBenchEntry.notActivated = $true
@@ -248,6 +274,50 @@ foreach ($verdict in $results.verdicts) {
248274 }
249275 $efficiencyBenches.Add ($tokenBenchEntry )
250276 }
277+
278+ # Efficiency metrics (from plugin run, if exists)
279+ # Compute plugin-specific notActivated signal for efficiency benches
280+ $pluginNotActivated = $false
281+ $saPlugin = if ($scenario.PSObject.Properties [' skillActivationPlugin' ]) { $scenario.skillActivationPlugin } else { $null }
282+ if ($saPlugin -and -not $saPlugin.activated -and $expectActivation ) {
283+ $pluginNotActivated = $true
284+ }
285+ if ($null -ne $plugin -and $null -ne $plugin.metrics.wallTimeMs ) {
286+ $pluginTimeBench = @ {
287+ name = " $testName - Plugin Time"
288+ unit = " seconds"
289+ value = [math ]::Round([float ]$plugin.metrics.wallTimeMs / 1000 , 1 )
290+ }
291+ if ($pluginNotActivated ) {
292+ $pluginTimeBench.notActivated = $true
293+ }
294+ if ($scenarioTimedOut ) {
295+ $pluginTimeBench.timedOut = $true
296+ }
297+ if ($overfittingSeverity ) {
298+ $pluginTimeBench.overfitting = $overfittingSeverity
299+ $pluginTimeBench.overfittingScore = $overfittingScore
300+ }
301+ $efficiencyBenches.Add ($pluginTimeBench )
302+ }
303+ if ($null -ne $plugin -and $null -ne $plugin.metrics.tokenEstimate ) {
304+ $pluginTokenBench = @ {
305+ name = " $testName - Plugin Tokens In"
306+ unit = " tokens"
307+ value = [float ]$plugin.metrics.tokenEstimate
308+ }
309+ if ($pluginNotActivated ) {
310+ $pluginTokenBench.notActivated = $true
311+ }
312+ if ($scenarioTimedOut ) {
313+ $pluginTokenBench.timedOut = $true
314+ }
315+ if ($overfittingSeverity ) {
316+ $pluginTokenBench.overfitting = $overfittingSeverity
317+ $pluginTokenBench.overfittingScore = $overfittingScore
318+ }
319+ $efficiencyBenches.Add ($pluginTokenBench )
320+ }
251321 }
252322}
253323
0 commit comments