Commit Graph

117 Commits

Author SHA1 Message Date
gsxdsm
161edaa694 FN-9148: add PostgreSQL loaded-failure census
Add retained-log census tooling and evidence for PostgreSQL loaded-lane timeout investigations.

- Parse complete Vitest logs and optional diagnostics without opening PostgreSQL or running tests.
- Classify failing files, lifecycle positions, failure shapes, backend headroom, waits, and watchdog data.
- Cover high-failure, healthy, malformed-diagnostics, and truncated-log cases with fixtures.
- Document the reproduced population, unsupported remedies, and successor measurement requirements.

Files changed:
 ...res-loaded-lane-unrelated-failure-population.md |  80 ++++++++++
 docs/testing.md                                    |   8 +
 .../fixtures/pg-loaded-failure-census/high-run.txt |  77 +++++++++
 .../fixtures/pg-loaded-failure-census/high.jsonl   |   4 +
 .../fixtures/pg-loaded-failure-census/low-run.txt  |   4 +
 .../pg-loaded-failure-census/truncated-run.txt     |   2 +
 .../__tests__/pg-loaded-failure-census.test.mjs    |  65 ++++++++
 scripts/pg-loaded-failure-census.mjs               | 172 +++++++++++++++++++++
 8 files changed, 412 insertions(+)

Fusion-Task-Id: FN-9148

Fusion-Task-Lineage: c632a9d0-b823-4416-ab46-0d834e850007

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 06:24:01 -07:00
gsxdsm
687990c0a6 FN-9146: document PostgreSQL flake campaign evidence
Document the bounded investigation results for active core PostgreSQL suite-only flakes.

- Record per-lane outcomes and sampled cluster-capacity evidence for entries 1, 2, and 7.
- Clarify reproduced, unreproduced, and unattributed statuses without changing quarantine policy.
- Ratchet campaign completeness, ownership, and documentation-link coverage in the register tests.

Files changed:
 .../suite-only-flakes-observed-register.md         | 71 +++++++++++++++++-
 docs/testing.md                                    |  4 +
 scripts/__tests__/observed-flake-register.test.mjs | 85 ++++++++++++++++++++--
 3 files changed, 148 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-9146

Fusion-Task-Lineage: d5de3fac-48d6-4ee7-ae09-173007d234e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 05:38:54 -07:00
gsxdsm
91daa37162 FN-9147: synchronize script test baselines
Align script-test expectations and documentation with the current validator and dashboard test inventory.

- Add the pre-JSON anchor validator to the verify-fast baseline.
- Ratchet documented pretest validators against canonical order and membership.
- Remove deleted dashboard tests from timing data.

Files changed:
 docs/testing.md                        | 22 +++++++++-
 scripts/__tests__/verify-fast.test.mjs | 76 +++++++++++++++++++++++++++++++++-
 scripts/test-timings.json              |  2 -
 3 files changed, 95 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9147

Fusion-Task-Lineage: fdb33c60-e019-402b-b91b-ba0f0f971350

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 05:23:41 -07:00
gsxdsm
b18c9d7594 FN-9144: Preserve test velocity measurement verdicts
Make test-velocity investigation notes durable across report regeneration and concurrent history updates.

- add idempotent note targeting for historical measurement entries
- serialize history mutations with bounded stale-lock recovery
- render all annotated cycles and record the W33 gate variance verdict
- document the generated-report workflow and cover retention/concurrency behavior

Files changed:
 .../merge-gate-w33-walltime-regression.md          |  15 ++
 docs/test-velocity-baseline.md                     |  12 ++
 docs/testing.md                                    |   2 +
 scripts/__tests__/test-velocity-baseline.test.mjs  | 153 +++++++++++++-
 scripts/test-velocity-baseline.mjs                 | 221 +++++++++++++++------
 scripts/test-velocity-history.json                 |   6 +
 6 files changed, 349 insertions(+), 60 deletions(-)

Fusion-Task-Id: FN-9144

Fusion-Task-Lineage: e3869e40-2cbc-4e5b-844e-9091da96b652

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-18 08:08:24 -07:00
gsxdsm
2b99b365de FN-9141: rescue plugin-runner tests and enforce quarantine lockstep
Rescue the plugin-runner suite before deletion while making quarantine records mechanically consistent.

- preserve logger assertions across worker-reused mock cleanup with a stable hoisted logger
- remove the rescued suite from the quarantine ledger and Vitest exclusion
- enforce ledger-to-exclude lockstep and cover missing or dangling quarantine entries
- document the reproduction evidence, rescue disposition, and strict checker behavior

Files changed:
 .../suite-only-flakes-observed-register.md         |  14 +-
 docs/testing.md                                    |  17 +-
 .../engine/src/__tests__/plugin-runner.test.ts     |  37 ++--
 packages/engine/vitest.config.ts                   |  14 +-
 scripts/__tests__/check-quarantine-ledger.test.mjs | 217 +++++++++---------
 scripts/__tests__/ci-test-shard-timings.test.mjs   |   5 +-
 scripts/check-quarantine-ledger.mjs                | 245 +++++++++++++--------
 scripts/lib/test-quarantine.json                   |  10 +-
 8 files changed, 314 insertions(+), 245 deletions(-)

Fusion-Task-Id: FN-9141

Fusion-Task-Lineage: 5b0549bf-3cc6-495e-bf99-a30a2dffb029

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-17 05:25:17 -07:00
gsxdsm
6d7b4a3ac3 FN-9140: make Vitest timeout ownership surveys deterministic
Replace ambiguous setup-boundary observations with calibrated, repeatable timeout ownership evidence.

- record fixture lifecycle events in an append-only JSONL ledger with process-safe ordering
- classify four timeout-budget arms across repeated isolate-mode cells and fail closed on incomplete evidence
- expand connectionless unit coverage and document the terminal insufficient-data survey result

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |   2 +
 .../vitest-setup-boundary-timeout-ownership.md     |  37 +++
 docs/testing.md                                    |   2 +-
 scripts/__tests__/pg-setup-boundary-probe.test.mjs | 195 ++++++++----
 scripts/pg-setup-boundary-probe.mjs                | 341 ++++++++++++---------
 5 files changed, 371 insertions(+), 206 deletions(-)

Fusion-Task-Id: FN-9140

Fusion-Task-Lineage: 9c6970b8-af80-400a-b2b2-49718d4fe87f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 22:47:53 -07:00
gsxdsm
2c3a47368f FN-9136: Characterize PostgreSQL fork database reuse
Characterize safe per-fork PostgreSQL database reuse while documenting why the production experiment remains reverted.

- add a bounded pool primitive with reset, verification, discard, and ownership fencing
- cover recycling, poison handling, capacity, and reclaim namespace behavior
- align PostgreSQL campaign documentation with the dead-fork leak rejection

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |   4 +-
 .../suite-only-flakes-observed-register.md         |   4 +-
 docs/testing.md                                    |   4 +-
 .../core/src/__test-utils__/pg-fork-db-pool.ts     | 184 +++++++++++++++++++++
 .../__tests__/pg-fork-db-pool-ownership.test.ts    |  36 ++++
 .../core/src/__tests__/pg-fork-db-pool.test.ts     |  60 +++++++
 6 files changed, 287 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9136

Fusion-Task-Lineage: 9e14e0eb-d957-4207-977e-2d913e78750f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 22:06:38 -07:00
gsxdsm
1a3e68de5d FN-9139: add bounded PostgreSQL pre-admission measurement
Establish an inert PostgreSQL setup signal and repeatable evidence tooling without changing harness behavior.

- add explicit setup participation semantics and inertness coverage
- survey Vitest setup boundaries with isolated report-only fixtures
- bound interleaved campaigns by process group and campaign deadline
- reject missing backend samples and enable candidate diagnostics
- document the rejected boundary result and successor protocol

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |  15 ++
 docs/testing.md                                    |  10 ++
 packages/core/package.json                         |   2 +-
 .../src/__test-utils__/pg-setup-participation.ts   |  22 +++
 .../src/__tests__/pg-setup-participation.test.ts   |  21 +++
 .../__tests__/vitest-setup-pg-inertness.test.ts    |  10 ++
 packages/core/vitest.pg.config.ts                  |  10 ++
 .../__tests__/pg-preadmission-campaign.test.mjs    |  63 +++++++
 scripts/__tests__/pg-setup-boundary-probe.test.mjs |  92 ++++++++++
 scripts/pg-preadmission-campaign.mjs               | 194 +++++++++++++++++++++
 scripts/pg-setup-boundary-probe.mjs                | 182 +++++++++++++++++++
 11 files changed, 620 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9139

Fusion-Task-Lineage: 2cf8ccbf-37f9-4fdc-8e8f-326df823e1cd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 21:09:58 -07:00
gsxdsm
8bb56a2185 FN-9134: add drift-resistant PostgreSQL DDL lane metric
Add a report-only acceptance metric and terminal evidence for PostgreSQL DDL structural experiments.

- require seven ordered control/candidate pairs with green Vitest summaries and zero leaked databases
- reject missing tests, failed summaries, nonzero exits, and unhandled runner errors
- document the no-improvement campaign result and retain the next candidate direction
- cover timing statistics, ordering, leak rejection, and runner-log validation

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |   8 ++
 .../suite-only-flakes-observed-register.md         |   2 +-
 docs/testing.md                                    |  24 ++++
 scripts/__tests__/pg-ddl-lane-metric.test.mjs      |  62 +++++++++
 scripts/pg-ddl-lane-metric.mjs                     | 139 +++++++++++++++++++++
 5 files changed, 234 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9134

Fusion-Task-Lineage: 3466ebf8-7125-475b-9574-6c4c92198bb3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 20:17:12 -07:00
gsxdsm
ae507afc37 FN-9131: Add PostgreSQL harness budget characterization
Characterize cluster-shared PostgreSQL connection admission while keeping regressive harness wiring disabled.

- add advisory-lock slot budgeting, bootstrap gating, and local allocation accounting
- cover budget arithmetic, queueing, degradation, and PostgreSQL lock behavior
- document loaded-lane failures and the terminal-negative lifecycle boundary
- clarify that the active harness neither admits nor clamps against the experimental budget

Files changed:
 .../test-failures/pg-harness-connection-budget.md  |  21 +
 .../suite-only-flakes-observed-register.md         |   2 +
 docs/testing.md                                    |   6 +
 .../__tests__/pg-connection-budget.test.ts         | 146 ++++++
 .../src/__test-utils__/pg-connection-budget.ts     | 492 +++++++++++++++++++++
 .../core/src/__test-utils__/pg-test-harness.ts     |   8 +
 .../postgres/pg-connection-budget.pg.test.ts       |  36 ++
 7 files changed, 711 insertions(+)

Fusion-Task-Id: FN-9131

Fusion-Task-Lineage: c83611ad-95f9-44ef-a0fd-1f182a26725d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 19:29:05 -07:00
gsxdsm
c709ed06d9 FN-9135: retain plugin runner quarantine through deadline
Preserve the quarantined plugin-runner coverage while recording the inconclusive reproduction campaign.

- Record two loaded-suite runs at each of 2, 6, and 8 workers.
- Keep all 82 plugin-runner tests, the ledger entry, and the default-lane exclusion through 2026-08-30.
- Clarify that opt-in strict checks do not block normal PR lanes.

Files changed:
 .../test-failures/suite-only-flakes-observed-register.md    | 13 ++++++++++++-
 docs/testing.md                                             |  3 +++
 2 files changed, 15 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9135

Fusion-Task-Lineage: 239425e5-7393-4b8a-a114-0a14f0065847

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 17:38:53 -07:00
gsxdsm
1d7dd3e7b8 FN-9133: Use bounded PostgreSQL DDL for reliability fixtures
Reliability fixtures now manage PostgreSQL databases through owned, deadline-bounded maintenance connections.

- Replace psql child-process DDL with postgres.js maintenance clients and forced cleanup.
- Remove redundant pre-create drops and preserve idempotent teardown behavior.
- Add a live-connection cleanup contract test and document audit measurements and policy.

Files changed:
 .../postgres-reliability-helper-ddl-audit.md       | 48 +++++++++++
 docs/testing.md                                    |  2 +-
 packages/engine/package.json                       |  5 +-
 .../_helpers-pg-ddl-contract.pg.test.ts            | 66 +++++++++++++++
 .../__tests__/reliability-interactions/_helpers.ts | 93 +++++++++++++---------
 pnpm-lock.yaml                                     |  3 +
 6 files changed, 176 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-9133

Fusion-Task-Lineage: 5a7f511d-abb4-4468-a97a-04331f60d245

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 16:11:21 -07:00
gsxdsm
a453245715 FN-9130: Add guarded PostgreSQL DDL admission infrastructure
Document and test PostgreSQL DDL admission experiments while preserving the direct harness after measured regressions.

- add advisory-slot admission with local slot accounting, degradation telemetry, and fail-closed reentrancy
- cover cross-fork bounds, session loss, timeouts, spawned nested work, and cleanup invariants
- make concurrent lifecycle coverage settle all creates and clean up every successful database in finally
- record loaded-core measurements and retain the existing PostgreSQL worker cap

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |  34 ++
 .../suite-only-flakes-observed-register.md         |   2 +-
 docs/testing.md                                    |   8 +
 .../core/src/__test-utils__/pg-ddl-admission.ts    | 351 +++++++++++++++++++++
 .../core/src/__test-utils__/pg-test-harness.ts     |  44 ++-
 .../core/src/__tests__/pg-ddl-admission.test.ts    | 294 +++++++++++++++++
 .../postgres/pg-harness-ddl-concurrency.pg.test.ts |  56 ++++
 packages/core/vitest.pg.config.ts                  |   5 +
 8 files changed, 778 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-9130

Fusion-Task-Lineage: e28777cd-cd7c-4598-9db6-c4622cb9fa33

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 15:57:36 -07:00
gsxdsm
1c9e4dfccd FN-9127: instrument PostgreSQL teardown diagnostics
Add opt-in evidence capture for loaded PostgreSQL teardown stalls without changing teardown behavior.

- Add bounded phase and hook watchdogs with capped pg_stat_activity snapshots.
- Instrument the shared PostgreSQL test harness and cover diagnostic behavior with focused tests.
- Document the diagnostic workflow, measured flake campaign, and corrected mission-store gate scope.

Files changed:
 .../suite-only-flakes-observed-register.md         |  12 ++
 docs/testing.md                                    |  19 ++
 .../src/__test-utils__/pg-teardown-diagnostics.ts  | 237 +++++++++++++++++++++
 .../core/src/__test-utils__/pg-test-harness.ts     | 120 ++++++++---
 .../src/__tests__/pg-teardown-diagnostics.test.ts  | 162 ++++++++++++++
 .../__tests__/postgres/mission-store.pg.test.ts    |   8 +-
 6 files changed, 526 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-9127
Fusion-Task-Lineage: 2488b7c0-f12f-4560-9a99-41aaca9d1526
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 12:59:23 -07:00
gsxdsm
5e5422de6e FN-9128: isolate schema-applier PostgreSQL fixtures
Use shared PostgreSQL harness fixtures to reduce repeated schema DDL while preserving migration coverage.

- replace private database lifecycle helpers with shared empty and baselined fixtures
- add regression coverage for fixture-state selection and idempotent schema application
- document PostgreSQL bootstrap guidance and the resolved flake investigation

Files changed:
 .../suite-only-flakes-observed-register.md         |  13 +-
 docs/testing.md                                    |   3 +
 .../postgres/schema-applier-isolation.test.ts      |  54 +++++++
 .../src/__tests__/postgres/schema-applier.test.ts  | 160 +++++++--------------
 4 files changed, 119 insertions(+), 111 deletions(-)

Fusion-Task-Id: FN-9128

Fusion-Task-Lineage: 036c9011-8973-4211-a77a-42bf0eb9fa5e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 12:27:35 -07:00
gsxdsm
beb8ae67db FN-9125: document flake findings and quarantine plugin runner
Classify the suite-only failures by actual PostgreSQL dependency and preserve unresolved evidence for follow-up.

- Record non-reproduction results and assign PostgreSQL investigations to focused follow-up tasks.
- Quarantine the independent in-memory plugin runner test under the deletion ratchet.
- Document evidence requirements for future PostgreSQL flake diagnosis.

Files changed:
 .../suite-only-flakes-observed-register.md         | 32 ++++++++++++++++++++--
 docs/testing.md                                    |  4 +++
 packages/engine/vitest.config.ts                   | 10 +++++++
 scripts/lib/test-quarantine.json                   |  8 +++++-
 4 files changed, 51 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-9125

Fusion-Task-Lineage: 1dc80163-a0dc-4241-bab1-75a2cafb9abe

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 11:46:39 -07:00
gsxdsm
fe910fcce7 FN-9122: align merge gate timing and policy baselines
Re-establish a trustworthy W33 merge-gate timing baseline without weakening blocking coverage.

- Document the controlled W33 re-measurement and future regression protocol.
- Align static-validator test ledgers with all 15 canonical gate checks.
- Correct gate composition, engine-core inventory, and bundle metrics in testing guidance.

Files changed:
 .../merge-gate-w33-walltime-regression.md          | 82 ++++++++++++++++++++++
 docs/testing.md                                    | 12 ++--
 .../__tests__/engine-vitest-gate-policy.test.mjs   | 12 ++++
 scripts/__tests__/run-static-gate-checks.test.mjs  |  2 +
 scripts/__tests__/verify-fast.test.mjs             |  8 +++
 5 files changed, 111 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9122

Fusion-Task-Lineage: 47ace0d7-902d-4ea5-848d-3d2386867c42

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 03:49:28 -07:00
gsxdsm
920bf8b022 FN-9105: document boot-smoke anomaly remeasurement
Confirm the W33 spike as cold-start variance and preserve a repeatable diagnosis protocol.

- Record five sequential phase-timed samples and the 20.5-second median threshold.
- Link the controlled remeasurement protocol from the testing guide.
- Explain the timing snapshot handoff and why incomplete CI artifacts were not published.
- Preserve the no-appeasement requirement beside boot-smoke phase timing.

Files changed:
 .../boot-smoke-w33-walltime-anomaly.md             | 100 +++++++++++++++++++++
 docs/testing.md                                    |   2 +-
 scripts/boot-smoke.mjs                             |   7 ++
 3 files changed, 108 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9105

Fusion-Task-Lineage: 6956b037-db0f-4560-bb04-136080a975b5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 16:59:37 -07:00
gsxdsm
c0e568bf78 FN-9100: fix staged Cursor core imports in CLI builds
Ensure staged plugin core runtime imports resolve reliably in packaged CLI builds.

- Export Cursor runtime core helpers from the CLI runtime shim.
- Guard staged plugin imports against undeclared or unavailable core exports.
- Add Cursor bundle coverage and document the focused packaging test.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-9100-staged-plugin-core-shim.md      |   7 +
 docs/testing.md                                    |   1 +
 .../__tests__/plugin-sdk-core-runtime-shim.test.ts |  40 +++-
 .../__tests__/staged-plugin-core-imports.test.ts   | 221 +++++++++++++++++++++
 packages/cli/src/plugin-sdk-core-runtime-shim.mjs  |  10 +-
 5 files changed, 272 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-9100

Fusion-Task-Lineage: 4c25ef74-065d-4e5a-86f2-e6f9a22500b3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 12:04:30 -07:00
gsxdsm
1d3f6c198c FN-9096: route CLI models through installed runtimes
Route every CLI-provider selection through an explicit installed-runtime policy.

- Centralize CLI provider classifications, runtime hints, fallback behavior, and actionable missing-runtime errors.
- Validate routing coverage statically and add conformance and integration tests for CLI runtime paths.
- Document runtime routing behavior and add a published CLI changeset.

Files changed: .changeset/fn-9096-cli-runtime-routing.md          |   7 +
 docs/settings-reference.md                         |  29 +++
 docs/testing.md                                    |   6 +-
 package.json                                       |   6 +-
 .../src/__tests__/cli-provider-routing.test.ts     |  74 ++++++++
 .../__tests__/cli-runtime-routing-check.test.ts    |  25 +++
 .../cli-runtime-routing-conformance.test.ts        | 210 +++++++++++++++++++++
 .../__tests__/hermes-runtime-integration.test.ts   |  28 +++
 .../engine/src/agents/agent-session-helpers.ts     | 166 ++++------------
 packages/engine/src/agents/cli-provider-routing.ts | 174 +++++++++++++++++
 scripts/check-cli-runtime-routing.mjs              |  26 +++
 scripts/lib/cli-runtime-routing-check.mjs          |  84 +++++++++
 12 files changed, 701 insertions(+), 134 deletions(-)

Fusion-Task-Id: FN-9096

Fusion-Task-Lineage: f9f6a434-b28d-4ebb-816a-53ca75efc2c4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 07:19:29 -07:00
gsxdsm
d39c0ae9eb FN-9034: use package-local Vitest for scoped runs
Resolve Quality file-scoped tests against the execution worktree's package metadata.

- Run scoped tests through each package's local Vitest binary
- Omit the removed basic reporter and preserve safe path handling
- Cover worktree resolution, package grouping, and reporter behavior

Files changed:
 .changeset/fn-9034-file-scoped-vitest.md           |   7 +
 docs/testing.md                                    |   4 +
 .../src/__tests__/command-presets.test.ts          | 222 +++++++++++++++++++--
 .../src/routes/create-routes.ts                    |   5 +
 .../src/runner/command-presets.ts                  | 115 ++++++++++-
 5 files changed, 336 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-9034

Fusion-Task-Lineage: f78159b6-2f1e-47bb-a367-e8e4324143e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-13 15:55:37 -07:00
gsxdsm
6d2c1bf0c9 FN-9020: parallelize boot smoke preflights
Reduce durable boot-smoke latency while preserving its CLI, initialization, health, and shutdown assertions.

- Run independent help and init preflights concurrently with bounded async child processes.
- Add phase timing diagnostics and deterministic init failure classification.
- Cover phase scheduling and isolated environment behavior, and document the diagnostics flag.

Files changed:
 docs/testing.md                       |   4 +-
 scripts/__tests__/boot-smoke.test.mjs |  65 ++++++++++-
 scripts/boot-smoke.mjs                | 201 +++++++++++++++++++++++++---------
 3 files changed, 214 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-9020

Fusion-Task-Lineage: 1f5d3d7f-dc0c-4d16-a4ab-fd5e3952dbdf

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-12 19:45:40 -07:00
gsxdsm
7b4b2b547b FN-8996: guard engine test module specifiers
Ensure engine test dependencies remain valid after module moves.

- Expand the engine test specifier guard to validate Vitest APIs and imports.
- Repair moved worktree, branch-conflict, and lifecycle module references in tests.
- Preserve worktree recovery coverage and document the harness contract.

Files changed:
 docs/testing.md                                    |  21 ++-
 .../worktrunk-self-healing.test.ts                 |  14 +-
 .../__tests__/vi-mock-specifiers-resolve.test.ts   | 149 ++++++++++++++++-----
 .../__tests__/workflow-graph-step-rerun.test.ts    |  14 +-
 ...-sync-role-conversion-inert-live-e2e.pg.test.ts |   2 +-
 .../__tests__/worktree-acquisition-pinned.test.ts  |  52 ++++++-
 .../__tests__/worktree-admin-entry-prune.test.ts   |  12 +-
 7 files changed, 212 insertions(+), 52 deletions(-)

Fusion-Task-Id: FN-8996

Fusion-Task-Lineage: dd93b4a8-cf45-42e2-9823-e5c2e6f84f82

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-11 18:46:48 -07:00
gsxdsm
f2c729bf77 FN-8994: add workspace package graph validation
Prevent cold workspace installs from failing on missing or unglobbed local packages.

- Validate workspace-protocol dependencies and overrides against glob-covered packages.
- Add static-gate coverage and regression tests for missing plugin packages.
- Document the workspace package graph check.

Files changed:
 docs/testing.md                                    |   4 +-
 package.json                                       |   9 +-
 scripts/__tests__/check-workspace-package-graph.test.mjs | 103 +++++++++++++++
 scripts/check-workspace-package-graph.mjs          | 138 +++++++++++++++++++++
 4 files changed, 249 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8994

Fusion-Task-Lineage: 17dbe062-79aa-4417-ae38-43df881e9fa4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-11 14:56:14 -07:00
gsxdsm
f1fe399184 FN-8991: add runtime skill-loader drift gate
Enforce the intentional Claude-to-Grok runtime skill-loader clone relationship across verification lanes.

- Add an exact rename-diff validator with fixture and live-loader coverage.
- Run the validator in pretest, fast verification, and static merge-gate checks.
- Document the loader duplication contract and expanded static-validator inventory.

Files changed:
 AGENTS.md                                          |   2 +
 docs/testing.md                                    |   4 +-
 package.json                                       |   7 +-
 .../check-runtime-skill-loader-drift.test.mjs      | 113 +++++++++++++++++++++
 scripts/__tests__/run-static-gate-checks.test.mjs  |   1 +
 scripts/__tests__/verify-fast.test.mjs             |   1 +
 scripts/check-runtime-skill-loader-drift.mjs       | 113 +++++++++++++++++++++
 7 files changed, 236 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8991

Fusion-Task-Lineage: a3b67752-0043-4336-9a2a-ff391672b31f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-11 05:23:02 -07:00
gsxdsm
25e292d0e6 FN-8954: preserve CLI liveness during startup
Ensure CLI startup operations settle before process exit on supported Node runtimes.

- Keep awaited QMD probes and ephemeral port selection ref'd until completion.
- Add CLI process regressions for init persistence and exit code 13.
- Declare the Node 22.4 runtime floor and extend boot smoke coverage.

Files changed:
 .changeset/fn-8954-cli-exit-13.md                  |  7 ++
 docs/testing.md                                    |  4 +-
 package.json                                       |  3 +
 packages/cli/agent-browser.mjs                     |  6 ++
 packages/cli/bin.mjs                               |  7 ++
 packages/cli/package.json                          |  3 +
 packages/cli/src/__tests__/ci-workflow.test.ts     |  9 +++
 packages/cli/src/__tests__/cli-exit-code.test.ts   | 82 ++++++++++++++++++++++
 packages/cli/src/__tests__/package-config.test.ts  | 12 ++++
 packages/cli/src/bin.ts                            |  6 ++
 .../__tests__/postgres/embedded-free-port.test.ts  | 37 ++++++++++
 packages/core/src/memory/memory-backend.ts         | 17 +++--
 packages/core/src/postgres/embedded-lifecycle.ts   | 16 +++--
 scripts/boot-smoke.mjs                             | 62 +++++++++++-----
 14 files changed, 244 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-8954

Fusion-Task-Lineage: 05303d07-2662-48d5-a442-6d43fa0a4493

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-11 04:20:33 -07:00
gsxdsm
79206c3f31 FN-8977: unify CLI Vitest mock resolution
Route CLI test mocks through dashboard and engine runtime imports.

- Anchor pi-coding-agent resolution to the CLI package instance
- Preserve real session exports while overriding runtime dependencies
- Add a regression test and document cross-package mock scoping

Files changed:
 docs/testing.md                                    |  6 ++
 .../__tests__/extension-permission-gates.test.ts   | 10 ++-
 .../vitest-cross-package-mock-scope.test.ts        | 75 ++++++++++++++++++++++
 packages/cli/vitest.config.ts                      | 12 ++++
 4 files changed, 101 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8977
Fusion-Task-Lineage: a652cdf4-463e-4603-8d71-87db91d0b846
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 22:12:15 -07:00
gsxdsm
e0af6ddd93 FN-8952: derive Quick Add Save smoke fixtures from locales
Keep 300px Quick Add Save browser smoke coverage synchronized with shipped translations.

- Derive board and list Save fixtures from supported locale catalogs.
- Escape fixture labels and reject missing Save translations.
- Add fast fixture parity, derivation, and escaping coverage.

Files changed:
 docs/testing.md                                    |   3 +
 .../__tests__/browser-layout-smoke-fixture.test.ts |  75 +++++++++++++-
 .../dashboard/scripts/browser-layout-smoke.mjs     | 110 ++++++++++++++-------
 3 files changed, 147 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-8952
Fusion-Task-Lineage: 31daec25-5d9a-43bb-9ccf-667702006e76
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 12:38:00 -07:00
gsxdsm
878db6dca7 FN-8951: repair script-test governance drift
Keep test-shard timing governance aligned with the current workspace and workflow seams.

- Add a safe timing-snapshot pruning mode with coverage.
- Align Todo plugin Vitest isolation and Docker dependency manifests.
- Refresh workflow reliability evidence and remove deleted test timings.

Files changed:
 Dockerfile                                         |  7 ++-
 docs/testing.md                                    |  9 ++-
 plugins/fusion-plugin-todos/vitest.config.ts       | 26 ++++++--
 scripts/__tests__/ci-test-shard-timings.test.mjs   | 71 ++++++++++++++++++++++
 scripts/ci-test-shard.mjs                          | 65 ++++++++++++++++++--
 .../lib/workflow-reliability-release-check.json    | 22 +++----
 scripts/test-timings.json                          | 21 -------
 7 files changed, 175 insertions(+), 46 deletions(-)

Fusion-Task-Id: FN-8951

Fusion-Task-Lineage: fbf7e79f-4cb2-43e2-9982-09f3f94de70d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 12:09:20 -07:00
gsxdsm
00e369711c FN-8949: add dead mock specifier guard
Prevent silent dead engine test mocks and restore renamed-lane coverage.

- Add a ratcheting test that detects unresolved relative vi.mock specifiers.
- Update self-healing test seams for moved modules and queue transitions.
- Document mock-specifier and store-fake failure patterns.

Files changed:
 .../dead-vi-mock-specifiers-fail-silently.md       |  57 ++++++
 ...e-defects-that-masquerade-as-production-bugs.md |  12 ++
 docs/testing.md                                    |   5 +
 .../self-healing-query-filter-blindness.test.ts    |  42 ++++-
 .../__tests__/vi-mock-specifiers-resolve.test.ts   | 199 +++++++++++++++++++++
 5 files changed, 306 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-8949

Fusion-Task-Lineage: a1079d1c-a2a9-4ac2-8245-1db434468405

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 04:54:55 -07:00
gsxdsm
0fbeba50d1 FN-8937: rescue project engine test quarantine
Rescue the project engine suite by making subprocess watchdog behavior deterministic.

- Capture real timer APIs for subprocess watchdogs and isolate failure ownership.
- Mock integration-branch resolution to prevent host git during lifecycle tests.
- Add watchdog regression coverage and remove the expired quarantine exclusion.

Files changed:
 docs/testing.md                                    |   3 +
 packages/core/src/__test-utils__/vitest-setup.ts   |  74 ++++++++++-
 .../__tests__/subprocess-guard-fake-timers.test.ts | 140 +++++++++++++++++++++
 .../engine/src/__tests__/project-engine.test.ts    |  63 +++++++---
 packages/engine/vitest.config.ts                   |  12 +-
 scripts/lib/test-quarantine.json                   |   8 +-
 6 files changed, 265 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-8937

Fusion-Task-Lineage: 9fe166b5-b101-4683-bb2b-4855ee73df10

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 03:50:58 -07:00
gsxdsm
313eea1461 FN-8935: make Agents Overview scrollable on mobile
Make long Active Agents lists reachable within constrained mobile and short desktop layouts.

- Establish a bounded, touch-friendly Active Agents scroll owner.
- Add unit and Chromium layout coverage for populated and empty overview states.
- Document the required browser smoke coverage and add a patch changeset.

Files changed:
 .../fn-8935-agents-overview-mobile-scroll.md       |  7 ++
 docs/testing.md                                    |  2 +
 .../__tests__/browser-layout-smoke-fixture.test.ts | 26 +++++-
 .../dashboard/app/components/AgentsOverviewBar.css | 14 ++++
 .../AgentsOverviewBar.mobile-scroll.test.tsx       | 96 ++++++++++++++++++++++
 .../dashboard/scripts/browser-layout-smoke.mjs     | 86 +++++++++++++++++++
 6 files changed, 230 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8935

Fusion-Task-Lineage: 43b793b9-3629-45a8-b6c1-d8100467e960

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 03:24:37 -07:00
gsxdsm
6cf95433bf FN-8928: evict flaky workflow IR PG gate canary
Remove the flaky sync-workflow-IR PostgreSQL canary from the blocking merge gate while preserving non-blocking coverage.

- Remove the default workflow-IR PostgreSQL test from the gate canary script.
- Update gate-policy coverage expectations and flake-eviction documentation.
- Record the observed setup-hook timeout and retained regression coverage.

Files changed:
 .../suite-only-flakes-observed-register.md         | 25 +++++++++++++--
 docs/testing.md                                    |  6 ++--
 packages/core/package.json                         |  2 +-
 .../sync-workflow-ir-is-always-default.pg.test.ts  |  6 ++++
 .../__tests__/engine-vitest-gate-policy.test.mjs   | 37 +++++++++++-----------
 5 files changed, 51 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8928

Fusion-Task-Lineage: b725ba1a-fb33-4d49-89b4-277a64246cdd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 02:32:24 -07:00
gsxdsm
e7a873c505 FN-8936: stabilize Planning Mode handoff tests
Stabilize live Proceed-action handoffs and re-admit the Planning Mode flow suite.

- Settle hydration and re-query the Proceed action before direct-create test clicks.
- Remove the Planning Mode test quarantine and record its rescue in the testing ledger.

Files changed:
 .../suite-only-flakes-observed-register.md           |  4 ++++
 docs/testing.md                                      |  3 +++
 .../PlanningModeModal.planning-flow.test.tsx         | 20 ++++++++++++++++----
 packages/dashboard/vitest.config.ts                  |  5 -----
 scripts/lib/test-quarantine.json                     |  5 -----
 5 files changed, 23 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8936

Fusion-Task-Lineage: ed869b67-9394-458b-879c-54da0d7d327e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 23:08:11 -07:00
gsxdsm
3d6a908b95 FN-8898: document inert prerebase settings
Clarify that legacy prerebase settings are inert on the production merge path.

- Mark retained prerebase configuration and audit events as legacy-only.
- Add a static validator and tests preventing new prerebase callers.
- Update merge architecture, testing, and settings documentation.

Files changed:
 AGENTS.md                                          |   2 +-
 docs/architecture.md                               |   3 +-
 docs/settings-reference.md                         |   6 +-
 docs/testing.md                                    |   2 +-
 package.json                                       |   6 +-
 packages/core/src/types/settings/settings-scope.ts |  32 +++--
 .../src/errors/transient-merge-error-classifier.ts |  12 +-
 packages/engine/src/merge/merger-auto-prerebase.ts |  12 +-
 packages/engine/src/util/run-audit.ts              |   2 +
 scripts/__tests__/check-prerebase-inert.test.mjs   |  73 +++++++++++
 scripts/__tests__/run-static-gate-checks.test.mjs  |   1 +
 scripts/__tests__/verify-fast.test.mjs             |   1 +
 scripts/check-prerebase-inert.mjs                  | 146 +++++++++++++++++++++
 scripts/lib/source-projection.mjs                  |  87 ++++++++++++
 14 files changed, 359 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8898

Fusion-Task-Lineage: 9cfd836d-17c2-44a0-a076-56fef0917935

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 06:01:02 -07:00
gsxdsm
74b4de3d19 FN-8883: migrate executor tests to StepSessionExecutor seam
Route executor lifecycle tests through graph-owned StepSessionExecutor fixtures.

- Add reusable workflow routing, worktree refresh, and implementation-session test helpers
- Update executor prompt, step-session, pause, and completion assertions for graph-owned sessions
- Document the graph executor fixture seams for focused verification

Files changed:
 docs/testing.md                                    |   3 +
 .../__tests__/ephemeral-task-create-gate.test.ts   |  29 +-
 .../engine/src/__tests__/executor-prompt.test.ts   | 417 ++++++++++++---------
 .../src/__tests__/executor-review-verdicts.test.ts |   2 +-
 .../executor-step-numbering-zero-based.test.ts     |  23 +-
 .../src/__tests__/executor-step-session.test.ts    | 152 ++++++--
 .../executor-task-done-summary.test.ts             |  14 +-
 .../engine/src/__tests__/executor-test-helpers.ts  |  65 +++-
 8 files changed, 468 insertions(+), 237 deletions(-)

Fusion-Task-Id: FN-8883

Fusion-Task-Lineage: 7ebbee52-fe43-4e18-b0e9-2253911a0acb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 04:59:15 -07:00
gsxdsm
cf171bc4b2 FN-8900: rescue deterministic Kimi K3 catalog test
Rescue Kimi K3 route coverage with a deterministic bundled-catalog registry seam.

- Use pi-ai's real Kimi catalog without live registry refresh.
- Restore route merge and deduplication coverage and remove the paired quarantine records.
- Document the measured refresh stall and preserve the existing timeout budget.

Files changed:
 docs/testing.md                                    |  3 +-
 packages/dashboard/package.json                    |  1 +
 .../src/__tests__/_kimi-model-catalog-fixture.ts   | 40 +++++++++
 ...ister-model-routes-kimi-k3-supplemental.test.ts | 75 ++++++-----------
 packages/dashboard/vitest.config.ts                | 19 ++---
 pnpm-lock.yaml                                     | 98 +++++++++++++++++-----
 scripts/lib/test-quarantine.json                   |  5 --
 7 files changed, 153 insertions(+), 88 deletions(-)

Fusion-Task-Id: FN-8900

Fusion-Task-Lineage: 6d4986ed-bc93-479f-85fb-510d17ced4b5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 03:47:56 -07:00
gsxdsm
ef99dcd1b0 FN-8894: model advancing clocks in oversight tests
Ensure TaskDetailModal mutation fixtures mirror server update timestamps.

- Add an advancing-clock task fixture helper for mutation responses
- Update desktop and mobile oversight control mocks to use newer task snapshots
- Cover equal-clock merge behavior and document the fixture contract

Files changed:
 docs/testing.md                                    |  6 ++
 .../TaskDetailModal.oversight-controls.test.tsx    | 74 +++++++++++++++++++++-
 .../TaskDetailModal.oversight-mobile.test.tsx      |  3 +-
 .../__tests__/TaskDetailModal.test-helpers.ts      | 15 +++++
 4 files changed, 94 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8894

Fusion-Task-Lineage: 614eb85a-0fbf-4f44-a08d-347f2511499b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 02:23:54 -07:00
gsxdsm
750b4bedbc FN-8788: retain Kimi K3 quarantine through deadline
Document the decision to preserve Kimi K3 quarantine coverage until its deletion-ratchet deadline.

- Retain the supplemental route test, Vitest exclusion, and ledger entry through 2026-08-15.
- Clarify that early removal requires regression evidence and a root-cause fix.

Files changed:
 docs/testing.md | 3 +++
 1 file changed, 3 insertions(+)

Fusion-Task-Id: FN-8788

Fusion-Task-Lineage: e1644a4b-1632-4cf7-a0a9-42ecc2b027a9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-04 11:45:20 -07:00
gsxdsm
07dccbe2bd FN-8783: parallelize static merge-gate validators
Run independent static merge-gate policy validators concurrently without weakening gate ordering.

- Add a fail-closed concurrent static-validator runner with coverage for inventory and failures.
- Preserve curated engine, PostgreSQL, unit, and CI-shape gate contracts.
- Document the gate composition and warm-cache performance policy.

Files changed:
 docs/testing.md                                    |  13 ++-
 package.json                                       |   3 +-
 packages/cli/src/__tests__/ci-workflow.test.ts     |  21 ++--
 packages/engine/vitest.config.ts                   |  36 +++++--
 .../__tests__/engine-vitest-gate-policy.test.mjs   |  90 +++++++++++++----
 scripts/__tests__/run-static-gate-checks.test.mjs  | 100 +++++++++++++++++++
 scripts/run-static-gate-checks.mjs                 | 106 +++++++++++++++++++++
 7 files changed, 332 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-8783

Fusion-Task-Lineage: d5d3c9e1-b3c4-45ff-a3e7-f9555585cd70

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-04 09:21:07 -07:00
gsxdsm
6d176a9372 FN-8721: reconcile census, delegation routing, and archive repair
Align lifecycle census coverage while routing delegated work to workflow-ready lanes and safely repairing archived tasks.

- Route delegated tasks through the selected workflow's hold or entry column.
- Scope soft-deleted archive repairs by project and protect them with compare-and-set updates.
- Refresh lifecycle-column census detection, baseline, documentation, and coverage.

Files changed:
 docs/testing.md                                    | 21 +++---
 .../u15-engine-dashboard-consumers.test.ts         | 31 ++++++++-
 .../core/src/task-store/archive-lifecycle-2.ts     |  5 ++
 .../core/src/task-store/async-archive-lineage.ts   |  5 ++
 packages/core/src/task-store/async-persistence.ts  | 11 ++++
 packages/core/src/task-store/async-self-healing.ts | 76 +++++++++++++++-------
 .../src/__tests__/agent-tools-delegation.test.ts   | 43 +++++++++++-
 .../__tests__/lifecycle-column-census-ast.test.ts  | 20 ++++++
 .../src/__tests__/lifecycle-column-census.test.ts  | 29 ++++++---
 packages/engine/src/agent-tools.ts                 | 29 +++++++--
 scripts/lib/lifecycle-column-census-ast.mjs        | 21 +++++-
 scripts/lib/lifecycle-column-census-baseline.json  | 17 ++---
 scripts/lifecycle-column-census.mjs                |  3 +-
 13 files changed, 245 insertions(+), 66 deletions(-)

Fusion-Task-Id: FN-8721
Fusion-Task-Lineage: ff78481f-5ecb-4d9b-b21a-a095682372ed
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 16:57:49 -07:00
gsxdsm
0512334e86 FN-8714: fix quality runner CLI argument passthrough
Allow dashboard aggregate quality commands through the pnpm script boundary.

- Normalize pnpm’s leading argument separator before validating runner options
- Add end-to-end aggregate and fail-fast quality-runner coverage with a deterministic fixture
- Document aggregate quality-runner invocation and failure reporting

Files changed:
 docs/testing.md                                    | 15 ++++
 packages/dashboard/scripts/__tests__/quality-runner-fixture.mjs | 18 +++++
 packages/dashboard/scripts/__tests__/run-quality-tests.test.ts | 88 ++++++++++++++++++++++
 packages/dashboard/scripts/run-quality-tests.mjs   | 23 ++++--
 4 files changed, 139 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8714

Fusion-Task-Lineage: 48dbd434-a9e6-4283-8658-cbaa254a7dc7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 12:13:52 -07:00
gsxdsm
13f7266b67 FN-8670: reuse model runtime fixtures in engine tests
Share a warmed Pi model runtime across engine catalog tests.

- Add an isolated in-memory model registry fixture backed by a per-file shared runtime.
- Warm the runtime before catalog tests and verify custom-provider registry isolation.
- Document the required fixture pattern for real Pi SDK catalog tests.

Files changed:
 docs/testing.md                                    |  1 +
 .../engine/src/__tests__/_model-runtime-fixture.ts | 40 ++++++++++++++++++++++
 .../custom-providers-openai-completions.test.ts    | 15 +++-----
 .../custom-providers-openai-responses.test.ts      | 15 +++-----
 .../src/__tests__/provider-registration.test.ts    | 33 ++++++++++++------
 5 files changed, 73 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-8670

Fusion-Task-Lineage: 7410d114-1853-44cc-a09b-a997fbc7f119

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 01:34:43 -07:00
gsxdsm
cced31208e FN-8672: document observed suite-only flakes
Record first-sighting evidence for three suite-only flakes while preserving their substantial test coverage.

- Define the narrow first-sighting observed-register exception and second-sighting quarantine escalation.
- Add reproduction data for the core and engine PostgreSQL-adjacent flakes.
- Validate register metadata, paths, hierarchy segments, and escalation guidance.

Files changed:
 AGENTS.md                                          |  4 ++
 .../suite-only-flakes-observed-register.md         | 74 ++++++++++++++++++++++
 docs/testing.md                                    |  4 ++
 scripts/__tests__/observed-flake-register.test.mjs | 61 ++++++++++++++++++
 4 files changed, 143 insertions(+)

Fusion-Task-Id: FN-8672

Fusion-Task-Lineage: b52c74fb-aa7b-49e3-9f1d-a2c8c577f9c7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 00:21:14 -07:00
gsxdsm
dd569395e8 FN-8671: isolate triage admission state in tests
Prevent leaked singleton admission state from affecting later triage polling tests.

- Add test-only coordinator reset and inspection seams for all admission categories.
- Stop tracked triage processors before clearing shared reservation and pre-held-slot state.
- Cover teardown behavior and document singleton-state isolation guidance.

Files changed:
 docs/testing.md                                   |  6 ++
 packages/engine/src/__tests__/concurrency.test.ts | 56 ++++++++++++++++
 packages/engine/src/__tests__/triage.test.ts      | 82 ++++++++++++++++++++---
 packages/engine/src/concurrency.ts                | 30 +++++++++
 4 files changed, 166 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-8671

Fusion-Task-Lineage: 41217db4-1fd6-45d6-a846-c57fc3c7052e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 00:14:32 -07:00
gsxdsm
5596d915ab FN-8647: quarantine flaky Kimi K3 catalog test
Quarantine the timing-sensitive Kimi K3 SDK catalog test without changing timeout budgets.

- Reuse the native model registry once per test file.
- Add the observed CI timeout to the dashboard quarantine ledger and config.
- Document validation and timeout-budget preservation requirements.

Files changed:
 docs/testing.md                                    |  8 ++++++++
 ...ister-model-routes-kimi-k3-supplemental.test.ts | 23 ++++++++++++++++++++--
 packages/dashboard/vitest.config.ts                |  8 ++++++++
 scripts/lib/test-quarantine.json                   |  5 +++++
 4 files changed, 42 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8647

Fusion-Task-Lineage: 31e79677-d923-4003-a8e8-082159334e65

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-31 22:32:18 -07:00
gsxdsm
dfe050e8d4 FN-8640: add FNXC stamp anomaly advisory
Add a non-blocking census for implausible future-dated FNXC stamps.

- Classify tolerated future stamps by timezone plausibility and report notable anomalies.
- Add injectable gate seams and coverage for advisory, report, baseline, and discovery behavior.
- Document the advisory and preserve read-only check-mode baseline handling.

Files changed:
 docs/testing.md                                    |   4 +
 scripts/__tests__/check-fnxc-future-dates.test.mjs | 185 ++++++++
 scripts/check-fnxc-future-dates.mjs                | 495 +++++++++++----------
 3 files changed, 439 insertions(+), 245 deletions(-)

Fusion-Task-Id: FN-8640

Fusion-Task-Lineage: 7e57feb0-95e2-46b9-a1cf-9bd93c40d8e0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-31 19:03:08 -07:00
gsxdsm
7927c7b58a docs(testing): probe the DOM before theorising about a missing element (#2850)
Earned the hard way this week: three separate causes in `App.test.tsx`
and `board-mobile-view-switch.test.tsx` all presented **identically** as
a missing element, each with a DOM that looked healthy.

| what the test said | what was actually wrong |
|---|---|
| `Unable to find "+ New Task"` | `ListView` rendered its workflow
**skeleton**, which carries the same `list-view` class as the real body
— so the preceding `waitFor(".list-view")` passed |
| `Unable to find role="heading" "New Task"` | `NewTaskModal` **threw**
— an incomplete `vi.mock` was missing `isShortViewport` — and an
`ErrorBoundary` swallowed it |
| `Unable to find [data-testid="switch-to-board"]` | an uncaught render
error **unmounted the entire React root**; the DOM was already empty
three lines earlier |

The part worth recording is the hit rate. **Three theories were offered
before any probe — "the board renders nothing", "i18n is returning
keys", "the FloatingWindow rework" — and all three were wrong.** Three
probes each landed the cause on the first try. Those wrong theories cost
days; the probe is four lines.

The doc records the snippet, what each signal means (`error-boundary` in
the DOM = a swallowed throw, and its text names a missing mock export
exactly; empty DOM with no boundary = unmounted root, so trust the
*first* failing assertion not the reported one; container present but
contents absent = a skeleton standing in), and the corollary for writing
assertions:

> Wait on a marker only the real thing has.

A class shared with a loading or empty state turns *"the list rendered"*
into *"something rendered"*, and the test then fails one line later
against a DOM that looks fine. That is why `list-view-body` exists
(#2834).

Placed under the dashboard testing sections in `docs/testing.md`. Docs
only — no changeset.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 15:07:34 -07:00
gsxdsm
bb3bdab999 The ratchet follows the count down — a drop tightens instead of reddening the gate (coordinator item 2) (#2679)
Taken after asking twice for reassignment with no reply, and after the
same failure bit a **third** time. No open PR touches the census CLI, so
this is unowned in practice — **U12, say so if you have started and I
will close this in favour of yours.**

## What changed

A **drop** now tightens the baseline instead of failing. Failing hard
was defensible in isolation — a stale allowance is a hole, since those
guards can return up to the old count while the check stays green. What
it missed:

**The drop is almost never the failing author's to fix.** Eleven files
dropped during one merge wave, none of those PRs re-recorded, and none
of their authors did anything wrong. Measured three times since CI began
gating this: `columnRoles.ts` 0 → 1, then `executor.ts` twice.

A permanently-red gate is a bigger hole than a stale allowance, because
it gets ignored and then nothing is guarded at all. **The rise check —
the ratchet's actual purpose — is untouched and still fails hard.**

## The residual, named rather than glossed

In CI the write is discarded with the runner, so the committed baseline
stays stale until someone commits a tightened one. The exposure is
bounded (regrowth only up to the old count), printed on every run, and
strictly smaller than the exposure from a check people route around.
`--strict --exact` restores hard failure for the pinned end state.

**One writer:** the write is now a named `writeBaseline()` shared by the
tighten path and `--update-baseline`, rather than a second
`writeFileSync`. Two writers for one artifact is how they drift — a
lesson this file already learned once.

## Exercised end to end

| scenario | result |
|---|---|
| drop, `--strict` | exit **0**, `TIGHTENED`, allowance rewritten 9 → 6
|
| drop, `--strict --exact` | exit **1**, baseline untouched |
| rise, `--strict` | exit **1** |
| clean | exit **0** |

Pinned through the real CLI with an isolated baseline. Revert proof:
restoring the hard failure fails **1 of 32**.

## Two of my own mistakes, recorded

**A vacuous assertion, in the case that guards against vacuity.** I
first wrote `expect(allowedAfter).toBeLessThan(4 + allowedAfter)` — true
for every number. Replaced with a comparison against the inflated value
the fixture started from. This file documents that trap repeatedly and I
still walked into it, which is the argument for the mechanical revert
check over careful reading.

**The env override is `FUSION_CENSUS_BASELINE_PATH`**, not the
`FUSION_CENSUS_BASELINE` I used in the first draft — so the first
version of these cases silently ran against the **real** baseline and
passed for the wrong reason. A test whose fixture never took effect is
the same failure as a test whose fixture can't fail.

## Verification

32/32 census suites, `pnpm test:gate` **71/71**, `--strict` exits 0,
`pnpm lint` clean, `docs/testing.md` updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---

## Update — the base-ref ratchet (review round 2, commit `4895845579`)

The first version of this PR shipped a **named residual**: the
tightening write dies with the CI runner, so the committed allowance
stays high and a later PR can regrow guards up to it while `--strict`
prints green. I called the exposure bounded and moved on. Greptile
flagged it P1 and was right — naming a hole is not closing one.

`--strict` now stops trusting the committed number for files the branch
touched. It measures each **changed** file at the base commit
(`FUSION_CENSUS_BASE_REF`, else the PR base branch, else `origin/main`)
and fails if the file carries more guards than the base ref has. **The
enforced ceiling is what main has today**, so a stale, missing, or
long-unrecorded baseline no longer opens a window.

| decision | why |
|---|---|
| changed files only, `<ref>...HEAD` | untouched files have main's
counts by construction; censusing all ~400 at the base ref is ~400 `git
show` calls to re-derive numbers that cannot have moved. Three-dot also
stops charging this branch for guards that landed on main after the
fork. |
| a new file's base allowance is **0** | "absent at the base ref" as
unbounded would make a new file the cheapest place to hide a fresh guard
|
| fails **open** on an unresolvable ref, printing `SKIPPED` | a shallow
clone cannot produce an honest comparison; a degraded run must not read
as a clean one. The baseline comparison still applies. |
| merged into the existing `regressions` list | one failure per file,
and `--update-baseline` keeps working as the deliberate escape hatch. No
new exit path. |

**Revert proof, measured both ways.** With the base-ref block removed,
the regrowth fixture — base commit 2 guards, HEAD 5, baseline allowing 9
— exits **0** with `TIGHTENED`, which is precisely the reported
scenario. With it: exit **1**, `column-guard count ROSE`, `above its
count on the base ref`, baseline left at 9. **3 of the 4** end-to-end
cases go red on revert. The fourth passes without the fix by design — it
is the genuine-conversion case the auto-tighten exists to keep green,
and a case that reddens either way proves nothing.

The end-to-end suite builds a throwaway two-commit `git init` repo under
the temp dir, because this exploit is a property of the **plumbing**,
not of the comparison: resolving a ref, working out the changed set,
reading base source through `git show`. The comparator itself is pure
with the reader injected (`findRegrowthAgainstBase`), with its own cases
in `lifecycle-column-census-ast.test.ts` — including the one that would
silently pass everything, looking up the wrong key in
`summarize().byFile`.

**Rebased onto `origin/main` @ bc782d8d92** (the branch was forked
before the recent merge wave; its baseline read 746 against a tree of
722).

Verification on the rebased branch: census **722** / `--strict` exit 0 ·
**70/70** across both census suites · `pnpm test:gate` **71/71** · `pnpm
lint` clean.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 02:56:08 -07:00
gsxdsm
8e211d1870 TAKING scripts/: parse instead of grep — an AST classifier for the lifecycle-column bar, cross-checked by a second implementation (#2633)
The program's completion bar is "`column === "triage"` reaches zero".
This measures what that bar actually covers, and checks the measurement
in so it cannot drift.

## The number, measured by the checked-in tool

```
lifecycle-column-census: scanned 1956 source files

  COLUMN guards (the backlog):   1031
  ROLE comparisons (not guards):   10
  DELIBERATE-LITERAL (reviewed):    4

  by column id:
     313  done
     217  in-review
     201  in-progress
     177  archived
      83  todo
      40  triage

  top files:
     151  packages/engine/src/executor.ts
     136  packages/engine/src/self-healing.ts
      50  packages/dashboard/app/components/TaskCard.tsx
      44  packages/core/src/task-store/moves.ts
      34  packages/dashboard/app/components/TaskDetailModal.tsx
```

**`triage` is under 4% of the class.** Every one of those 1031 sites is
the same defect: a lifecycle decision made by column NAME, which stops
matching the moment a board renames a column. The bar can be met in full
while 991 identical guards remain — and two files hold a quarter of
them.

## The tracked count is wrong in three directions at once

Each of these cost real work this week, which is why this is a PR and
not a comment.

1. **Vocabulary.** It measures one of six legacy ids.
2. **Receiver.** It is anchored on locals named
`column`/`toColumn`/`fromColumn`, so it never saw the three real guards
in `executor.ts` written against `from` and `originColumn`. One of those
meant completed-but-stranded work was never recovered on a renamed
board, with nothing else owning that state (converted in #2628).
3. **Collision.** `role === "triage"`, `agentType === "triage"`,
`entry.agent === "triage"` compare an **AGENT ROLE**. The planner *lane*
is named `triage` and keeps that name — U11 removed the *column*. Ten
such sites were counted as backlog, and the "obvious" fix (renaming the
role) silently empties the planner's prompt template and mis-binds its
model markers.

A count that is too high and too low simultaneously sends work to the
wrong files while hiding the files that need it. So the census reports
**three separate numbers** and never nets them.

## Proven to fail on the original defect

Not asserted — exercised:

```
$ # reintroduce `task.column === "triage" || task.column === "todo"` into live-agent-count.ts
$ node scripts/lifecycle-column-census.mjs --strict; echo "exit=$?"
  packages/core/src/live-agent-count.ts: 10 -> 12
exit=1
$ # restore the file
$ node scripts/lifecycle-column-census.mjs --strict >/dev/null; echo "exit=$?"
exit=0
```

The CLI also exits 1 when its own file list comes back empty — a guard
that reports success without checking anything is worse than no guard.

## 12 regression cases, split by what they defend

Must catch: all six ids; a guard on a local named `from`/`originColumn`
(verbatim the executor.ts shape); single quotes; negation; several
comparisons on one line.

Must **not** catch: role comparisons; comment prose (two tracked
"guards" in `replan-target.ts` were prose about a filter that lives in
another file); a trailing `// … === "triage"` on a code line; sites
carrying a `DELIBERATE-LITERAL` marker.

Plus: **one marker cannot launder a distant guard in the same file** —
that is how allowlists rot.

## Report-only, deliberately

`--strict` compares per-file counts against
`scripts/lib/lifecycle-column-census-baseline.json` and fails when any
file's count **rises**. It is **not** wired into the merge gate: a
thousand-site backlog cannot be a blocking check the day it is first
measured, and a guard nobody can pass is a guard everyone disables.
Owners tightening their own area re-record the baseline in the PR that
lowers it. This is the ratchet shape the `DELIBERATE-LITERAL` markers
scattered through the program already anticipate.

## Stated limitation

Classification is by receiver **name**, so a future field named `agent`
that holds a column would be misclassified as a role comparison.
Recorded at the site, and it is precisely why the two classes are
reported separately instead of netted into one figure.

## Verification

- 12/12 new cases
(`packages/engine/src/__tests__/lifecycle-column-census.test.ts`)
- `pnpm test:gate` **71/71**; `pnpm lint` clean
- `pnpm census:lifecycle-columns`, `--json`, and `--strict` all
exercised end to end
- documented in `docs/testing.md`; no production code touched

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 22:52:18 -07:00