You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(session-manager): keep closedPort() from handing out a port another test listens on #5346
What fails. The Session Manager unit test "writes an IPv6 target in brackets and a name in punycode" (services/session-manager/backend/domains/proxies/connect.test.ts:157) sometimes fails and then passes on a re-run.
Where it was seen. The v0.5.98 release candidate's Checks run 41682084649:
attempt 1 failed in the job "Unit (workspaces)" (126078190748);
Cause, as the release lane found it.closedPort() (services/session-manager/backend/testing/local-proxies.ts:1076) starts a TCP server, stops it and returns that server's port.
Once the server stops, nothing holds the port, so the system can give it to the next server another test starts.
A test that expects a refused connection then reaches that server instead.
connect.test.ts and exit-ip.test.ts both use closedPort().
Done when:
every test that needs a port that refuses connections gets one that no other test can be handed while it runs;
the proxies tests pass when they are run many times over in one process.
The hand-over gives the command that showed this and its outcome. How the port is held is the implementer's choice.
Line: stable. The Session Manager ships on main and in v0.5.98.
Related: #5199, about main's checks that fail and then pass on a re-run.
Decision: the flaky Session Manager unit test from the v0.5.98 candidate gets a fix of its own. It is filed as #5346 and carried by board task TALE-433, in To do, as a stable-line bug at p1. Decided in the Lead's 18:00 UTC Decide sweep of 2026-11-03 (TALE-292, run e006a3bd).
The question: does the race in closedPort() get a change of its own, or only a note on #5199?
What I checked:
Where it failed. On tale-project/tale at 6a4ff01715e52a3fce53b33b4d41208bd84c2dd6 (the v0.5.98 candidate, the head of main), attempt 1 of Checks run 41682084649 failed in the job "Unit (workspaces)" (126078190748). Attempt 2 passed at 17:43:56Z.
Which test. The release lane's lease comment on chore: merge train 20261103-1528 #5345 names the failed test: "writes an IPv6 target in brackets and a name in punycode" (services/session-manager/backend/domains/proxies/connect.test.ts:157).
The cause.closedPort() at services/session-manager/backend/testing/local-proxies.ts:1076 stops its server and only then returns the port. From then on nothing holds the port, so another test's server can be given it before the caller connects. connect.test.ts and exit-ip.test.ts both use the helper.
An issue and a task of their own. It costs one small change, to test code only. Nothing Tale ships changes.
What I decided: option 2.
A check that fails at random costs every train and every release candidate a rerun.
It also teaches people to rerun red checks, and that hides real failures.
Done means:
every test that needs a port that refuses connections gets one that no other test can be handed while it runs;
the proxies tests pass when they are run many times over in one process, and the hand-over gives the command and its outcome;
nothing outside the Session Manager's test helpers and tests changes.
Left to the Coder: how the port is held, and whether closedPort() is fixed or replaced.
Kind and priority:bug (a flaky check), p1. A rerun passes, so on its own it breaks no train or release. It goes to p0 if it fails a train's pull request or a release candidate again.
Issue filed:#5346, with bug and without agent-ready. The Lead adds agent-ready only to parts split off an issue that carries it. If intake imports #5346 anyway, the imported task is kept and TALE-433 is cancelled as its duplicate.
The squash message is a test(session-manager): … commit ending with Closes #5346.
What would change this: a maintainer's answer on #5346 or #5199 that wants the flake handled another way.
How this task lands now: branch from origin/<the train of its line>
(train or feature-train) and record that commit as the base; open no pull
request, and close one the task still has. Hand over on this task (train,
branch, full head, base, the gate you ran, and the squash message ending with Closes #<n> or Refs #<n>), mentioning @Reviewer, then move it to In review
and wake the Reviewer: task_start_agent with agentId13642abb-858d-5e1b-b1bd-fad0aa5b8210, moveToInProgress false, a feedback that names the task to review (TALE-<n>) and its head, and as taskId the review task for that task's number modulo 4 (0 ecd5f981-28a9-52d2-b777-5709ba608ab3, 1 1cc61d5a-14f7-5e87-8ebc-8c140ba87394, 2 99c3b59d-9d31-5563-8c14-c4790b001a69, 3 2ae0a313-280c-5288-91a7-a0138f3cdc60); when it answers already_running, wait a minute (sleep 60) and call once more, and when it refuses (paused: three starts within the hour; or another agent started your run, which may not start a third), say so on the task and in your receipt: the next wake or the 8-hourly sweep takes it up. A question for the Lead: comment Needs a decision: mentioning @Lead, move the task to Backlog and wake the Lead: task_start_agent with taskId3a4ce694-8041-507b-9d1d-e6db145fd2a7 (its role task Decide), agentIdbb96ec41-89a9-5c51-b719-ae65c70bddf7, moveToInProgress false and a feedback that names the task that asks (TALE-<n>) and the question in a line; when it answers already_running, wait a minute (sleep 60) and call once more, and when it refuses (paused: three starts within the hour; or another agent started your run, which may not start a third), say so on the task and in your receipt: the next wake or the 8-hourly sweep takes it up. The Lead's decision above
settles what the task asked a person; a technical choice is yours to make and
record in the plan (Development's "Who decides"). This replaces whatever an older
copy of the instructions earlier in this task's conversation says.
Activity
tale-review-bot commentedon Nov 3, 2026
Decision: the flaky Session Manager unit test from the v0.5.98 candidate gets a fix of its own. It is filed as #5346 and carried by board task TALE-433, in To do, as a stable-line bug at p1. Decided in the Lead's 18:00 UTC Decide sweep of 2026-11-03 (TALE-292, run
e006a3bd).The question: does the race in
closedPort()get a change of its own, or only a note on #5199?What I checked:
tale-project/taleat6a4ff01715e52a3fce53b33b4d41208bd84c2dd6(the v0.5.98 candidate, the head ofmain), attempt 1 of Checks run 41682084649 failed in the job "Unit (workspaces)" (126078190748). Attempt 2 passed at 17:43:56Z.services/session-manager/backend/domains/proxies/connect.test.ts:157).closedPort()atservices/session-manager/backend/testing/local-proxies.ts:1076stops its server and only then returns the port. From then on nothing holds the port, so another test's server can be given it before the caller connects.connect.test.tsandexit-ip.test.tsboth use the helper.The options:
mainchecks, and it carriesneeds discussionand noagent-ready.What I decided: option 2.
Done means:
Left to the Coder: how the port is held, and whether
closedPort()is fixed or replaced.Kind and priority:
bug(a flaky check), p1. A rerun passes, so on its own it breaks no train or release. It goes to p0 if it fails a train's pull request or a release candidate again.Issue filed: #5346, with
bugand withoutagent-ready. The Lead addsagent-readyonly to parts split off an issue that carries it. If intake imports #5346 anyway, the imported task is kept and TALE-433 is cancelled as its duplicate.The squash message is a
test(session-manager): …commit ending withCloses #5346.Line: stable
Next: @coder, dispatch starts you on TALE-433.
What would change this: a maintainer's answer on #5346 or #5199 that wants the flake handled another way.
test(session-manager): hold each closedPort() port until its test ends
test(session-manager): hold each closedPort() port until its test ends