refine: remove unused basePath/unitId from verification gate
Remove basePath and unitId from RunVerificationGateOptions — they were defined in the interface and passed by callers but never read by runVerificationGate(). This eliminates false coupling where callers compute values that have zero effect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ef5006e16d
commit
f4c6dc67b7
3 changed files with 0 additions and 20 deletions
|
|
@ -71,8 +71,6 @@ export async function runPostUnitVerification(
|
|||
}
|
||||
|
||||
const result = runVerificationGate({
|
||||
basePath: s.basePath,
|
||||
unitId: s.currentUnit.id,
|
||||
cwd: s.basePath,
|
||||
preferenceCommands: prefs?.verification_commands,
|
||||
taskPlanVerify,
|
||||
|
|
|
|||
|
|
@ -226,8 +226,6 @@ describe("verification-gate: execution", () => {
|
|||
|
||||
test("all commands pass → gate passes", () => {
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T01",
|
||||
cwd: tmp,
|
||||
preferenceCommands: ["echo hello", "echo world"],
|
||||
});
|
||||
|
|
@ -243,8 +241,6 @@ describe("verification-gate: execution", () => {
|
|||
|
||||
test("one command fails → gate fails with exit code + stderr", () => {
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T01",
|
||||
cwd: tmp,
|
||||
preferenceCommands: ["echo ok", "sh -c 'echo err >&2; exit 1'"],
|
||||
});
|
||||
|
|
@ -257,8 +253,6 @@ describe("verification-gate: execution", () => {
|
|||
|
||||
test("no commands discovered → gate passes with 0 checks", () => {
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T01",
|
||||
cwd: tmp,
|
||||
});
|
||||
assert.equal(result.passed, true);
|
||||
|
|
@ -268,8 +262,6 @@ describe("verification-gate: execution", () => {
|
|||
|
||||
test("command not found → exit code 127", () => {
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T01",
|
||||
cwd: tmp,
|
||||
preferenceCommands: ["__nonexistent_command_xyz_42__"],
|
||||
});
|
||||
|
|
@ -289,8 +281,6 @@ describe("verification-gate: execution", () => {
|
|||
const script = [
|
||||
`import { runVerificationGate } from ${JSON.stringify(pathToFileURL(gatePath).href)};`,
|
||||
`runVerificationGate({`,
|
||||
` basePath: ${JSON.stringify(tmp)},`,
|
||||
` unitId: "T-DEP",`,
|
||||
` cwd: ${JSON.stringify(tmp)},`,
|
||||
` preferenceCommands: ["echo dep0190-check"],`,
|
||||
`});`,
|
||||
|
|
@ -317,8 +307,6 @@ describe("verification-gate: execution", () => {
|
|||
|
||||
test("each check has durationMs", () => {
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T01",
|
||||
cwd: tmp,
|
||||
preferenceCommands: ["echo fast"],
|
||||
});
|
||||
|
|
@ -330,8 +318,6 @@ describe("verification-gate: execution", () => {
|
|||
test("one command fails — remaining commands still run (non-short-circuit)", () => {
|
||||
// First fails, second and third should still execute
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T02",
|
||||
cwd: tmp,
|
||||
preferenceCommands: [
|
||||
"sh -c 'exit 1'",
|
||||
|
|
@ -351,8 +337,6 @@ describe("verification-gate: execution", () => {
|
|||
test("gate execution uses cwd for spawnSync", () => {
|
||||
// pwd should report the temp dir
|
||||
const result = runVerificationGate({
|
||||
basePath: tmp,
|
||||
unitId: "T02",
|
||||
cwd: tmp,
|
||||
preferenceCommands: ["pwd"],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -220,8 +220,6 @@ function sanitizeCommand(cmd: string): string | null {
|
|||
}
|
||||
|
||||
export interface RunVerificationGateOptions {
|
||||
basePath: string;
|
||||
unitId: string;
|
||||
cwd: string;
|
||||
preferenceCommands?: string[];
|
||||
taskPlanVerify?: string;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue