perf(test): raise memory-profile file concurrency to eight - #50
Conversation
…ault Port of PDP-Connect/pdpp PR #287 (head 07737ec79) into this repository. pdpp froze reference-implementation/ for direct edits because the reference server now lives here, so the change lands here instead. run-tests.ts, the reference implementation's test runner, spawns one child process per test file and lets a fixed number of workers pull files from a shared queue. That number defaulted to 2 regardless of host cores, so a 24-core machine spent most of the suite's wall time queueing. Each child is its own process with its own event loop and listen sockets, and any database a file needs is allocated under a collision-proof random name, so more workers add real parallelism without changing what a test observes. The default cap is now 8 for the memory-default profile (tests against the in-memory store). It stays at 2 for the postgres profile (tests against a real PostgreSQL database): that profile's backup/restore oracle uses one shared restore database, PDPP_TEST_POSTGRES_RESTORE_URL, that is not allocated per file, and the cap-8 measurement never covered it. PDPP_TEST_CONCURRENCY still overrides either default when set. Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Assisted-by: AI Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Signed-off-by: tnunamak <tnunamak@gmail.com> Assisted-by: AI
Signed-off-by: tnunamak <tnunamak@gmail.com> Assisted-by: AI
Signed-off-by: tnunamak <tnunamak@gmail.com> Assisted-by: AI
Signed-off-by: tnunamak <tnunamak@gmail.com> Assisted-by: AI
|
Rebase onto current main was blocked before the first signed commit: GPG opened interactive pinentry; cancellation caused signing to fail. The batch stopped under the requested GPG rule. This rebase was aborted. Head: fe27010 → fe27010 (unchanged). No new CI ran; existing checks show 7 success, 4 failure, 1 skipped. Needs work: unlock GPG and retry the rebase/CI verification. Assisted-by: AI |
|
Locally rebased onto main bac5526 with no conflicts: fe27010 → 5a2a77513f377b36c9bb6a1fca4faac99649cefc. Original patches are unchanged (range-diff and stable patch-ID comparison). PARKED: unattended GPG signing failed with “No pinentry”. Rewritten commits have Tim’s identity and DCO but remain unsigned locally under the owner’s fallback policy; nothing was pushed. The remote head and its old hosted CI results are unchanged; no fresh hosted checks ran. Fresh cap-2/cap-8 comparison failed: both completed 1,036 files and 10,249 assertions; cap 2 had 9,880 pass / 0 fail / 369 skip, cap 8 had 9,878 pass / 2 fail / 369 skip. The two manual-upload tests pass alone, but their cap-8 failures remain unresolved. Needs work; outcome equivalence is not established. Assisted-by: AI |
Summary
Memory-default test runs use eight file workers by default. PostgreSQL test runs retain two because their backup/restore oracle shares
PDPP_TEST_POSTGRES_RESTORE_URL. A positivePDPP_TEST_CONCURRENCYstill overrides either profile.This PR also fixes the test-accounting transcript terminal-event ordering defect: malformed accounting output now resolves to the final nonzero status before the transcript is closed.
Changed
memory-defaultuses 8 workers unlessPDPP_TEST_CONCURRENCYis set.PDPP_TEST_POSTGRES_RESTORE_URL.Evidence
reference-implementation/docs/receipts/gate-concurrency-memory-cap-2.receipt.jsonand...cap-8.receipt.json, with their checked-in transcripts, record two clean-sourcememory-defaultruns on Node 22.23.1. Both select 1,033 files and record 6,961 assertions: 6,335 passed, 396 failed, and 230 skipped. They retain the same 396 failure identities, meaning the same failing test names are observed under both caps, and exit code 1. Cap 2 took 352.198 seconds; cap 8 took 141.066 seconds.The receipt-pair test verifies each transcript digest and binding, then compares selection, structured outcome counts, failure identities, source digest, and timing fields. The checked-in receipt generator refuses a dirty source tree and uses the memory-default profile plus the documented cap.
This PR does not make the full test suite green and does not claim PostgreSQL concurrency equivalence.
Reviewer Findings Addressed
eb6a890d57658c14aef706bdbe4f756b14238d21; the later artifact-only commit carries those generated files.Validation
node --test --import tsxfor the receipt unit, receipt-pair, concurrency-cap, authority exit-order, and authority concurrency tests: 14 passing.Assisted-by: AI