Repository navigation
bench: measure Phase 0 PG16.4 enforcement overhead (unstable local host) - #22
MrDarkRoot wants to merge 9 commits into
Conversation
|
Maintainer review of PR #22 at HEAD Follow-up required before accepting benchmark conclusions:
Do not close Issue #15 or claim a reproducible overhead number. Do not alter shared |
|
Issue #15 follow-up at published measured implementation SHA |
|
Maintainer follow-up review at PR #22 HEAD Verified on GitHub:
This PR is reviewable and useful as an inconclusive research-method/evidence artifact, but it does not satisfy Issue #15's Phase 0 benchmark gate and Issue #15 should remain OPEN. Do not turn these numbers into a product or performance claim. The next meaningful measurement needs a substantially quieter/controlled host (or equivalent dedicated runner) and should preserve the new anomaly-capture path. No shared security/enforcement change is warranted from the current evidence. |
Scope
Refs #15. Adds a reproducible, disposable PG16.4 benchmark under benchmarks/phase0/ only. Baseline tables match protected columns, primary-key indexes, synthetic rows and restricted writer grants; existing C extension and protected triggers are built unchanged from experiments/native_tx_state/. Image digest pinned; trusted test budget 100 for 100-row transactions.
Invariant / Current Spec Reference
Research-only performance evidence for docs/test-plan.md §15 and docs/spec.md §13. No security assertion, policy scope or managed deployment claim is changed.
Relevant Canonical CC-* Tests
Existing full integrated security suite ran at measured implementation SHA 12375d3, exit 0; complete transcript archived. The original suite uses some legacy experiment IDs; this PR does not relabel them.
What Changed
Two complete measured runs, each 3 rounds × 200 transactions per accepted arm/case, 50 warmups; 1/5/100 subscription updates, individual users/refunds and mixed 3+2+2. Separate 30-trial protected denied cases. Raw CSVs, summary JSON (p50/p95/p99, TPS, rows/sec, variability), metadata and analysis: benchmarks/phase0/evidence/REPORT.md.
Security Impact / Adversarial Testing
Runner checks effect shapes, writer grants, durable state and rejected sticky-denial commits. Full existing suite passed at implementation SHA. One attempted repeat stopped on a missing denial message at transition trial 22; it was not counted as a passing run. A separate 100-trial diagnostic had 100 expected denials and no unauthorized durable state from a fresh admin; cause of the missing message is unknown.
PostgreSQL Semantics Considered
Only existing BEFORE UPDATE native C trigger graph is measured. Baseline has no trigger; the end-to-end difference includes trigger dispatch, callbacks, fixed-rule validation and the research fixture's server LOG lines, not isolated C accounting overhead.
Limitations / Unknowns
Draft for review: host throughput was unstable. In one complete run baseline 1-row TPS fell 1346 → 379 → 101 across rounds; 100-row paired TPS changes were −37%, +66%, −49%. Raw results are real but not a reliable general overhead estimate or PASS gate. Investigate host scheduling/I/O/contention and rerun on controlled hardware before interpreting overhead or tuning. Local PG16.4, one client only. No arbitrary PASS threshold.
Out-of-Scope Work Explicitly Not Included
No CI/demo changes, optimization, production performance or managed/cloud assertions, or broadening of supported SQL effects. No secrets; only fixture-only test credentials already present in the existing experiment.