Skip to content

chore: merge train 20261031-0751 - #5196

Merged
tale-code-bot merged 12 commits into
mainfrom
train-20261031-0751
Oct 31, 2026
Merged

tale-code-bot merged 12 commits into
mainfrom
train-20261031-0751

Conversation

@tale-code-bot

@tale-code-bot tale-code-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Cut: 5224003

The stable line's merge train: the 10 commits that landed on train since #5181 departed, each squashed behind the fast gate (formatting, typecheck, build), one commit per task. train carries the stable line (main, 0.5.x) only: fixes, and the tests, docs and CI about what main ships. All 10 commits are of those types (nine fix, one test), so none moved to feature-train before this departure. This pull request runs the full CI once for the whole train and rebase-merges when green (auto-merge). The Coder's merge-train role works it until it is green; while it is open no other stable-line train departs.

main (06fe8590, the merge of #5181) is the train's base: train was moved onto it after #5181 merged, so the commits apply to it unchanged. The merge-train role ran no fast gate of its own before this departure; each commit passed the Reviewer's when it landed.

main's own push runs on 06fe8590:

  • Security 41150926316 failed in Bun audit (job 124386990893): follow-redirects 1.16.1 is in GHSA-mrwp-f3q8-3g9p (high, >=1.16.0 <=1.16.1). This train changes no file of the security scope (.github/ci-scope.yml: bun.lock, the package.json files, the services' Dockerfiles, .trivyignore.yaml, security.yml), so this pull request's Security run 41182268369 skipped Bun audit and passed, and its merge starts no Security run on main, whose push paths are the same files. main's next scheduled or release-candidate Security run stays red on that advisory until main takes 1.16.2, as Renovate chore(deps): update dependency follow-redirects to v1.16.2 [security] - autoclosed #5021 does and as release/0.6 already does with 9dfaeea0d.
  • Checks 41150926366 failed in Unit (workspaces) (job 124386991412: services/sandbox-runtime/daemon/src/process-reaper.test.ts:782, "signalExecProcesses > a normally completed shim needs no post-exec process or environment reads") and so in Unit; its Backend integration (job 124387030248) was cancelled.
  • Build 41150926290 was cancelled (Build platform, Build sandbox-runtime, Build sandbox and three container tests).
  • CLI 41150926370, SAST 41150926345, Commitlint 41150926288 and Publish packages 41150926130 passed.

08103ad58 (TALE-263) changes .github/workflows/publish-packages.yml, one of that workflow's push paths on main, so this train's merge starts a Publish packages run on main. No commit changes a workflow's permissions.

Commits (10):

Task keys: TALE-131, TALE-207, TALE-190, TALE-129, TALE-243, TALE-247, TALE-263, TALE-264, TALE-266, TALE-270

08103ad58 (TALE-263) also carries Refs #4970, #4785: #4785 stays open after the merge, and #4970 is already closed.

Fixed on this branch by the merge-train role (2), each after the fast gate, the whole workspace's lint (turbo run lint --continue) and Knip:

  • fix(platform): test the device-room flag without a literal compare (6942f7213): Checks › Lint failed on the cut (run 41182268395, job 124481920539) at services/platform/backend/domains/tasks/agent-workers.ts:312, a boolean compared to true, which 6f086939f (TALE-207) brought in. readDeviceRoom now returns early on !rows[0]?.ask, which takes the same branch for a missing row, false and true.
  • test(load): stop exporting burst helpers no other module imports (7415fd2ae): Checks › Knip failed on the cut (the same run, job 124481920560) on 11 unused exports in tools/load/src/burst, which 50f6cf751 (TALE-247) brought in. Ten are used only in their own module and lose their export; readText, read nowhere, goes with its readFile import.

When a command exits, runnerd waits up to EXIT_DRAIN_GRACE_MS for its
stdio to close before it sends the exit event, and endStalled stood down
only once finish() had started. A stall round inside that drain marked
the exec stalled: its exit event carried EXEC_STALLED next to the
command's own exit code, and what it left running for another live exec
was reaped early.

endStalled now also stands down once the command has exited. A quiet,
idle exec whose command still runs is ended as stalled as before.

Closes #4722

Task: TALE-131
A task run parks with the host reason when the sandbox host refuses to
start its worker. Its next claim chose the task's previous worker again
whenever that worker was free and startable, without knowing whether its
machine could admit a session. A run whose last worker was on a full
server therefore asked that server again on every wake, retry and
restart until it failed after 12 hours, while a connected device had a
free slot and the agent had a free worker on it.

A park for the host reason now records the refused worker on the run
(project_agent_runs.host_refused_session_ids, migration 0224), once. A
run with refusals first takes a worker it can start without asking that
host again (TASK-R85): its previous worker or a warm free one that was
not refused or sits on a device with a free slot; while the
organization has a slot left, a stopped free worker on such a device;
or, when a device has room, a new worker, which the hub places there.
The sandbox service's /v1/devices now reports each device's free slots
and which sessions it holds, so the platform can tell; when the hub
does not answer, the claim goes on without it. When nothing fits, the
run chooses as before and waits for room in its previous worker. A run
no host refused still goes back to its previous worker first. No
workspace is destroyed: the refused worker keeps its files.

The waiting text and the docs no longer promise that a run waiting for
room starts on its own. They say it moves to another worker of its
agent that can start, or waits for room for up to 12 hours from its
start.

Closes #5006

Task: TALE-207
The docs frame that docs.tale.dev and the design-system docs share had
seven defects (#4909).

The docs 404 named each "Did you mean" card by an English rendering of
its slug ("Develop / Mcp Endpoint"). Each card now carries its page
title in the reader's language, from navPage, the lookup Previous/Next
already used; the design-system 404 already worked this way. slugLabel,
left without a consumer, is removed.

The route passes a section landing page by its address (/cloud is
cloud), while the navigation lists its file (cloud/index), so
navNeighbours found no neighbours there and navGroupTrail fell back to
an English folder name. Both now compare routes (slugRoute), and the
five section landing pages get Previous/Next and their breadcrumbs in
every language.

The search field showed "Search documentation" but was named "Open
search" (WCAG 2.5.3, Label in Name). It is now named by the text it
shows; its shortcut hint is hidden from the name and exposed as
aria-keyshortcuts. The phone bar's icon-only button keeps "Open search".

A demo whose code failed to load showed an empty code panel that never
loaded again. It now shows a loading line, then the code or "Couldn't
load this example's code." with Try again, and a failed load fetches
again on the next open.

"Copy page", "Copy code" and "Copy link to this section" only warned in
the console when the clipboard refused. They now go through useCopy,
which raises the shared "Couldn't copy to clipboard" toast; failedToCopy
moves from the platform's messages to @tale/ui, and the docs root mounts
the Toaster the design-system docs already had.

The prompts that hand a page to ChatGPT, Claude or Cursor are
translated, and recent searches are kept per language
(tale.docs.recentSearches.v1.<locale>), as the search index is.

Each fix carries a test that fails before it, and the manual suites and
automation maps of both docs sites say what changed.

Closes #4909

Task: TALE-190
A task comment restarts a working run's turn under a new exec. When the
sandbox refused that exec for room (its session short of memory, or
every live-exec place of its workspace taken), the steer failed the run
as steer_restart_failed: an attempt spent, its broker account stepped
past, and the retry started at once into the same full sandbox. An
EXEC_LIMIT start window was not raised as a refusal at all and failed
the run as harness_error.

The steer now raises an EXEC_LIMIT window as the kick does, and ends a
run whose restart sandboxCapacityRefusal classifies as a room wait under
the new failure code sandbox_capacity (class interrupted). Its refused
exec closes as the kick's room waits do (cancelled, awaiting_room). Its
retry spends no attempt and does not count toward the restart circuit
(freeCapacityWaits), keeps its broker account eligible, and starts once
the refusal's wait has passed. It resumes the run's conversation over
its kept delivery box with the comment in its brief, and parks for room
like any start if the sandbox is still full. Any other launch failure,
a pending Destroy included, fails the run as before.

Closes #4720

Task: TALE-129
A project agent's run that finds no room waits with its reason, and its
Run row says why, but the board read only running agent runs: the card
and list row of a task whose run waited or was queued looked idle, and
an automation run that only waited read as working.

The per-project ops read now sorts each task's newest live automation
run with runWaitingFor: a run at work, on its agent's turn or on a
person's answer stays in runningTaskIds, and one that is queued or
parked on anything else goes to automationWaits with what it waits for.
TaskBoardProvider reads every task's run once (runState): a question,
then a working run, then the live agent runs the indicators already
return (a parked run waits with its reason, an unparked queued one is
Queued), then an automation run that waits. The card's live line and
the list row say that state in the Run row's own words
(tasks.agentRun.waiting.*) and read it through the title's description;
while the live-run list is truncated, an unlisted In progress agent task
reads Run status unknown, never idle. The kanban drop hint counts a
queued or waiting run as live, since the drop cancels it too.

New strings in EN, DE and FR; the task automation guide, the manual box
TASK-F75a and the automation map follow.

Closes #5147

Task: TALE-243
Nothing showed that the fixes since #3977 (one worker per run, host
admission, CPU weight, the out-of-memory wait) keep the platform up
under the incident's load: tools/load drove HTTP users only, and the
Load workflow's stack ran no spawner.

- The mock provider's [[mock:hog=<MiB>]] and [[mock:hog-seconds=<s>]]
  directives answer a turn that offers a shell tool with a call of a
  python3 program that holds that much memory, every page written, and
  keeps a CPU busy; the result is answered in prose, so the turn ends.
  tale_load_mock_hog_calls_total and tale_load_mock_hog_results_total
  count the calls sent and the hogs that ran to their end, merged
  across the mock's processes.
- The mock's Anthropic parser reads the user's turn past Claude Code's
  system messages (role "system", or a user message the gateway wraps
  in <system-reminder>); it read the environment block instead, missed
  the directive, and a burst passed without its load.
- `tale-load burst` signs in the seeded owner, gives the project the
  largest sandbox budget the organization may set, creates the agents
  and starts the runs within the window. It samples /proc/meminfo, the
  spawner's admission door, /api/health/ready and the runs, then reads
  the kernel log and the process logs, writes report.json and
  report.md with one check per expectation (the load applied, no
  host-wide OOM kill, available memory above the spawner's reserve, no
  database pool timeout, health p95 under 1 s, every wait with a
  reason, no capacity failure, every run settled) and exits 1 on a
  miss.
- `stack up --listen-host` binds the api and the mock beyond the host
  their URLs name, so the sandbox relay and the gateway reach them from
  their Docker bridges; the stack state records the mock's metrics URL.
- The Load workflow's agent-burst profile builds the spawner, egress
  proxy, gateway and session runtime from the checkout, starts them as
  bun dev does with default settings, turns swap off, opens the kernel
  log, drops what reaches the api's and the mock's ports on the
  runner's interface, runs 12 runs across 7 agents within 30 s, each
  turn holding 2048 MiB and a CPU for 60 s, and uploads the report and
  the logs. The ci-disk guard covers its reclaim step.
- The README documents the burst, and the manual layer's row on a
  saturated host names it.

Load run 41174870519 on the 4 vCPU / 16 GB hosted runner held every
expectation (12 of 12 hogs ran, no OOM kill, lowest available memory
1.80 GiB against the spawner's 1.56 GiB reserve, no pool timeout,
/api/health/ready p95 5 ms, the 7 runs beyond the project's budget of
5 waited with org_limit, none failed for capacity).

Closes #5151

Task: TALE-247
The release-notes validator checked only the shape of the notes, so
Upgrade notes that contradicted the release passed: v0.5.89's said no
database migration was needed although it added
0204_usage_ledger_provider.sql and moved the API contract from 3.43.0
to 3.44.0 (#4970), and v0.5.83's left out twelve of its migrations
(#4785).

The maintainers' run before the tag (release-notes.ts --version) now
also reads from Git what the candidate brings since the previous
release tag, which git describe finds from the candidate's parent or
--previous-tag names. It refuses Upgrade notes that do not name each
migration file added to services/platform/backend/db/migrations, by its
file name, and the new API_CONTRACT_VERSION when it changed, and its
error names what is missing. Naming an earlier release's migration
stays allowed, and an HTML comment names nothing. validateReleaseNotes
is unchanged; the comparison is the new validateUpgradeNotes, fed by
readReleaseChanges.

Release's Prepare and compose steps and Publish packages pass
--shape-only. They run after the tag, where a refusal costs the
version, and Prepare's sparse checkout has no history (#4153).
Publish packages must refuse exactly what Release refuses. RELEASING.md
and the release-notes guide say what the check enforces.

Refs #4970, #4785

Closes #5167

Task: TALE-263
A reply could say a file was attached when its turn stored none: a
create_file or generate_image call that failed, a call the output cap
withheld, or a code run that wrote no file, with only a line of the
prompt against it. Nothing compared the reply with the files it carries.

The turn now reads the settled reply against its artifact parts. A reply
that carries no file is stamped fileNotAttached when it called a file
tool, or when it ran code and its text claims an attachment in its own
voice (first-person and enclosure forms in English, German and French).
The chat then shows "No file was attached to this reply." under it, in
every shipped locale. Words alone mark nothing, since a drafted letter or
a reply about the person's own upload says "attached" too; nor does a
reply that carries a file, only ran code, already says its file tools
could not be set up, or was blocked by the guardrails.

The chat spec states the rule as CHAT-R35; the files docs page and the
manual box CHAT-F85 describe what a person sees.

Closes #5168

Task: TALE-264
On an install at automation writer protocol 2, `tale deploy --dry-run`
admitted the target platform image before anything was pulled. The
admission inspects that image, so the preview the upgrade guide runs
after `tale update --version` stopped with "The installed automation
writer protocol could not be read safely." (exit 5) whenever the target
was not on the host yet, and its "Would pull" lines were never printed.

The dry run now prints its "Would pull" lines first. It admits the
target as the deploy would when the image is already on the host;
otherwise it says which check the deploy runs after its pull, and skips
the installed-writer comparison that needs the admitted target. The
real deploy still pulls first and admits after, and protocol-1 dry runs
print the same lines, the pull lines now before the cutover line.

A failed inspect in the image admission now names the image and the
read (`docker image inspect <image>`) instead of blaming the installed
writer.

Closes #5170
Task: TALE-266
The documented Windows install, irm ... | iex, runs the installer in the
caller's session. Write-Err ended every reported error with exit 1,
which closed that session's window and took the red error line and its
recovery hints with it. The top-level $ErrorActionPreference = "Stop"
also stayed in the caller's session after the install.

Write-Err now throws: the error returns to the caller's prompt or
script, and a run with -File still exits 1. Main sets the preference as
its own variable, so every step still runs with Stop while the caller
keeps its own.

A new installer test runs the script through Invoke-Expression in a
child PowerShell session whose release lookup finds no Windows binary:
the session keeps running after the error, with its preference
unchanged.

Closes #5174
Task: TALE-270
@tale-code-bot tale-code-bot added the merge-train A merge train's pull request into main label Oct 31, 2026
@tale-code-bot
tale-code-bot enabled auto-merge (rebase) October 31, 2026 07:51
CI ready (Checks) failed on merge train #5196 at 5224003: Lint (Checks
run 41182268395, job 124481920539) stopped on
backend/domains/tasks/agent-workers.ts:312, "This expression
unnecessarily compares a boolean value to a boolean instead of
negating it", which 6f08693 (TALE-207) brought in.

readDeviceRoom now returns early on `!rows[0]?.ask`. That takes the
same branch as the `!== true` compare did for a missing row, for false
and for true.
CI ready (Checks) failed on merge train #5196 at 5224003: Knip
(Checks run 41182268395, job 124481920560) listed 11 unused exports in
tools/load/src/burst, which 50f6cf7 (TALE-247) brought in.

Ten of them are used only in their own module and lose their export
(burstExitCode in command.ts; HEALTH_PATH, hostProbes,
DEFAULT_INTERVALS, defaultProjectSessions, burstTaskDescription,
readSandboxLimits, writeSandboxQuota, ensureAgents and
burstOrganization in driver.ts). readText in probes.ts is read
nowhere, so it goes, with the readFile import only it used.
@tale-code-bot
tale-code-bot merged commit df6105c into main Oct 31, 2026
106 of 108 checks passed
@tale-code-bot
tale-code-bot deleted the train-20261031-0751 branch October 31, 2026 09:10
tale-code-bot added a commit that referenced this pull request Oct 31, 2026
CI ready (Checks) failed on merge train #5196 at 5224003: Lint (Checks
run 41182268395, job 124481920539) stopped on
backend/domains/tasks/agent-workers.ts:312, "This expression
unnecessarily compares a boolean value to a boolean instead of
negating it", which 6f08693 (TALE-207) brought in.

readDeviceRoom now returns early on `!rows[0]?.ask`. That takes the
same branch as the `!== true` compare did for a missing row, for false
and for true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-train A merge train's pull request into main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant