{
  "version": "1.0.0",
  "measured_at_utc": "2026-10-12T10:36:19.583Z",
  "completed_at_utc": "2026-10-12T10:36:20.080Z",
  "node_version": "v24.19.0",
  "scope": "Pinned actual module functions exercised in Node/WebCrypto with fictional records; no browser UI, localStorage, real wallet, exchange account, cloud or recovery-secret test.",
  "source_manifest_sha256": "22b0563855f5a987fcfe8c2b3d7abc776112eb0667bb94a6ec49314c95222021",
  "fixture_original": {
    "version": 4,
    "accounts": [
      {
        "id": "main",
        "name": "Exchange records"
      },
      {
        "id": "cold",
        "name": "Offline wallet"
      },
      {
        "id": "unused",
        "name": "Unused account"
      }
    ],
    "transactions": [
      {
        "id": "fixture-fill-a",
        "type": "buy",
        "amount": 0.75,
        "price": 96,
        "fee": 0.6,
        "date": "2026-09-28",
        "notes": "Two distinct fictional fills",
        "currency": "USD",
        "fx": {
          "USD": 1,
          "EUR": 0.92,
          "GBP": 0.78,
          "PLN": 3.95
        },
        "fxDate": "2026-09-28",
        "fxSource": "Manual",
        "accountId": "main",
        "toAccountId": null,
        "networkFee": 0,
        "valuationPrice": 96
      },
      {
        "id": "fixture-fill-b",
        "type": "buy",
        "amount": 0.75,
        "price": 96,
        "fee": 0.6,
        "date": "2026-09-28",
        "notes": "Two distinct fictional fills",
        "currency": "USD",
        "fx": {
          "USD": 1,
          "EUR": 0.92,
          "GBP": 0.78,
          "PLN": 3.95
        },
        "fxDate": "2026-09-28",
        "fxSource": "Manual",
        "accountId": "main",
        "toAccountId": null,
        "networkFee": 0,
        "valuationPrice": 96
      },
      {
        "id": "fixture-transfer",
        "type": "transfer",
        "amount": 0.4,
        "price": 0,
        "fee": 0,
        "date": "2026-09-29",
        "notes": "Fictional internal transfer",
        "accountId": "main",
        "toAccountId": "cold",
        "networkFee": 0.0001,
        "currency": "USD",
        "fx": {
          "USD": 1
        },
        "fxDate": null,
        "fxSource": "USD only",
        "valuationPrice": null
      },
      {
        "id": "fixture-sale",
        "type": "sell",
        "amount": 0.2,
        "price": 120,
        "fee": 0.25,
        "date": "2026-09-30",
        "notes": "Fictional partial sale",
        "currency": "USD",
        "fx": {
          "USD": 1,
          "EUR": 0.91,
          "GBP": 0.79,
          "PLN": 4.02
        },
        "fxDate": "2026-09-30",
        "fxSource": "Manual",
        "accountId": "main",
        "toAccountId": null,
        "networkFee": 0,
        "valuationPrice": 112
      }
    ],
    "reconciliations": [
      {
        "accountId": "main",
        "date": "2026-09-30",
        "amount": 0.9
      },
      {
        "accountId": "cold",
        "date": "2026-09-30",
        "amount": 0.4
      }
    ]
  },
  "summary": {
    "total_ltc": "1.29990000",
    "main_ltc": "0.89990000",
    "cold_ltc": "0.40000000",
    "purchase_cost_usd": "145.20000000",
    "net_sale_usd": "23.75000000",
    "network_basis_usd": "0.00968000",
    "remaining_basis_usd": "125.83032000",
    "ending_price_usd": "110",
    "ending_value_usd": "142.98900000",
    "total_economic_result_usd": "21.53900000"
  },
  "module_summary": {
    "amount": 1.2999,
    "basis": 125.83031999999999,
    "average": 96.79999999999998,
    "realized": 4.390000000000004,
    "unrealized": 17.158680000000018,
    "value": 142.989,
    "total": 21.539000000000023,
    "fees": 1.45,
    "networkLtc": 0.0001,
    "networkBasis": 0.00968,
    "purchases": 145.2,
    "proceeds": 23.75,
    "history": [
      {
        "id": "fixture-fill-a",
        "type": "buy",
        "amount": 0.75,
        "price": 96,
        "fee": 0.6,
        "date": "2026-09-28",
        "notes": "Two distinct fictional fills",
        "currency": "USD",
        "fx": {
          "USD": 1,
          "EUR": 0.92,
          "GBP": 0.78,
          "PLN": 3.95
        },
        "fxDate": "2026-09-28",
        "fxSource": "Manual",
        "accountId": "main",
        "toAccountId": null,
        "networkFee": 0,
        "valuationPrice": 96,
        "order": 0,
        "beforeAmount": 0,
        "balance": 0.75,
        "netCash": -72.6,
        "realized": null,
        "costBasis": 0,
        "networkExpense": 0,
        "accountBalance": 0.75
      },
      {
        "id": "fixture-fill-b",
        "type": "buy",
        "amount": 0.75,
        "price": 96,
        "fee": 0.6,
        "date": "2026-09-28",
        "notes": "Two distinct fictional fills",
        "currency": "USD",
        "fx": {
          "USD": 1,
          "EUR": 0.92,
          "GBP": 0.78,
          "PLN": 3.95
        },
        "fxDate": "2026-09-28",
        "fxSource": "Manual",
        "accountId": "main",
        "toAccountId": null,
        "networkFee": 0,
        "valuationPrice": 96,
        "order": 1,
        "beforeAmount": 0.75,
        "balance": 1.5,
        "netCash": -72.6,
        "realized": null,
        "costBasis": 0,
        "networkExpense": 0,
        "accountBalance": 1.5
      },
      {
        "id": "fixture-transfer",
        "type": "transfer",
        "amount": 0.4,
        "price": 0,
        "fee": 0,
        "date": "2026-09-29",
        "notes": "Fictional internal transfer",
        "accountId": "main",
        "toAccountId": "cold",
        "networkFee": 0.0001,
        "currency": "USD",
        "fx": {
          "USD": 1
        },
        "fxDate": null,
        "fxSource": "USD only",
        "valuationPrice": null,
        "order": 2,
        "beforeAmount": 1.5,
        "balance": 1.4999,
        "netCash": 0,
        "realized": null,
        "costBasis": 0,
        "networkExpense": 0.00968,
        "accountBalance": 1.0999
      },
      {
        "id": "fixture-sale",
        "type": "sell",
        "amount": 0.2,
        "price": 120,
        "fee": 0.25,
        "date": "2026-09-30",
        "notes": "Fictional partial sale",
        "currency": "USD",
        "fx": {
          "USD": 1,
          "EUR": 0.91,
          "GBP": 0.79,
          "PLN": 4.02
        },
        "fxDate": "2026-09-30",
        "fxSource": "Manual",
        "accountId": "main",
        "toAccountId": null,
        "networkFee": 0,
        "valuationPrice": 112,
        "order": 3,
        "beforeAmount": 1.4999,
        "balance": 1.2999,
        "netCash": 23.75,
        "realized": 4.390000000000004,
        "costBasis": 19.359999999999996,
        "networkExpense": 0,
        "accountBalance": 0.8999
      }
    ],
    "accounts": [
      {
        "id": "main",
        "name": "Exchange records",
        "amount": 0.8999,
        "value": 98.989
      },
      {
        "id": "cold",
        "name": "Offline wallet",
        "amount": 0.4,
        "value": 44
      },
      {
        "id": "unused",
        "name": "Unused account",
        "amount": 0,
        "value": 0
      }
    ]
  },
  "reconciliation": [
    {
      "accountId": "main",
      "date": "2026-09-30",
      "amount": 0.9,
      "name": "Exchange records",
      "expected": 0.8999,
      "difference": 0.0001
    },
    {
      "accountId": "cold",
      "date": "2026-09-30",
      "amount": 0.4,
      "name": "Offline wallet",
      "expected": 0.4,
      "difference": 0
    }
  ],
  "cases": [
    {
      "id": "C01",
      "label": "Original fictional ledger",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": null,
      "duplicates": null,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": ""
    },
    {
      "id": "C02",
      "label": "JSON parsed",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": null,
      "duplicates": null,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": "All three accounts and both balance checks preserved."
    },
    {
      "id": "C03",
      "label": "JSON merged into empty portfolio",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": 4,
      "duplicates": 0,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": "Default Main account renamed by the fresh import special case."
    },
    {
      "id": "C04",
      "label": "Same JSON imported again",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": 0,
      "duplicates": 4,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": ""
    },
    {
      "id": "C05",
      "label": "JSON merged with one existing purchase",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": 3,
      "duplicates": 1,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": ""
    },
    {
      "id": "C06",
      "label": "Same ID with changed quantity",
      "outcome": "rejected",
      "message": "An imported transaction identifier conflicts with an existing record."
    },
    {
      "id": "C07",
      "label": "Merge keeps existing account name and check",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": 0,
      "duplicates": 4,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": "Existing main check 2026-09-29 retained; imported check 2026-09-30 did not replace it."
    },
    {
      "id": "C08",
      "label": "Merge retains existing FX and valuation",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": 0,
      "duplicates": 4,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": "Imported first-buy EUR/USD input 0.95 and valuation 97 were not applied."
    },
    {
      "id": "C09",
      "label": "CSV parsed",
      "transactions": 4,
      "accounts": 2,
      "balance_checks": 0,
      "added": null,
      "duplicates": null,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": "Only two used accounts reconstructed; unused account and saved balance checks absent."
    },
    {
      "id": "C10",
      "label": "CSV merged into empty portfolio",
      "transactions": 4,
      "accounts": 2,
      "balance_checks": 0,
      "added": 4,
      "duplicates": 0,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": ""
    },
    {
      "id": "C11",
      "label": "Encrypted JSON decrypted and restored",
      "transactions": 4,
      "accounts": 3,
      "balance_checks": 2,
      "added": 4,
      "duplicates": 0,
      "total_ltc": 1.2999,
      "main_ltc": 0.8999,
      "cold_ltc": 0.4,
      "note": ""
    },
    {
      "id": "C12",
      "label": "Wrong backup password",
      "outcome": "rejected",
      "message": "Cannot decrypt: wrong password or a damaged backup. Nothing was imported."
    },
    {
      "id": "C13",
      "label": "One ciphertext byte changed",
      "outcome": "rejected",
      "message": "Cannot decrypt: wrong password or a damaged backup. Nothing was imported."
    }
  ],
  "assertions_passed": 60,
  "assertions": [
    {
      "name": "Pinned source hash portfolio-ledger.js",
      "passed": true,
      "details": ""
    },
    {
      "name": "Pinned source hash tools-core.js",
      "passed": true,
      "details": ""
    },
    {
      "name": "Pinned source hash portfolio-fx.js",
      "passed": true,
      "details": ""
    },
    {
      "name": "Pinned source hash portfolio-io.js",
      "passed": true,
      "details": ""
    },
    {
      "name": "Pinned source hash portfolio-backup.js",
      "passed": true,
      "details": ""
    },
    {
      "name": "Pinned source hash portfolio-crypto.js",
      "passed": true,
      "details": ""
    },
    {
      "name": "Two distinct identical purchase records retained",
      "passed": true,
      "details": ""
    },
    {
      "name": "Independent integer quantity sum",
      "passed": true,
      "details": ""
    },
    {
      "name": "Independent account quantities add to total",
      "passed": true,
      "details": ""
    },
    {
      "name": "Module total agrees with integer litoshis",
      "passed": true,
      "details": "expected 1.29990000, module 1.2999"
    },
    {
      "name": "Module source account agrees with integer litoshis",
      "passed": true,
      "details": "expected 0.89990000, module 0.8999"
    },
    {
      "name": "Module destination account agrees with integer litoshis",
      "passed": true,
      "details": "expected 0.40000000, module 0.4"
    },
    {
      "name": "Independent cash purchase costs",
      "passed": true,
      "details": "expected 145.20000000, module 145.2"
    },
    {
      "name": "Independent pooled network cost",
      "passed": true,
      "details": "expected 0.00968000, module 0.00968"
    },
    {
      "name": "Independent partial-sale released basis",
      "passed": true,
      "details": "expected 19.36000000, module 19.359999999999996"
    },
    {
      "name": "Independent remaining basis",
      "passed": true,
      "details": "expected 125.83032000, module 125.83031999999999"
    },
    {
      "name": "Independent net sale proceeds",
      "passed": true,
      "details": "expected 23.75000000, module 23.75"
    },
    {
      "name": "Independent ending value",
      "passed": true,
      "details": "expected 142.98900000, module 142.989"
    },
    {
      "name": "Independent total economic result",
      "passed": true,
      "details": "expected 21.53900000, module 21.539000000000023"
    },
    {
      "name": "Main saved check difference",
      "passed": true,
      "details": "expected 0.00010000, module 0.0001"
    },
    {
      "name": "Wallet saved check difference",
      "passed": true,
      "details": "expected 0.00000000, module 0"
    },
    {
      "name": "JSON export is version 4",
      "passed": true,
      "details": ""
    },
    {
      "name": "JSON parse restores complete normalized state",
      "passed": true,
      "details": ""
    },
    {
      "name": "Fresh JSON restore complete equality",
      "passed": true,
      "details": ""
    },
    {
      "name": "Fresh import adds all four records",
      "passed": true,
      "details": ""
    },
    {
      "name": "Repeat import adds zero and skips four",
      "passed": true,
      "details": ""
    },
    {
      "name": "Repeat import leaves complete state unchanged",
      "passed": true,
      "details": ""
    },
    {
      "name": "Partial import adds three and skips one",
      "passed": true,
      "details": ""
    },
    {
      "name": "Partial import preserves two separate fills",
      "passed": true,
      "details": ""
    },
    {
      "name": "Partial result equals full normalized snapshot",
      "passed": true,
      "details": ""
    },
    {
      "name": "Changed quantity with same ID rejected",
      "passed": true,
      "details": "An imported transaction identifier conflicts with an existing record."
    },
    {
      "name": "Rejected import did not mutate input",
      "passed": true,
      "details": ""
    },
    {
      "name": "Existing account name retained on merge",
      "passed": true,
      "details": ""
    },
    {
      "name": "Existing balance check retained despite newer imported date",
      "passed": true,
      "details": ""
    },
    {
      "name": "Missing second-account balance check added",
      "passed": true,
      "details": ""
    },
    {
      "name": "FX-only and valuation-only differences do not replace existing transaction",
      "passed": true,
      "details": ""
    },
    {
      "name": "Metadata-only changed record counted as duplicate",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV restores all transaction fields",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV restores only two used account names",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV has no saved balance checks",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV omits unused account",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV keeps same total LTC",
      "passed": true,
      "details": "expected 1.29990000, module 1.2999"
    },
    {
      "name": "CSV fresh import adds four",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV repeated onto JSON state skips four",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV merge does not erase existing unused account/checks",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV protects tested formula-leading note",
      "passed": true,
      "details": ""
    },
    {
      "name": "CSV quoted multiline note round-trips",
      "passed": true,
      "details": ""
    },
    {
      "name": "Encryption envelope version",
      "passed": true,
      "details": ""
    },
    {
      "name": "Encryption algorithms and work factor",
      "passed": true,
      "details": ""
    },
    {
      "name": "Salt and nonce lengths",
      "passed": true,
      "details": ""
    },
    {
      "name": "Decrypted plaintext exactly equals original export",
      "passed": true,
      "details": ""
    },
    {
      "name": "Encrypted restore full-state equality",
      "passed": true,
      "details": ""
    },
    {
      "name": "Wrong test password rejected",
      "passed": true,
      "details": "Cannot decrypt: wrong password or a damaged backup. Nothing was imported."
    },
    {
      "name": "One changed ciphertext byte rejected",
      "passed": true,
      "details": "Cannot decrypt: wrong password or a damaged backup. Nothing was imported."
    },
    {
      "name": "Changed nonce rejected",
      "passed": true,
      "details": "Cannot decrypt: wrong password or a damaged backup. Nothing was imported."
    },
    {
      "name": "Short password rejected",
      "passed": true,
      "details": "Use a password of 12–1,024 characters. It is not stored and cannot be recovered here."
    },
    {
      "name": "Second encryption uses different salt and nonce",
      "passed": true,
      "details": ""
    },
    {
      "name": "Second encrypted file differs",
      "passed": true,
      "details": ""
    },
    {
      "name": "Unsupported envelope work factor rejected",
      "passed": true,
      "details": "Unsupported encrypted backup version."
    },
    {
      "name": "All tests leave original fixture unchanged",
      "passed": true,
      "details": ""
    }
  ],
  "encrypted_fixture_notice": "Only fictional public data. Test password is fictional-backup-test-only and must never be reused for a real backup."
}
