Skip to content

test(store): wait for the archived count instead of assuming it arrived with the index - #571

Merged
Tryanks merged 1 commit into
mainfrom
fix/archive-test-waits
Oct 1, 2026
Merged

Tryanks merged 1 commit into
mainfrom
fix/archive-test-waits

Conversation

@Tryanks

@Tryanks Tryanks commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Handled per CONTRIBUTING → "When a test fails, or is met on the way", for store::tests::archiving_the_viewed_child_returns_to_its_parent, which failed once on Linux CI (#567's first run) and passed on rerun.

  1. Reproduce as the app would: alone ×6 and inside the full tcode-ui suite — all pass locally; the CI failure was under the shared runner's load. The assertion read archived(child) the moment selected_status(parent) turned true. Those are two replicated topics (the session index, and the index summary that carries the archived counts); the client applies whichever has arrived, and nothing in the protocol orders one before the other. The driver assumed an atomicity the app does not have — the same test already waits for archived(sibling) in its second half.
  2. The assertion's contract (archiving the viewed child returns the user to its parent, keeps the parent's records, and archives the child; a background archive does not move the user) is a real user path and a known regression (Return to parent on child auto-archive; GPT-6 low execution default #364). Kept.
  3. No code change: the host and client behave correctly.
  4. Fix: the child's archived state is awaited with the same wait_until the sibling's is, with a comment naming the two topics.

Checks: cargo fmt --all --check; cargo nextest run -p tcode-ui --locked archiving_the_viewed passes.

…ed with the index

The index and its summary replicate on their own topics; the return to
the parent follows the index, the archived count the summary. The test
asserted the count the moment the selection moved, which the protocol
never promised, and failed once on CI under load.
@Tryanks
Tryanks merged commit 42b5fe4 into main Oct 1, 2026
7 checks passed
@Tryanks
Tryanks deleted the fix/archive-test-waits branch October 1, 2026 19:02
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.

1 participant