Skip to content

P5 O8: the attempt-log tests cancel at the approval step, not at the hub's count (#304's flake) - #309

Merged
SSFSKIM merged 2 commits into
masterfrom
p5-o8-cancel-flake
Oct 28, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
p5-o8-cancel-flake

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026

Copy link
Copy Markdown
Owner

This fixes a flake from #304 in src/main/org/org-session.test.ts that hit class 1a runs on master. The change touches tests only.

The failure was in run 40740419061: "logs each attempt's start and its end, a cancel included…" expected attempt 1: cancelled at approval and received attempt 1: cancelled at checking.

Cause

The test waited for the hub's pending count to rise, then cancelled straight away. But the session posts the device's entry before it moves to the approval step: postPending resolves, then await pairingFingerprint(...) runs, and only then does step({step: 'approval'}) (org-session.ts:747-750). Under load, the cancel landed while the step still read checking.

Fix

Both cancels in that test now wait for the session's status to read the approval step, as the neighbouring test already does.

reviewer-low found the same early-cancel shape in "cancel stops the wait for approval…" (line 502). That test passed either way but did not guarantee the coverage its name promises, so it gets the same wait.

Validation Evidence

  • npx vitest run --project node src/main/org/org-session.test.ts: 59 passed (59).
  • Class 1a at 23a2c9a: run 40741860322, green (static, unit, probes).
  • reviewer-low on 0d760b1: no material findings. Its one note, the line-502 test, is fixed in 23a2c9a.

Residue

None.

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

…al step, not when the hub's count rises (the entry is posted before the step moves, so under load the cancel read 'checking')

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…o (reviewer-low: the same early-cancel shape)

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

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T18:12:59.225310Z 23a2c9a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit c978279 into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…s cancel flake fixed (O8)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers 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