Skip to content

test(desk-hub): keep ordering checks independent of unrelated pushes - #138

Merged
SSFSKIM merged 1 commit into
masterfrom
fix/desk-hub-directory-ordering-flake
Oct 24, 2026
Merged

SSFSKIM merged 1 commit into
masterfrom
fix/desk-hub-directory-ordering-flake

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Root cause: test interference, not duplicate client delivery

org-directory.test.ts shares one LocalHub across the file. Earlier tests close machines whose project leases remain online for the normal 15-second close grace. When those grace timers expire, Project.alarm reports the offline state; Registry.refreshOnline calls directoryChanged, which correctly pushes a new whole directory to every connected machine.

The failing assertion counted every call to Machine.directory through the fault-injection seam, before the production version guard. It therefore required the whole org to stop changing during the ordering test's retry window. A pool run's scheduling can put an unrelated close-grace expiry inside that window.

Before-fix evidence

  • The unchanged file passed locally once (17/17).
  • A controlled unrelated machine close-grace expiry reproduced the reported expected 2, received 3 failure. Both received directories kept the target machine offline; only the unrelated machine changed from online to offline. The ordering assertion passed.
  • With the original shared fixture and a temporary 5-second diagnostic delay before this case, earlier tests' actual grace timers reproduced expected 2, received 6. The four additional directories carried offline transitions for od-1, od-4, od-5, and od-7/od-8, respectively. The target od-26 stayed offline with the same seen in all five received directories. The ordering assertion again passed. The diagnostic delay and logging are not in this PR.

Change

  • Deliberately expire an unrelated machine's close grace after the newer directory arrives, and wait for that update on the watcher's real stream.
  • Wait until the injected failure has been consumed before submitting the newer target state.
  • Remove the invalid global RPC-count invariant. Keep the existing frames.slice(frames.findIndex(newer)).every(newer) ordering assertion unchanged and keep the existing 1,500 ms retry observation unchanged. No timeout was widened and no production behavior changed.

Only apps/desk-hub/test/org-directory.test.ts changes. The parallel PTY fix and the tech-debt tracker are untouched.

Validation

The corrected file passed locally (17/17), then passed ten consecutive complete-file stress runs (170 tests), all through /tmp/maws-review/with-slot.sh. No broad suite was run locally.

Five consecutive green full unit gates on final head 1f0581ea519d6ea1a1a48543522d4a9cfc225e95, all on the pool and all on attempt 1:

Run Gates Result
40119970772 static, unit, probes green; all four unit shards
40120094399 unit green; all four shards
40120358639 unit green; all four shards
40120659544 unit green; all four shards
40120920234 unit green; all four shards

The first run used scripts/ci-gate.sh <worktree> --gates static,unit,probes --class1a pool; the next four used --gates unit --class1a pool on the same pinned head. Each invocation created the script's fresh nonce commit; no affected-only selection was used. There were no red/preempted jobs to discount.

Independent doperpowers:reviewer-medium review over 9a564bc4398b59e060d45d52208554ed36e544b8..1f0581ea519d6ea1a1a48543522d4a9cfc225e95: correct, no material findings. The reviewer also ran the 17-test file through the slot wrapper successfully. No fixes or further review rounds were needed.

The existing directory row in friction tracker #92 now records the diagnosed cause and this fix; the tech-debt tracker was not edited. This PR remains open and is not merged.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 3586dab into master Oct 24, 2026
SSFSKIM added a commit that referenced this pull request Oct 24, 2026
… interference from earlier tests' grace expiries; five consecutive green unit gates)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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