Repository navigation
test(gateway): stall in-flight test answers the owner-DM members check - #5887
Conversation
#5515 made the bridge adopt the registry's owner_dm_room only after /v1/room {"op":"members"} lists just the agent and its owner. This test's fake relay answered every /v1/room post with {"ok": true}, so the bridge never adopted the owner DM, held proactive-200.txt, and the three delivery assertions failed on main from 957e30f (#4564). The fake relay now answers the members op with the agent and owner, matching src/remote-gateway-bridge.test.py. Passes 3/3 locally on main; fails without the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qingyun-wu
left a comment
There was a problem hiding this comment.
Approving at 8bc9b57 (agent-assisted, Qingyun's Sutando seat). The mock relay now answers the bridge's /v1/room op: members probe (src/remote-gateway-bridge.py) with exactly the agent and its owner, the shape the owner-DM adoption check requires. So the bridge adopts the DM and reaches the in-flight send again. Ran locally: the test fails at the parent (3 failures, the same signature as main's shard 5: "no successful poll", posts=0) and passes at this head (posts=1, 0 failures). Test-only, with no production change.
liususan091219
left a comment
There was a problem hiding this comment.
Approving at 8bc9b57.
The diff is test-only: 4 added lines in tests/gateway-stall-exit-inflight-send.test.py, no production change. The fake relay now answers the bridge's /v1/room op: members probe (src/remote-gateway-bridge.py:217) with just the agent and the owner, the same shape as the fixture in src/remote-gateway-bridge.test.py:141. That lets the bridge adopt the owner DM and reach the in-flight send the test exists to check.
Verified locally in a scratch worktree, hermetic env (temp HOME and workspace, localhost mock relay):
main957e30f: fails, 3 of the 6 assertions (exit wait 3.3s, not archived, posts=0). The bridge log showsholding owner-directed proactive-200.txt: no owner DM reading.- Head 8bc9b57: passes 3 of 3 runs,
OK — 0 failure(s). - Head with the 4 lines removed: the same 3 failures come back (posts=0). The fixture is what fixes it.
CI at this head: all 9 python standalone shards pass, and license/cla is success (1 context). No unresolved review threads. #5883 and #5885 both fail on this same test right now (#5883 also has a separate pool-restart failure).
A note on "main green": the latest main run also failed shards 1/9 (watch-tasks-stream-shutdown-leaves-inflight-claim) and 6/9 (create-worker-roster-preflight). Those files aren't touched here and pass at this head, so they look like flakes, but this PR doesn't fix them.
Second approval at this head: @qingyun-wu.
— Sutando (susans-MacBook-Pro)
Coverage Gate✅ Diff coverage PASSES the 95% bar. Whole-tree (informational): 94%. Diff CoverageDiff: origin/main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
Brings in #5887 so the gateway-stall shard runs on the fixed test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
tests/gateway-stall-exit-inflight-send.test.py(added in #4564) has failed onmainsince it merged at 957e30f. That keepstsc + tests (clean install)andpython standalone tests (5/9)red for every gateway PR (for example #5883 and #5885). CI run 40239176069, job 121307141571:Cause
#5515 landed on
mainbetween #4564's last CI run (head 1f79824, green) and its squash merge. Since #5515, the bridge adopts the registry'sowner_dm_roomonly after/v1/room {"op": "members"}lists just the agent and its owner. This test's fake relay answered every/v1/roompost with{"ok": true}, so the bridge never adopted the owner DM and heldproactive-200.txt. The bridge log shows it:holding owner-directed proactive-200.txt: no owner DM reading from the gateway yet (never the pinned room). No post was sent, so all three delivery assertions failed. The bridge behaves correctly; the fixture was stale.Fix
The fake relay now answers the members op with the agent and the owner, matching the fixture in
src/remote-gateway-bridge.test.py. This is a test-only change of 4 lines.Evidence
mainwith the change: passes 3 times out of 3 (OK — 0 failure(s),posts=1).mainwithout the change: fails (exit 1). This is the regression control.Regression test: tests/gateway-stall-exit-inflight-send.test.py
Before fix: FAIL — 3 failures on main 957e30f (posts=0)
After fix: PASS — 0 failures, posts=1
🤖 Generated with Claude Code