Skip to content

Flaky merge-gating test: missionInbox 'reference-stable snapshot' fails intermittently on main (fails Desktop Fast + NuncioCrew Gate) #135

Description

@devin-ai-integration

Problem

src/features/home/lib/missionInbox.test.mjs:654same inputs return a reference-stable snapshot — fails intermittently, taking the whole Desktop Fast lane and the downstream NuncioCrew Gate with it:

AssertionError [ERR_ASSERTION]: Values have same structure but are not reference-equal
  at src/features/home/lib/missionInbox.test.mjs:665

Evidence that it is flaky, not branch-specific

Measured with the repo's harness loader and a narrowed name filter:

pnpm --filter buzz exec node --import ./test-loader.mjs --experimental-strip-types \
  --test --test-name-pattern='same inputs return a reference-stable snapshot' \
  src/features/home/lib/missionInbox.test.mjs
Branch Pass Fail
clean origin/main @ 35af74019 8 1
an unrelated PR branch (#128) 7 2

Identical assertion output on both. origin/main CI run 31362178966 (Desktop Fast job 93373095521) passed; PR #128 run 31395279532 (job 93476664430) failed on it with a documentation-only delta and an empty git diff origin/main -- desktop/src/features/home/lib.

So it fails on main too, at roughly the same rate. It was found while verifying #121 (PR #128) and is unrelated to that work.

Why it matters more than a normal flake

It fails a merge-gating lane (Desktop FastNuncioCrew Gate), unlike the known-broken smoke lanes (#109, #110) that reviewers already discount. Every unrelated PR pays a coin-flip tax and, worse, teaches reviewers to wave through a red gate.

What to solve

Find why the memoized snapshot is not reference-stable across identical inputs — a cache keyed on something not fully deterministic (iteration/insertion order, a time or id input, a shared mutable structure being rebuilt) is the usual cause. Fix the identity/memoization, not the assertion: the test is asserting a real invariant, and weakening or skipping it would hide the actual instability.

Definition of Done

  • Root cause identified and stated (why the snapshot loses reference stability).
  • The instability is fixed in the source, not by relaxing or skipping the test.
  • The named test passes in a repeated run (e.g. 20+ consecutive) on the fix branch.
  • The test is not weakened, and no new allowance/retry is added to hide it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions