diff --git a/docs/test-velocity-baseline.md b/docs/test-velocity-baseline.md index 5cc6f20854..70a0200b7d 100644 --- a/docs/test-velocity-baseline.md +++ b/docs/test-velocity-baseline.md @@ -4,8 +4,8 @@ ## Latest baseline -- Cycle: **2026-W26** -- Captured at: **2026-06-27T05:43:17.293Z** +- Cycle: **2026-W27** +- Captured at: **2026-07-02T08:47:17.721Z** - Timing snapshot: `scripts/test-timings.json` captured at **2026-06-27T05:41:42.568Z** - Quarantine ledger: `scripts/lib/test-quarantine.json` @@ -13,10 +13,10 @@ | Metric | Current | Delta vs previous | |---|---:|---:| -| Merge gate wall-time (`pnpm test:gate`) | 6.9s | -1.2s | -| Boot smoke wall-time (`pnpm smoke:boot`) | 18.0s | +436ms | -| Changed-only test wall-time (`pnpm test`) | 13.7s | n/a | -| Quarantine / flake count | 0 | 0 | +| Merge gate wall-time (`pnpm test:gate`) | 7.7s | +778ms | +| Boot smoke wall-time (`pnpm smoke:boot`) | 17.4s | -557ms | +| Changed-only test wall-time (`pnpm test`) | 9.3s | -4.4s | +| Quarantine / flake count | 1 | +1 | | Deletion-due quarantines | 0 | n/a | ## Measurement failures @@ -56,7 +56,7 @@ | Age bucket | Count | |---|---:| -| 0-6 days | 0 | +| 0-6 days | 1 | | 7-13 days | 0 | | deletion due (>=14 days) | 0 | | unknown/future | 0 | @@ -71,16 +71,16 @@ | Row | Captured at | Gate | Boot smoke | `pnpm test` | Quarantine count | |---|---|---:|---:|---:|---:| -| Previous | 2026-06-27T02:02:13.530Z | 8.1s | 17.6s | unavailable | 0 | -| Latest | 2026-06-27T05:43:17.293Z | 6.9s | 18.0s | 13.7s | 0 | -| Delta | — | -1.2s | +436ms | n/a | 0 | +| Previous | 2026-06-27T05:43:17.293Z | 6.9s | 18.0s | 13.7s | 0 | +| Latest | 2026-07-02T08:47:17.721Z | 7.7s | 17.4s | 9.3s | 1 | +| Delta | — | +778ms | -557ms | -4.4s | +1 | _Future weekly rows append to `scripts/test-velocity-history.json`; compare the latest row against the previous row before posting to #leads._ ## Post to #leads ```text -FN-6612 weekly test velocity: gate 6.9s (-1.2s), boot smoke 18.0s (+436ms), pnpm test 13.7s (n/a), quarantine ledger 0 (0). Slowest file: packages/dashboard/src/__tests__/insights-routes.test.ts at 26.5s. Deletion-due quarantines: 0. +FN-6612 weekly test velocity: gate 7.7s (+778ms), boot smoke 17.4s (-557ms), pnpm test 9.3s (-4.4s), quarantine ledger 1 (+1). Slowest file: packages/dashboard/src/__tests__/insights-routes.test.ts at 26.5s. Deletion-due quarantines: 0. ``` ## How to refresh diff --git a/scripts/__tests__/test-velocity-baseline.test.mjs b/scripts/__tests__/test-velocity-baseline.test.mjs index e2b23e2198..de0f07fcee 100644 --- a/scripts/__tests__/test-velocity-baseline.test.mjs +++ b/scripts/__tests__/test-velocity-baseline.test.mjs @@ -277,6 +277,81 @@ describe("main", () => { } }); + /* + FNXC:TestVelocityQuarantine 2026-07-02-01:55: + FN-7414 requires report-only refreshes to trust the live quarantine ledger over stale generated report text or stale history rows, so a newly quarantined test cannot be published as count zero. + */ + it("renders populated live quarantine figures over stale zero report and history values", async () => { + const rootDir = tempRoot(); + try { + writeJson(rootDir, "scripts/lib/test-quarantine.json", { + entries: [ + { + file: "packages/engine/src/__tests__/executor-pause.test.ts", + reason: "FN-7239: stale post-cutover direct-dispatch StepSessionExecutor/legacy pause assertions fail after builtin:coding graph cutover.", + quarantinedAt: "2026-06-29", + }, + ], + }); + writeJson(rootDir, "scripts/test-velocity-history.json", { + entries: [ + { + capturedAt: "2026-06-25T12:00:00.000Z", + gateMs: 10_000, + bootSmokeMs: 20_000, + testMs: 30_000, + quarantineCount: 0, + slowestTop20: [{ file: "packages/a/src/__tests__/slow.test.ts", package: "@pkg/a", ms: 9_000 }], + measurementFailures: [], + }, + { + capturedAt: "2026-06-27T12:00:00.000Z", + gateMs: 7_000, + bootSmokeMs: 18_000, + testMs: 25_000, + quarantineCount: 0, + slowestTop20: [{ file: "packages/a/src/__tests__/slow.test.ts", package: "@pkg/a", ms: 9_000 }], + measurementFailures: [], + }, + ], + }); + mkdirSync(path.join(rootDir, "docs"), { recursive: true }); + writeFileSync( + path.join(rootDir, "docs/test-velocity-baseline.md"), + "| Quarantine / flake count | 0 | 0 |\n| 0-6 days | 0 |\nquarantine ledger 0 (0)\n", + "utf8", + ); + + const exitCode = await main(["--write-report"], { + rootDir, + stdout: nullStream(), + stderr: nullStream(), + now: new Date("2026-07-02T12:00:00.000Z"), + commandRunner: async (measurement) => { + throw new Error(`unexpected command: ${measurement.label}`); + }, + }); + + assert.equal(exitCode, 0); + const report = readFileSync(path.join(rootDir, "docs/test-velocity-baseline.md"), "utf8"); + assert.match(report, /\| Quarantine \/ flake count \| 1 \| \+1 \|/); + assert.match(report, /\| Deletion-due quarantines \| 0 \| n\/a \|/); + assert.match(report, /\| 0-6 days \| 1 \|/); + assert.match(report, /\| 7-13 days \| 0 \|/); + assert.match(report, /\| deletion due \(>=14 days\) \| 0 \|/); + assert.match(report, /\| unknown\/future \| 0 \|/); + assert.match(report, /\| — \| — \| — \|/); + assert.match(report, /\| Latest \| 2026-06-27T12:00:00\.000Z \| 7\.0s \| 18\.0s \| 25\.0s \| 1 \|/); + assert.match(report, /\| Delta \| — \| -3\.0s \| -2\.0s \| -5\.0s \| \+1 \|/); + assert.match(report, /quarantine ledger 1 \(\+1\)/); + assert.match(report, /Deletion-due quarantines: 0\./); + assert.doesNotMatch(report, /\| Quarantine \/ flake count \| 0 \| 0 \|/); + assert.doesNotMatch(report, /quarantine ledger 0 \(0\)/); + } finally { + rmSync(rootDir, { recursive: true, force: true }); + } + }); + it("honors --skip-build-preflight while still measuring lanes", async () => { const rootDir = tempRoot(); const calls = []; diff --git a/scripts/test-velocity-history.json b/scripts/test-velocity-history.json index b1d967457c..f504667e3e 100644 --- a/scripts/test-velocity-history.json +++ b/scripts/test-velocity-history.json @@ -1249,6 +1249,118 @@ "measurementFailures": [], "timingSnapshotCapturedAt": "2026-06-27T05:41:42.568Z", "timingNotes": [] + }, + { + "capturedAt": "2026-07-02T08:47:17.721Z", + "gateMs": 7682, + "bootSmokeMs": 17433, + "testMs": 9326, + "quarantineCount": 1, + "slowestTop20": [ + { + "file": "packages/dashboard/src/__tests__/insights-routes.test.ts", + "ms": 26500, + "package": "@fusion/dashboard" + }, + { + "file": "packages/engine/src/runtimes/__tests__/in-process-runtime.test.ts", + "ms": 24700, + "package": "@fusion/engine" + }, + { + "file": "packages/dashboard/src/__tests__/workflow-routes.test.ts", + "ms": 22000, + "package": "@fusion/dashboard" + }, + { + "file": "packages/core/src/__tests__/db.test.ts", + "ms": 21200, + "package": "@fusion/core" + }, + { + "file": "packages/dashboard/app/components/__tests__/GitManagerModal.test.tsx", + "ms": 16900, + "package": "@fusion/dashboard" + }, + { + "file": "packages/core/src/__tests__/mission-store.test.ts", + "ms": 16000, + "package": "@fusion/core" + }, + { + "file": "packages/cli/src/__tests__/extension.test.ts", + "ms": 15700, + "package": "@runfusion/fusion" + }, + { + "file": "packages/dashboard/app/components/__tests__/AgentPromptsManager.test.tsx", + "ms": 14800, + "package": "@fusion/dashboard" + }, + { + "file": "packages/dashboard/app/components/__tests__/App.test.tsx", + "ms": 14600, + "package": "@fusion/dashboard" + }, + { + "file": "packages/dashboard/app/components/__tests__/TaskDetailModal.inline-editing-and-integrations.test.tsx", + "ms": 14100, + "package": "@fusion/dashboard" + }, + { + "file": "packages/dashboard/app/components/__tests__/TaskDetailModal.rendering.test.tsx", + "ms": 13700, + "package": "@fusion/dashboard" + }, + { + "file": "packages/dashboard/src/__tests__/routes-auth.test.ts", + "ms": 13600, + "package": "@fusion/dashboard" + }, + { + "file": "packages/core/src/__tests__/agent-store.test.ts", + "ms": 13400, + "package": "@fusion/core" + }, + { + "file": "packages/engine/src/__tests__/workspace-merger-idempotency.test.ts", + "ms": 12700, + "package": "@fusion/engine" + }, + { + "file": "packages/engine/src/__tests__/self-healing-workspace.test.ts", + "ms": 11800, + "package": "@fusion/engine" + }, + { + "file": "packages/engine/src/__tests__/pr-response-run.test.ts", + "ms": 11600, + "package": "@fusion/engine" + }, + { + "file": "packages/dashboard/app/components/__tests__/ListView.test.tsx", + "ms": 11300, + "package": "@fusion/dashboard" + }, + { + "file": "plugins/fusion-plugin-compound-engineering/src/__tests__/sync.test.ts", + "ms": 11000, + "package": "@fusion-plugin-examples/compound-engineering" + }, + { + "file": "packages/dashboard/app/components/__tests__/AgentDetailView.settings.test.tsx", + "ms": 10700, + "package": "@fusion/dashboard" + }, + { + "file": "packages/dashboard/app/components/__tests__/SecretsView.test.tsx", + "ms": 10700, + "package": "@fusion/dashboard" + } + ], + "measurementFailures": [], + "timingSnapshotCapturedAt": "2026-06-27T05:41:42.568Z", + "timingNotes": [] } ] }