Repository navigation
test(module): isolate concurrent fixture Wasm artifacts - #457
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe test infrastructure now builds and caches the Wasm module once per process. Publishing helpers use cached bytes through ChangesModule test publishing
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Module integration tests now reuse cached Wasm bytes while publishing each fixture from a private artifact path. Concurrent regular and anonymous publication is covered, with no remaining merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant FixturePublishTest
participant ModuleTestSupport
participant ModulePublisher
participant SQLQuery
FixturePublishTest->>ModuleTestSupport: request cached module_bytes
ModuleTestSupport->>ModulePublisher: publish Wasm bytes
ModulePublisher-->>FixturePublishTest: publication result
FixturePublishTest->>SQLQuery: query game_item_template
SQLQuery-->>FixturePublishTest: query result
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Mathih13
left a comment
There was a problem hiding this comment.
The private-byte publication path addresses the shared optimizer output, and the extracted Cargo artifact reader preserves the configured target directory.
One test failure path needs a fix before merge. In concurrent_fixtures_publish_complete_modules, each worker starts its Standalone before reaching a four-party Barrier. If any startup panics, the other workers wait forever and the scoped thread join cannot finish. Start all four Standalone instances before spawning the workers, then move one into each worker and put ready.wait() first. Publication still starts concurrently, while startup failures remain bounded by the existing Standalone timeout.
Please retain the current CI and CodeRabbit checks after that correction.
|
Independent review of PR #457 at Local diagnostic tests passed: four concurrent fixture publications, including anonymous publication, and the existing typed-taxi durable contracts. Formatting and diff checks pass. Full CI and actual CodeRabbit review are still pending; this is not yet a merge handoff. Root is monitoring and will report the final result. |
|
@coderabbitai review Please review the current head |
|
✅ Action performedReview finished.
|
|
The startup-barrier finding is fixed in current head @coderabbitai The reported missing Module dependency is already present in the base and current branch: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- relevant files ---'
fd -t f -a '^(fixture_publish|mod|module_wasm|typed_taxi_contracts)\.rs$' module/tests gateway 2>/dev/null || true
printf '%s\n' '--- module dev-dependencies ---'
rg -n -A16 -B3 '^\[dev-dependencies\]' module/Cargo.toml
printf '%s\n' '--- gateway dev-dependencies ---'
rg -n -A16 -B3 '^\[dev-dependencies\]' gateway/Cargo.toml
printf '%s\n' '--- fixture test outline ---'
ast-grep outline module/tests/fixture_publish.rs --items all --view expanded
printf '%s\n' '--- concurrent fixture test source ---'
rg -n -A80 -B8 'concurrent|ready\.wait|thread::spawn|Standalone' module/tests/fixture_publish.rsLength of output: 4293
I withdraw the prior merge-risk statements for the startup barrier and the missing Module dependency. ✏️ Learnings added
You are interacting with an AI system. |
Concurrent durable fixtures can publish corrupt Wasm. SpacetimeDB 2.7.1 sends each optimizer to the same
.opt.wasmoutput after Cargo finishes; a concurrent run read an all-zero Wasm header.Build the Module once per test process, retain its bytes, and publish a private copy for each Standalone through
--bin-path. Reuse the typed-taxi artifact reader and test four concurrent publications, including anonymous publication. Start the fixtures before the worker barrier so a startup failure cannot strand other workers.All seven checks pass at
91c5745bed7a82536449b4670889a59b7e1020f4, including the full durable selection, Gateway auction regression, all crate suites, strict workspace clippy and binding comparison. Independent review and completed CodeRabbit review have no outstanding findings.Pinned CLI source: https://github.com/clockworklabs/SpacetimeDB/blob/v2.7.1/crates/cli/src/tasks/mod.rs
Implemented by GPT-6 through Codex in T3 Code.