Skip to content

feat(idxdb-store): decouple StateSync from Store#23

Open
WiktorStarczewski wants to merge 4 commits into
nextfrom
wiktor/migrate-2132-statesync-decouple
Open

feat(idxdb-store): decouple StateSync from Store#23
WiktorStarczewski wants to merge 4 commits into
nextfrom
wiktor/migrate-2132-statesync-decouple

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

@WiktorStarczewski WiktorStarczewski commented Apr 28, 2026

Client PR: #2132

Migrated from miden-client#2132 (author: @juan518munoz) as part of the web-sdk split (web/WASM components moved out of miden-client into this dedicated repo — see miden-client #1992 / #2135).

This is the idxdb-store side of the StateSync / Store decoupling work. Closes the web-sdk portion of miden-client#2102. The Rust client-side changes (the bulk of the original PR) stay on miden-client#2132.

Migrated from 0xMiden/miden-client#2132 (author: juan518munoz) as part
of the web-sdk split. Original PR: 0xMiden/miden-client#2132

This is the idxdb-store side of the StateSync/Store decoupling work
(closes miden-client #2102). The Rust client-side changes stay on the
original PR.
…-from-store)

Temporarily retarget the workspace miden-client / miden-client-sqlite-store
git deps from `next` to the upstream PR branch so this PR's CI can compile
against `miden_client::sync::PublicAccountDelta` (added in
0xMiden/miden-client#2132 and not yet released).

Revert before merge — see CLAUDE.md / PR description for the merge sequence.
@WiktorStarczewski WiktorStarczewski added the no changelog PR doesn't need a CHANGELOG entry (trivial / non-user-visible) label Apr 30, 2026
WiktorStarczewski added a commit that referenced this pull request Apr 30, 2026
Now that miden-client#1835's wiktor-storekeys branch has been merged
with miden-client@dab6cf7b (the same snapshot of next that web-sdk
currently pins), the dep retarget that #23/#25/#26/#31 use works for
this PR too.

Local 'cargo check --workspace --target wasm32-unknown-unknown' is clean
(was 23 errors before the upstream merge, due to the alpha-protocol
mismatch the PR description mentions).

Revert before merge — see PR description merge gate.
WiktorStarczewski added a commit that referenced this pull request Apr 30, 2026
Observed flake: probe returns HTTP 200 once on the first attempt that
clears the connection-refused phase, exits, tests start, ALL tests fail
with 'TypeError: Failed to fetch' to the gRPC backend. The single-probe
gate isn't strict enough — a one-shot 200 (e.g. tonic-health responding
before the rest of the dispatcher is fully wired) currently passes.

Upgrade the readiness signal to N consecutive HTTP successes spaced
PROBE_INTERVAL apart (defaults: 3 successes, 0.5s apart), so the probe
only declares the server ready after ~1s of demonstrably-stable
response. Any non-success in the streak resets it to zero and the
slow-poll loop resumes — so a momentary blip during init doesn't get
counted twice on either side.

Tracked occurrences across recent PR runs: web-sdk PR #23 ci-shard-4,
PR #29 ci-shard-1 + ci-shard-4, PR #27 multiple shards.
WiktorStarczewski added a commit that referenced this pull request Apr 30, 2026
Observed flake: probe returns HTTP 200 once on the first attempt that
clears the connection-refused phase, exits, tests start, ALL tests fail
with 'TypeError: Failed to fetch' to the gRPC backend. The single-probe
gate isn't strict enough — a one-shot 200 (e.g. tonic-health responding
before the rest of the dispatcher is fully wired) currently passes.

Upgrade the readiness signal to N consecutive HTTP successes spaced
PROBE_INTERVAL apart (defaults: 3 successes, 0.5s apart), so the probe
only declares the server ready after ~1s of demonstrably-stable
response. Any non-success in the streak resets it to zero and the
slow-poll loop resumes — so a momentary blip during init doesn't get
counted twice on either side.

Tracked occurrences across recent PR runs: web-sdk PR #23 ci-shard-4,
PR #29 ci-shard-1 + ci-shard-4, PR #27 multiple shards.
WiktorStarczewski added a commit that referenced this pull request Apr 30, 2026
Observed flake: probe returns HTTP 200 once on the first attempt that
clears the connection-refused phase, exits, tests start, ALL tests fail
with 'TypeError: Failed to fetch' to the gRPC backend. The single-probe
gate isn't strict enough — a one-shot 200 (e.g. tonic-health responding
before the rest of the dispatcher is fully wired) currently passes.

Upgrade the readiness signal to N consecutive HTTP successes spaced
PROBE_INTERVAL apart (defaults: 3 successes, 0.5s apart), so the probe
only declares the server ready after ~1s of demonstrably-stable
response. Any non-success in the streak resets it to zero and the
slow-poll loop resumes — so a momentary blip during init doesn't get
counted twice on either side.

Tracked occurrences across recent PR runs: web-sdk PR #23 ci-shard-4,
PR #29 ci-shard-1 + ci-shard-4, PR #27 multiple shards.
WiktorStarczewski added a commit that referenced this pull request Apr 30, 2026
Observed flake: probe returns HTTP 200 once on the first attempt that
clears the connection-refused phase, exits, tests start, ALL tests fail
with 'TypeError: Failed to fetch' to the gRPC backend. The single-probe
gate isn't strict enough — a one-shot 200 (e.g. tonic-health responding
before the rest of the dispatcher is fully wired) currently passes.

Upgrade the readiness signal to N consecutive HTTP successes spaced
PROBE_INTERVAL apart (defaults: 3 successes, 0.5s apart), so the probe
only declares the server ready after ~1s of demonstrably-stable
response. Any non-success in the streak resets it to zero and the
slow-poll loop resumes — so a momentary blip during init doesn't get
counted twice on either side.

Tracked occurrences across recent PR runs: web-sdk PR #23 ci-shard-4,
PR #29 ci-shard-1 + ci-shard-4, PR #27 multiple shards.
…p manual dep retarget

Brings in the auto-patch infrastructure landed in #65 (composite
action + readiness gate + lefthook guard + dev script). Drops the
manual git+branch retarget on Cargo.toml: the 'Client PR: #2132'
marker on this PR's description now drives the dep injection at
CI runtime.

Cargo.toml + Cargo.lock are now byte-identical to origin/next.
@github-actions
Copy link
Copy Markdown

🔗 Linked client PR: 0xMiden/miden-client#2132

Field Value
Patched at 0xMiden/miden-client@jmunoz-decouple-statesync-from-store
Pin (head sha) 1fddc93fc47536d8d2c5e4c96848878df2c42db3
Upstream state open (merged: false)

This run is testing against the linked PR's head. The published artifact will use the canonical miden-client source — CI on main/next does not auto-patch.

Local-dev parity:

scripts/dev-with-client-pr.sh 2132    # apply the same patch locally
scripts/dev-with-client-pr.sh --clear                            # remove it before commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR doesn't need a CHANGELOG entry (trivial / non-user-visible)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant