Skip to content

fix(desktop): restore the shard-4 message-thread-summary cluster (one harness cause, #132) - #156

Merged
oscarlehuu merged 3 commits into
mainfrom
devin/fix-132-thread-summary-e2e
Aug 11, 2026
Merged

fix(desktop): restore the shard-4 message-thread-summary cluster (one harness cause, #132)#156
oscarlehuu merged 3 commits into
mainfrom
devin/fix-132-thread-summary-e2e

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 11, 2026

Copy link
Copy Markdown

Summary

The hypothesis in #132 was right: 15 of the 17 shard-4 failures were one shared cause, and it is a harness bug, not a product bug. Two one-line conditions in the E2E mock bridge, no product code touched.

Upstream's read-model overhaul stopped live thread replies from entering the channel timeline list; a thread's reply summary now comes from the relay's kind:39005 recount push. e2eBridge.ts only emitted that push when the channel was the huddle ephemeral channel, so a reply emitted live into an ordinary channel like general produced no message-thread-summary at all — and 15 specs asserted on it.

-  if (rootEvent && mockHuddle?.state.ephemeral_channel_id === channelId) {
+  if (rootEvent && emitLive) {

Making the recount universal then exposed a second mock/relay divergence: the mock persisted kind:20002 typing indicators into channel history, and the now-visible recount counted them as thread descendants (messaging.spec.ts saw "20 replies" where 18 were real). The relay treats kinds 20000–29999 as ephemeral and never stores them, so the mock now matches:

-    recordMockMessage(channelId, event);
+    if (event.kind !== KIND_TYPING_INDICATOR) {
+      recordMockMessage(channelId, event);
+    }
     emitMockLiveEvent(channelId, event);

D-041 records the rule both bugs violated: mock relay behavior is derived from relay semantics for all channels and kinds, never narrowed to the surface that first needed it — a selectively-faithful mock produces failures indistinguishable from product bugs, which is the expensive failure mode.

No spec was skipped, weakened, deleted, or given a longer timeout. The failures that remain are left red and honestly attributed to four new issues rather than silenced.

Related issue

Fixes #132 (partially — the shared cause and every failure it covers; see below).

Residue split out with full evidence, per the "file it, don't bundle a half-fix" rule:

project-outcomes.spec.ts:108 is untouched — owned by #125/PR #131. overscroll-boundary.spec.ts:34 was not chased, as instructed: it passes in a targeted run on both branches and only ever fails inside a full-suite run, consistent with #132's flaky/environmental call.

Definition of Done

#132 asks for Where it is satisfied
Test the one-shared-cause hypothesis first, say which it was Confirmed, with the code-level mechanism above. Harness bug.
Fix the message-thread-summary cluster e2eBridge.ts live kind:39005 emission. 8 of the 13 thread-unread and both threadpane-ultrawide tests go green.
relay-reconnect:617 / scroll-history:1281 — fix if tractable, else file with evidence Not tractable without discriminating instrumentation; filed as #154 / #155.
overscroll-boundary:34 — do not chase, state it Stated above, with targeted-run evidence on both branches.
project-outcomes:108 — out of scope Untouched.
Product vs spec/harness for each fix Both fixes: harness. Both remaining clusters: product (#152, #153).
No weakened/skipped specs, no raised timeouts None. Verify with the diff — it is 3 files.
Before/after lane duration Below.
Decision entry D-041 (allocated slot).

docs/crew/STATE.md is unchanged deliberately: this changes no shipped state, only test-harness fidelity.

Testing

No visual change, so no screenshots.

Shard 4 — the lane #132 is about — measured in CI, not locally (this PR's run 31458263391, job 93676494888), against the baseline #132 published:

Passed Failed Skipped Wall clock
Baseline (#132, PR #129's shard 4) 227 17 4 22.1m
This PR 233 9 4 20.7m

8 fewer failures, 1.4m of headroom bought back — 9.3m of margin against the 30m cancellation budget, up from 7.9m. That is the point of the exercise: the remaining failures are no longer paying the assertion-timeout and retry cost of 17.

The 9 that remain in CI are exactly the attributed residual set, with nothing unexpected: thread-unread 03/05/06/07/15 (#152), thread-orientation 03/04 (#153), relay-reconnect:617 (#154), scroll-history:1281 (#155). CI also marked 4 tests flaky-but-passing on retry (overscroll-boundary:34, project-outcomes:56, thread-reply-anchor-roleplay:163/:215) — the same intermittents seen locally, none of them a final failure.

Locally, same invocation in separate worktrees: base 20ba49d07 228 passed / 18 failed → this branch 235 passed / 11 failed, 0 newly failing, 8 newly passing. Consistent with CI.

Full smoke (all 4 shards, sequential, same box): base 965 passed / 33 failed → this branch 972 passed / 26 failed.

Every "newly failing" title from that full-suite comparison was re-run targeted on both branches rather than assumed flaky — that is how the typing-indicator bug above was caught (messaging.spec.ts:1328 was a genuine regression from the first commit, and is fixed here, not explained away).

Also green: pnpm --filter buzz build:e2e, pnpm --filter buzz check, pnpm --filter buzz typecheck.

Note on the base

Branched off PR #129 rather than main, because #129 is what un-cancels shard 4 and is not merged yet — so this PR's diff shows #129's three commits underneath it. Once #129 lands, the rebase is clerical and this reduces to the 3 files above.

Link to Devin session: https://app.devin.ai/sessions/bee9c37812e84af8b8fa520936a3118d
Requested by: @oscarlehuu

@oscarlehuu oscarlehuu self-assigned this Aug 11, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration Bot and others added 3 commits August 11, 2026 23:44
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
@oscarlehuu
oscarlehuu force-pushed the devin/fix-132-thread-summary-e2e branch from 497ee9b to 36723ce Compare August 11, 2026 14:14
@oscarlehuu
oscarlehuu merged commit 7a2ffc0 into main Aug 11, 2026
8 of 12 checks passed
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.

Shard-4 Desktop Smoke E2E: 17 preexisting failures newly visible after the lane was revived (15 share a missing message-thread-summary)

1 participant