Bind declared and independent records on one key
The joiner collects the operator declaration, the calibrated field measurement and the counterparty or customs manifest under a single national event UUID within a bounded settlement window.
Technology · Layer: engines
How does a deterministic rules engine cross-check independent streams, apply statutory rates and explain every exception without opaque code?
01 · Layer 04 · Reconciliation, rules & digital twins · Heat 2 · Auditor test
A reconciliation and rules engine compares at least two independent data streams on one immutable event key using versioned, human-readable statutory rules, turning raw telemetry into explainable variance cases that any auditor can replay years later.
Controlled field study benchmark when independent reporting binds declarations
Same empirical study where declarations lack independent cross-checking
US IRS benchmark for income streams with little or no third-party reporting
Illustrative engineering acceptance target: identical input stream and rule hash yield identical output
Self-declaration fails when the reporting entity controls the only record of volume, grade, tariff or crossing. Empirical tax research shows evasion near 0.3% when third-party reporting binds the return, versus 37% on unverified self-reported income. A national reconciliation engine brings that third-party discipline to physical commodities, telecom traffic, customs consignments and statutory contributions by pairing declared records against independent measurement or counterparty feeds before any clearance or assessment closes.
The engineering core is strict determinism. Rules are never buried in ad-hoc scripts, mutable database triggers or spreadsheet macros maintained by an individual analyst. Every rate schedule, tolerance band, exemption clause and currency conversion rule is stored as a signed, versioned rule bundle with explicit effective dates. When an event arrives from Layer 03, the engine evaluates it against the exact rule bundle active on the transaction timestamp and writes an immutable evaluation snapshot back to the evidence ledger.
Under a software-first programme launch, the reconciliation engine goes live within the first ninety days using existing operator exports, customs manifests, bank settlement files and port weighbridge logs. Where two streams disagree beyond the statutory tolerance band, the engine opens a numbered exception ticket and routes it to a named public officer rather than blocking compliant trade or guessing a missing figure. Additional field sensors are commissioned later only at choke points where the variance ledger proves persistent discrepancy.
0.3%
When an independent party reports the transaction automatically, evasion stays near zero without intrusive manual inspection of every line item.
Source: Kleven, Knudsen, Kreiner, Pedersen and Saez, Econometrica 79(3) (2011) Open record ↗
37%
Where the taxpayer or operator supplies the sole figure without cross-stream reconciliation, misreporting rises by more than two orders of magnitude.
Source: Kleven, Knudsen, Kreiner, Pedersen and Saez, Econometrica 79(3) (2011) Open record ↗
55%
Across national revenue streams with minimal independent information reporting, net misreporting exceeds half of the true base.
Source: US Internal Revenue Service, Publication 1415 (August 2022) Open record ↗
Standards designed against
Published standards shaping Reconciliation & rules within Reconciliation, rules & digital twins (design basis only, never a certification claim):
02 · Architecture & data model
Inspect the 4 security nodes for Reconciliation & rules or toggle the tabular register, then review canonical custody rules starting with RuleBundleVersion.
Deterministic four-stage reconciliation pipeline from ledger projection to officer exception workbench. Four security zones in sequence: Zone A · Stream joiner (Multi-stream correlation window, Read-only ledger stream); Zone B · Rule registry (Signed statutory rule bundle, Git-signed YAML/JSON + SHA-256); Zone C · Evaluator (Pure deterministic rule engine, Stateless sandboxed worker); Zone D · Case ledger (Exception ticket & replay store, Append-only ledger write).
Control gate: Deterministic join on national lot, declaration or session UUID with explicit missing-leg timeout (Read-only ledger stream)
Control gate: Effective-dated tariff, tolerance and exemption tables approved under dual authority sign-off (Git-signed YAML/JSON + SHA-256)
Control gate: Zero external network calls, pinned decimal arithmetic, full firing trace per clause (Stateless sandboxed worker)
Control gate: Routes variance packs with exact rule clause citations to authorised statutory officers (Append-only ledger write)
| Security zone | Component | Protocol / standard | Control gate | Custody owner |
|---|---|---|---|---|
| Zone A · Stream joiner | Multi-stream correlation window | Read-only ledger stream | Deterministic join on national lot, declaration or session UUID with explicit missing-leg timeout | Reconciliation service |
| Zone B · Rule registry | Signed statutory rule bundle | Git-signed YAML/JSON + SHA-256 | Effective-dated tariff, tolerance and exemption tables approved under dual authority sign-off | Public authority policy desk |
| Zone C · Evaluator | Pure deterministic rule engine | Stateless sandboxed worker | Zero external network calls, pinned decimal arithmetic, full firing trace per clause | Platform engineering |
| Zone D · Case ledger | Exception ticket & replay store | Append-only ledger write | Routes variance packs with exact rule clause citations to authorised statutory officers | Public authority compliance |
Illustrative Source: Tie Wang Layer 04 reference architecture (designed against OpenAPI 3.1, WCO SAFE Framework and EITI Standard 2023)
A defensible rules engine separates three data structures that ordinary enterprise systems collapse together: the immutable input projection, the versioned statutory rule bundle and the derived evaluation snapshot. Every rule clause carries a permanent code, a legal instrument reference, an effective start timestamp, an optional sunset timestamp and a machine-verifiable expression written in a restricted, side-effect-free grammar. Floating-point arithmetic is prohibited for money, mass and volume; every calculation uses fixed-precision decimal scaling defined in the rule header.
When a second corroborating stream fails to arrive before the configured settlement window closes, the engine never invents a proxy value or silently clears the consignment. It emits an explicit UnmatchedStream state with the elapsed wait duration and escalates the lot to the desk responsible for the absent feed. Every historical reassessment stores both the superseded snapshot identifier and the compensating rule or input event, preserving a complete chain from raw reading to statutory demand.
| Data entity | Join / primary key | Immutability control | Retention window | Custodian |
|---|---|---|---|---|
| RuleBundleVersion | rule_bundle_id + bundle_sha256 | Signed before activation; never edited in place | Permanent statutory archive | Authority legal & rules committee |
| CorrelatedEventWindow | national_event_uuid + window_close_utc | Read-only projection from Layer 03 | Concession term plus 10 years (illustrative) | Reconciliation join service |
| RuleEvaluationSnapshot | eval_uuid + bundle_sha256 + event_uuid | Append-only ledger entry | Permanent statutory archive | Evidence ledger core |
| ExceptionCaseTicket | case_uuid + eval_uuid | State transitions appended with officer ID | Statutory limitation period plus 7 years (illustrative) | Authority compliance desk |
| ReplayVerificationProof | audit_run_id + period_range + output_sha256 | Signed auditor attestation record | Permanent audit archive | Independent verifier |
Illustrative Source: Tie Wang Layer 04 canonical schema specification
03 · Operable instrument & performance budget
Run Deterministic reconciliation rule evaluator below to stress-test reconciliation & rules controls live, paired with illustrative reconciliation latency and exception disposition budget.
Operable engineering instrument
ComputedAdjust the declared figure, the independent third-party reading and the secondary drift indicator to watch statutory rules R01 to R03 evaluate and route an exception case in real time.
Source: Live browser deterministic rules model on illustrative custody-transfer tolerances
Illustrative reconciliation latency and exception disposition budget. Illustrative reconciliation latency and exception disposition budget from Automated rule evaluation (SLA) to Independent audit replay window: starts at 0.2 h, ends at 44 h, range 0.2 h to 44 h.
Illustrative allocation of elapsed hours across stream arrival, automated rule evaluation and officer exception closure for a national custody-transfer register.
| Stage or tier | Value (h) | Engineering rationale |
|---|---|---|
| Automated rule evaluation (SLA) | 0.2 | Sub-minute deterministic scoring once both streams land |
| Corroborating stream arrival window | 12 | Allows laboratory, port or roaming partner settlement feeds |
| Desk analyst variance dossier prep | 18 | Attaches raw tickets, certificates and historical operator trend |
| Statutory officer disposition SLA | 36 | Clearance, hold or supplementary assessment signed by officer |
| Independent audit replay window | 44 | Full batch verification of closed period prior to fee release |
Illustrative Source: Tie Wang Layer 04 operational design target (illustrative programme budget)
04 · Operational sequence
Step through Reconciliation & rules from bind declared and independent records on one key to deliver evidence pack to officer and enable full-period replay; the schematic plate updates on every beat.
The joiner collects the operator declaration, the calibrated field measurement and the counterparty or customs manifest under a single national event UUID within a bounded settlement window.
Rather than querying live mutable configuration tables, the evaluator loads the cryptographically signed rule bundle effective on the transaction timestamp, guaranteeing identical behaviour during future replays.
Each rule emits its exact measured input, statutory threshold and pass, warn or fire state. No score is opaque; every firing clause links to the published regulation article and formula.
Exceptions open a structured case file with raw attachments for the public officer. At quarter end, the independent verifier replays the entire period from raw ledger logs to prove zero hidden overrides.
05 · Interfaces, failure modes & honest limits
4 published interface contracts and 4 failure modes for Reconciliation & rules, stating degraded fallbacks and where statutory or field duties begin.
| Interface | Direction | Protocol / schema | Control gate | Degraded / offline mode |
|---|---|---|---|---|
| Ledger event projection feed | Layer 03 → Layer 04 | Read-only gRPC / Kafka log compaction disabled | Sequence continuity check + SHA-256 envelope verification | Consumer pauses on hash mismatch and raises Sev-1 integrity alert |
| Statutory rule governance API | Policy portal → Rule registry | OpenAPI 3.1 + WebAuthn dual approval | Regression test suite against golden historical corpus before activation | Previous signed rule bundle remains active until dual approval completes |
| Exception case dispatch | Layer 04 → Layer 05 | Signed JSON case bundle over mTLS | Mandatory clause trace and raw object digest attached to every ticket | Cases queue durably in ledger; priority alerts escalate via command desk |
| Independent auditor replay CLI | Layer 03 + Rule registry → Auditor sandbox | Deterministic container image + signed input export | Output digest comparison against production period summary hash | Offline air-gapped replay supported from quarterly ledger snapshot |
Illustrative Source: Tie Wang Layer 04 interface control document
| Failure mode | Operational symptom | Engineering containment | Honest limit |
|---|---|---|---|
| Rule drift between statute and production code | Gazetted tariff or royalty change is applied late or inconsistently across sites | Effective-dated signed rule bundles linked to legal instrument references with pre-launch golden regression tests | Engine cannot interpret ambiguous draft decrees until legal text is codified into explicit parameters |
| Alert flooding from miscalibrated tolerances | Officers face thousands of trivial penny variances and begin rubber-stamping closures | Separate warning bands from statutory exception thresholds using empirical measurement uncertainty budgets | Setting tolerance bands too wide to cut workload masks systematic small-percentage skimming |
| Silent join failure on mismatched identifiers | Declared and measured streams fail to match and sit unreviewed in separate tables | Strict reconciliation-window timers turn every orphaned record into a dated exception after window close | Upstream legacy registries with duplicate taxpayer or vessel IDs require master-data cleansing first |
| Retroactive rule tampering | A modified rule is back-dated to reduce an operator assessment after a dispute starts | Append-only rule registry with RFC 3161 publication timestamps; historical replays lock original bundle hashes | Legal back-dating ordered by parliament requires an explicit compensating reassessment event rather than overwrite |
Illustrative Source: Tie Wang engineering hazard and failure-mode register
A reconciliation engine can only be as truthful as the independence of its two inputs. If both streams originate from the same uncalibrated operator database under different file names, the engine will report a 0.00% variance while physical leakage continues unchecked. Every deployment therefore documents an independence matrix verifying that at least one feed sits outside the declaring party control boundary.
Deterministic rules also cannot resolve disputed physical custody by themselves. When a rule fires on a gold bar assay gap or a fuel gantry shortage, software produces the evidentiary dossier and locks the clearance workflow, while statutory enforcement, physical sampling and reassessment remain exclusively with public officers.
06 · Action by audience
Follow how Reconciliation & rules inside Reconciliation, rules & digital twins connects to adjacent stack layers, illustrative structures and working instruments.
Authority
Approve statutory rule bundles under dual sign-off and review only evidence-backed exception packs rather than every compliant transaction.
Lender
Inspect deterministic replay proofs and exception-closure SLAs to verify that service-fee calculations cannot be disputed at audit.
Operator
Test declarations against published OpenAPI validation schemas before submission so compliant trade clears automatically.
Partner
Start national reconciliation in ninety days on existing agency feeds before financing site-by-site hardware upgrades.