Repository navigation
Conversation
CORA - Pending Reviewers
Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown For more details, see the full review summary. |
|
✅ No conflicts with other open PRs targeting |
llo tests: add WithRMax and use RMax=10 (5s epochs instead of 50s) in v31_blob_catchup and v31_restart_resumes, which waited out a full epoch. Those two tests drop from 66-82s to ~28s. cltest: use N=2^4 scrypt params for test keystores. The keyring is re-encrypted on every key add; scrypt was 14% of llo CPU. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
llo aggregation_fault_tolerance: the admits case now stops once both channels have reported instead of sitting out a fixed 15s window; the withholds case window is 10s (was 15s). syncer/v2 Test_StartReconciliation_RetriesWithBackoffV2: wait for >= 3 handler calls (2 failures + success) instead of exactly 1 event, which was only true for ~200ms and was missed under load. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
TestLockedDB_TwoInstances waits 3 renewal intervals instead of the full 10s lease. The ccip/ocrimpls transmitter tests mine and sample heads every 100ms instead of 1-2s (15s -> 1.8s per subtest). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Test_PipelineORM_DeleteRunsOlderThan created a cron job per run and ran StoreRun for each of 2000 runs. One job now owns all runs and the rest are inserted in one InsertFinishedRuns call (15s -> 0.24s). Test_FindPipelineRunIDsByJobID inserted 4600 runs one at a time. A new helper inserts them in one ordered statement so ids still interleave across jobs (14.6s -> 0.3s). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
llo nodes ran at Debug with P2P tracing and verbose pipeline/Mercury logging, plus an in-memory observer nothing read: ~190 MB of output per package run. They now log at Info; LLO_TEST_DEBUG=1 turns the old behaviour back on and the unused observer is gone. cltest.NewApplicationWithConfig built its default logger at Debug regardless of config. It now follows the config level; CL_TEST_DEBUG_LOGS=1 restores Debug. Measured: llo output 192 MB -> 45 MB, CPU -14%; features/ocr2 output 35 MB -> 3.1 MB, CPU -12%. Wall time per package is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… llo tests first ccip/launcher: registrysyncer.WithTickInterval(100ms) so the test does not wait out the 12 s sync tick (package 14.7 s -> 2.2 s). bridges: the async upsert test uses a 50 ms interval (package 6.6 s -> 1.4 s). vrf/v2: TestLogPollerFilterRegistered polls every 10 ms and checks for 2 s instead of 5 s (package 8.5 s -> 4.3 s). llo: move the aggregation_fault_tolerance and v31_blob_catchup wrappers above the other integration tests. Parallel tests are released in source order, so the two longest tests no longer wait ~26 s for a slot. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
6652202 to
a6da7c3
Compare
PR Triage · Risk 🟡 Medium · Complexity 🟡 MediumSuggests 1 approval, including one from an owner. Suggested reviewers: @brunotm, @jmank88.
Start Review Here
Blast radius2 changed exports are referenced by other packages. Threshold: 5 packages.
Blast radius fan-outflowchart LR
br0["core/internal/cltest.NewKeyStore"]
br0 --> br1["core/services/blockhashstore"]
br0 --> br2["core/services/cron"]
br0 --> br3["core/services/feeds"]
br0 --> br4["core/services/headreporter"]
br0 --> br5["core/services/job"]
br0 --> br6["core/services/keystore"]
br0 --> br7["core/services/ocr"]
br0 --> br8["core/services/ocr2"]
br0 --> br9["core/services/pipeline"]
br0 --> br10["core/services/vrf/proof"]
br0 --> brm["+1 more packages"]
VisualizationsScore mapflowchart LR
R["Risk: Medium"]
rs["1 signal → floor Medium"]
s0["blast radius core/internal/cltest.NewKeyStore (11 packages)"] --> rs
rs --> R
seq["sequential changes (9 in 7d)"] -->|"lifts Low → Medium"| R
C["Complexity: Medium"]
m0["new code size 3,876 ≥ 1,600"] --> C
RT["Suggests 1 approval · one from an owner"]
R --> RT
classDef low fill:#dafbe1,stroke:#1a7f37,color:#1f2328;
classDef medium fill:#fff8c5,stroke:#9a6700,color:#1f2328;
classDef high fill:#ffebe9,stroke:#cf222e,color:#1f2328;
class R medium;
class C medium;
Change shapepie title Change shape
"Tests" : 2753
"Source" : 316
"Trivial" : 2
— distributed across 24 files Files: 25 changed, 1 skippedWhy these reviewers
Others who know this code: pavel-raykov 13%, denis-chernov-smartcontract 5%, RensR 4%. Ranked by commits to the changed files. Commits in the 360 days before the base tip count, newer ones more. Requested everyone with at least 20% of the score, up to 4. Excluded the PR author, @kalverra. Considered only current organization members. Metrics and policy
Risk signals: pr-triage v0.0.0-20261115114818-e596a947e450 · policy |
Intent
Most of the suite's wall time was tests waiting on fixed sleeps and long poll intervals, with debug logging burning CPU on top. This cuts those waits, batches bulk inserts and defaults the heaviest integration tests to Info, so CI spends its time asserting instead of sleeping. Timer injection comes from #24190. Part of DX-5066. This is the top of the stack; results below cover all four layers.
How to review this stack
259 files change across the stack, but 173 of them are a single added
t.Parallel()line. Read the layers marked Medium or High; skim layer 1's mechanical files.t.Parallel()plus the fallout they opened updata_source.go,cltest.gopgtest.go,db.golease_lock.go,scheduler.gogo_core_tests,cltest.got.Parallel()diff is a test touching process-global state, and that risk is concentrated in the files linked above.pg/lease_lock_test.gochanges in layers 1, 2 and 4.Changes
Logging and keystore costs were a large share of the CPU, not the assertions
cltestbuilt its logger at Debug whatever the config said; it now follows the config, andCL_TEST_DEBUG_LOGS=1restores Debug when chasing a failure.TestScryptParamsdrops scrypt to N=2^4 for test keystores; scrypt was 14% oflloCPU.llonodes default to Info with no P2P, pipeline or Mercury tracing, and the unused in-memory log observer is gone.LLO_TEST_DEBUG=1restores the old behaviour. Output fell 192 MB → 45 MB inlloand 35 MB → 3.1 MB infeatures/ocr2.The three slowest packages now start first
go teststarts packages in command-line order, sollo,features/ocr2andcore/cmdused to start ~45s in and set the wall clock.SLOW_PACKAGESlists them first; a scheduling trick, not a fix.Waits replaced or shortened, per test
features/ocr2contractConfigTrackerPollInterval = "1s", was 1 mincmdTestShell_BeholderLifecyclegateway/networkTestHTTPClient_SendSleep(10s)ccip/ocrimplstransmitterccip/launcherWithTickInterval(100ms)from #24190synchronizationhealth testspgTestLockedDB_TwoInstancespgtesttxdb cancel testbridgesasync upsertvrf/v2TestLogPollerFilterRegisteredBulk inserts batched in the slow ORM tests
Test_PipelineORM_DeleteRunsOlderThannow inserts 1,999 runs in oneInsertFinishedRunscall (15s → 0.24s), and the pipeline-run-ID test does one ordered insert for 4,600 runs (14.6s → 0.3s). Both stay above the 1,000-row batch size, so batching is still covered.Shorter LLO epochs in two integration tests
v31_blob_catchupandv31_restart_resumesrun RMax 10 (5s epochs): 66-82s → ~28s. Inaggregation_fault_tolerancetheadmitscase stops as soon as both channels report, and thewithholdsnegative window drops from 15s to 10s.Results
This stack adds significant test parallelism and improvements. This had knock-on effects throughout the code:
No-Race
Race
Notes
CL_TEST_DEBUG_LOGS=1orLLO_TEST_DEBUG=1before reading a flake.