Skip to content

Conversation

@tomusdrw
Copy link
Contributor

@tomusdrw tomusdrw commented Dec 3, 2025

Closes #710

Fixes the required test job not being run in merge queue.
Also reworks the test vectors to use single workflow file and a matrix.

On top, I've decided to run less stuff in merge queue to speed up merging. We risk bugs that are introduced by auto-merging parallel PRs, but I think it should be super rare, and it's acceptable for dev speed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Summary by CodeRabbit

Chores

  • Consolidated test workflows - Multiple individual test workflows combined into a unified test suite workflow for streamlined CI/CD operations.
  • Enhanced CI/CD triggers - Updated workflows to support merge group events, improving automation coordination during pull request merges.
  • Workflow consolidation - Removed redundant test workflow configurations to reduce maintenance overhead.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Consolidates multiple per-suite GitHub Actions workflows into a new matrix-based workflow at .github/workflows/vectors-test-suites.yml and removes several individual vector workflows (.github/workflows/vectors-jam-conformance-070.yml, vectors-jam-conformance-071.yml, vectors-w3f-070.yml, vectors-w3f-davxy-070.yml, vectors-w3f-davxy-071.yml, vectors-w3f-davxy-072.yml). Adds or documents the merge_group trigger in build workflows (.github/workflows/build-qa.yml and comments in build-docker.yml and utils-benchmarks.yml). No changes to exported/public code entities.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Inspect matrix entries mapping suite → gp_version → script → expected output for correctness.
  • Verify conditional steps (caching, optional checkout of test vectors) and artifact upload-on-failure behavior were preserved in the consolidated workflow.
  • Confirm concurrency/group settings and environment variables (TEST_VECTORS_REF, NODE_VERSION) behave as intended with the matrix.
  • Check for leftover references to removed workflow filenames.

Possibly related PRs

Suggested reviewers

  • skoszuta
  • mateuszsikora
  • DrEverr

Poem

🐇 I hopped through ymls, tidy and spry,
Gathered many tests beneath one sky.
Matrixed the suites, trimmed duplicate fray,
Now CI bounces less and hops away. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Rework running workflows & merge queue' clearly summarizes the main changes: refactoring workflows and adjusting merge queue behavior.
Description check ✅ Passed The description is related to the changeset, mentioning fixes to the test job in merge queue and reworking test vectors into a single matrix-based workflow.
Linked Issues check ✅ Passed The PR successfully addresses issue #710 by consolidating multiple test vector workflows into a single matrix-based workflow file (vectors-test-suites.yml) and removing individual workflow files.
Out of Scope Changes check ✅ Passed Changes to build-docker.yml, build-qa.yml, and utils-benchmarks.yml regarding merge_group are scope-related updates to support merge queue workflows, not out-of-scope additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch td-jobs

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8992448 and fa7bda6.

📒 Files selected for processing (10)
  • .github/workflows/build-docker.yml (1 hunks)
  • .github/workflows/build-qa.yml (1 hunks)
  • .github/workflows/utils-benchmarks.yml (1 hunks)
  • .github/workflows/vectors-jam-conformance-070.yml (0 hunks)
  • .github/workflows/vectors-jam-conformance-071.yml (0 hunks)
  • .github/workflows/vectors-test-suites.yml (1 hunks)
  • .github/workflows/vectors-w3f-070.yml (0 hunks)
  • .github/workflows/vectors-w3f-davxy-070.yml (0 hunks)
  • .github/workflows/vectors-w3f-davxy-071.yml (0 hunks)
  • .github/workflows/vectors-w3f-davxy-072.yml (0 hunks)
💤 Files with no reviewable changes (6)
  • .github/workflows/vectors-w3f-070.yml
  • .github/workflows/vectors-jam-conformance-071.yml
  • .github/workflows/vectors-w3f-davxy-070.yml
  • .github/workflows/vectors-w3f-davxy-071.yml
  • .github/workflows/vectors-w3f-davxy-072.yml
  • .github/workflows/vectors-jam-conformance-070.yml
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: w3f-davxy-0.7.2
  • GitHub Check: w3f-davxy-0.7.0
  • GitHub Check: w3f-davxy-0.7.1
  • GitHub Check: benchmarks (22.x)
  • GitHub Check: jam-e2e (22.x)
  • GitHub Check: test (22.x)
  • GitHub Check: e2e (22.x)
🔇 Additional comments (6)
.github/workflows/build-docker.yml (1)

8-8: Intentional skip of merge queue execution—LGTM.

Commenting out the merge_group trigger appropriately skips the Docker build in the merge queue, aligning with the PR objective to reduce merge queue workload.

.github/workflows/utils-benchmarks.yml (1)

9-9: Intentional skip of merge queue execution—LGTM.

Commenting out the merge_group trigger appropriately avoids re-running benchmarks in the merge queue, reducing unnecessary CI overhead and aligning with the PR's goal to speed up merge queue validation.

.github/workflows/build-qa.yml (1)

8-8: Merge queue trigger correctly activates required test job.

Adding the merge_group trigger directly addresses the PR objective to fix the required test job not running in the merge queue. This ensures all GP_VERSION variants (0.7.0, 0.7.1, 0.7.2) are validated before merge.

.github/workflows/vectors-test-suites.yml (3)

7-7: Clarify merge_group handling in concurrency group.

Line 7 comments out the merge_group trigger (intentionally skipping this workflow in merge queue), but line 10's concurrency group still references github.event.merge_group.head_ref. While this is functionally safe (the OR chain falls back to github.ref), it's semantically confusing to reference a context that can never be populated.

Recommendation: If merge_group is intentionally excluded, simplify line 10 to remove the dead reference:

- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref }}
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

Alternatively, if the workflow should run in merge queue, uncomment line 7.

Also applies to: 10-10


60-94: Step structure and workflow execution—LGTM.

The job structure is well-organized with proper caching, conditional checkout, and failure artifact uploads. The matrix interpolation across all steps is consistent and correct.


14-14: Verify that load-test-ref.sh script exists and properly sets TEST_VECTORS_REF.

Line 14 initializes TEST_VECTORS_REF to a placeholder hash, expecting it to be overwritten by the load-test-ref.sh script at line 63. The script correctly exports TEST_VECTORS_REF to GITHUB_ENV using the actual test vector reference (6129da00879bbb2831ef01588604fbade1ec197a). If this script doesn't run or fails to export the variable, the workflow will cache and checkout using the wrong test vector reference, causing test failures. Verify the script remains executable and the workflow step continues to be executed before cache operations.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/vectors-test-suites.yml (1)

49-79: Consider standardizing artifact naming for consistency.

Artifact names use inconsistent prefixes: conformance-, w3f-, and abbreviated davxy- (instead of full w3f-davxy-). While functionally unique and correct, standardizing to full suite names (e.g., w3f-davxy-070-results instead of davxy-070-results) would improve clarity when scanning artifact lists.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d46b97 and 7cf0632.

📒 Files selected for processing (1)
  • .github/workflows/vectors-test-suites.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: e2e (22.x)
  • GitHub Check: test (22.x)
  • GitHub Check: jam-e2e (22.x)
🔇 Additional comments (3)
.github/workflows/vectors-test-suites.yml (3)

49-79: Artifact naming issue from past review has been resolved.

Each matrix entry now has a unique artifact name (e.g., davxy-070-results, davxy-071-results, davxy-072-results for w3f-davxy variants), addressing the earlier concern about w3f-davxy-071 and w3f-davxy-072 overwriting the same artifact. This ensures all test results are preserved across parallel runs.


7-7: Verify merge_group intent aligns with PR objectives.

Line 7 comments out merge_group to skip this workflow in the merge queue, reasoning that it's slow. However, the PR description states "Fixes the required test job not being run in the merge queue." Clarify whether this vector test workflow is intentionally excluded from merge queue checks, or if a different test job handles that requirement.

Also applies to: 49-79


10-10: Verify parallel matrix execution and cache behavior.

The workflow runs 6 matrix jobs in parallel, all sharing the same cache key jam-test-vectors-${{ env.TEST_VECTORS_REF }}. Confirm that:

  1. The shared cache key is correct (i.e., all test suites reside in a single fluffylabs/test-vectors repository).
  2. No race conditions or cache corruption occur when multiple jobs restore concurrently.
  3. The GP_VERSION environment variable (line 82) correctly isolates test execution across matrix items.

Also applies to: 81-118

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

File Benchmark Error
codec/view_vs_collection.ts[4] Get last element from Decoded Significant speed difference: (current) "20299.99 (1.362499444649177) ±1.88%" vs "27604.46 (1.072111869675337) ± 20%" (previous)
codec/view_vs_collection.ts[6] Get 50th element from View Fastest result changed to (current) "Get 50th element from View[3]" from "Get first element from View[1]" (expected) ❌
View all
File Benchmark Ops
bytes/hex-from.ts[0] parse hex using Number with NaN checking 121324.4 ±0.43% 85.44% slower
bytes/hex-from.ts[1] parse hex from char codes 833522.29 ±0.84% fastest ✅
bytes/hex-from.ts[2] parse hex from string nibbles 532722.8 ±0.32% 36.09% slower
math/count-bits-u32.ts[0] standard method 94100486.81 ±2.84% 55.02% slower
math/count-bits-u32.ts[1] magic 209225994.08 ±6.52% fastest ✅
logger/index.ts[0] console.log with string concat 6939886.18 ±50.78% fastest ✅
logger/index.ts[1] console.log with args 1836109.29 ±81.94% 73.54% slower
math/add_one_overflow.ts[0] add and take modulus 221183411.58 ±6.99% 9.07% slower
math/add_one_overflow.ts[1] condition before calculation 243255892.55 ±5.97% fastest ✅
math/count-bits-u64.ts[0] standard method 2158234.27 ±3.2% 97.21% slower
math/count-bits-u64.ts[1] magic 77268469.53 ±2.08% fastest ✅
hash/index.ts[0] hash with numeric representation 176.62 ±2.65% 31.29% slower
hash/index.ts[1] hash with string representation 100.4 ±3.81% 60.94% slower
hash/index.ts[2] hash with symbol representation 165.2 ±1.61% 35.73% slower
hash/index.ts[3] hash with uint8 representation 158.58 ±0.38% 38.31% slower
hash/index.ts[4] hash with packed representation 257.05 ±0.45% fastest ✅
hash/index.ts[5] hash with bigint representation 188.07 ±0.57% 26.84% slower
hash/index.ts[6] hash with uint32 representation 190.05 ±1.23% 26.06% slower
collections/map-set.ts[0] 2 gets + conditional set 115224.98 ±0.52% fastest ✅
collections/map-set.ts[1] 1 get 1 set 59478.48 ±0.25% 48.38% slower
codec/bigint.compare.ts[0] compare custom 241639326.98 ±5.87% fastest ✅
codec/bigint.compare.ts[1] compare bigint 221757035.58 ±7.1% 8.23% slower
bytes/hex-to.ts[0] number toString + padding 174029.67 ±1.62% fastest ✅
bytes/hex-to.ts[1] manual 10838.89 ±1.12% 93.77% slower
codec/bigint.decode.ts[0] decode custom 163501826.35 ±2.26% fastest ✅
codec/bigint.decode.ts[1] decode bigint 60122889.63 ±1.85% 63.23% slower
math/switch.ts[0] switch 232608655.32 ±7.61% fastest ✅
math/switch.ts[1] if 204738237.13 ±8.37% 11.98% slower
math/mul_overflow.ts[0] multiply and bring back to u32 221281207.26 ±7.64% 8.43% slower
math/mul_overflow.ts[1] multiply and take modulus 241647512.95 ±6.01% fastest ✅
codec/encoding.ts[0] manual encode 1948844.54 ±1.33% 21.89% slower
codec/encoding.ts[1] int32array encode 2494863.14 ±1.19% fastest ✅
codec/encoding.ts[2] dataview encode 2294632.09 ±1.88% 8.03% slower
codec/decoding.ts[0] manual decode 10198464.36 ±2.61% 94.15% slower
codec/decoding.ts[1] int32array decode 160699817.46 ±3.16% 7.81% slower
codec/decoding.ts[2] dataview decode 174304953.81 ±3.93% fastest ✅
codec/view_vs_object.ts[0] Get the first field from Decoded 209797.11 ±7.21% 44.57% slower
codec/view_vs_object.ts[1] Get the first field from View 61813.85 ±2.97% 83.67% slower
codec/view_vs_object.ts[2] Get the first field as view from View 65926.75 ±3.41% 82.58% slower
codec/view_vs_object.ts[3] Get two fields from Decoded 378511.41 ±0.84% fastest ✅
codec/view_vs_object.ts[4] Get two fields from View 63762.18 ±0.83% 83.15% slower
codec/view_vs_object.ts[5] Get two fields from materialized from View 128983.88 ±1.09% 65.92% slower
codec/view_vs_object.ts[6] Get two fields as views from View 57853.46 ±1.17% 84.72% slower
codec/view_vs_object.ts[7] Get only third field from Decoded 334285.16 ±1.45% 11.68% slower
codec/view_vs_object.ts[8] Get only third field from View 66517.88 ±2.8% 82.43% slower
codec/view_vs_object.ts[9] Get only third field as view from View 67358.56 ±3.43% 82.2% slower
codec/view_vs_collection.ts[0] Get first element from Decoded 19647.7 ±2.22% 9.55% slower
codec/view_vs_collection.ts[1] Get first element from View 20626.84 ±103.01% 5.04% slower
codec/view_vs_collection.ts[2] Get 50th element from Decoded 10935.11 ±9.88% 49.66% slower
codec/view_vs_collection.ts[3] Get 50th element from View 21722.16 ±2.57% fastest ✅
codec/view_vs_collection.ts[4] Get last element from Decoded 20299.99 ±1.88% 6.55% slower
codec/view_vs_collection.ts[5] Get last element from View 15100.71 ±1.8% 30.48% slower
collections/hash-dict-vs-blob-dict_set.ts[0] StringHashDictionary 2347.31 ±1.01% 17.35% slower
collections/hash-dict-vs-blob-dict_set.ts[1] BlobDictionary(1) 2182.34 ±1.3% 23.16% slower
collections/hash-dict-vs-blob-dict_set.ts[2] BlobDictionary(2) 2092.18 ±1.61% 26.33% slower
collections/hash-dict-vs-blob-dict_set.ts[3] BlobDictionary(3) 2174.29 ±1.41% 23.44% slower
collections/hash-dict-vs-blob-dict_set.ts[4] BlobDictionary(4) 2840.05 ±3.09% fastest ✅
collections/hash-dict-vs-blob-dict_set.ts[5] BlobDictionary(5) 2574.02 ±3.06% 9.37% slower
collections/hash-dict-vs-blob-dict_get.ts[0] StringHashDictionary 2542.93 ±0.85% 4.43% slower
collections/hash-dict-vs-blob-dict_get.ts[1] BlobDictionary(1) 2618.22 ±0.82% 1.6% slower
collections/hash-dict-vs-blob-dict_get.ts[2] BlobDictionary(2) 2627.85 ±1% 1.23% slower
collections/hash-dict-vs-blob-dict_get.ts[3] BlobDictionary(3) 2632.39 ±0.91% 1.06% slower
collections/hash-dict-vs-blob-dict_get.ts[4] BlobDictionary(4) 2660.7 ±0.89% fastest ✅
collections/hash-dict-vs-blob-dict_get.ts[5] BlobDictionary(5) 2604.56 ±0.9% 2.11% slower
collections/hash-dict-vs-blob-dict_delete.ts[0] StringHashDictionary 3413.75 ±1.73% fastest ✅
collections/hash-dict-vs-blob-dict_delete.ts[1] BlobDictionary(1) 3386.24 ±1.02% 0.81% slower
collections/hash-dict-vs-blob-dict_delete.ts[2] BlobDictionary(2) 3333.53 ±1.64% 2.35% slower
collections/hash-dict-vs-blob-dict_delete.ts[3] BlobDictionary(3) 3336.34 ±1.29% 2.27% slower
collections/hash-dict-vs-blob-dict_delete.ts[4] BlobDictionary(4) 3322.25 ±0.91% 2.68% slower
collections/hash-dict-vs-blob-dict_delete.ts[5] BlobDictionary(5) 3224.42 ±1.06% 5.55% slower
collections/map_vs_sorted.ts[0] Map 249623.8 ±0.91% fastest ✅
collections/map_vs_sorted.ts[1] Map-array 97105.39 ±0.97% 61.1% slower
collections/map_vs_sorted.ts[2] Array 50505.65 ±2.39% 79.77% slower
collections/map_vs_sorted.ts[3] SortedArray 180940.56 ±1.34% 27.51% slower
bytes/bytes-to-number.ts[0] Conversion with bitops 5828.77 ±5.46% fastest ✅
bytes/bytes-to-number.ts[1] Conversion without bitops 5783.73 ±6.07% 0.77% slower
bytes/compare.ts[0] Comparing Uint32 bytes 13666.31 ±4.96% fastest ✅
bytes/compare.ts[1] Comparing raw bytes 13547.65 ±2.71% 0.87% slower
hash/blake2b.ts[0] our hasher 1.89 ±2.08% fastest ✅
hash/blake2b.ts[1] blake2b js 0.04 ±3.48% 97.88% slower
crypto/ed25519.ts[0] native crypto 4.15 ±20.87% 84.53% slower
crypto/ed25519.ts[1] wasm lib 8.99 ±3.44% 66.49% slower
crypto/ed25519.ts[2] wasm lib batch 26.83 ±2.43% fastest ✅

Benchmarks summary: 82/83 OK ❌

@tomusdrw tomusdrw added this pull request to the merge queue Dec 4, 2025
Merged via the queue into main with commit b577adc Dec 4, 2025
14 of 15 checks passed
@tomusdrw tomusdrw deleted the td-jobs branch December 4, 2025 08:47
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.

Refactor workflow files for test vectors into single matrix-based workflow

4 participants