fix(FN-1895): improve companies.sh import error handling and add retry behavior
- Surface companies.sh API errors to frontend instead of returning empty list - Add 30s timeout to GitHub archive download to prevent hanging - Prevent infinite retry loop in browse catalog useEffect - Update retry handler to call fetch directly for better control - Fix TypeScript error with Response type in timeout code - Add comprehensive tests for error handling and retry behavior
This commit is contained in:
@@ -90,12 +90,15 @@ describe("memory-compaction", () => {
|
||||
|
||||
expect(automation.steps![0]).not.toHaveProperty("modelProvider");
|
||||
expect(automation.steps![0]).not.toHaveProperty("modelId");
|
||||
expect(automation.steps![0]).not.toHaveProperty("modelProvider");
|
||||
expect(automation.steps![0]).not.toHaveProperty("modelId");
|
||||
});
|
||||
|
||||
it("should set correct timeout", () => {
|
||||
const automation = createAutoSummarizeAutomation({});
|
||||
|
||||
expect(automation.steps![0].timeoutMs).toBe(120_000);
|
||||
expect(automation.steps![0].timeoutMs).toBe(120_000);
|
||||
});
|
||||
|
||||
it("should prompt to preserve core sections", () => {
|
||||
@@ -104,6 +107,9 @@ describe("memory-compaction", () => {
|
||||
expect(automation.steps![0].prompt).toContain("Architecture");
|
||||
expect(automation.steps![0].prompt).toContain("Conventions");
|
||||
expect(automation.steps![0].prompt).toContain("Pitfalls");
|
||||
expect(automation.steps![0].prompt).toContain("Architecture");
|
||||
expect(automation.steps![0].prompt).toContain("Conventions");
|
||||
expect(automation.steps![0].prompt).toContain("Pitfalls");
|
||||
});
|
||||
|
||||
it("should prompt to check threshold and skip when below", () => {
|
||||
@@ -111,12 +117,15 @@ describe("memory-compaction", () => {
|
||||
|
||||
expect(automation.steps![0].prompt).toContain("Below threshold");
|
||||
expect(automation.steps![0].prompt).toContain("skipped");
|
||||
expect(automation.steps![0].prompt).toContain("Below threshold");
|
||||
expect(automation.steps![0].prompt).toContain("skipped");
|
||||
});
|
||||
|
||||
it("should prompt to write compacted content to file", () => {
|
||||
const automation = createAutoSummarizeAutomation({});
|
||||
|
||||
expect(automation.steps![0].prompt).toContain(".fusion/memory.md");
|
||||
expect(automation.steps![0].prompt).toContain(".fusion/memory.md");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user