You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build(deps): keep nodes running and get test results sooner - #1447
The node pins kwil-db at 6608a4cc. This moves the pin to 284bfd01, the head of kwil-db main, which adds the four pull requests merged there since:
chore: get schema test results sooner, even after a stall kwil-db#1775: the schema test harness replaces a test database that has not reported ready within 60 seconds, and fails the test if the second one does not report ready either. It used to wait until the two hour package timeout. It also removes each test database with its volume. After each schema change, a node reloads the table metadata with a query that takes about 21 ms on a schema the size of the node's, instead of about 258 ms.
chore(node): keep a node that skipped ahead in sync kwil-db#1777: a node that restores a newer snapshot under resync_when_behind keeps the replica identity the snapshot gives each table, so the blocks it applies after the restore reach the network's app hash.
chore(node): retry a block that failed to execute kwil-db#1778: when a sentry, or any node in catch-up, fails to execute a committed block, it rolls the block back and applies it again, up to three times, and stops if the block still fails. It used to stop at the next attempt with block N already processed.
The slow integration tests run every test on that harness. A test database that stalls now costs its test a minute, where it held its job for two hours and then made the job's retry rerun all of its packages. Applying the node's migrations and seed data to a test database took about 22 seconds and now takes about 5, because most of that time went to the reload.
Before the release
Executing a block gives the same results as before. The new reload query returns the same tables as the old one, which the first pull request above checked with reflect.DeepEqual on every namespace of a database holding the node's migrations. The second pull request changes only how a node admits transactions.
The third changes what a restore produces only when it restores into a database kwild has already opened, which happens only with resync_when_behind above 0. The restored tables then get the replica identities a new node gets from the same snapshot, so the node hashes deletes and updates as the network does.
The fourth changes only what a node does after a block fails to execute. A fatal database error still stops the node at once. A block applied again can still run to another app hash, when the failed attempt left something in the memory of the interpreter or an extension, such as a table the block created. The node then stops, and its log says that a restart replays the block.
The four add no config key, migration or p2p protocol.
kwil-db/core changes only in core/types: the new ErrMalformedTx and its mapping to and from code 1. The node's own code calls neither mapping function.
go build ./... and go vet -tags kwiltest ./... are clean with Go 1.25.3, the version CI and the Dockerfile use.
The go.mod diff is the two kwil-db lines, and go mod tidy changed nothing else.
The 42 packages that CI tests on a pull request, 25 of them with tests, pass locally with the same go test -failfast -p 1 -count=1 -tags=kwiltest command.
On one node built from this branch, user.broadcast with an empty transaction got code 1, malformed transaction: no body. user.broadcast without a transaction and user.estimate_price without a body got invalid params. The node went on producing blocks.
The slow integration tests do not run on a pull request that changes only go.mod, so I started them on this branch by hand. All three jobs passed on their first attempt. order_book took 23m15s, streams 16m22s and rest 25m31s, and the whole run 25m36s. On the previous pin the same jobs took 41m28s, 42m46s and 50m25s, and the whole run 50m29s, in the run linked from the pull request that split them into three jobs. Twice in this run a test database did not report ready within a minute, in TestRequestAttestationFees and in TestQueries. The harness replaced it each time, and both tests passed.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID: a5e3a1fa-111b-4cf4-bd88-625ecd415904
📥 Commits
Reviewing files that changed from the base of the PR and between c14b49b and 31306ee.
⛔ Files ignored due to path filters (1)
go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
go.mod
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
The module updates the pseudo-versions of both Kwil DB dependencies. Their module paths remain unchanged.
Changes: Kwil DB dependencies
Layer / File(s)
Summary
Update Kwil DB versions go.mod
Both Kwil DB dependencies use newer pseudo-versions dated 2026-10-12 instead of 2026-10-07.
No actionable merge-blocking issue is established. Confirm the slow integration suite’s result before claiming the one-hour objective has been met.
Pre-merge checks · 4 · 1
Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Linked Issues check
Issue #1445 requires the slow integration tests on a node pull request to finish within one hour and stalled runs to fail within minutes. This PR updates only the two kwil-db dependency declarations…
Add the required node CI workflow changes, or provide reviewable evidence that the current workflow now runs the slow integration tests for the relevant pull requests and enforces the one-hour and stalled-run limits. Re-run the affected wor…
Passed checks (4 passed)
Check name
Status
Explanation
Out of Scope Changes check
The reviewed change is limited to the kwil-db and kwil-db/core version updates. The described upstream changes address the slow integration-test setup and execution behavior identified by issue #1…
Docstring Coverage
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title describes the dependency update’s intended effects: improved node reliability and faster test results. It is relevant to the primary change.
Full details: Linked Issues check
Explanation
Issue #1445 requires the slow integration tests on a node pull request to finish within one hour and stalled runs to fail within minutes. This PR updates only the two kwil-db dependency declarations. The PR description states that pull requests changing only go.mod do not run the slow integration tests, and it reports only manually started runs. No node CI workflow change is present to make the issue outcome apply to relevant pull requests. The imported kwil-db changes address test-database stalls, but the complete linked-issue coding requirement is not established by this PR.
Resolution
Add the required node CI workflow changes, or provide reviewable evidence that the current workflow now runs the slow integration tests for the relevant pull requests and enforces the one-hour and stalled-run limits. Re-run the affected workflow and record the result.
Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The node pins
kwil-dbat6608a4cc. This moves the pin to284bfd01, the head of kwil-dbmain, which adds the four pull requests merged there since:malformed transaction, whether a client broadcasts it or a peer announces it.resync_when_behindkeeps the replica identity the snapshot gives each table, so the blocks it applies after the restore reach the network's app hash.block N already processed.The slow integration tests run every test on that harness. A test database that stalls now costs its test a minute, where it held its job for two hours and then made the job's retry rerun all of its packages. Applying the node's migrations and seed data to a test database took about 22 seconds and now takes about 5, because most of that time went to the reload.
Before the release
reflect.DeepEqualon every namespace of a database holding the node's migrations. The second pull request changes only how a node admits transactions.resync_when_behindabove 0. The restored tables then get the replica identities a new node gets from the same snapshot, so the node hashes deletes and updates as the network does.kwil-db/corechanges only incore/types: the newErrMalformedTxand its mapping to and from code 1. The node's own code calls neither mapping function.Related Problem
How Has This Been Tested?
go build ./...andgo vet -tags kwiltest ./...are clean with Go 1.25.3, the version CI and the Dockerfile use.The
go.moddiff is the twokwil-dblines, andgo mod tidychanged nothing else.The 42 packages that CI tests on a pull request, 25 of them with tests, pass locally with the same
go test -failfast -p 1 -count=1 -tags=kwiltestcommand.On one node built from this branch,
user.broadcastwith an empty transaction got code 1,malformed transaction: no body.user.broadcastwithout a transaction anduser.estimate_pricewithout a body got invalid params. The node went on producing blocks.The slow integration tests do not run on a pull request that changes only
go.mod, so I started them on this branch by hand. All three jobs passed on their first attempt.order_booktook 23m15s,streams16m22s andrest25m31s, and the whole run 25m36s. On the previous pin the same jobs took 41m28s, 42m46s and 50m25s, and the whole run 50m29s, in the run linked from the pull request that split them into three jobs. Twice in this run a test database did not report ready within a minute, inTestRequestAttestationFeesand inTestQueries. The harness replaced it each time, and both tests passed.