Bullion: accounting through franken_accounting, and the metric engine
6,619 words9 subsections8 tables1 listingPlan version 0.1
On this page9
Crates:
fmine-metalacct: the metal and inventory subledger;fmine-acctpack: the mining domain pack;fmine-metrics: the metric engine;fmine-fa-bridge: the only FA client.
Sources: R4 (the FA fit, read at FA 53c6e953), B4 §5 (bridge design) and B3 §5.3 (AISC consistency).
21.1 Doctrine
- FA is FrankenMining's only book of record. FrankenMining never computes an authoritative balance. Balances are FA folds, read through certified reads and cited by certificate (FACT, R4 §7.1). At a company that already runs an ERP, the ERP stays the statutory ledger, and FA is a reconciling analytical book that must agree with the ERP's trial balance; every difference is a cited register item, and Workpapers support entries the controllers post in their own ERP (DESIGN, §1.5).
- FrankenMining owns operational truth and estimates; FA owns the mechanical record. Every FrankenMining
estimate that moves money enters FA as a certified computation document (
Workpaper) on the entry it supports. This covers NRV, depletion rates, ARO PV, impairment, MTM, stream drawdown, royalties and survey true-ups. - No second posting universe. Physical and inventory detail lives in FrankenMining and enters FA only as reviewed summaries (FA-INV-12 external-subledger form).
- Judgment stays with humans. FA "will never decide GAAP treatment" (FACT, R4 §10). Every policy choice is a
named, versioned FrankenMining policy object with an approver:
- E&E capitalization;
- stripping components;
- NRV reversal policy;
- CGU definition;
- the sustaining vs growth classification.
- Agents prepare; humans authorize (§30.4).
21.2 FA facts that shape this design (FACT, R4 at FA 53c6e953)
| Fact | Consequence |
|---|---|
About 793K lines of Rust at 53c6e953 (≈ 796K at HEAD 41363acb); FA's own reality check records a large share as PARTIAL, UNPROVEN or NOT_STARTED, including cross-book consolidation with CTA, the CloseRun DAG and operability at scale |
Treat FA as an evolving dependency: pin the rev, run FrankenMining's own acceptance suite (§21.3), track V27/V37/V38 |
| Single writer per book; per-post latency measured at 118 ms rising to 439 ms over 300 posts in a debug build | Post summaries, never transactions (GB from B4 G1, §21.7) |
| No metal or mass units registered | Interim money-only legs; metal quantities live in Workpaper rows and the FrankenMining flow ledger (§21.3.6) |
| Canon cannot multiply variables, divide or use tables; outputs only Original or Adjusting | Canon rules are account determination only. FrankenMining computes every amount (R4 §7.6). |
Eight fixed dimension kinds plus legal_entity and party; no custom kinds |
Mapping in §21.4; never repurpose fund or grant (they drive fund-balance closing) |
Eight implemented REA event kinds; no Custom(id) |
PostEntry/PostBatch for most mining events; RecordEvent only for Shipment/Sale |
FrankenMining-generated evidence grades Generated and is self-sourced |
Every entry cites a third-party or connector document and a human review (§21.3.5) |
| SoD binds asserted names; approvals unsigned (V19) | FA SoD evidence is labelled HYPOTHESIS-grade in FrankenMining control reports until V19 closes |
| FA has no plugin or domain-pack concept | The domain pack lives entirely in FrankenMining (§21.5). Registry rows are upstream asks (Appendix F). |
21.3 The bridge (fmine-fa-bridge; B4 §5)
21.3.1 Transport.
- Primary path:
fadhosts each book (writer lease) at the enterprise finance node.fmine-fa-bridgecallsfa --jsonrobot verbs as a subprocess, using FA's NDJSON envelope, exit codes 0 and 2–8, and refusal objects. - Fallback: a signed intent outbox. FrankenMining writes canonical intent files, and a finance operator or
scheduled job feeds them to
fa post --intent … --dry-run/fa commit --plan ….- The intent bytes and idempotency keys are identical on both paths, so switching paths cannot double-post.
- Agents use
fa-mcpon drafts. - Embedded Rust (
fa::Book) is used only intools/fa-conformance. FA's toolchain and pins (nightly, its asupersync and fgdb revs) are not imposed on FrankenMining (R4 §7.11).
21.3.2 Book topology.
- One FA book per (functional-currency group × primary basis), with
legal_entityas the balancing dimension. - Secondary-basis and local statutory books run as full books until
AdjustmentLayeris surfaced (V27). - A management book carries AISC and cost-category tagging.
- When the company is JV operator, each JV entity has its own book, and partners receive
.fabbundles verifiable withfa-verify. When the company is a non-operating partner, the operator's certified statements are imported as evidence. registries/books.tomlmaps (site, legal entity) → books.
21.3.3 Granularity (DESIGN).
- One external-subledger summary per (site, flow family, month, book). The flow families are:
ore: ROM and stockpiles;wip: leach pads and circuit;fg: doré, concentrate, cathode;cost: absorption.
- Close entries (DD&A, ARO accretion, NRV, MTM, royalties) are one per site-month-book. Sales are per shipment or invoice.
- Truck-, assay- and shift-level postings are prohibited. They fail on writer throughput and on the human review that FA-INV-12 requires (§21.7).
21.3.4 Merkle-folded detail and keys (DESIGN).
- Each (account, side, dimension tuple) aggregates to one external detail row. The row's
source_digestis the MMR root of the FrankenMining ledger slice that folds to it, so an auditor can descend from an FA leg to every daily movement and source certificate by digest. - Limits: ≤ 128 rows, ≤ 32 legs and ≤ 8 KiB per entry. Overflow splits deterministically by
cost_center, then byproduct. - Idempotency key grammar:
fmine1:<book>:<slot_kind>:<site>:<family|step>:<period>:g<gen>, for examplefmine1:BK-USD-IFRS:extsub:SITE-NV01:ore:2027-03:g0.- B4 drafted
fm1:. Thefmine1:prefix follows the crate-prefix decision (§28.1; OPEN-B4-09). genincrements only through a supersession record.- FA's identity rule is vid(Entry) = H(book ‖ principal_scope ‖ idempotency_key).
- B4 drafted
- The posting-slot automaton (Petri invariant: one token per slot, at most one live
Original):
Planned ─prepare─▶ Prepared{workpaper_digest, payload}
─import─▶ Imported{doc_oid} (ImportReceipt Connector{franken_mining/metalacct, v})
─review─▶ Reviewed{attestation_vid} (independent human principal; OB-REVIEW resolves)
─dry-run─▶ Planned@FA{plan_digest} (fa post --intent --dry-run --plan-out)
─commit─▶ Committed{EntryRef, cert} terminal-live
│exit 3/7 ─▶ Refused{FA-REF-nnn} (human triage; never auto-modify)
│exit 6 ─▶ Replan | ALARM (IDEMPOTENCY_CONFLICT ⇒ FrankenMining bug)
│timeout ─▶ Indeterminate ─reconcile by key─▶ Committed | Planned
Committed ─recompute differs─▶ Drift ─▶ Replace (open period: Reversal + Replacement, g+1)
└▶ Adjusting EstimateChange (closed period, new slot)
21.3.5 The evidence grading triple (B4 §5.5). Every summary entry cites three things:
- the FrankenMining
Workpaper(gradeGenerated); - at least one non-self-sourced document: the survey report, lab batch certificates, weighbridge totals, the invoice;
- the independent human
Reviewed{against: workpaper_digest}attestation.
FrankenMining service principals use Production/Preparer profiles with caveats (entities ⊆ site,
accounts ⊆ subtree, amount ≤, requires_dry_run). They never use the Agent profile on trunk.
21.3.6 Interim postures while FA's P0 asks are pending (rows FD-FA-*). Each interim posture is correct today
and stays correct afterwards:
| Ask (Appendix F) | Interim posture | Switch-over rule |
|---|---|---|
| Metal and mass units | Money-only legs; metal in Workpaper rows and the flow ledger | From the first open period after FA ships balanced XAU_OZ/CU_LB/… rows. No back-posting. |
| Custom dimension kinds | Chart-leaf encoding plus the eight-kind map | New dimension values apply prospectively |
| Custom REA event kinds | PostEntry/PostBatch; RecordEvent only for Shipment/Sale |
Canon account-determination rules after Custom(id) |
| Tiered NCI and cross-book consolidation | FrankenMining's JV engine computes attributable figures citing FA certificates; FA consolidate only for non-tiered groups |
When fa-76hy lands, FrankenMining's computation becomes an oracle cross-check |
21.3.7 Acceptance suite (INT-FA-001 = all pass; run against the pinned FA rev).
| ID | Test | Pass |
|---|---|---|
| FA-ACC-01 | Robot envelope and exit dictionary (0, 2–8) for every verb used | Schema matches; exit 1 never emitted |
| FA-ACC-02 | Identical PostBatch twice |
already_recorded = true, same EntryRefs |
| FA-ACC-03 | Same key, different members | Exit 6; nothing posted |
| FA-ACC-04 | External Workpaper with 128 rows, with 129 rows, and with a non-folding summary | Accept, refuse, refuse |
| FA-ACC-05 | Generated-only evidence under the Agent profile on trunk | Refused |
| FA-ACC-06 | Original into a Closed period; Adjusting with approval | Exit 7 FA-REF-010; accepted |
| FA-ACC-07 | fa replay of the certified trial balance for FrankenMining-posted months |
Byte-identical |
| FA-ACC-08 | fa bundle produce → fa-verify; one-byte tamper |
Exit 0; exit 8 |
| FA-ACC-09 | Release build, book seeded to 10⁵ entries; 300 summaries | p99 ≤ 2 s/post and slope ≤ 0.02 ms per entry (TARGET) |
| FA-ACC-10 | After unit rows exist: an unbalanced metal leg | FA-REF-001 |
| FA-ACC-11 | A second fad on the same book |
FA-REF-018, exit 6; the bridge degrades to the outbox |
| FA-ACC-12 | Kill fad between dry-run and commit, over 1,000 LabRuntime seeds |
No duplicate; plan invalidated → replan |
| FA-ACC-13 | PostBatch whose members are external-subledger summaries |
Accept, or document per-entry posting (OPEN-B4-03) |
✖ KILL-1 (FA scale and fit; the single definition, cited by §37.3). Two triggers, two tiers of fallback:
- (a) Scale, month 9. FA-ACC-09 fails at the FA rev pinned by month 9 (p99 > 10 s at 10⁵ entries) → post monthly only, at ≤ 300 publications per book per month; keep quantities authoritative in the FrankenMining flow ledger; file the upstream bead.
- (b) Fit, month 15 (the M3 deadline). FA still lacks metal units (FD-FA-01) or still fails (a) → a FrankenMining-local certified ledger with FA as a draft adapter. No executive deliverable slips.
Never fork FA, never build a GL.
21.4 Chart and dimensions (FACT inputs from R4 §7.3; DESIGN mapping)
- Mining chart spec. FrankenMining ships IFRS and US GAAP variants, applied by
OpenAccountschema-control intents. Leaf families:- ore stockpiles (current and non-current);
- heap leach WIP, metal in circuit, doré/bullion, concentrate, cathode;
- materials and supplies;
- mineral properties (acquired, development, producing);
- stripping activity assets per component;
- E&E (IFRS book);
- CIP split into sustaining and growth leaves;
- ARO asset and provision (operating and non-operating sites);
- stream deferred revenue;
- provisional-pricing receivable and adjustments;
- royalties and mining taxes payable;
- hedge assets and liabilities, and the CFH reserve;
- NCI;
- statistical production and reserve accounts.
| FA dimension | FrankenMining meaning |
|---|---|
legal_entity (balancing) |
Legal entity |
party |
Smelters, offtakers, refiners, JV partners, streamers, royalty holders, governments, suppliers |
region |
Operation hierarchy: country > complex > mine > pit/underground |
segment |
IFRS 8 / ASC 280 segment; CGU or asset group |
cost_center |
Process stage or department: mining, processing (mill, leach, flotation), refining, site G&A, corporate |
project |
Capital project/AFE, stripping component, exploration project |
product |
Au, Ag, Cu, Sn; doré, concentrate, cathode |
department |
Spare, optionally the WGC cost category |
21.5 The mining domain pack (fmine-acctpack; the 17 parts from R4 §8)
FrankenMining owns all 17 parts. Phases refer to §37.
| # | Part | FrankenMining computes | FA records via | Phase |
|---|---|---|---|---|
| 1 | Metal and inventory subledger (ROM, stockpiles, heap WIP, metal in circuit, doré, concentrate, cathode, supplies) with survey true-ups and NRV tests | Quantities, costs, true-ups from Touchstone posteriors (§20.8); NRV at the per-class policy price basis | External-subledger summaries; Adjusting EstimateChange true-ups; NRV PostEntry per book |
M3 |
| 2 | Production cost engine (process costing, absorption, by-product vs co-product, relative-sales-value drivers) | Cost pools from CostDriverCards (§21.6) |
Allocate, Reclass |
M3 |
| 3 | Deferred stripping (IFRIC 20 components; US GAAP variable-cost treatment) | Stripping ratios per component from Pushback plans and actuals | Reclass/PostEntry per book |
M4 |
| 4 | Mineral property register and DD&A (units of production from reserves, prospective revisions) | UoP rates from the Hallmark register (§24) as at the effective date | Adjusting rule with amount input; later Depreciate |
M3 |
| 5 | E&E policy (IFRS 6 capitalization vs US GAAP expense; triggers; transfer to development) | Policy application per project from Lodestar status (§11) | Per-book entries | M4 |
| 6 | Closure and ARO (inflation, discount bases, accretion, revisions, settlement) | Freeboard closure estimates (§18.6) | Accrue/PostEntry; revisions EstimateChange |
M5 |
| 7 | Impairment (CGU registry, LOM and price-deck models, FVLCD/VIU, ASC 360 two-step) | LOM cash flows over the scenario index (§23.4) with FA scenarios for sensitivities | PostEntry after scenario rehearsal |
M4 |
| 8 | Concentrate and bullion sales (payables, TC/RC, penalties, quotational period, MTM, provisional and final invoices, assay exchange, outturn) | Settlement engine from Crucible custody (§17.6) | RecordEvent(Shipment/Sale), RecordInvoice, ApplyReceipt plus explicit adjustment legs |
M3 |
| 9 | Streams and royalties (deposits, drawdown, financing component, catch-ups; NSR/NPI/gross royalties) | Contract terms as policy objects; price-linked amounts on the scenario index | PostEntry/Accrue |
M4 |
| 10 | Hedge accounting (designation, effectiveness, valuation, OCI recycling) | Valuations with counterparty confirmations | PostEntry/Reclass |
M5 |
| 11 | Mining taxes and government royalties, per jurisdiction | Jurisdiction packs | Accrue |
M4 |
| 12 | JV and joint arrangements (IFRS 11, operator billing, proportionate consolidation, equity method) | Attributable figures; billing | Native FA subledgers; RecordInvoice/RecordBill |
M3 |
| 13 | Capital project accounting (AFE, CIP, sustaining vs growth, capitalized borrowing costs, pre-production proceeds) | WGC-rule classification (§21.6) with an attested decision per project | project dimension; CIP leaves |
M3 |
| 14 | Non-GAAP metrics (AISC, AIC, cash costs, C1, GEO, attributable vs consolidated) | The metric engine (§21.6) | Certified reads of FA rows; reconciliation schedules as StatementDefinitions |
M0 (public lane), M3 (private) |
| 15 | Reserves and resources register | Hallmark (§24) | ImportDocument(kind Disclosure) plus QP Attest |
M3 |
| 16 | Chart spec, dimension map, Canon account-determination rules, StatementDefinitions |
Shipped as data | Schema-control intents; PolicyControl activation with dual control |
M3 |
| 17 | Mining close orchestrator and mining control procedures (metal-balance variance, F1/F2/F3, stockpile variance, capitalization tests) | §21.7 | Results filed as evidence over certified reads | M3 |
NRV workflow (example of the pattern).
- Touchstone's inventory posterior (§20.8) and Crucible's heap inventory (GB-20) give quantity distributions.
- Bullion computes cost per recoverable ounce and NRV at the per-inventory-class price basis (a
Ratedocument per class, set by accounting policy), and computes P(NRV < carrying value). - If that probability exceeds a policy threshold, or at period end, a
Workpaperwith the computation, the price evidence and the survey/reconciliation evidence goes to the controller. - The controller reviews it, and an
Adjustingentry is posted per book. IAS 2.33 permits reversals; under ASC 330 the write-down sets a new cost basis. That basis difference is a per-book policy object (FACT, R4 §5.2).
21.6 The metric engine (fmine-metrics): AISC, AIC, C1, GEO, reserve replacement, ROCE
Doctrine (from B3 §5.3).
-
One authority per number. FA owns actual costs as certified rows. FrankenMining owns physical drivers, plans and the metric definitions.
-
One function, two inputs (PO-PUSH-9).
aisc(rules_version, inputs)runs identically on:- plan quantities × driver rates (forecast);
- FA-certified actuals (actual).
-
Rules are versioned data.
- The WGC guidance note was issued on 26 June 2013 and updated in 2018 (FACT, E611; the November 2018 month is FACT[U]).
- AISC includes on-site costs, corporate G&A including share-based pay, lease payments, sustaining exploration and capital, production-phase stripping and underground development, current NRV write-downs, and reclamation at operating sites.
- It excludes interest, M&A, impairments, one-off severance, income tax and growth.
- AIC adds non-sustaining items.
- The sustaining vs non-sustaining test: a project is non-sustaining if it raises annual or LOM production, NPV or reserves by ≥ 10% and generates no net cash within 12 months. Pushbacks count as sustaining unless they take ≥ 12 months and the ore phase exceeds 5 years.
- Barrick cites the 2013 definition in its 2026 Circular (FACT, R6 §4.1).
-
Variants are named adjustment layers with reason codes. Examples:
- by-product vs co-product: Newmont's Q3 2026 by-product AISC is $1,454/oz against a co-product AISC of $1,963/oz (FACT, R6 §2.3; the $1,520/oz figure is the full-year guidance, a different basis);
- compensation-adjusted: Barrick's API "actual" of $1,423/oz vs $1,637/oz reported for FY2025, with the adjustment basis not located (FACT, R6 §1.5);
- attributable vs consolidated, through FA party ownership;
- aggregation layers: company AISC = Σ sold-weighted site AISC + L_corp + L_JV. In Barrick's Mine Stats, Total Gold sits $47.6–55.7/oz above its sold-weighted regions in the six blocks Q1, Q2 and H1 2025 and Q1, Q2 and H1 2026 (Q3 2025 is +$88.66; R7-C125), while regions reconcile to 0.1% (INFERENCE, E110, E111). Across all sixteen quarters 2023Q1–2026Q2 the layer is always positive, from +$23.57 to +$88.66/oz, and it roughly doubled from 2024 to 2025–26; the AISC workbooks carry G&A only in their total column: the row is zero for every site and region on all 40 sheets (FACT, E697), so corporate G&A sits wholly in L_corp (E496; W1 §11, §12); NGM sits $8.7–19.4/oz above its four mines (INFERENCE, E112). Each layer is named and cites the Quarter Report reconciliation (E107).
A reported gap that cannot be decomposed into named layers is a refusal (G-BULL-3), not a footnote.
Definition flags on every registered AISC-family metric (C4 P14):
byproduct_credit_location(SeparateLine, InsideSellingCosts, Excluded),includes_inventory_adjustments, andper_oz_denominator(Produced, Sold). Public unit costs are per attributable ounce sold (INFERENCE, E110). Veladero's 2014–2017 AISC carries silver credits inside selling costs and inventory adjustments (FACT, E284), and Porgera's 2011 "$841/oz" is a departmental cost per ounce produced, not AISC (C4 P14). -
AISC is never an objective (§15.6). Its shadow price is published (§23.6).
CostDriverCard (from B3 §5.3). One card per site and cost pool:
- driver: t mined, t·km hauled, t milled, kWh, kg reagent/t, labour hours;
- fixed/variable split;
- rate distribution;
- the FA certificate IDs of the registers it was fitted on;
- valid time;
- colour
Estimated.
Plan cost = Σ driver quantities × rates. Price-linked lines (royalties, profit-sharing, by-product credits) are functions of the same price draw as revenue (§23.4).
The variance waterfall, decomposed exactly and order-independently (DESIGN).
- The bridge components are volume (tonnes), grade, recovery, unit rates by cost line, price-linked items, by-product price, classification and FX.
- A sequential decomposition ("change grade first, then recovery…") is order-dependent: the same grade change gets a different number depending on where it sits in the sequence (GB-26).
- FrankenMining uses the log-mean Divisia index (LMDI) for the multiplicative identity
AISC = C / oz_sold, with oz_sold = T·g·R·B·S, where B = produced / (T·g·R) is the metal-balance and in-circuit
inventory factor and S = sold / produced is the finished-goods inventory factor (both named effects; the
public lane computes them from Mine Stats rows):
- each factor's effect is L(AISC_a, AISC_p)·Δln(factor), with L(x, y) = (x − y)/(ln x − ln y);
- this decomposition is exact (it sums to the total) and independent of order.
- Additive cost lines are split within the cost effect pro rata.
- PO-PUSH-10: the bridge sums exactly to the total variance, to the cent.
- The waterfall's residuals feed the calibration ledger: the plan was a registered forecast (§10).
- On public data the waterfall is a descriptive accounting bridge, not a causal one (B7; E699).
- LMDI needs every factor finite and positive. Heap-leach sites publish no recovery (Veladero, Zaldívar) and some factors are zero or negative, so 26 of 127 gold site-quarter year-on-year pairs cannot be factored. They fall back to a signed additive split of the $M numerator lines, labelled as such, never to a forced factor. By-product credits are zero or positive in 124 of 519 AISC columns, so a credit-value effect is not a price effect.
- Every bar carries the interval implied by the half-unit rounding of its inputs. A bar whose interval contains zero prints sign not determined (72 of 606 factor effects on the public tables).
- Closure is arithmetic, not attribution: a +10% error in North Mara's 2026 grade moves about $177/oz from grade into B while the bridge still sums exactly, so PO-PUSH-10 holds either way. Causal labels wait for M2 and the metallurgical balance (GATE-DATA-03; §20).
- The bridge closes on the recomputed rate 1,000 × Δ($M / koz). The gap to the printed rate is a listed rounding or denominator item (E691, E695), never absorbed into a bar.
Other metrics.
- Copper C1 cash cost per lb (by-product credits netted).
- Cash cost per oz.
- GEO (gold-equivalent ounces), with the price-ratio basis named. Budget ratios vs realized ratios give different answers (GB-27), and GEO is 25% of Barrick's API (FACT, R6 §1.5).
- Newmont CSC/GEO (adjusted cash sustaining cost per GEO, 35% of its bonus; FACT, R6 §2.5).
- Reserve replacement under one registered definition.
- Barrick's FY2025 release and its 2026 Circular give three-year (2023–25) reserve replacement as "close to 190%" in gold ounces and as 504% in gold-equivalent ounces (the published figure; 87 Moz ÷ 17.2 Moz on the rounded inputs gives 506%, 499–514% under rounding; R7-C029), both excluding acquisitions and divestments (FACT, E603, E604): the bases differ by metal coverage, not by window.
- The engine computes every basis and names each.
- A KPI constraint uses only a reconciled definition (§23.6).
- ROCE on the stated capital-employed basis.
The public lane (M0; §31.1, B5). fmine assure public --issuer barrick reproduces published metrics from public
filings (EDGAR/SEDAR+, XBRL where present) and the issuer's quarterly Mine Stats and AISC workbooks:
- TARGET: GATE-BULL-01's three parts (below; §21.8): extraction fidelity, identity accounting with every instance in one of five cited states, and issuer consistency reported per identity family;
- every scored value passes the live-dependency proof: deleting or blanking any registered file refuses with a non-zero exit, and perturbing any cited cell by one unit in its last place moves the value and the state root (BD-338; it would have caught every stand-in in K.2 finding 1);
- byte-identical reruns, with a state root that commits to the input manifest and to every scored value, so any byte change in any input changes the root (R7-C065);
- zero uncited numbers: each extracted number carries its locator and file sha256; each derived number carries its
rule (
rules_version, G-BULL-6) and its input locators; each company-level figure cites the filed page that states it and reproduces that page's label (period or window, basis, metal coverage, denominator, ownership basis). A matching value under a different label fails (R7-C038, R7-C131); - registered inputs only: a pinned source registry lists each workbook with its issuer URL, retrieval time and
sha256 (equal to W1's). An absent, unreadable or mismatched file is a typed refusal that names the file. No
in-code workbook ever stands in for a registered one; synthetic fixtures print
syntheticin every output and never count toward a gate (R7-C034, R7-C037; Appendix K.2).
The FY2026 forecast record (R7-C042, R7-C066, R7-C119, R7-C135, R7-C155; DESIGN). The FY2026 per-site forecasts are a scoreable, externally time-proved record, not a promise:
- Information set. A stated information cut-off and an input manifest (each document, its publication date, its sha256).
- Targets and basis. Per-site production on the 100% basis (Mine Stats column B, E456), with a pre-written rule for re-segmentation, divestment or ownership change; unit costs per ounce sold carry their own basis rule.
- Scored quantity and baselines. The Q4-implied value (FY − published 9M), scored with the interval score
against two pre-registered baselines: Barrick's last stated per-site guidance and a run-rate persistence forecast.
A per-ounce cost is not additive, so FY − 9M is undefined for it: the unit cost is scored on the Q4 value as
printed (QTD). The rules (
forecasts/fy2026/rules.toml: estimator, n_eff range, the named 13-site universe with Hemlo and TongonNOT_PUBLISHED, guidance and basis rules) are hashed and time-proved before any forecast. - Deadline and time proof. Hashed and pushed to the public repository with an RFC 3161 receipt or a completed OpenTimestamps proof by 31 Dec 2026, before any M0 content reaches an issuer insider, and before any January production release (Barrick issued mid-January Q4 releases for 2020–2024; R7-C154). Caller-supplied timestamps do not count (R7-C061). Forecasts hashed after the 9 Nov 2026 Q3 release are mostly a Q4 nowcast (Q4 was 26.8% of FY2025 attributable production; R7-C026) and are labelled so.
- Attestation. The author attests that no non-public issuer information was used (extends §10.1
author); any revision after first issuer contact is flaggedpost-contact. - Further vintages. Q1 and Q2 2027 vintages follow, each with as-of date and horizon; a vintage hashed after its quarter ends is a nowcast and is scored separately (R7-C119). A vintage is issued only while its author holds no private access (§31.1): once the author joins an issuer's insider list, no further vintage is issued, and the frozen ones are only scored.
- What it can show. Every score report gives n, an n_eff with its assumed correlation range, and the Clopper–Pearson interval. One period × about 14 sites demonstrates the protocol, not skill: separating 80% from 60% coverage first needs n ≈ 35 independent outcomes, so no positive calibration claim is made by month 12 (R7-C118). A severe miss can still be reported as evidence of miscalibration.
Public-lane sources and scoring (C1 §4; C3 §3.5).
- Per-site source. The only per-site AISC/TCC/grade/recovery source in the corpus is Barrick's quarterly Mine Stats workbook (xlsx). The corpus held two workbooks (Q1 and Q2 2026; E148). The research pass retrieved all ten quarterly workbooks from Q1 2024 to Q2 2026 from Barrick's public IR host, with their MD&As and, from Q3 2024, the per-site AISC reconciliation workbooks; the Q1/Q2 2026 downloads are byte-identical to the corpus copies, and comparative columns add the 2023 quarters as restated (FACT, E451, E452; W1 §2). Q3 2026 is the only DATA-GATE: Barrick releases it on 9 Nov 2026 (FACT, E454, E455). AISC workbooks were never published for Q1 and Q2 2024 (E499). There is no per-site GEO field; GEO is company-level only, on a named price basis (GB-27).
- Locator and import. A workbook has no filing accession. Each cell cites
<file-period>:<Sheet>!<Cell>+ the file's sha256, plus the filed Quarter Report page that reconciles it (Q1 2026 from p.36, Q2 2026 from p.44; E107). Import is label-anchored, because rows drift between files (CoS moved from row 38 to 40; E121). Footnote markers are stripped, ownership is parsed from labels, the tokens—,n/a, 0 and blank are typed (E119), and#REF!residue and the 15,903-columnYTDrange are excluded (E120). Ten vintages add rules (W1 §13): the region map is versioned by file (Pueblo Viejo moves into North America from Q4 2025, E461), so region aggregates are never compared across that boundary; 2024 copper rows labelled "millions of pounds" hold kt (E463);n/a,—, blank and numeric-zero placeholders in divested or withheld cells are allNilwith the token kept, including the AISC workbooks' zeros for Loulo-Gounkoto 2025 (E497); the column scan is bounded and formula cells are ignored (Q2 2026 holds 1,092#REF!cells, E466); first publication and later comparatives are both kept, because 9 of about 6,400 cells changed without a footnote (E474; W1 T16). - Denominator. Numeric site-quarter cells only;
—,n/aand placeholders are excluded and listed. Site-quarters that areNOT_PUBLISHEDare excluded by name (Loulo-Gounkoto Q1–Q3 2025; E122, E248). - GATE-BULL-01 in three parts (R7-C040, R7-C111; replaces the single "≥ 95% reproduced" bar).
- Extraction fidelity. 100% of the numeric cells in the named denominator N are extracted equal to the published value, with locators, measured against a reference read independent of the importer (a second reader, or BD-271's hand-checked cells). Reported separately for the ten known files and the blind file; every miss is a listed defect.
- Identity accounting, in five states (B7; E691–E698, E815–E818). Every identity instance (attributable = ownership × 100%, Σ components, Q1 + Q2 = H1, sold-weighted roll-up, $M × 1,000 / koz = $/oz for cost of sales, cash costs and AISC) is evaluated on rounding intervals under a construction declared per table family: a subtotal rounded once from unrounded inputs, or a sum of separately rounded component lines. Both are run and the declared one scores; the construction is never chosen per instance to make a check pass. The AISC tables declare the second: 1,207 of 1,212 printed TCC and AISC totals equal the sum of their displayed lines (E815). Cost of sales per ounce has a one-cell numerator, so its failures hold on any construction (E817). Each instance lands in exactly one state: (i) consistent; (ii) explained by a named layer (L_JV, L_corp, unpublished component such as capitalized interest, region-map boundary, restatement), citing the public pages or cells whose printed numbers close the arithmetic, and marked stated where an issuer note gives the rule or reconstructed where only the numbers close (E816); (iii) issuer discrepancy, with an exact certificate checked in rationals and the inclusion-minimal set of cells involved (BD-340); (iv) undecidable from public data, naming the missing fact; (v) refused, naming the missing input. Acceptance: 0 unclassified; an independent census assigns the same state to every instance; a second reader confirms each state-(iii) and state-(iv) item. Classification never stands in for part 1: a swapped-value mutation keeps 0 unclassified and 0 uncited rows while fidelity falls to 0 of 2 (E696). Known answers: Veladero Q4 2025, whose three per-ounce rates imply 44 koz against 47 printed (E691); Africa & Middle East Q1 2025, explained by reconstruction from Loulo-Gounkoto's public cells (E694, E816); Kibali Q2 2024, whose printed by-product sign breaks its own column's footing (E815); Kibali and Hemlo Q4 2025 cost of sales per ounce (E817); the first-filed 2024 GEO row (E692); the 2025 deck and MD&A split (E698).
- Issuer consistency. Reported per identity family as a finding, with no threshold. Barrick's own identities hold in 84/89 cases (94.4%) under strict rounding (E113–E115). The gate record prints N, the excluded placeholders and NOT_PUBLISHED list, and four counts: cells with a passing identity, cells matched by extraction only, explained register cells and refused cells. An independent census on the same files reproduces the counts. Why the single bar was withdrawn: 41–46% of numeric cells sit in no named identity, so for them "reproduced" is extraction fidelity (R7-C023, R7-C050); a perfect extractor scores 90.5–92.4% if a failing identity disqualifies every participating cell and 98.0–99.7% if only the computed cell (R7-C110); and the 84/89 consistency rate it was set against measures a different quantity (R7-C024).
- Component split (BD-058, partial). Mine Stats publish per site CoS, royalties/oz, depreciation/oz, TCC, AISC, sustaining and project capex (cash basis), and cost per tonne. They do not publish G&A $/oz, sustaining leases, minesite exploration, reclamation accretion or by-product credits, so TCC → AISC is only a residual ($5–80/oz "other"). The per-site split needs the Quarter Report reconciliation and stays OPEN.
21.7 Close orchestration and the human-review bottleneck
FA's CloseRun DAG is NOT_STARTED (V07), so FrankenMining orchestrates the mining close in R4 §7.9's order. Each step is a durable obligation with its inputs, its evidence and its reviewer:
- bank reconciliations;
- stockpile and pad surveys;
- metal-balance reconciliation (Touchstone certificate, §20.9);
- inventory valuation and NRV;
- provisional-pricing MTM;
- DD&A and stripping;
- ARO accretion;
- royalties and mining taxes;
- stream deliveries and accretion;
- hedge MTM;
- JV billing and partner reconciliation;
- intercompany matching;
- FX revaluation (
fa revalue); - consolidation (
fa consolidate --certify); - statements and
IssueStatements; - non-GAAP metrics (§21.6).
When FA's CloseRun lands, these become CloseTask vertices with DEPENDS_ON edges.
Why monthly summaries, quantified (B4 card G1, renumbered GB-28).
- Equation. t(n) = a + b·n with a = 0.118 s and b = 1.07 ms per entry already in the book (FACT-derived from the debug-build measurement; linear growth is a HYPOTHESIS).
- Writer time.
- Per-truck posting (30,000 per day) would need about 4.85×10⁵ s of writer time on day one (ρ ≈ 5.6). Infeasible.
- Daily site-family posting fits the writer, at about 29 min/day in year 1.
- Human review.
- Daily site-family posting needs 4 families × 3 books = 12 reviews per site per day. For a site controller with 8 h/month at 10 min/review who reviews only their own site, ρ_review = 12 × 30 × 10 ÷ 480 = 7.5. Infeasible. (Read as 60 reviews per book per day for one reviewer, it is 37.5; R7-C123.)
- Monthly posting needs 12 reviews per site per month: ρ_review ≈ 0.25. If each of B4's 16 close steps per site also needs the same controller, ρ = 1.25 (0.42 with one book). G-BULL-2 needs a non-self-sourced document OR a human review, and §21.7 gives each close step its own reviewer, so the card states the review rule per step.
- Writer time "≈ 29 min/day in year 1" is the end-of-year rate; the year-1 average is about 12–18 min/day.
- Intuition. The binding server is the human reviewer that FA-INV-12 requires, not FA's writer.
- Flip. FA admits an authenticated delegated reviewer (V19) → daily trunk posting becomes possible.
21.8 Guards, proof obligations and gates
| Guard | Condition | Action |
|---|---|---|
| G-BULL-1 | FrankenMining computes or displays a balance as authoritative | Refuse; cite the FA certificate instead |
| G-BULL-2 | A summary entry lacking a non-self-sourced document or a human review | Hold in Prepared; never commit |
| G-BULL-3 | A metric variant gap not decomposable into named layers | Refuse |
| G-BULL-4 | AISC forecast from drivers lacking FA certificates | Watermark "plan-only metric" (G-PUSH-7) |
| G-BULL-5 | Truck-, assay- or shift-level posting attempted | Refuse (§21.3.3) |
| G-BULL-6 | A metric rendered without rules_version and basis |
Refuse |
| PO | Statement | Verification |
|---|---|---|
| PO-PUSH-9 | Plan and actual AISC use the same aisc() and rules_version |
Type-level single function; test |
| PO-PUSH-10 | The plan→actual bridge sums exactly; LMDI effects are order-independent | Property tests over random permutations |
| PO-BULL-1 | Exactly-once posting: at most one live Original per slot (B4 PO-4) | FA-ACC-02/03/12; automaton model check |
| PO-BULL-2 | Bridge idempotency: replaying the outbox after any crash leaves FA unchanged (B4 PO-10) | FA-ACC-12 over 1,000 seeds |
| PO-BULL-3 | Merkle-folded detail rows fold exactly to the summary leg | Property test; FA-ACC-04 |
| PO-BULL-4 | Synthetic FA book: AISC by-product, co-product and comp-adjusted variants reproduced to $0.01/oz from certified rows | GATE-BULL-02 |
| Gate | Threshold (TARGET) | When |
|---|---|---|
| INT-FA-001 | FA-ACC-01…13 all pass at the pinned FA rev | Before any trunk posting (M3) |
| ✖ GATE-BULL-01 (public metric reproduction) | On registered inputs only (§21.6): (1) extraction fidelity 100% of N against an independent reference read; (2) identity accounting with every instance in one of five cited states, confirmed by an independent census (§21.6); (3) issuer consistency reported. Every scored value passes the live-dependency proof (BD-338). Reruns byte-identical with the input manifest in the state root; zero uncited numbers; every company-level figure matches its filed page and label, checked by a person who did not build the output; the FY2026 forecast record hashed with an external time proof (§21.6). The blind-layout clause runs on the Q3 2026 workbook only if the importer's revision was pushed before 06:00 ET on 9 Nov 2026; otherwise on the Q4 2026 workbook at M1 (R7-C041) | M0. Kill if blind-file extraction fidelity is < 80%, or two reviewers from the named pool (§37.3) rate it "nothing new": the public metric engine becomes test fixtures only, and weight shifts to M1 reconciliation and an early M4 (B5) |
| GATE-BULL-02 | Synthetic FA book reproduces all AISC variants to $0.01/oz; the bridge closes exactly | M3 (WP-13, with INT-FA-001; R7-C091, R7-C105) |
| GATE-BULL-03 | Site pilot: per-quarter AISC waterfall from tonnes, grade and recovery to unit cost, reconciled to the site's reported figures, in the site's reporting unit ($/lb at Lumwana; Minestats4!D25). Cost-driver bars (fuel, FX, royalty, sustaining capex) count only with GATE-DATA-03's cost-centre extracts; otherwise one aggregate cost effect is shown and labelled as such (R7-C142) | M2 |
21.9 Galaxy-brain cards (illustrative values)
GB-26 · An exact, order-independent AISC waterfall.
- Identity. AISC = C / oz_sold, oz_sold = T·g·R·B·S (§21.6). In this synthetic example B = S = 1.
- Plan. $800M of cost on 10.0 Mt at 1.728 g/t and 90% recovery = 500,000 oz, so AISC = $1,600/oz.
- Actual.
- 9.9 Mt (−1%), grade −4%, recovery 89%, giving 469,920 oz.
- Cost $820M: royalty +$15M (price-linked), diesel +$10M, labour +$15M, sustaining deferral −$20M.
- AISC = $1,745/oz (+$144.98).
- LMDI effects (sum exactly to +$144.98).
- Grade +$68.23.
- Cost +$41.27, made up of royalty +$30.95, diesel +$20.64, labour +$30.95 and sustaining deferral −$41.27.
- Recovery +$18.68.
- Tonnes +$16.80.
- The order problem. A sequential waterfall assigns grade +$66.67 if grade goes first and +$69.80 if it goes last. The answer depends on the analyst's arbitrary ordering, and LMDI removes that choice.
- Intuition. Two things a CFO should see:
- the "lower grades processed" explanation has an exact, auditable number;
- the sustaining deferral flatters AISC by $41/oz while raising future hazard, which the DecisionCard shows beside it (§23.2).
- Flip. Reclassifying the deferred item as growth under the WGC test would also move it out of AISC. G-BULL-3 requires that move to be a named layer with an attested project classification.
- Public case: the bridge does not close without S. North Mara Q2 2025 → Q2 2026, +$1,285/oz, decomposes exactly into grade +$1,047, cost +$725, recovery +$65, tonnes +$27, metal balance B −$75 and sold/produced S −$504 (INFERENCE, E137). Sold/produced ranges from 0.81 to 1.26 across sites and quarters (E138).
GB-27 · GEO moves when the gold price moves.
- Equation. GEO = Au oz + Cu lb × (P_Cu/P_Au) + Ag oz × (P_Ag/P_Au) + ….
- Substituted. 3,200 koz Au and 440 Mlb Cu at $4.50/lb.
- At $3,000/oz gold: GEO = 3,860 koz, of which copper contributes 660 koz.
- At $4,500/oz gold: GEO = 3,640 koz, of which copper contributes 440 koz.
- Result. GEO falls 220 koz with no physical change. That is 38% of an illustrative threshold-to-maximum pay range of 579 koz.
- Intuition. A "production" KPI with a price-ratio basis is partly a price KPI. The engine renders GEO on budget ratios and realized ratios side by side, and names which one pay uses.
- Flip (met for Barrick). Barrick's 2025 API computes GEO at fixed long-term reserve prices ($1,500/oz Au, $3.25/lb Cu; FACT, E606), so the effect disappears from pay and reappears in the plan-vs-actual bridge as a "ratio basis" layer. The 579 koz pay range above is therefore insulated from the gold price.
Open questions.
- OPEN-BULL-1. Which basis Barrick's compensation-adjusted AISC uses (R6 [UNV]); needed for exact reproduction.
- OPEN-BULL-2. The cause of FA's O(n) per-post growth: a defect or inherent? It decides KILL-1 risk (OPEN-B4-04).
- OPEN-BULL-3. Whether FA will accept a delegated reviewer (V19) to permit finer posting.
- OPEN-BULL-4 (resolved from primary sources, W5). Both figures are three-year (2023–2025), exclude acquisitions and divestments, and divide reserve additions by depletion. 190% is gold ounces (FY2025 release endnote 7; Circular p.41); 504% is gold-equivalent ounces at reserve prices, 87 Moz ÷ 17.2 Moz, with 2024 contributing 79 Moz (Circular p.86) (FACT, E603, E604). The corpus's pooled 3-year GEO figure (506%, 499–514% under rounding; E146) agrees. The 2020–2024 pooled 186% (E145) fits a differently footnoted "close to 190%" and is not the results-release basis. BD-063 reproduces both from the Circular table.