refactor(qa): remove unused parity helpers · openclaw/openclaw@c6aa8e7
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -452,41 +452,3 @@ export function buildHarnessParityResult(params: {
|
452 | 452 | tokenDeltaPercent, |
453 | 453 | }; |
454 | 454 | } |
455 | | - |
456 | | -function formatPercent(value: number) { |
457 | | -const normalized = Math.abs(value) < 0.05 ? 0 : value; |
458 | | -const prefix = normalized > 0 ? "+" : ""; |
459 | | -return `${prefix}${normalized.toFixed(1)}%`; |
460 | | -} |
461 | | - |
462 | | -export function renderHarnessParityMarkdownReport(report: HarnessParityReport): string { |
463 | | -const lines = [ |
464 | | -`# OpenClaw Harness Parity - ${report.left.label} vs ${report.right.label}`, |
465 | | -"", |
466 | | -`- Generated at: ${report.generatedAt}`, |
467 | | -`- Provider mode: ${report.providerMode}`, |
468 | | -`- Verdict: ${report.pass ? "pass" : "fail"}`, |
469 | | -"", |
470 | | -"| Scenario | Drift | First drift turn | Token delta | Prompt chars delta | Tool count delta | Details |", |
471 | | -"| --- | --- | ---: | ---: | ---: | ---: | --- |", |
472 | | -]; |
473 | | - |
474 | | -for (const result of report.results) { |
475 | | -lines.push( |
476 | | -`| ${result.scenarioId} | ${result.drift} | ${result.firstDriftTurn ?? ""} | ${formatPercent( |
477 | | - result.tokenDeltaPercent, |
478 | | - )} | ${result.promptDelta.systemPromptChars} | ${result.promptDelta.toolCount} | ${ |
479 | | - result.driftDetails ?? "" |
480 | | - } |`, |
481 | | -); |
482 | | -} |
483 | | - |
484 | | -if (report.failures.length > 0) { |
485 | | -lines.push("", "## Gate Failures", ""); |
486 | | -for (const failure of report.failures) { |
487 | | -lines.push(`- ${failure}`); |
488 | | -} |
489 | | -} |
490 | | - |
491 | | -return `${lines.join("\n").trimEnd()}\n`; |
492 | | -} |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,11 +59,6 @@ export const QA_RUNTIME_CAPABILITY_LAYERS: readonly QaRuntimeCapabilityLayer[] =
|
59 | 59 | "structural-text", |
60 | 60 | ] as const; |
61 | 61 | |
62 | | -export const QA_CODEX_TOOL_LOADING_MODES: readonly QaCodexToolLoading[] = [ |
63 | | -"direct", |
64 | | -"searchable", |
65 | | -] as const; |
66 | | - |
67 | 62 | const DEFAULT_LAYER_BY_BUCKET: Record<QaRuntimeToolBucket, QaRuntimeToolExpectedLayer> = { |
68 | 63 | "codex-native-workspace": "codex-native-workspace", |
69 | 64 | "openclaw-dynamic-integration": "openclaw-dynamic", |
@@ -173,25 +168,3 @@ export function readScenarioRuntimeToolCoverageMetadata(
|
173 | 168 | runtimeParityTier: scenario.runtimeParityTier, |
174 | 169 | }); |
175 | 170 | } |
176 | | - |
177 | | -export function runtimeToolComparisonModeForScenario( |
178 | | -scenario: QaSeedScenarioWithSource, |
179 | | -): RuntimeParityComparisonMode { |
180 | | -const explicit = readString(scenario.execution.config?.runtimeParityComparison); |
181 | | -if (explicit) { |
182 | | -if ( |
183 | | -explicit !== "default" && |
184 | | -explicit !== "codex-native-workspace" && |
185 | | -explicit !== "outcome-only" |
186 | | -) { |
187 | | -throw new Error( |
188 | | -`unknown runtime parity comparison mode: ${explicit}; expected default, codex-native-workspace, outcome-only`, |
189 | | -); |
190 | | -} |
191 | | -return explicit; |
192 | | -} |
193 | | -return readScenarioRuntimeToolCoverageMetadata(scenario).expectedLayer === |
194 | | -"codex-native-workspace" |
195 | | - ? "codex-native-workspace" |
196 | | - : "default"; |
197 | | -} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。