fix(FN-2545): persist memory audit extraction state and polish MemoryView
- Persist extract-to-audit continuity state in memory insights so extraction progress survives follow-up runs - Add core and dashboard route tests that cover audit extraction flow and prevent regressions - Restore lint/typecheck baseline by removing obsolete planning subtask route wiring from dashboard routes - Apply MemoryView UX refinements with updated component logic and dedicated styling adjustments
This commit is contained in:
@@ -1100,6 +1100,31 @@ describe("memory-insights audit generation", () => {
|
||||
expect(report.extraction.duplicateCount).toBe(2);
|
||||
});
|
||||
|
||||
it("reuses persisted extraction state when explicit metadata is omitted", async () => {
|
||||
const runAt = new Date().toISOString();
|
||||
|
||||
writeFileSync(
|
||||
join(tempDir, MEMORY_WORKING_PATH),
|
||||
"## Architecture\n\nDurable notes\n\n## Conventions\n\nConventions",
|
||||
);
|
||||
|
||||
await processAndAuditInsightExtraction(tempDir, {
|
||||
rawResponse: JSON.stringify({
|
||||
summary: "Persisted extraction summary",
|
||||
insights: [{ category: "pattern", content: "Persisted insight" }],
|
||||
}),
|
||||
stepSuccess: true,
|
||||
runAt,
|
||||
});
|
||||
|
||||
const report = await generateMemoryAudit(tempDir);
|
||||
|
||||
expect(report.extraction.runAt).toBe(runAt);
|
||||
expect(report.extraction.success).toBe(true);
|
||||
expect(report.extraction.summary).toBe("Persisted extraction summary");
|
||||
expect(report.checks.find((c) => c.id === "recent-extraction")?.passed).toBe(true);
|
||||
});
|
||||
|
||||
it("should include pruning outcome in report", async () => {
|
||||
writeFileSync(join(tempDir, MEMORY_WORKING_PATH), "## Architecture\n\nNotes");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user