{
  "schemaVersion": 1,
  "generatedAt": "2026-08-22T14:40:24.884Z",
  "status": "source-runtime-evidence",
  "testedSubject": {
    "project": "Posnic POS",
    "projectVersion": "1.4.0",
    "channel": "source",
    "packagedRelease": false,
    "commit": "5803f200636c777eef77e2e5e1fe31fb86b38fd5",
    "worktreeClean": true,
    "files": [
      {
        "role": "shared-csv-parser",
        "name": "import-csv-parser.js",
        "bytes": 4730,
        "sha256": "6787d8f5511002d207e75a57c0b2bc617a28f8aae121799ab093823768723ffd"
      },
      {
        "role": "item-repository",
        "name": "item.repository.js",
        "bytes": 191629,
        "sha256": "d25f93d79d4244109a1eeff4dba555eaafc41aff32e2218c2fd7186d822e33a9"
      },
      {
        "role": "evidence-runner",
        "name": "capture-item-import-runtime-evidence.js",
        "bytes": 30004,
        "sha256": "6b8e387616ff3f0016757455c906f07ad0324a48317c6fd9e0d7398aa57b0e0b"
      },
      {
        "role": "mongod-executable",
        "name": "mongod.exe",
        "bytes": 63694848,
        "sha256": "919ce2ee9893ffcac72e95610f543beacce721a7c226867568856ca0754d49d8"
      }
    ]
  },
  "environment": {
    "platform": "win32",
    "architecture": "x64",
    "osRelease": "10.0.26200",
    "nodeVersion": "v24.19.0",
    "cpuModel": "AMD Ryzen 9 5900HX with Radeon Graphics",
    "logicalProcessors": 16,
    "totalMemoryBytes": 33720791040,
    "mongodbVersion": "7.0.14",
    "databaseBinding": "127.0.0.1",
    "ephemeralPort": true,
    "isolatedGeneratedDatabase": true
  },
  "method": {
    "requestedScaleRows": [
      100,
      1000,
      10000
    ],
    "sharedBrowserParserExercised": true,
    "exactItemHeadersExercised": true,
    "browserFileReaderExercised": false,
    "browserAliasMappingExercised": false,
    "HTTPControllerExercised": false,
    "itemRepositoryExercised": true,
    "realMongoDBExercised": true,
    "customerDataUsed": false,
    "databaseNamePublished": false,
    "loopbackPortPublished": false,
    "oneCleanDatabasePerCase": true,
    "totalRunnerMs": 18527.773
  },
  "cases": [
    {
      "case": "clean-scale-import",
      "submittedRows": 100,
      "fixture": {
        "format": "UTF-8 CSV with BOM and CRLF records",
        "bytes": 14718,
        "sha256": "f7e657700c4bafe864ae7cc4dc6ee85e75b62f7e264c5c17088ac2f928ba5c2d",
        "parsedRows": 100
      },
      "stages": {
        "sharedParserMs": 1.193,
        "repositoryAndDatabaseMs": 281.397,
        "reconciliationMs": 7.868
      },
      "processMemory": {
        "rssBeforeBytes": 99741696,
        "peakRssBytes": 124985344,
        "peakRssIncreaseBytes": 25243648,
        "scope": "Node evidence runner only; excludes mongod and OS file cache"
      },
      "result": {
        "status": true,
        "message": "Import complete: 100 added",
        "returnedRows": 100
      },
      "persisted": {
        "items": 100,
        "suppliers": 1,
        "categories": 8,
        "grouptax": 1,
        "unit": 2,
        "price_history": 0
      },
      "checks": {
        "persistedItemCountMatchesSubmitted": true,
        "distinctItemIdsMatchSubmitted": true,
        "leadingZeroItemIdPreserved": true,
        "leadingZeroBarcodePreserved": true,
        "quotedCommaAndQuotePreserved": true,
        "quotedMultilineFieldPreserved": true,
        "unicodePreserved": true,
        "zeroQuantityPreserved": true
      },
      "databaseSnapshot": {
        "residentMemoryBytes": 121634816,
        "dataSizeBytes": 116154,
        "storageSizeBytes": 20480,
        "indexSizeBytes": 20480
      }
    },
    {
      "case": "clean-scale-import",
      "submittedRows": 1000,
      "fixture": {
        "format": "UTF-8 CSV with BOM and CRLF records",
        "bytes": 146259,
        "sha256": "faf04173df90cf765ed51875f500cc13513819189227450c413d9556ff82f252",
        "parsedRows": 1000
      },
      "stages": {
        "sharedParserMs": 4.596,
        "repositoryAndDatabaseMs": 1771.779,
        "reconciliationMs": 6.753
      },
      "processMemory": {
        "rssBeforeBytes": 125206528,
        "peakRssBytes": 146325504,
        "peakRssIncreaseBytes": 21118976,
        "scope": "Node evidence runner only; excludes mongod and OS file cache"
      },
      "result": {
        "status": true,
        "message": "Import complete: 1000 added",
        "returnedRows": 1000
      },
      "persisted": {
        "items": 1000,
        "suppliers": 1,
        "categories": 8,
        "grouptax": 1,
        "unit": 2,
        "price_history": 0
      },
      "checks": {
        "persistedItemCountMatchesSubmitted": true,
        "distinctItemIdsMatchSubmitted": true,
        "leadingZeroItemIdPreserved": true,
        "leadingZeroBarcodePreserved": true,
        "quotedCommaAndQuotePreserved": true,
        "quotedMultilineFieldPreserved": true,
        "unicodePreserved": true,
        "zeroQuantityPreserved": true
      },
      "databaseSnapshot": {
        "residentMemoryBytes": 130023424,
        "dataSizeBytes": 1121724,
        "storageSizeBytes": 20480,
        "indexSizeBytes": 20480
      }
    },
    {
      "case": "clean-scale-import",
      "submittedRows": 10000,
      "fixture": {
        "format": "UTF-8 CSV with BOM and CRLF records",
        "bytes": 1470601,
        "sha256": "8d817e7cd0869a8dc8f7a831c4aba17dd2fd6a04959bec47211020c54842bc90",
        "parsedRows": 10000
      },
      "stages": {
        "sharedParserMs": 32.916,
        "repositoryAndDatabaseMs": 15269.858,
        "reconciliationMs": 19.661
      },
      "processMemory": {
        "rssBeforeBytes": 173793280,
        "peakRssBytes": 442777600,
        "peakRssIncreaseBytes": 268984320,
        "scope": "Node evidence runner only; excludes mongod and OS file cache"
      },
      "result": {
        "status": true,
        "message": "Import complete: 10000 added",
        "returnedRows": 10000
      },
      "persisted": {
        "items": 10000,
        "suppliers": 1,
        "categories": 8,
        "grouptax": 1,
        "unit": 2,
        "price_history": 0
      },
      "checks": {
        "persistedItemCountMatchesSubmitted": true,
        "distinctItemIdsMatchSubmitted": true,
        "leadingZeroItemIdPreserved": true,
        "leadingZeroBarcodePreserved": true,
        "quotedCommaAndQuotePreserved": true,
        "quotedMultilineFieldPreserved": true,
        "unicodePreserved": true,
        "zeroQuantityPreserved": true
      },
      "databaseSnapshot": {
        "residentMemoryBytes": 149946368,
        "dataSizeBytes": 11177400,
        "storageSizeBytes": 20480,
        "indexSizeBytes": 20480
      }
    },
    {
      "case": "plan-limit-rejection",
      "submittedRows": 3,
      "allowedRows": 2,
      "durationMs": 0.07,
      "status": false,
      "message": "This plan allows up to 2 item rows in one import; 3 were submitted. No rows were imported.",
      "before": {
        "items": 0,
        "suppliers": 0,
        "categories": 0,
        "grouptax": 0,
        "unit": 0,
        "price_history": 0
      },
      "after": {
        "items": 0,
        "suppliers": 0,
        "categories": 0,
        "grouptax": 0,
        "unit": 0,
        "price_history": 0
      },
      "zeroWrites": true
    },
    {
      "case": "duplicate-key-rejection",
      "submittedRows": 3,
      "duplicateRows": 1,
      "durationMs": 0.071,
      "status": false,
      "message": "CSV contains 1 duplicate item row with the same name and item ID. No rows were imported.",
      "duplicateDetails": [
        {
          "row": 4,
          "firstRow": 2,
          "name": "Cafe, \"East\"",
          "itemid": "00000001"
        }
      ],
      "before": {
        "items": 0,
        "suppliers": 0,
        "categories": 0,
        "grouptax": 0,
        "unit": 0,
        "price_history": 0
      },
      "after": {
        "items": 0,
        "suppliers": 0,
        "categories": 0,
        "grouptax": 0,
        "unit": 0,
        "price_history": 0
      },
      "zeroWrites": true
    },
    {
      "case": "required-field-rejection",
      "submittedRows": 2,
      "invalidRows": 1,
      "durationMs": 0.087,
      "status": false,
      "message": "CSV validation failed: Missing required fields. Please ensure all items have name, category_name, selling_price, and available_quantity.",
      "missingFields": [
        "supplier_name"
      ],
      "before": {
        "items": 0,
        "suppliers": 0,
        "categories": 0,
        "grouptax": 0,
        "unit": 0,
        "price_history": 0
      },
      "after": {
        "items": 0,
        "suppliers": 0,
        "categories": 0,
        "grouptax": 0,
        "unit": 0,
        "price_history": 0
      },
      "zeroWrites": true
    },
    {
      "case": "matched-row-update",
      "submittedRows": 2,
      "firstImportMs": 42.115,
      "reimportMs": 14.659,
      "status": true,
      "message": "Import complete: 2 updated",
      "persisted": {
        "items": 2,
        "suppliers": 1,
        "categories": 2,
        "grouptax": 1,
        "unit": 1,
        "price_history": 2
      },
      "checks": {
        "itemCountUnchanged": true,
        "priceUpdated": true,
        "imagePreserved": true,
        "behaviorFlagPreserved": true,
        "historyRowsWritten": true
      }
    }
  ],
  "finalDatabaseSnapshot": {
    "residentMemoryBytes": 148897792,
    "dataSizeBytes": 4828,
    "storageSizeBytes": 24576,
    "indexSizeBytes": 24576
  },
  "boundaries": [
    "This is one source-branch run, not a stable packaged release result.",
    "The shared browser CSV parser and real item repository ran, but the FileReader, UI, HTTP controller, authentication and packaged desktop did not.",
    "Fixtures were generated and used exact Posnic item headers; migration aliases and spreadsheet-application export behavior were not tested.",
    "Timings are observations from one Windows machine and one run per scale, not performance guarantees or capacity recommendations.",
    "Peak RSS measures the Node runner only; it excludes mongod memory, operating-system file cache and other processes.",
    "The test used an isolated unauthenticated loopback database and no customer, cloud, sync or network data.",
    "No concurrent users, background sync, hardware, fault injection, power loss or disk-full condition was tested.",
    "The import is not transactional across all rows; this run did not prove crash recovery during a partially completed accepted import.",
    "The 10 MiB and 10,000-row limits remain input safeguards. A successful observation on this machine is not a promise for every catalog or computer.",
    "Independent reproduction is still required before treating this evidence as external validation."
  ]
}
