diff --git a/src/commands/build.ts b/src/commands/build.ts index e861ef0..eff5167 100644 --- a/src/commands/build.ts +++ b/src/commands/build.ts @@ -139,9 +139,15 @@ export async function runBuild(cwd: string, args: string[] = []): Promise 0 ? [] : (config.verification?.defaultCommands ?? [])) + ...buildVerificationCommands, + ...(buildVerificationCommands.length > 0 ? [] : defaultVerificationCommands) ]; const requestedMode = parsed.options.requestedMode ?? config.workflows.build.mode ?? "interactive"; const timeoutSeconds = config.workflows.build.timeoutSeconds; diff --git a/src/config.ts b/src/config.ts index 3a23288..5cdfaa5 100644 --- a/src/config.ts +++ b/src/config.ts @@ -548,6 +548,8 @@ function validateConfigDocument(source: string, value: unknown): void { function createDefaultProvenance(): ConfigProvenance { return { codexSandbox: { source: "default" }, + buildVerificationCommands: { source: "default" }, + defaultVerificationCommands: { source: "default" }, workflowAllowDirty: { build: { source: "default" }, ship: { source: "default" }, @@ -565,6 +567,12 @@ function updateProvenanceFromDocument( if (hasConfigPath(parsed, ["codex", "sandbox"])) { provenance.codexSandbox = { source: sourceKind, sourcePath }; } + if (hasConfigPath(parsed, ["workflows", "build", "verificationCommands"])) { + provenance.buildVerificationCommands = { source: sourceKind, sourcePath }; + } + if (hasConfigPath(parsed, ["verification", "defaultCommands"])) { + provenance.defaultVerificationCommands = { source: sourceKind, sourcePath }; + } for (const workflowName of ["build", "ship", "deliver"] as const) { if (hasConfigPath(parsed, ["workflows", workflowName, "allowDirty"])) { provenance.workflowAllowDirty[workflowName] = { source: sourceKind, sourcePath }; diff --git a/src/types.ts b/src/types.ts index b428cfd..d6acb49 100644 --- a/src/types.ts +++ b/src/types.ts @@ -440,6 +440,8 @@ export interface ConfigValueProvenance { export interface ConfigProvenance { codexSandbox: ConfigValueProvenance; + buildVerificationCommands: ConfigValueProvenance; + defaultVerificationCommands: ConfigValueProvenance; workflowAllowDirty: { build: ConfigValueProvenance; ship: ConfigValueProvenance;