Skip to content

Start SQL Integration Tests#1292

Draft
yyforyongyu wants to merge 2 commits into
impl-runtime-store-6from
wallet-default-sqlite
Draft

Start SQL Integration Tests#1292
yyforyongyu wants to merge 2 commits into
impl-runtime-store-6from
wallet-default-sqlite

Conversation

@yyforyongyu

Copy link
Copy Markdown
Collaborator

Switches the default runtime store backend for newly-created wallets from kvdb
to SQLite so the integration tests exercise the SQL store by default: an unset
DBConfig.Backend now resolves to SQLite, with a default SQLite path derived
next to the legacy kvdb database. Callers opening an existing kvdb-only wallet
set Backend: DBBackendKVDB explicitly. The bwtest harness now honors its
configured backend so db=kvdb parity runs still exercise kvdb rather than
silently falling back to SQLite.

Single commit. Stacked on impl-runtime-store-6.

@coveralls

coveralls commented Jul 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29745821027

Warning

No base build found for commit f6d677d on impl-runtime-store-6.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 57.437%

Details

  • Patch coverage: 32 uncovered changes across 1 file (5 of 37 lines covered, 13.51%).

Uncovered Changes

File Changed Covered %
bwtest/harness_wallet.go 32 0 0.0%
Total (3 files) 37 5 13.51%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 62367
Covered Lines: 35822
Line Coverage: 57.44%
Coverage Strength: 11998.11 hits per line

💛 - Coveralls

Comment thread bwtest/harness_wallet.go Outdated
Comment thread bwtest/harness_wallet.go Outdated
Comment thread wallet/runtime_store_config.go
Comment thread wallet/signer_test.go Outdated
Comment thread wallet/runtime_store_config.go
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from b23830b to ecb2ba3 Compare July 14, 2026 13:46
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from 1f88969 to d011a90 Compare July 14, 2026 13:46
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from ecb2ba3 to 7341df7 Compare July 14, 2026 18:03
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from d011a90 to 8758c4f Compare July 14, 2026 18:03
@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 🎲

Comment thread Makefile
Comment thread bwtest/harness_wallet.go
Comment thread itest/main_test.go
Comment thread bwtest/harness_wallet.go Outdated
Comment thread itest/main_test.go Outdated
Comment thread wallet/manager_test.go Outdated
Comment thread bwtest/harness_wallet.go Outdated
Comment thread wallet/runtime_store_config.go
Comment thread wallet/runtime_store_config.go
Comment thread bwtest/harness_wallet.go
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from 7341df7 to 1905c03 Compare July 17, 2026 14:05
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch 2 times, most recently from 1f88969 to b3d4be8 Compare July 17, 2026 14:06
@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by gpt-5.5 🪄

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by k3 🎈

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 on re-review of the updated PR. 🌻

Comment thread wallet/runtime_store_config.go
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from 8c0aa34 to f9a0403 Compare July 18, 2026 18:57
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from a6cedc5 to cb48727 Compare July 18, 2026 18:57
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from f9a0403 to 2a8d83a Compare July 18, 2026 19:09
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from cb48727 to b685487 Compare July 18, 2026 19:09
@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 on re-review of the updated PR. 🍀

Comment thread wallet/deprecated.go Outdated
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from 2a8d83a to 4552199 Compare July 19, 2026 11:57
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from b685487 to 9f5b912 Compare July 19, 2026 11:57
@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by k3 🎯

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 on re-review of the updated PR. ❇️

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by gpt-5.5 🪁

@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from 4552199 to f6d677d Compare July 20, 2026 13:20
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from 9f5b912 to 63691af Compare July 20, 2026 13:20
@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 on re-review of the updated PR. 🎆

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by k3 🍀

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by gpt-5.5 🧵

@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from f6d677d to 950e3de Compare July 21, 2026 14:30
// backend is SQLite and no SQLite path was given, a deterministic default is
// derived next to the legacy kvdb database (DB.KVDB.DBPath) so the runtime
// store has a stable on-disk location.
func (c DBConfig) withDefaults() DBConfig {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This PR is still based on the pre-restructure impl-runtime-store-6: its head (63691af) is not an ancestor of the new stack, GitHub reports CONFLICTING, and the PR diff currently shows the entire old 27-commit stack underneath its own 2 commits; rebase onto the new impl-runtime-store-6 (950e3de) so the diff shrinks back to the two sqlite-default commits. k3

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 on re-review of the updated PR. :choo_choo:

Comment thread wallet/manager.go Outdated
// The account is absent. On an already created wallet this is an
// over-create adding a new account, not a partial-import retry to
// complete, so reject it instead of mutating the wallet.
if preCreated {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This reintroduces the partial-create wedge that the base fixed: when an earlier attempt created the wallet row and imported only a prefix of InitialAccounts, retry sets preCreated and rejects the first missing account instead of completing it; keep the durable create_complete marker and only reject wallets marked complete. (gpt-5.5)

Flip the zero-value store Backend from DBBackendKVDB to
DBBackendSQLite, so new library-created wallets default to the SQLite
runtime store. Callers opening an existing kvdb-only wallet must now
set DBBackendKVDB explicitly to keep using walletdb.
Default the integration-test backend to SQLite and wire the harness to
resolve the configured backend: kvdb and SQLite both run off the
subtest DB path, while postgres is rejected with a clear message since
the harness provisions no DSN. Update the Makefile default and ADR
0008 to match.
@yyforyongyu
yyforyongyu force-pushed the impl-runtime-store-6 branch from 950e3de to 99030fe Compare July 23, 2026 17:22
@yyforyongyu
yyforyongyu force-pushed the wallet-default-sqlite branch from 63691af to 2684a57 Compare July 23, 2026 17:22
@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by glm-5.2 on re-review of the updated PR. 🧭

@yyforyongyu

Copy link
Copy Markdown
Collaborator Author

No issues found by k3 🌊

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.

3 participants