haqlLabs

haql-closeout · Month-end

Every month ends. Not every month closes.

Locking a period means signing off that it is complete and reconciled. The records can pass a per-row QC pass and still contradict each other: a test rate that disagrees with the daily average, a well marked shut-in that produced all month, a field that sold more than it made. haql-closeout finds the wells and days that block a clean close — before you commit to the number.

Best run after haql-qc. QC clears the records; closeout confirms the period ties out. Both run fully offline.

Read the public guide: what it does, what it checks and what it does not do →

one command, period close
# get the binary — Windows .exe, macOS, or Linux (no Python)
# haql-lab.github.io/downloads

# reconcile the last period before locking it
haql-closeout -i production.csv \
              --well-tests  well_tests.csv \
              --downtime    downtime.csv \
              --sales       field_sales.csv \
              -r closeout.json

# result
period=2026-09  blocks=3  clean=true
  W-114 test vs daily;  W-209 shut-in producing;  field sold > produced

The report names each blocker by well, day, rule ID and source row — everything you need to decide whether it blocks the lock.

What it is

The reconciliation check that a per-record QC pass can't do.

haql-qc asks "is this row defensible?". haql-closeout asks "does this month tie together?". Different question, different inputs, same design stance.

Goes in

The production CSV, plus well test rates, downtime reason codes, and field-level sales or disposition volumes where you have them.

Comes out

A closeout report naming the wells and days that block a clean close — each with rule ID and source row — and a clear clean/blocked signal for the period.

Why you need it

The mismatch always surfaces on the last working day.

Because that is when someone actually checks. By then the number has been committed to the close, forwarded to a partner, or scheduled for a filing.

The committed number

The period close is a commitment — to partners, to royalty owners, to a state filing. Discover the contradiction a week later and you are not fixing a number, you are issuing a correction.

The contradictory record

A well reports intermittently shut-in while producing at normal rate. The downtime code says one thing, the volumes say another. Someone has to decide which field is lying — on a guess, at 9pm.

The field that over-sold

Delivered volumes exceed what the field produced. The balance looks plausible at the summary level, because the summary does not total the same lines you do.

The defended number

Next April, someone will defend this month against a query. A closeout report is the evidence that the close was actually checked — not assumed.

Without haql-closeout

The period is locked because "everything looked fine". The well test that disagreed with the daily average ships in the reporting package anyway.

The person who locks a close should not be the person who has to defend it in April.

With haql-closeout

Three blockers are named before the lock: W-114, W-209, and the over-sold field. The close is either clean or you know exactly what stands in the way.

The lock is now a decision backed by a report, not an assumption.

What it actually catches

Six ways a clean-looking month is not closed.

The full check list
  • Well test vs. daily average — a test rate that does not reconcile with reported daily volumes
  • Downtime vs. production — a well recorded shut-in while volumes say it was running
  • Date continuity — reporting gaps measured against that well's own cadence, inferred from that well's own history
  • Field balance — volumes sold or delivered exceeding what the field produced
  • Cumulative continuity — totals that go backwards inside the period
  • Duplicate well-days — the same well reported twice for one date
  • Signed closeout — every report can carry an Ed25519 attestation (report hash + a root over every finding) and a deterministic inspection bundle, so "that isn't the file we signed" stops being a thing anyone can say

Same design stance as haql-qc: read-only, offline, deterministic, traceable to the row — and, with --attest --sign-key seed.key, provably unedited afterwards.

Pricing

Cheaper than one re-keyed month.

Sample check

Free

One month of data, on the house. No key, no seat limit, no card. The point is to hit one contradiction you did not know about.

Send me your CSV

Team

$349/month

Annual commitment, up to 10 users, unlimited fields. Combined with or separate from a haql-qc license — your call.

On-premise

$1,750/month

Annual, per site, unlimited users on that site. On-premise is not a feature — under most operators' data-residency policy it is the premise.

Evaluation: 30 days, no license key needed.

Next

Close the month with evidence.

Email a month of production data — anonymised if you prefer — and get the closeout report at no cost. Or run the CLI yourself; the code stays on your machine.

kunleaz100@gmail.com