FN-6334: rescue db recovery corruption test
Rescues the database recovery corruption test by reducing its fixture size and removing its quarantine. - Reduce recovery test fixture rows so sqlite3 .recover is not overfed while still corrupting a B-tree page. - Re-enable packages/core/src/__tests__/db.test.ts in the core Vitest config. - Remove the db recovery test entry from the quarantine ledger. Files changed: packages/core/src/__tests__/db.test.ts | 5 +++-- packages/core/vitest.config.ts | 1 - scripts/lib/test-quarantine.json | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) Fusion-Task-Id: FN-6334 Fusion-Task-Lineage: c4555976-fe98-4f25-a1b5-e70bfd991b16
This commit is contained in:
@@ -3216,9 +3216,10 @@ describe("Database.recoverIfCorrupt startup guard", () => {
|
||||
const dbPath = join(fusionDir, "fusion.db");
|
||||
const db = new Database(fusionDir);
|
||||
db.init();
|
||||
// Span many pages so mid-file corruption lands on a B-tree page.
|
||||
// Span enough pages so mid-file corruption lands on a B-tree page
|
||||
// without overfeeding sqlite3 .recover.
|
||||
db.transaction(() => {
|
||||
for (let i = 0; i < 3000; i++) {
|
||||
for (let i = 0; i < 100; i++) {
|
||||
db.prepare("INSERT INTO activityLog (id, timestamp, type, details) VALUES (?, ?, 'test', '{}')").run(
|
||||
`row-${i}`,
|
||||
new Date().toISOString(),
|
||||
|
||||
@@ -15,7 +15,6 @@ export default defineConfig({
|
||||
test: {
|
||||
include: ["src/**/*.test.ts"],
|
||||
exclude: [
|
||||
"src/__tests__/db.test.ts",
|
||||
"src/__tests__/soft-delete-tasks.test.ts",
|
||||
"src/__tests__/store-get-task-columns.test.ts",
|
||||
"src/__tests__/store-create-summarize-deferred-hook.test.ts",
|
||||
|
||||
@@ -51,11 +51,6 @@
|
||||
"reason": "Flake observed during FN-6324 verification: broad `pnpm test` failed with `Task FN-001 not found` after temp-root disappearance symptoms in adjacent core tests, alongside a leaked fusion-test-workers temp root. The task only changed agent role policy/settings/heartbeat routing, so this is unrelated temp redirect suite-order/concurrency sensitivity.",
|
||||
"quarantinedAt": "2026-06-12"
|
||||
},
|
||||
{
|
||||
"file": "packages/core/src/__tests__/db.test.ts",
|
||||
"reason": "Flake observed during FN-6299 verification: broad `pnpm --filter @fusion/core test` timed out in `Database.recoverIfCorrupt startup guard > rebuilds a malformed database and preserves the corrupt original` after 15s; earlier `pnpm test` attempt SIGTERM'd the core package and leaked a fusion-test-workers temp dir. Follow-up FN-6334.",
|
||||
"quarantinedAt": "2026-06-12"
|
||||
},
|
||||
{
|
||||
"file": "packages/core/src/__tests__/store-create-summarize-deferred-hook.test.ts",
|
||||
"reason": "Flake observed during FN-6320 final broad `pnpm test`: `store-create.test.ts > TaskStore > createTask with title summarization > defers the task-created hook until store-managed summarize completes` timed out because the registered task-created hook had zero calls after the gated store-managed summarizer prompt was released. FN-6326 cross-check: the test passed twice standalone after FN-6313, and product code in `TaskStore.createTask` suppresses the synchronous hook only while `hasPendingSummarization` is true, then unconditionally refreshes the task and calls `invokeTaskCreatedHook(latestTask)` after `onSummarize` settles across success/null/throw branches. The broad/package load failure was therefore classified as suite-load/harness sensitivity rather than a confirmed product defect; the single flaky `it` was extracted so the rest of `store-create.test.ts` remains covered.",
|
||||
|
||||
Reference in New Issue
Block a user