Executed synthetic operations

Usage ledger operations rehearsal

These checks use generated records, disposable local databases and deliberate faults. A passing check means the stated expected outcome occurred, including expected rejection or rollback. It does not certify an internet-facing deployment or hardware power-loss behavior.

Results

CaseRequirementExpectedObservedResult
crash.ingestAbrupt exit before ingest commit leaves every business table empty{"exit": 86, "rows": 0}{"exit": 86, "rows": 0}PASS
crash.responseCommitted ingest survives process exit and replay creates no extra quantity{"exit": 87, "duplicate": true, "quantity": "1.125"}{"exit": 87, "duplicate": true, "quantity": "1.125"}PASS
load.idempotencyEight concurrent writers turn 800 requests into 400 source events{"new": 400, "duplicate": 400, "matches": true}{"new": 400, "duplicate": 400, "matches": true}PASS
load.exact-totalConcurrent exact quantities sum without rounding"450.000""450.000"PASS
load.correctionsTen corrections append reversals and replacements with the expected net"447.500""447.500"PASS
close.rollbackCrash before close commit leaves period open and no frozen version{"exit": 86, "status": "open", "closes": 0}{"exit": 86, "status": "open", "closes": 0}PASS
close.immutabilityLate event and correction leave the frozen January digest unchanged"cfa9e8ea751f8921176b347023e120d2b8d93a7e481e2bcf4c418b56f3046231""cfa9e8ea751f8921176b347023e120d2b8d93a7e481e2bcf4c418b56f3046231"PASS
api.isolationOther-account read and viewer mutation are rejected[403, 403][403, 403]PASS
api.boundaryForeign Host and Origin are rejected[403, 403][403, 403]PASS
api.storageStorage failure returns HTTP 503 without inventing success503503PASS
restore.frozen-exportRestored January export matches every frozen row and digest{"sha256": "cfa9e8ea751f8921176b347023e120d2b8d93a7e481e2bcf4c418b56f3046231", "entries": 420, "identical": true}{"sha256": "cfa9e8ea751f8921176b347023e120d2b8d93a7e481e2bcf4c418b56f3046231", "entries": 420, "identical": true}PASS
restore.point-in-timeSnapshot correctly excludes the two records received after backup00PASS
restore.source-replayStable upstream identities restore two lost records exactly once22PASS
restore.carry-forwardRecovered late usage and correction close February at 2.625 minutes"2.625""2.625"PASS
restore.closed-digestRecovery and carry-forward preserve the January digest"cfa9e8ea751f8921176b347023e120d2b8d93a7e481e2bcf4c418b56f3046231""cfa9e8ea751f8921176b347023e120d2b8d93a7e481e2bcf4c418b56f3046231"PASS
restore.corruptionModified snapshot is rejected before destination creationtruetruePASS
restore.no-overwriteExisting restore destination is preservedtruetruePASS
integrity.finalRecovered database passes integrity and foreign-key checks{"integrity": "ok", "foreign_key_errors": 0}{"integrity": "ok", "foreign_key_errors": 0}PASS
backup.scheduleFinite scheduler creates two checked snapshots and stops{"exit": 0, "snapshots": 2, "valid": 2}{"exit": 0, "snapshots": 2, "valid": 2}PASS

Measurements

{
  "concurrent_ingestion": {
    "writers": 8,
    "requests": 800,
    "unique_events": 400,
    "elapsed_seconds": 0.8952,
    "requests_per_second": 893.67,
    "qualification": "Finite local synthetic run with repeated connection initialization, not a production rate guarantee."
  },
  "recovery": {
    "snapshot_bytes": 245760,
    "snapshot_seconds": 0.004807,
    "restore_seconds": 0.006143,
    "snapshot_source_events": 410,
    "events_after_snapshot": 2,
    "upstream_replay_operations": 4,
    "new_events_after_replay": 2,
    "nominal_backup_interval_seconds": 900,
    "theoretical_max_unbacked_events_at_2_per_second": 1800,
    "assumption": "At most two events per second, successful backup every 15 minutes. This is a capacity/RPO scenario, not measured customer traffic."
  }
}

Method

Reproduce

python operations_rehearsal.py

See OPERATIONS.md for startup, snapshot, restore and capacity assumptions. The machine-readable record is completion.json.

Boundaries