Skip to content

feat(storage-bench): storage/DB backend perf + integrity benchmark, aligned to the storage standard - #51

Merged
mdheller merged 1 commit into
mainfrom
feat/storage-backend-bench
Aug 3, 2026
Merged

feat(storage-bench): storage/DB backend perf + integrity benchmark, aligned to the storage standard#51
mdheller merged 1 commit into
mainfrom
feat/storage-backend-bench

Conversation

@mdheller

@mdheller mdheller commented Aug 3, 2026

Copy link
Copy Markdown
Member

A benchmark suite for storage / DB backends where integrity is a first-class result, aligned to SocioProphet/socioprophet-standards-storage (evidence-first: a number is a claim only if backed by a reproducible record).

  • ts/src/storage-bench.tsbenchObjectBackend measures any ObjectBackend (InMemory / S3-BYOS / RocksDB / …) on put / get / verify: latency p50/p95/p99 + throughput (ops/s, MB/s), over deterministic seeded content-addressed blobs. Fail-closed: a blob that doesn't byte-round-trip, or whose content hash doesn't re-derive, fails the run — a fast backend that returns the wrong bytes fails here, by design. toEvaluationRecord emits a record conforming to evaluation-record-standard.v1 (subject_type=platform_capability, attempt_mode=benchmark_run), carrying the raw measurements as evidence.
  • storage-bench.test.ts — 5 tests, teeth both ways: correct backend passes with full integrity + ordered percentiles; deterministic for a fixed seed; a corrupting backend fails; a losing backend fails; the EvaluationRecord conforms.
  • docs/STORAGE_BACKEND_MATRIX.md — the Table-2.1 analog: estate backends (Canonical object store, S3-BYOS, RocksDB, Hypercore, AtomSpace, FederatedAtomSpace) + the external field, scored on the standard's dimensions (content-addressed / provenance / integrity-at-rest·codex / fault tolerance / sovereign-BYOS / distributed / fail-closed verify). Perf numbers live in EvaluationRecords, never inline.

Typecheck clean; suite 5/5; dist rebuilt. Runs under the existing agent-machine/ts-ci test step.

🤖 Generated with Claude Code

…ligned to the storage standard

A benchmark harness for storage backends where INTEGRITY is a first-class result, not a footnote —
aligned to SocioProphet/socioprophet-standards-storage (evidence-first: a number is a claim only if
backed by a reproducible record).

- ts/src/storage-bench.ts: benchObjectBackend measures any ObjectBackend (InMemory/S3-BYOS/RocksDB/…)
  on put/get/verify — latency p50/p95/p99 + throughput (ops/s, MB/s) — over deterministic seeded
  content-addressed blobs. FAIL-CLOSED: a round-tripped blob that doesn't byte-match, or whose content
  hash doesn't re-derive, makes the whole run a failure. toEvaluationRecord emits a record conforming
  to evaluation-record-standard.v1 (subject_type=platform_capability, attempt_mode=benchmark_run),
  carrying the raw measurements as evidence.
- ts/src/storage-bench.test.ts: 5 tests, teeth both ways — a correct backend passes with full
  integrity + ordered percentiles; the run is deterministic for a fixed seed; a corrupting backend
  (wrong bytes) FAILS; a losing backend (missing blob) FAILS; the EvaluationRecord conforms.
- docs/STORAGE_BACKEND_MATRIX.md: the Table-2.1 analog — estate backends (Canonical object store,
  S3-BYOS, RocksDB, Hypercore, AtomSpace, FederatedAtomSpace) + external field, scored on the
  STANDARD's dimensions (content-addressed / provenance / integrity-at-rest / fault tolerance /
  sovereign-BYOS / distributed / fail-closed verify) — perf numbers live in EvaluationRecords, not the table.

Typecheck clean; storage-bench suite 5/5; dist rebuilt.
@mdheller

mdheller commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Merge rationale (self-hosted CI queued, not failing): ran the full CI-equivalent locally — npm ci && npm run build (dist in sync, the build-and-verify-dist assertion) + full ts suite 471/471 pass + tsc --noEmit clean. Change is additive (new storage-bench module + test + index export + rebuilt dist + a doc); it touches no existing module.

Adversarial self-review: integrity is fail-closed and proven both ways — a corrupting backend (wrong bytes) and a losing backend (missing blob) both FAIL the run, a correct backend passes with full integrity; runs are deterministic for a fixed seed; the EvaluationRecord conforms to evaluation-record-standard.v1 (evidence carried, no bare numbers). Merging on the local proof.

@mdheller
mdheller merged commit 95e7993 into main Aug 3, 2026
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant