{
  "schema_version": "1.0.0",
  "method_id": "dn-restatement-reconciliation-v1",
  "method_version": "1.0.0",
  "tool_id": "N009",
  "commission_namespace": "accepted-2027-continuation",
  "wordpress_post_id": 45243,
  "canonical_url": "https://decentralised.news/restated-financial-statements-margin-reconciliation-2027",
  "source_review_date": "2026-12-03",
  "historical_draft_review_date": "2026-11-29",
  "source_register_sha256": "bfc4a09fe4f5188f0bcf455cf80870ce45b6d14391e611e72135102fea6b4e61",
  "source_code": {
    "file": "calculator.js",
    "repository_path": "utils/dnContinuationRestatements.js",
    "sha256": "8611e2a20b658a6c6d493c35c00eaffcc2994b5cbc65c8dd85680e63eb3ed06c",
    "relationship": "Byte-identical production pure calculation core; not the independent oracle."
  },
  "formulas": {
    "revenue_residual": "revisedRevenue - originalRevenue - revenueAdjustment",
    "cost_residual": "revisedCost - originalCost - costAdjustment",
    "gross_profit": "revenue - cost",
    "gross_margin": "gross_profit / revenue when revenue != 0, otherwise null",
    "margin_percent": "100 * exact_margin_ratio, rounded once",
    "original_first_to_last_pp": "100 * (last_original_ratio - first_original_ratio), rounded once",
    "revised_first_to_last_pp": "100 * (last_revised_ratio - first_revised_ratio), rounded once",
    "mixed_original_first_to_revised_last_pp": "100 * (last_revised_ratio - first_original_ratio), rounded once; diagnostic only"
  },
  "rounding": {
    "places": 6,
    "mode": "half_away_from_zero",
    "basis": "unrounded exact ratios before one final rounding",
    "output": "normalized decimal strings, no trailing fractional zeroes or negative zero"
  },
  "input_contract": {
    "required_controls": [
      "rows",
      "unit",
      "basisConfirmed"
    ],
    "optional_controls": [
      "originalSource",
      "adjustmentSource",
      "revisedSource"
    ],
    "extra_controls": "refused",
    "rows_type": "JSON string containing 1..10 flat eight-field objects",
    "maximum_rows_utf8_bytes": 20000,
    "row_fields": [
      "periodStart",
      "periodEnd",
      "originalRevenue",
      "originalCost",
      "revenueAdjustment",
      "costAdjustment",
      "revisedRevenue",
      "revisedCost"
    ],
    "row_field_types": "all strings; duplicate decoded JSON keys, missing keys and extra keys refused",
    "dates": "real YYYY-MM-DD in 1900..2200; inclusive intervals supplied in strictly ordered, nonoverlapping order; no silent sorting; gaps and nonannual intervals are allowed declarations",
    "money": "optional +/- plain decimal strings, no leading zeroes except zero, maximum six fractional places, absolute input <=1000000000000; original/revised amounts nonnegative; adjustments may be signed",
    "zero_and_missing": "explicit zero accepted; missing, blank, null, nonfinite and numeric-not-string values refused",
    "unit": "nonblank <=80 UTF-16 code units, no control characters",
    "basisConfirmed": "exact string yes; a supplied declaration, not certification",
    "references": "optional text <=1024 UTF-16 code units, no control characters; absent/blank identifiers export null; caller strings never fetched or executed"
  },
  "bounds": {
    "absolute_input": "1000000000000",
    "absolute_residual": "2000000000000",
    "absolute_gross_profit": "1000000000000",
    "minimum_positive_revenue": "0.000001",
    "minimum_margin_percent": "-99999999999999999900",
    "maximum_margin_percent": "100",
    "absolute_percentage_point_movement": "100000000000000000000"
  },
  "null_semantics": {
    "zero_revenue": "margin and ratio null; amounts/residuals retained",
    "one_row": "all three movements null",
    "zero_endpoint": "each movement requiring that endpoint null",
    "unresolved_fields": [
      "accounting_correctness",
      "source_authentication",
      "source_revision_compatibility",
      "period_comparability",
      "historical_availability",
      "amendment_chain_completeness"
    ]
  },
  "clearing_policy": "Every revenue and cost residual must independently equal zero. No tolerance, cancellation between lines or balancing entry. Nonzero residuals remain a valid, inspectable result with reconciled=false.",
  "evidence_boundary": "Fixed original/Amendment No. 2 pair; amounts disclosed, revenue zero adjustments derived, all nondefault cases synthetic. No latest-filing, full amendment-chain, source-authentication, historical-eligibility or accounting-audit claim.",
  "authored_cases": {
    "total": 117,
    "accepted": 34,
    "rejected": 83
  },
  "authored_known_answer_values": 105,
  "arithmetic_matrix": {
    "case_count": 144,
    "design": "Six exact monetary magnitudes crossed as revenue/cost under four version/adjustment patterns; two ordered periods, including intentional line residuals."
  },
  "independent_oracle": {
    "file": "oracle.py",
    "money": "Python Decimal",
    "ratios": "Python Fraction; exact signed rational arithmetic",
    "rounding": "floor(abs(exact percentage)*10^6 + 1/2), restored sign",
    "dates": "Python datetime.date calendar validation",
    "does_not_import_or_invoke_javascript": true
  },
  "reproduce_commands": [
    "python3 reproduce.py",
    "python3 reproduce.py --check-zip",
    "node run-calculator.mjs inputs.json",
    "python3 oracle.py inputs.json"
  ],
  "network_requests_during_reproduction": 0,
  "publication_at_utc": null,
  "live_verification_at_utc": null,
  "rights": {
    "dn_original_compilation_and_synthetic_examples": "CC BY 4.0",
    "license_url": "https://creativecommons.org/licenses/by/4.0/",
    "third_party_sources": "Retain their own rights; full reports are not redistributed.",
    "hash_limit": "Byte identity with supplied records, not cryptographic authentication or financial truth."
  }
}
