feat(FN-4333): emergency hot-fix for post-merge audit blocks

Stop the post-merge audit from parking tasks as `failed` when deterministic
merge verification already proved the merged tree. Adds `postMergeAuditMode`
project setting (`block` | `warn` | `off`, default `block`) and a
verified-tree short-circuit for rebase-strategy overlap-only findings.

- packages/engine/src/merger.ts: new `resolvePostMergeAuditAction` helper
  + audit call site gated on `postMergeAuditMode` and verification-cache
  lookup. Rebase + overlap-only + verified-tree → pass through with a
  short-circuit log entry instead of throwing SquashAuditError.
- packages/core/src/types.ts, settings-schema.ts, index.ts: new
  `PostMergeAuditMode` type, `postMergeAuditMode` field on Settings,
  default `block`, exports `normalizePostMergeAuditMode`.
- packages/engine/src/__tests__/post-merge-audit-action.test.ts: unit
  tests for the decision helper.
- packages/dashboard/app/components/SettingsModal.tsx: settings UI row.
- .changeset: minor bump for @runfusion/fusion.

The FN-3936 silent-drop guard is preserved: duplicate-subject findings
still block in `block` mode and squash-strategy audits still block
(no equivalent deterministic guarantee).

Fusion-Task-Id: FN-4333
This commit is contained in:
gsxdsm
2026-05-13 08:56:44 -07:00
parent b2d1caf802
commit 961f3da8bb
7 changed files with 324 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
---
"@runfusion/fusion": minor
---
Stop the post-merge audit from parking tasks as `failed` when deterministic merge verification already proved the resulting tree. Adds `postMergeAuditMode` project setting (`"block"` | `"warn"` | `"off"`, default `"block"`):
- A `rebase`-strategy audit that flags only touched-file overlap risks now passes through when the merged tree has a verification cache hit — silent drops are impossible by construction in that case.
- `warn` mode logs audit findings on the agent log but auto-completes the merge.
- `off` skips the audit entirely.
Duplicate-subject findings still block in `block` mode and squash-strategy audits still block (no equivalent deterministic guarantee). The FN-3936 silent-drop guard is preserved.