Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cli/commands/fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function renderFixPlan(plan: ActionPlan, format: string | undefined = "te
}
}
}
lines.push("No Skill workspace files written by the plan operation.");
lines.push("Plan only; no patches applied.");
return `${lines.join("\n")}\n`;
}

Expand Down
11 changes: 8 additions & 3 deletions tests/cli/fix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("skillsync fix", () => {
expect(allIssues.stdout).toContain("Patches:");
expect(allIssues.stdout).toContain("scripts/check.sh (safe mode 777 -> 755)");
expect(allIssues.stdout).toContain("Manual steps:");
expect(allIssues.stdout).toContain("No Skill workspace files written by the plan operation.");
expect(allIssues.stdout).toContain("Plan only; no patches applied.");

const selected = await runCli([
"fix",
Expand Down Expand Up @@ -70,7 +70,9 @@ describe("skillsync fix", () => {
});

it("writes an explicit plan once and refuses to overwrite it", async () => {
const { root } = await createSkillRoot();
const { root, scriptPath } = await createSkillRoot();
const originalContent = await readFile(scriptPath, "utf8");
const originalMode = (await stat(scriptPath)).mode & 0o777;
const issueId = await issueIdFor(root, "structure.invalid-script-mode");
const outputPath = join(root, "fix-plan.json");
const first = await runCli([
Expand All @@ -84,9 +86,12 @@ describe("skillsync fix", () => {
outputPath,
]);
expect(first.exitCode).toBe(0);
expect(first.stdout).toContain("No Skill workspace files written by the plan operation.");
expect(first.stdout).toContain("Plan only; no patches applied.");
expect(first.stdout).not.toContain("No Skill workspace files written");
expect(first.stdout).toContain(`Plan file written: ${outputPath}`);
expect(JSON.parse(await readFile(outputPath, "utf8")).issueIds).toEqual([issueId]);
expect(await readFile(scriptPath, "utf8")).toBe(originalContent);
expect((await stat(scriptPath)).mode & 0o777).toBe(originalMode);

const second = await runCli([
"fix",
Expand Down
Loading