Worked example: balanced trial balance, unfinished review
The fictional example compares 31 July 2026 with 30 June 2026. With thresholds of $10,000 and 10%, and a reconciliation tolerance of $0.01, the result is REVIEW: 8 exceptions, none blocked, and 6 draft client queries.
From supplied balances to an exception
| File | Field | Value |
|---|---|---|
| current_trial_balance.csv | YTDCredit | 65000.00 |
| subledger_balances.csv | SubledgerBalance | -64750.00 |
| exceptions.csv | difference | -250.00 |
The engine compares -65000.00 with -64750.00 and writes subledger_reconciliation,REVIEW. Download the generated exceptions.csv with all 8 exceptions, or inspect the complete fictional input files at the same commit. Reproduced on 3 November 2026.
| Exception | Result | Reviewer action |
|---|---|---|
| Creditors reconciliation | Trial balance less supplied subledger: −$250. | Trace the reconciling items and document their cause. |
| Account mapping | Operating Expenses, account 6000, has no supplied mapping. | Confirm the account’s review group. |
| Financial year reset | The comparison crosses 1 July. | Resolve the reset before treating profit and loss YTD differences as ordinary monthly movements. |
Five threshold movements make up the remaining exceptions. The 8 exceptions are not 8 accounting errors. The review acknowledgement leaves the result at REVIEW.
From an exception to a draft client query
Download the generated client-queries.csv with all 6 draft queries from the same fictional run. A preparer must review them before sending anything. A client answer does not clear an exception or approve the close.
| Field | Generated value |
|---|---|
| Query ID | Q-368abd6aff22 |
| Source finding | period_variance for Varrock Ventures Pty Ltd, account ID 100, code 1000, Operating Bank. |
| Question | What drove the year-to-date movement in this account against the prior period? |
| Evidence requested | The transactions or documents behind the movement, and confirmation that no part of it belongs to another period. This comparison crosses a 30 June year-to-date reset, so confirm the movement is real before putting this query to anyone: a profit-and-loss account restarts at nil on 1 July. |
The captured manager case study explains the selected exceptions. The command below reproduces the 4-file output at that same commit. All inputs are fictional.
Inputs
Start with canonical CSVs written by the Xero trial balance exporter. The example uses these inputs:
- Current and prior trial balances, required: one organisation and one report date in each file. Both must name the same organisation, with the prior date earlier than the current date.
- Account mapping, optional: a CSV assigning accounts to review groups. With a supplied file, missing mappings are flagged for review. Omit it and the mapping control is not run.
- Subledger balances, optional: supplied balances to compare with the trial balance. Omit them and subledger reconciliation is not run.
- Review note, optional: a human acknowledgement. It does not clear exceptions or approve the close.
Set the absolute and percentage materiality thresholds and reconciliation tolerance for the review. Choose an output directory outside version control. The pinned source documentation defines the accepted files and controls.
Outputs and status
close-summary.md: overall status, thresholds, source hashes and the exception table.exceptions.csv: account-level differences, reasons and suggested reviewer actions for Excel or Power BI.client-queries.csv: draft questions for exceptions a client can help resolve. A preparer must review them before sending anything.close-review-pack.json: structured results and evidence for the run, including any supplied review acknowledgement.
PASS means the configured checks passed on the supplied files. REVIEW or BLOCKED requires attention and returns exit code 2. Malformed inputs, invalid configuration or an output path the tool refuses return exit code 1. A human decides whether the close is acceptable.
Run the example
Needs Git and Rust installed with rustup. The component pins Rust 1.99.0 in rust-toolchain.toml, which rustup uses in that directory. The first build downloads the crates locked in Cargo.lock. It needs no Xero account, API access or client files.
git clone https://github.com/ryanduguid/accounting-review-pipeline.git
cd accounting-review-pipeline
git checkout 1ce98d50f1c81d9f9873d47986a33a42f40f4e96
cd packages/monthly-close-control-plane
cargo run --locked --release --bin close-control -- review --current examples/current_trial_balance.csv --prior examples/prior_trial_balance.csv --mapping examples/account_mapping.csv --subledger examples/subledger_balances.csv --absolute-threshold 10000 --percentage-threshold 0.10 --reconciliation-tolerance 0.01 --review-note examples/review_note.json --output ../../../close-control-demo
After Cargo’s build messages, expect exit code 2 and close-control: REVIEW; 8 exception(s); 6 client query(ies) drafted, followed by the absolute path of each of the 4 pack files. The output directory is beside the checkout. Keep review packs outside version control; the command refuses an output directory inside a checkout.
Software issue using fictional data? Open an issue.
Reproduce a refusal: output inside the checkout
From the same component directory at source commit 1ce98d5, repeat the fictional example with only --output changed to ./close-control-demo:
cargo run --locked --release --bin close-control -- review --current examples/current_trial_balance.csv --prior examples/prior_trial_balance.csv --mapping examples/account_mapping.csv --subledger examples/subledger_balances.csv --absolute-threshold 10000 --percentage-threshold 0.10 --reconciliation-tolerance 0.01 --review-note examples/review_note.json --output ./close-control-demo
Expect exit code 1 and an output error saying the directory is inside the version-control checkout and naming that checkout. The command creates no pack. This guard runs before reading the input files, because review packs can contain client accounts and balances.
Use a new access-controlled directory outside version control for an actual review. The example proves this output-path refusal; it does not test every malformed input or establish that a close is acceptable.
Limits
A balanced trial balance can still contain omissions, misclassifications or unsupported transactions. These checks use the files, mappings and thresholds you supply. They do not establish that the source records are complete or that an accounting treatment is correct.
The tool cannot post journals, make payments, lodge returns, lock a period or approve a close. It does not send the draft client queries. A reviewer must investigate the exceptions and record the decision through the firm’s workpaper process.
Common questions
Does Monthly Close Controls connect to Xero?
No. It reads local CSV files in the canonical Xero trial balance export format. Use the Xero trial balance exporter separately to obtain those files.
Can I open the exception report in Excel?
Yes. Import exceptions.csv to filter the account-level findings, differences and reviewer actions. The tool also writes a Markdown summary and a JSON evidence pack.
Does PASS approve the month-end close?
No. PASS means the configured checks passed on the supplied inputs. A human still reviews completeness, accounting treatment and the evidence before approving a close.