DOCX export refused: engagement not balanced
You clicked Export Word; the export refused with HTTP 422 and reason: "engagement_not_balanced".
What this means
The renderer reads the latest FsGeneratedStatement and asserts isBalanced = true. The most recent statement run did not balance.
Diagnose
sql
SELECT version_no, is_balanced, anomalies
FROM fs_generated_statements
WHERE engagement_id = '<engagementId>'
ORDER BY version_no DESC LIMIT 1;
-- expect is_balanced = true; if false, inspect the anomalies arrayFix
- Open the Statements tab. The red
not balancedbanner names the imbalance. - Follow Statements not balanced — almost always a sign-flip on a mapping.
- After fixing the mapping, regenerate statements. The new
versionNoshould landis_balanced = true. - Regenerate notes if the statements changed materially.
- Re-export.
When to ship unbalanced
There is no production path that allows shipping an unbalanced statement. The reviewer-override flag (planned, behind a Senior Accountant action) would land the export with a banner warning on the cover — and this should be the rarest of escape hatches, used only when the imbalance is provably immaterial and within audit tolerance.