GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(id): cut the interrupted sync session on committed state, not a record count (#188) by dezren39 · Pull Request #254 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 18, 2026

Copy link
Copy Markdown
Member

Fixes #188.

Problem

test_an_interrupted_session_restarts_without_duplicates flakes under full-suite load (left 0, right 256). The test cut the connection after the sender had written 400 records. Closing a QUIC connection discards whatever stream data the peer has not read yet, so under load the receiver could read fewer than 256 records before the close landed — its first batch then never committed, and the restart assertions saw 0 committed events instead of exactly one batch. The issue's own suggested fix: cut on committed state, not on a record count.

Solution

  • New CommitSignal (shared Arc<AtomicUsize>): a session side reports each batch it commits (in flush, only after the batch's transaction succeeds — a failed batch commits nothing and reports nothing).
  • New Cut::AfterRecordsWhenCommitted { records, signal, committed }: the sender writes records events, then waits (5 ms poll, 30 s cap) until the peer's signal reaches committed before closing the connection. If the commit never comes, the cut still happens and the test's assertions report the state the peer actually reached.
  • The loopback harness wires the acceptor's commit reports into the dialer's cut signal automatically when the cut carries one. Production sessions are untouched: sync_over passes Cut::Never and no signal.
  • The interrupted-session test now cuts at 400 records once B has committed BATCH_EVENTS (256), so the "one whole batch committed, the other 144 died with the session" premise is deterministic under load.
  • Two network-free unit tests cover the new plumbing: the signal counts batches across clones, and wait_for_commit is released by the commit it waits for (and at once by one that already happened).

Cut loses its Copy/PartialEq derives (the signal is neither); the one comparison site now uses matches!. The unused flight/record variants are kept as interruption-test plumbing under an explicit #[allow(dead_code)] — previously the PartialEq derive was the only thing keeping them from reading as dead.

Verification

  • cargo test --lib --no-run ✓ — warnings back to the single pre-existing one (Staged::keeps in ingest.rs); same for cargo check --lib and cargo check --lib --no-default-features ✓.
  • rustfmt --check on the changed file ✓ clean.
  • Network-free event_store::sync tests 5/5 pass locally, including the two new ones.
  • Honest limitation: the loopback test itself cannot run in my sandbox — UDP socket sends return EPERM there, so every iroh loopback test (including the untouched empty-store one) hangs to its 300 s timeout on unmodified main too. The interrupted-session test needs CI (or any UDP-capable host) for its end-to-end pass; the fix's moving parts are covered by the unit tests above and the compile checks.

Note: merged main's latest nix flake check (run 39081860390, head 5bddbd3) does not fail on the #240 fmt follow-up — the fmt stage passes now. It fails on rustc-LLVM ERROR: No space left on device while linking in the id-test/id-ci derivations run in parallel (--keep-going), plus one Firefox image-upload e2e failure in the same run. That disk failure is pre-existing infra, unrelated to this change; if this PR's check hits the same ENOSPC, the unit-test stage results are the signal to read.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Muse Sweep
fix(id): cut the interrupted sync session on committed state, not a r…
a3e87e6
…ecord count (#188)
@dezren39
dezren39 requested a review from a team as a code owner October 18, 2026 02:33
@github-actions github-actions Bot assigned dezren39 Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b009eaeb-619a-482e-a8f1-6d8d1eb9f148
📥 Commits

Reviewing files that changed from the base of the PR and between 5bddbd3 and a3e87e6.

📒 Files selected for processing: 1
  • pkgs/id/src/event_store/sync.rs
+---------------------------------------------+
| Because, no one wants to be a human linter. |
+---------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • 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

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit e1f9923 into main Oct 18, 2026
3 of 5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the sweep/188-cut-on-commit branch October 18, 2026 02:35
This was referenced Oct 18, 2026
Phase 3: test_an_interrupted_session_restarts_without_duplicates flakes under full-suite load #188
Closed
mcpx: re-home the open mcpx backlog from dezren39/nix, with this repo as the single source #309
Closed
This was referenced Oct 27, 2026
design(mcpx): JSON Schema validation of tool input and output — one validator at the client choke point #1481
Closed
feat(mcpx): validate CallTool arguments against inputSchema (-32602), warn on output mismatch (#1483) #1596
Merged
mcpx: Phase 2 of #1481 — validate tool arguments at CallTool (enforce, -32602) + structuredContent against outputSchema (warn-only) #1483
Closed
mcpx: the four genuine conformance gaps left at 2026-07-28, and the ~50 that are fixture artefacts not defects #1948
Closed
mcpx: JSON Schema validation of tool inputs/outputs and elicitation schemas (7 conformance rows) #1951
Closed
mcpx: elicitation storage is readable by any local user and never pruned; elicitation UI and response validation rows #1954
Closed
mcpx: sampling relay -- human review, validation of results, error mapping (8 conformance rows) #1955
Closed
mcpx: smaller conformance gaps -- user identity, annotation trust, rate limits, cursors, URI encoding, prompt validation, restart, invalidation #1957
Closed
mcpx daemon tests fail when the temp tree sits under the real $HOME (config walk leaks ~/.config/mcpx/config.json) #1959
Closed
mcpx: block further writes after a write whose outcome is unknown #1977
Closed
mcpx: adopt what is useful from codex-connectors-mcp #1984
Closed
mcpx: argument rules -- allow a call by its arguments, per tool and per argument (JSON Schema; depends on #254) #1986
Closed
mcpx: close #1951 remainder — stale dialect-gap rows + structuredContent warn-only policy doc #2190
Merged
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Phase 3: test_an_interrupted_session_restarts_without_duplicates flakes under full-suite load

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.