comfy-qa 1.7.1 → 1.7.2
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 +1 -1
- package/src/agent/qa-research.ts +6 -2
package/package.json
CHANGED
package/src/agent/qa-research.ts
CHANGED
|
@@ -752,8 +752,8 @@ async function debugLoop(specPath: string, maxRetries = 3): Promise<boolean> {
|
|
|
752
752
|
RULES:
|
|
753
753
|
- Only fix the specific error. Don't rewrite the whole spec.
|
|
754
754
|
- Keep the same structure (title, segments, outro).
|
|
755
|
-
-
|
|
756
|
-
- If
|
|
755
|
+
- NEVER change import paths. Keep them exactly as they are.
|
|
756
|
+
- If a selector timed out, try a more robust selector.
|
|
757
757
|
- Return the COMPLETE fixed spec file (not just the diff).
|
|
758
758
|
|
|
759
759
|
## Current spec:
|
|
@@ -786,6 +786,10 @@ Return ONLY the fixed TypeScript file content, no markdown fences.`;
|
|
|
786
786
|
const balancedBraces = (fixedContent.match(/\{/g)?.length ?? 0) === (fixedContent.match(/\}/g)?.length ?? 0);
|
|
787
787
|
|
|
788
788
|
if (hasImport && hasTest && hasEnd && balancedBraces) {
|
|
789
|
+
// Force correct import paths (LLM sometimes changes them)
|
|
790
|
+
fixedContent = fixedContent
|
|
791
|
+
.replace(/from\s+["'].*?fixtures\/fixture["']/g, 'from "./fixtures/fixture"')
|
|
792
|
+
.replace(/from\s+["'].*?demowright\/dist\/[^"']*["']/g, 'from "../lib/demowright/dist/index.mjs"');
|
|
789
793
|
fs.writeFileSync(specPath, fixedContent);
|
|
790
794
|
console.log(` ✏️ Spec updated, retrying...`);
|
|
791
795
|
} else {
|