Skip to content

Extend adversarial coverage of bounded history readers and replay #4287

Open

Description

@kriszyp

#3504 adds real-store frame/origin/corruption/retention and300patch read-bound tests, seeded random oracle checks on both engines, a resumed iterator with a concurrent coercive write, and ResourceBridge read_audit_log coverage. Remaining coverage is tracked rather than expanding that PR's mechanisms.

Add targeted cases for a stream longer than the retained memo budget (20,000or more patches), a wide singleton/opaque-value prefix followed by a long eligible record, same-size mapped-origin merges between yields, and full read_audit_log(hash_value) through a running operations server after natural TTL eviction of a many-patch record. Cover cancellation, retention/generation changes, replay-to-live handoff and both storage engines. Existing raw native corruption and control-origin cases are RocksDB-specific; LMDB skips do not prove those native cases there. A stopped/cancelled iterator is not a resumed-stream test.

Measure data and CPU work as well as getRange/get counts: one scoped RocksDB2.14 sample of2,880evicted patches took32,667ms wall/38,493CPU despite5,765native reads, compared with206ms/289CPU for the live record. A1,000-row bulk-patch stream took6,596ms and2,001ranges, and full replay3,047ms/1,002ranges. These are performance evidence for choosing stress sizes, not assertions of timing limits.

The closing review should trace retained-state accounting/close/exhaustion paths. Earlier automatic state-advance coverage flags included field initialization; adjudicate whether each is an actual progress assertion before inventing a failure. Relevant tests: unitTests/resources/historyReader.test.js, auditLog.test.js, subscriptionReplay.test.js; benchmark command: NODE_OPTIONS=--conditions=typestrip HISTORY_BENCH_REPETITIONS=1 npx mocha unitTests/resources/historyReader.bench.js.

No production change or new process-wide cache is requested here. This is test/harness work in the audit-log subsystem; no release is committed. Open review source922a7faf4f3d is included; attach any closing-adjudication stable deferral marker to this issue.

Deferred from #3504.

Review-Deferral: e7949192a5dec008 severity=nit category=test-coverage

Broad-run validation limitation

A full branch o-z run completed 3,822 passing/116 pending/one failure in originClosedFloor.test.js:635 (the clock-glitch case's issuance-ceiling assertion). The isolated case passes on the branch and exact main c20b5a9; this does not establish a baseline failure or a root cause. A separate broad a-n run passes 3,278/126. Broad runs preceded the final narrow unordered-anchor fix; subsequent selected collections pass 328 RocksDB and 241 LMDB cases, source history 32/23, and 35 server integration tests. Record the full-run context when investigating timing coverage rather than silently treating isolated passes as proof.

Review-Deferral: 05a682fc7dff9b49 severity=minor category=test-coverage

Closing test-bound fragility

unitTests/resources/historyReader.test.js:610-616 takes its oldest key from the shared bounded_history_reader database. Its windows<=8 assertion depends on earlier tests finishing within approximately6.25seconds, rather than only the lookup stopping at the true retained boundary. A loaded runner can therefore report9windows although the value/search boundary is correct. Give this test a separate database or derive the expected window bound from the actual key gap. Preserve the runaway-to-key1 detection.

No observed assertion failure is claimed for this new reviewer scenario. Focused latest suites pass328RocksDB/241LMDB; source32/23 with9LMDB engine skips. The broader o-z clock-ceiling failure remains a separate unproven-baseline limitation already recorded here. The state-trace deferral marker is corrected to the closing adjudicator's nit/test-coverage classification; the independent closing trace covers34row states with0NO entries, without claiming all future stress coverage.

🤖 Generated by OpenAI Codex; posted via @kriszyp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions