Files
fusion/scripts/lib/test-quarantine.json
gsxdsm 167f9b0542 FN-6324: allow opted-in engineer backlog auto-claim
Engineer backlog auto-claim now respects an explicit opt-in while keeping the default executor-only behavior.

- Add engineerBacklogAutoClaim settings and runtime overrides for backlog pickup role checks.
- Update heartbeat auto-claim filtering, logs, and no-task prompt guidance for opted-in engineer agents.
- Cover executor/default engineer/opted-in engineer routing with core and heartbeat tests.
- Document the setting and record quarantined unrelated temp-root flakes seen during verification.

Files changed:
 .changeset/FN-6324-engineer-backlog-auto-claim.md  |  5 ++
 docs/agents.md                                     |  3 +
 docs/settings-reference.md                         |  1 +
 .../core/src/__tests__/agent-role-policy.test.ts   | 33 +++++++++-
 packages/core/src/agent-role-policy.ts             | 11 +++-
 packages/core/src/settings-schema.ts               |  1 +
 packages/core/src/types.ts                         |  4 ++
 packages/core/vitest.config.ts                     |  6 ++
 .../src/__tests__/heartbeat-executor.test.ts       | 70 ++++++++++++++++++++++
 packages/engine/src/agent-heartbeat.ts             | 65 +++++++++++++++-----
 scripts/lib/test-quarantine.json                   | 20 +++++++
 11 files changed, 199 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-6324

Fusion-Task-Lineage: 4d124d98-4ad1-44ce-a76c-f1db3199b3c6
2026-06-12 19:45:37 -07:00

56 lines
5.9 KiB
JSON

{
"$comment": "Flaky-test quarantine ledger (deletion ratchet — see AGENTS.md 'Flaky tests: quarantine on sight' and docs/testing.md 'Quarantine ledger and the deletion ratchet'). A test observed failing without a corresponding real bug is quarantined ON SIGHT: add an entry here AND a matching one-line `exclude` entry in that package's vitest config, in the same commit. Every entry needs a non-empty `reason` (link the failing run) and a `quarantinedAt` date — the entry expires 14 days later, at which point the test file is DELETED unless someone rescues it with evidence it catches real regressions plus a root-cause fix (never appeasement). There is deliberately no loader module and no automation around this file: it is a dated record, the vitest config exclude is the mechanism, and the sweep is policy executed by whoever touches the suite.",
"entries": [
{
"file": "packages/engine/src/__tests__/merger-ai-cleanup-active-session.test.ts",
"reason": "Flake: pruneExistingAiMergeWorktrees skips active-session paths — active-session temp AI merge dir was unexpectedly pruned during pnpm --filter @fusion/engine test in FN-6206 verification, while the same file passed standalone. Root cause suspected: realpathSync resolution mismatch or readdirSync mock interaction with activeSessionRegistry singleton under concurrent engine suite load. Discovered during FN-6206.",
"quarantinedAt": "2026-06-10"
},
{
"file": "packages/engine/src/__tests__/merger-ai-cleanup.test.ts",
"reason": "Flake observed during FN-6206 verification: `pruneExistingAiMergeWorktrees skips active-session paths` failed in full `pnpm --filter @fusion/engine test` runs while the file passed standalone, indicating suite-order/concurrency sensitivity. Follow-up FN-6207.",
"quarantinedAt": "2026-06-10"
},
{
"file": "packages/engine/src/__tests__/merger-ai.test.ts",
"reason": "Flake observed during FN-6238 verification: full `pnpm --filter @fusion/engine test` failed in two merger-ai tests with git ENOENT / unable to read current working directory after a temp checkout disappeared, while the file passed standalone (23/23). Follow-up FN-6248.",
"quarantinedAt": "2026-06-11"
},
{
"file": "packages/dashboard/app/components/__tests__/QuickEntryBox.test.tsx",
"reason": "Flake observed during FN-6239 verification: broad `pnpm test` in dashboard backfill shard 4/4 could not find `quick-entry-priority-button` immediately after a successful task creation, while the named test passed standalone. Indicates suite-order/concurrency sensitivity unrelated to QuickChatFAB coverage.",
"quarantinedAt": "2026-06-11"
},
{
"file": "packages/engine/src/__tests__/reliability-interactions/soft-delete-blocker-residue.test.ts",
"reason": "Flake observed during FN-6294 verification and reproduced during FN-6319 broad `pnpm --filter @fusion/engine test`: `clearStaleBlockedBy handles missed task:deleted event with soft-deleted-blocker reason` failed because the log entry was absent, while the same file passed standalone and the narrow three-file reproduction passed. Product-code cross-check: `clearStaleBlockedBy` still has the soft-deleted-blocker branch and soft-delete-deadlock-scan-exclusion.test.ts covers it via a deterministic store double, indicating suite-order/concurrency sensitivity in this reliability-interactions fixture rather than a confirmed product bug.",
"quarantinedAt": "2026-06-12"
},
{
"file": "packages/engine/src/__tests__/sandbox/bubblewrap-backend.test.ts",
"reason": "Flake observed during FN-6294 verification: `attempts bwrap execution when available` timed out in the broad and narrow engine runs, while the file passed standalone during FN-6319. The test mocks detectBwrap as available with path `bwrap` and then invokes real bwrap execution, making it host/environment sensitive when a real bwrap binary is unavailable or behaves differently under suite load.",
"quarantinedAt": "2026-06-12"
},
{
"file": "packages/core/src/__tests__/soft-delete-tasks.test.ts",
"reason": "Flake observed during FN-6324 verification: broad `pnpm test` failed with `ENOENT: no such file or directory, mkdtemp .../fusion-test-workers-.../redir-.../kb-store-test-XXXXXX`, alongside a leaked fusion-test-workers temp root. The task only changed agent role policy/settings/heartbeat routing, so this temp redirect failure is unrelated suite-order/concurrency sensitivity.",
"quarantinedAt": "2026-06-12"
},
{
"file": "packages/core/src/__tests__/store-get-task-columns.test.ts",
"reason": "Flake observed during FN-6324 verification: broad `pnpm test` failed with `ENOENT` renaming a task.json temp file under the redirected fusion-test-workers temp root after the temp tree disappeared. 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__/task-dependency-mutation.test.ts",
"reason": "Flake observed during FN-6324 verification: broad `pnpm test` failed with `ENOENT` reading task.json under a redirected fusion-test-workers temp root that had disappeared. 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__/task-node-override.test.ts",
"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"
}
]
}