fix(cli): validate selected local paths before resolution

Reuse the nonempty NUL-free local path contract before normalization in artifact commands, auxiliary inputs, and output destinations. Empty selections now fail at parsing instead of selecting the working directory; explicit relative paths preserve their target.

Public CLI checks cover primary and auxiliary empty paths, exact relative-file digest, explicit current-directory selection, symlink parent semantics, and environment export inputs. Correct the desktop fixture to assert the existing CLI validation envelope.
This commit is contained in:
morluto committed 2026-10-24 07:28:09 +08:00
1 parent 231e458246
commit 9d7779d365
20 files changed
+229 -58

No files matched your search

+2 -3
View File
@@ -10,6 +10,7 @@ import { AnalysisInputError } from "../domain/analysisErrorCore.js";
import { createEvidenceBundle } from "../domain/evidenceBundle.js";
import { publishEvidenceDelivery } from "../application/EvidenceBundleCommands.js";
import { inspectAnalysisViewValidated } from "../application/analysisView/AnalysisViewService.js";
import { localPathStringSchema } from "../domain/localPath.js";
import { absoluteCallerPath } from "../filesystem/callerPath.js";
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
@@ -18,9 +19,7 @@ export const analysisEvidenceDeliveryOptions = {
.enum(["complete", "summary"])
.default("complete")
.describe("Deliver complete Evidence, or a summary with --evidence_output"),
evidence_output: z
.string()
.min(1)
evidence_output: localPathStringSchema
.optional()
.describe(
"Save complete Evidence as a bundle; required for summary delivery. Never overwrites.",