@diegovelasquezweb/a11y-engine 0.11.20 → 0.11.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -301,6 +301,7 @@ function validateAiPatchOutput(output, projectDir, fileSet) {
|
|
|
301
301
|
const replace = typeof change.replace === "string" ? change.replace : "";
|
|
302
302
|
if (!filePath || !search) return { ok: false, reason: "Change is missing filePath/search" };
|
|
303
303
|
if (!fileSet.has(filePath)) return { ok: false, reason: `Change file not in candidate set: ${filePath}` };
|
|
304
|
+
if (search === replace) return { ok: false, reason: `AI generated a no-op patch for ${filePath} — search and replace are identical` };
|
|
304
305
|
|
|
305
306
|
const abs = path.resolve(projectDir, filePath);
|
|
306
307
|
if (!isWithin(projectDir, abs) && abs !== path.resolve(projectDir, filePath)) {
|