ENGINE 28
SFS-E28-FEX · FINANCING EXECUTION · REV 2026-07-24 · PRODUCTION
PRODUCTION = runnable end-to-end, CI-backed, full test suite passing. All data fictional and seeded.
Financing Execution & Schedule Variance
Does each variance re-derive, and does the report tie to the month before it?
A capital-markets team publishes a monthly "Upcoming Financings" report, and it drifts in ways nobody watches. Each active financing is a workstream -- typed as debt marketing, equity syndication or an extension/refinancing -- carrying an Original | Prior | Current | Variance block of milestone dates, a summary Gantt, and a rollup of the active count, the overdue count and the total capital in flight. This engine reads the seven artifacts that report emits -- the workstream register, the milestone schedule, last month's prior schedule, the playbook catalog, the master tracker, the Gantt summary and the monthly financing report -- and runs twenty-one deterministic controls over them. Is the report complete and the report date readable, are the workstream ids unique, typed and statused, does every milestone name a workstream in the register, does every financing type carry its standard playbook and every active workstream carry each playbook milestone, does the report tie both ways to the master portfolio, are the milestone dates readable, does each variance re-derive as Current minus Prior in whole days, does each Gantt bar sit in its target-closing month, does this month's Prior date equal last month's Current, is the Original baseline frozen across months, is the report date the period-end, does each overdue flag match the date gate of ACTIVE and Current before the report date, are the milestone sequence numbers unique and their current dates non-decreasing, and do the active count, the overdue count and the financing total each recompute from the workstreams they summarise. It compares every variance and every count with exact ==, treats the overdue gate as a strict less-than so a milestone due on the report date is not yet overdue, and never writes to a source artifact.
An "Upcoming Financings" report looks like the safest document a deal team circulates: a grid of dates with a Variance column, a Gantt, and three summary numbers. That is exactly why it drifts. None of the ways it goes wrong look wrong in a spreadsheet. A Current date is hand-edited and the Variance beside it is left behind, so the report says a milestone slipped by a number that no longer matches its own dates. This month's Prior column is quietly overwritten and no longer equals last month's Current, or the Original baseline is re-based, and the report reads current while its history no longer ties. A live workstream is missing one of its financing type's standard milestones, or a project on the master tracker has no workstream in the report at all. And the rollup -- the active count, the overdue list, the total capital in flight -- is stated on a figure nobody recomputed from the workstreams underneath it, while the Gantt draws a bar in a month that is not the month the deal is set to close. The engine rebuilds every variance, every overdue flag, every Gantt month and every rollup count from the base milestone dates and the workstream register through one shared kernel, compares with exact ==, ships a planted-defect file for every registered control, and states its benchmark as a command rather than a claim. A slipped milestone re-based into looking on-plan is invisible until someone walks the Prior column back to the month before it.
Architecture
functional block stack · static overviewSelect a layer
Eight control families run in registry order over each financing report. The first proves the others had something to read and that the report date is legible, because a control that passes on absent evidence reports assurance it never performed.
Key specifications
at a glanceWhat it does for you
plain termsA capital-markets team publishes a monthly "Upcoming Financings" report: every active financing is a workstream, typed as debt marketing, equity syndication or an extension/refinancing, and each carries an Original | Prior | Current | Variance block of milestone dates plus a summary Gantt and a rollup of the active count, the overdue count and the total capital in flight. It is a snapshot of a pipeline that moves every month, and it drifts in ways nobody watches. Four failures hide inside that, and none of them look wrong in a spreadsheet. The variance stops reconciling: a hand-edited Current date leaves the Variance beside it behind, so the report says a milestone slipped by a number that no longer matches its own dates. The month-over-month chain breaks: this month's Prior column no longer equals last month's Current, or the Original baseline is quietly overwritten, and the report reads current while its history no longer ties. The playbook or the portfolio has a hole: a live workstream is missing one of its financing type's standard milestones, or a project on the master tracker has no workstream in the report at all. And the rollup drifts from the schedule: the active count, the overdue list or the financing total is stated on a figure nobody recomputed from the workstreams underneath it, while the Gantt places a bar in a month that is not the month the deal is set to close. None of these are judgment calls. They are equalities and comparisons -- a stated Variance against Current minus Prior with exact ==, a Prior date against last month's Current, a financing total against the sum of the active workstreams, an overdue flag against a date gate with a strict less-than -- which a deterministic control settles better than a spreadsheet inherited by whoever keeps the pipeline this month.
The seeded demo runs every control over every financing report7. The CLI generates twenty-three fictional financing reports -- one clean baseline and one carrying each of the twenty-two planted defects -- then runs all twenty-one controls over each. The clean report returns PASS with no flags; every defect report returns REVIEW or FAIL and names the control it tripped along with the reason that control exists.
The controls are independent and boundary-exact8. One defect file pulls a later-sequence milestone back to its predecessor's date while re-deriving the variance, so only ord_current_nondecreasing fires and var_recomputes still holds. Another moves the report date one day before period-end, tripping date_report_is_period_end while every overdue count stays untouched, because the gate is a strict less-than that no current date has yet crossed. Each break is confined to the control it was built for.
The variance is recomputed, not read back9. A defect file bumps one milestone's stated Variance by a single day without moving its dates, so the report claims a slippage its own Prior and Current no longer support. var_recomputes rebuilds the variance as Current minus Prior in whole days and fails, proving the number is recomputed from the milestone's dates rather than trusted as stated.
Functional block diagram
engineering · each block links to its sourcePlain terms
- Seeded Financing Reports. fictional "Upcoming Financings" reports enter the control registry
- Structural Precondition. is the financing report complete and the report date legible
- Register & Portfolio. is the register sound, the playbook complete and the portfolio covered
- Variance & Gantt. do the variance and the Gantt month re-derive from the dates
- Roll-Forward. does this month's Prior tie last month's Current
- Frozen Baseline. is the Original baseline frozen across months
- Report-Date Gate. is the report date the period-end and each overdue flag true
- Sequencing. are the milestones sequenced and non-decreasing
- Rollup Tie-Out. do the rollup counts and the financing total recompute
- Register, Schedule & Tracker. the artifacts and dates every rule resolves against
- Verdict and Findings. every finding, with the reason it exists, ends at a person
Engineering
- Seeded Financing Reports. generate_corpus writes one clean baseline plus one planted-defect file for every registered control, twenty-three files in total. Only the workstreams, the milestone dates, the playbooks and the master tracker are stated; each milestone's variance and overdue flag, every Gantt month, and the portfolio's active, overdue and financing-total counts are re-derived through the same schedule kernel the engine later recomputes with, so the relationships the engine tests are the same relationships that produced the data.
- Structural Precondition. One control. FAILs a report missing any of the seven artifact types or carrying a duplicate, or an unreadable report_date, so no downstream rule holds vacuously on absent evidence.
- Register & Portfolio. Eight controls: unique, typed and statused workstream ids; every milestone attributable; every financing type's playbook defined and, for active workstreams, complete; and the report tied both ways to the master tracker.
- Variance & Gantt. Three controls: the Original, Prior and Current dates are readable, each stated Variance equals Current minus Prior in whole days, and each Gantt bar sits in the month of its target closing, all compared with exact ==.
- Roll-Forward. One control: each milestone's Prior date is a verbatim carry of the Current date last month's prior schedule froze, so the month-over-month chain cannot be quietly broken.
- Frozen Baseline. One control: each milestone's Original date is unchanged from the baseline the prior schedule carried, so a slipped milestone cannot be re-based into looking on-plan.
- Report-Date Gate. Two controls: the report date is the last calendar day of the period month, and each stated overdue flag matches the recomputed gate of ACTIVE and Current before the report date -- the flag a REVIEW signal, checked with a strict less-than at the boundary.
- Sequencing. Two controls: no two milestones in a workstream share a sequence number, and a later-sequence milestone is never dated before its predecessor.
- Rollup Tie-Out. Three controls: the active-financing count ties the ACTIVE workstreams, the overdue count ties the recomputed date gate, and the financing total ties the exact sum of active financing amounts in integer cents.
- Register, Schedule & Tracker. The workstream register carries each financing's id, type, status, target closing, partner and amount; the milestone schedule carries the Original | Prior | Current | Variance block per milestone; the prior schedule carries last month's Original and Current; the playbook catalog carries the standard milestone set per financing type; the master tracker carries the portfolio of record; and the Gantt summary and monthly report carry the derived months and rollup counts. Every variance, roll-forward, baseline, ordering, date and rollup control resolves against these through the shared schedule kernel.
- Verdict and Findings. Findings roll up per financing report: any FAIL is FAIL, FLAGs without FAILs are REVIEW, clean is PASS. The CLI exit code is the verdict, so a pipeline can gate on it. Reports carry no timestamps or absolute paths, which is what makes the committed report diffable.
Instruction set
every public command| Command | Operation | Output | Exit | Artifacts |
|---|---|---|---|---|
python run.py | regenerate the seeded fictional corpus, run all twenty-one controls, write both reports | per-file verdicts and every actionable finding, then the overall verdict | 2 for the bundled corpus, which carries a planted defect for every control by design | financing_report.json, financing_report.md, samples/ |
python -m financing_engine samples | analyze an existing folder of financing reports without regenerating it | per-file verdicts and findings | 0 PASS / 1 REVIEW / 2 FAIL / 3 usage | none unless --json or --md is passed |
python -m financing_engine samples --generate --quiet | regenerate the corpus and print only the overall verdict | a single verdict line | 0 PASS / 1 REVIEW / 2 FAIL / 3 usage | samples/ |
python -m pytest financing_engine/tests -q | run the full test suite for this engine | 10337 passed | 0 when every test passes | none |
Benchmarks
measured demo results| Measure | Result |
|---|---|
| Engine tests10 | 10,337 tests collected live collection from the engine directory |
| Registered controls11 | 21 controls counted from the registry, not from documentation |
| Planted defects12 | 22 defect files every registered control has at least one file that trips it |
| Control coverage13 | 100 percent of controls with a planted defect no control ships without a file demonstrating it firing |
Control characteristics
engineeringPlain terms
The engine has no write path and therefore no autonomy to gate. It produces findings; a person decides whether the report is circulated and whether a milestone, a baseline or a rollup figure is corrected.
Engineering
Deterministic envelope. seeded fictional inputs, read-only operation, offline default mode.
Demo gate. FAIL on the bundled corpus, by design -- it carries a planted defect for every registered control
| Severity | Verdict | Action |
|---|---|---|
| No findings above PASS | PASS | carry the mechanically clean financing report into the documented review and circulation |
| One or more FLAG, no FAIL | REVIEW | a human resolves each flag; a milestone whose stated overdue flag does not match the recomputed date gate lands here |
| One or more FAIL | FAIL | the report is not circulated until the failing control is cleared -- a variance that does not re-derive, a broken roll-forward, a mutated baseline, a missing playbook milestone, an out-of-order milestone, a wrong report date, or a rollup count that does not recompute |
- Read-only: financing reports are parsed and never written back, so the engine cannot introduce the break it reports.
- Integer cents throughout, compared with exact ==; there is no tolerance band on a financing amount or a count, and a cent or a day off the re-derivation is reported as a break.
- A count or amount that should be an integer but is not produces an AMOUNT_INVALID finding contained to the one field it was read on, rather than being coerced into the number the engine is meant to audit.
- One schedule kernel: the controls and the generator share the kernel in financing_engine.schedule, so a re-derived variance, overdue flag or Gantt month cannot disagree with the data that produced it.
- The overdue gate is boundary-exact: a milestone whose current date lands exactly on the report date is due today, not yet overdue, and a closed workstream is never overdue.
- Every overdue and period-end test is measured to the report_date carried in the file, never the system clock, so the run is deterministic and byte-stable with no timestamps or absolute paths in any output.
- Absent evidence is never a passing control; a missing artifact fails completeness rather than letting the controls that read it pass unread.
Operating limits
what it refuses to do- The engine never books an entry, releases a wire, accrues a note, settles cash, files a report, or writes to a source artifact. It reads the financing report and stops.14
- It reads the seven artifacts the monthly report emits. It does not connect to a loan system, a treasury workstation, a general ledger or the underlying deal documents.15
- It proves the report reconciles to itself and to the month before it -- variances re-derive, the roll-forward ties, the baseline is frozen, the playbook is complete -- not that any milestone date is the right target or that a financing will actually close. That judgment is the deal team's.16
- It re-derives each overdue flag and period-end date against the report_date the file carries; it does not decide whether that report date, or the target closing dates beneath it, are the correct ones for the pipeline.17
- It takes the milestone dates, statuses and amounts at face value: it confirms the register, schedule and rollup foot and reconcile, not that a milestone was actually met. All shipped data is fictional and the report period is set in a fictional future.18
See it run
control architecture
Integration
how to run itDistribution: public repository, MIT license.
- 1python -m pytest --collect-only -q -o addopts= (financing-execution-automation/)
- 2len(financing_engine.engine.REGISTRY)
- 3distinct rule-id prefixes in financing_engine.engine.REGISTRY
- 4samples/*.json after python run.py
- 5len(financing_engine.model.DOC_TYPES)
- 6financing_engine/tests boundary tests on the day and the cent
- 7python run.py (financing-execution-automation/); financing_engine/tests planted-defect suite
- 8financing_engine/generate.py DEFECTS out_of_order_milestone / wrong_report_date
- 9financing_engine/generate.py DEFECTS variance_wrong -> var_recomputes
- 10python -m pytest --collect-only -q -o addopts= (financing-execution-automation/)
- 11len(financing_engine.engine.REGISTRY)
- 12len(financing_engine.generate.DEFECTS)
- 13financing_engine/tests: every registered rule has a planted defect
- 14financing-execution-automation/README.md and financing_engine read-only / determinism tests
- 15financing_engine/model.py DOC_TYPES
- 16financing_engine/engine.py var_, roll_, base_ and mem_ families
- 17financing_engine/engine.py date_ family and the schedule kernel
- 18financing_engine/generate.py
Show us where the hours go.
One conversation: you describe the work that consumes your team's month; we tell you plainly what this engine can take over, what it can't, and what a scoped first phase would cost. Your people keep approval authority.
Book a free consultation