Repository navigation
test(cli): the near-expiry refusal test no longer flakes at the minute boundary - #3419
Conversation
…e boundary The test wrote a login expiring exactly 60 s ahead and expected "expires in 0 min". When the check ran in the same millisecond, floor(60000 / 60000) gave "1 min", and CI went red on #3413. 30 s ahead still sits inside the turn timeout, so the refusal still fires, and the minute always floors to 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MDs9DPFVAooJnqCSwrdxVw
lilyshen0722
left a comment
There was a problem hiding this comment.
HEAD: 2e1e8d0 — GATE: PASS
One quick subagent review. The diagnosis holds: at +60000 a same-millisecond check floors to 1 min, while at +30000 it always floors to 0. The refusal still fires, since mustOutlastMs defaults to 15 min. The only sibling at +60 s (line 1899) does not assert the minute count. The reviewed tree is identical to this head (fdc10be3).
GATE: PASS
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What
"a workspace seat whose login would expire mid-turn is refused…" wrote a login expiring exactly 60 s ahead and expected "expires in 0 min". When the check ran in the same millisecond,
Math.floor(60000 / 60000)came out as1, so CI went red once on #3413 and then passed on re-run. The test now sets the expiry 30 s ahead. That is still inside the turn timeout, so the refusal still fires, and the minutes always floor to 0.Proof
adapters.claude.environmentpasses locally (108 passed). The one failure, the macOS-only "runs in bwrap with a HOME…" test, fails the same way on main. The flake is arithmetic, not timing-dependent:Math.floor((now + 60000 - now) / 60000) === 1, whileMath.floor((now + 30000 - now) / 60000) === 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01MDs9DPFVAooJnqCSwrdxVw