





















@@ -40,12 +40,16 @@ type QaRunCliOptions = QaLabSelfCheckCommandOptions &
4040qaProfile?: QaProfileCommandOptions["profile"];
4141surface?: QaProfileCommandOptions["surface"];
4242category?: QaProfileCommandOptions["category"];
43+evidenceMode?: QaProfileCommandOptions["evidenceMode"];
44+excludeTestExecutionEvidence?: boolean;
4345};
44464547const QA_RUN_PROFILE_ONLY_OPTIONS = [
4648{ optionName: "outputDir", flag: "--output-dir" },
4749{ optionName: "surface", flag: "--surface" },
4850{ optionName: "category", flag: "--category" },
51+{ optionName: "evidenceMode", flag: "--evidence-mode" },
52+{ optionName: "excludeTestExecutionEvidence", flag: "--exclude-test-execution-evidence" },
4953{ optionName: "transport", flag: "--transport" },
5054{ optionName: "providerMode", flag: "--provider-mode" },
5155{ optionName: "model", flag: "--model" },
@@ -97,6 +101,29 @@ function parseQaCliPositiveIntegerOption(value: string, flag: string): number {
97101return parsed;
98102}
99103104+function parseQaEvidenceModeOption(value: string): QaProfileCommandOptions["evidenceMode"] {
105+const evidenceMode = value.trim();
106+if (evidenceMode === "full" || evidenceMode === "slim") {
107+return evidenceMode;
108+}
109+if (evidenceMode === "compact") {
110+return "slim";
111+}
112+throw invalidQaCliArgument("--evidence-mode must be one of full, slim.");
113+}
114+115+function resolveQaEvidenceModeOptions(opts: QaRunCliOptions) {
116+if (opts.excludeTestExecutionEvidence !== true) {
117+return opts.evidenceMode;
118+}
119+if (opts.evidenceMode === "full") {
120+throw invalidQaCliArgument(
121+"--exclude-test-execution-evidence conflicts with --evidence-mode full.",
122+);
123+}
124+return "slim";
125+}
126+100127function collectCliSuppliedQaRunFlags(
101128command: Command,
102129options: readonly { optionName: string; flag: string }[],
@@ -360,14 +387,27 @@ export function registerQaLabCli(program: Command) {
360387.description("Run private QA automation flows and launch the QA debugger");
361388registerMantisCli(qa);
362389363-qa.command("run")
390+const qaRun = qa
391+.command("run")
364392.description("Run the bundled QA self-check and write a Markdown report")
365393.option("--repo-root <path>", "Repository root to target when running from a neutral cwd")
366394.option("--output <path>", "Report output path")
367395.option("--output-dir <path>", "Profile run artifact directory")
368396.option("--qa-profile <id>", "Run the QA profile from taxonomy.yaml")
369397.option("--surface <id>", "Limit --qa-profile to a taxonomy surface id")
370398.option("--category <id>", "Limit --qa-profile to a taxonomy category id")
399+.option(
400+"--evidence-mode <mode>",
401+"Set profile qa-evidence.json mode: full or slim",
402+parseQaEvidenceModeOption,
403+)
404+.option(
405+"--exclude-test-execution-evidence",
406+"Deprecated alias for --evidence-mode slim",
407+false,
408+);
409+qaRun.options.at(-1)?.hideHelp();
410+qaRun
371411.option("--transport <id>", "QA transport id", "qa-channel")
372412.option("--provider-mode <mode>", formatQaProviderModeHelp())
373413.option("--model <ref>", "Primary provider/model ref")
@@ -380,31 +420,32 @@ export function registerQaLabCli(program: Command) {
380420"Write artifacts without setting a failing exit code when scenarios fail",
381421false,
382422)
383-.option("--fast", "Enable provider fast mode where supported", false)
384-.action(async (opts: QaRunCliOptions, command: Command) => {
385-validateQaRunMode(opts, command);
386-if (opts.qaProfile?.trim()) {
387-await runQaProfile({
388-repoRoot: opts.repoRoot,
389-outputDir: opts.outputDir,
390-profile: opts.qaProfile,
391-surface: opts.surface,
392-category: opts.category,
393-transportId: opts.transport,
394-providerMode: opts.providerMode,
395-primaryModel: opts.model,
396-alternateModel: opts.altModel,
397-concurrency: opts.concurrency,
398-allowFailures: opts.allowFailures,
399-fastMode: opts.fast,
400-});
401-return;
402-}
403-await runQaSelfCheck({
423+.option("--fast", "Enable provider fast mode where supported", false);
424+qaRun.action(async (opts: QaRunCliOptions, command: Command) => {
425+validateQaRunMode(opts, command);
426+if (opts.qaProfile?.trim()) {
427+await runQaProfile({
404428repoRoot: opts.repoRoot,
405-output: opts.output,
429+outputDir: opts.outputDir,
430+profile: opts.qaProfile,
431+surface: opts.surface,
432+category: opts.category,
433+evidenceMode: resolveQaEvidenceModeOptions(opts),
434+transportId: opts.transport,
435+providerMode: opts.providerMode,
436+primaryModel: opts.model,
437+alternateModel: opts.altModel,
438+concurrency: opts.concurrency,
439+allowFailures: opts.allowFailures,
440+fastMode: opts.fast,
406441});
442+return;
443+}
444+await runQaSelfCheck({
445+repoRoot: opts.repoRoot,
446+output: opts.output,
407447});
448+});
408449409450qa.command("suite")
410451.description("Run repo-backed QA scenarios against the QA gateway lane")
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。