Skip to content

chore: merge train 20261105-1540 - #5389

Merged
tale-code-bot merged 15 commits into
mainfrom
train-20261105-1540
Nov 5, 2026
Merged

tale-code-bot merged 15 commits into
mainfrom
train-20261105-1540

Conversation

@tale-code-bot

Copy link
Copy Markdown
Collaborator

Cut: f1dbd1c

The stable line's merge train: the fourteen commits between 9be27c4e2 (the merge of #5373, the v0.5.100 candidate) and the cut. They are for v0.5.101.

Six of these commits are authored by a person (yannickmonney) and carry no Task: line:

8d37319dc is a feat on the stable line. The Lead's decision on TALE-234 (comment 802e12fb, 2026-11-05 05:36Z) keeps it and 38d214ea6 on this line for v0.5.101. Nothing moved to feature-train.

  • If either commit turns this pull request red and the fix is not small, the merge-train role asks the Lead (Needs a decision:). It does not take the commit out.

The follow-ups to 8d37319dc:

  • f163a9c90 stubs the new Default chat agent section in the project overview route test. Without the stub, the section calls useProjectChatAgents on a mock that lacks it, and the test's six cases fail under vitest.ui.config.ts.
  • 90c765441 drops two exports that nothing imports and that knip:check refused: the type ProjectChatAgents and the e2e helper fillComposer.
  • 2472e545c says in the API reference (de, en, fr) and in the OpenAPI descriptions which agent answers a chat sent over the API.
  • a32fb1586 names the project agents page in 580a2b011's turn test, in place of https://docs.tale.dev/agents. That URL redirects, and lint:links refused it as link-via-redirect.

90c765441 and a32fb1586 make the same code changes as the two patches that earlier drafts planned to commit on this branch after its departure. Those patches are not applied.

13ec650da (TALE-456, closes #5385) fixes a flake in services/session-manager/backend/domains/identity/fingerprints.test.ts. The test drew its pool straight from the generator. About 4% of the generator's Windows fingerprints lack navigator.oscpu, and drawIdentity refuses those. So "draws again after a generator failure" failed about 1 run in 10, as it did in the first attempt of the v0.5.100 candidate's Checks run 41993736580. The test now draws its pool with drawIdentity itself.

f0f715be4 (TALE-458, closes #5381) removes the client project from services/platform/vitest.config.ts. It was a second jsdom suite: no script ran it, but every bare bunx vitest --run did. It ran without css: true, and it left out the route tests. Now vitest.ui.config.ts (test:ui) is the jsdom suite alone. A new guard test, tests/guards/jsdom-suite.guard.test.ts, fails when a project of vitest.config.ts runs in jsdom, or runs a file of test:ui again.

67e9ad9a9 (TALE-459, closes #5382) makes ProjectAvatar decorative (aria-hidden) unless it is given a label, as @tale/ui's Avatar is. Its required name prop becomes the optional label. Beside a visible project name, that is a Home project row, a Home chat row, the chat header and the Projects list's name cell, it passes none, so a screen reader reads the name once. The manual accessibility suite gains A11Y-A22.

f1dbd1c84 (TALE-461, closes #5384) makes the browser highlight code in a language outside the 39 grammars that @tale/ui's Shiki highlighter loads up front. It loaded such a grammar through a template import of shiki/langs/<id>.mjs that Vite was told to leave alone, so the browser got a bare specifier it cannot resolve, and CSV and every other such language showed as plain text. The highlighter now takes the grammar from Shiki's own map, bundledLanguages from shiki/langs, which imports each grammar by name, so each becomes a lazy chunk of the build. A name Shiki has no grammar for, prototype keys included, is plain text without a warning.

One commit on this branch, not on train: 176848981 test(platform): word the guard's jsdom hint so Knip reads no package (refs #5381). Without it, knip:check fails with one unlisted dependency, jsdom` at tests/guards/jsdom-suite.guard.test.ts:20:31: checked at f0f715be4, at 67e9ad9a9 and at the cut f1dbd1c84. Knip 6.3.1 reads @vitest-environment <name> in any comment as an import. The guard's doc comment quoted that pragma in a code span, so Knip took the closing backtick as part of the name. The commit rewords the comment so that no value follows the pragma.

Checked before departure, without the credential:

  • At 1d1bd67af (now f29668ac0), with the two patches applied (07:14–07:19Z):
    • These exit 0: the frozen install, format:check, lint:links and knip:check.
    • So does oxlint in services/sandbox, packages/shared, packages/ui and services/platform.
    • turbo typecheck build passed, except the @tale/cli and @tale/web builds. Both failed on downloads alone, and neither reads a changed file.
    • The changed test files pass: sandbox 397 tests, platform 734 and ui 28.
  • At c663773a0 (now 112541dd2), 07:51–08:00Z:
    • oxfmt, commitlint, oxlint and the CLI's tsc exit 0.
    • In the changed test file, 3 tests pass and 2 fail. The 2 are the historical-stage tests, which need git archive --mtime. The worker's git 2.39.5 lacks it, and the parent's version of the file fails the same way. This pull request's CLI workflow is the first to run them.
  • At 112541dd2 (step 2 of chore: merge train 20261105-0740 #5373, 08:05–08:11Z): the fast gate. The install and format:check exit 0. turbo typecheck build passed 26 of 28 tasks.
    • @tale/web#build failed on a download alone and reads no changed file.
    • @tale/cli#build compiled for linux-x64, then failed on the darwin download. Its inputs include the changed stage.test.ts, so this pull request is the first to build it in full.
    • Without the patches, lint:links and knip:check fail there (08:55–08:57Z).
  • At a32fb1586, with no patch applied (2026-11-05 10:11–10:22Z):
    • lint:links exits 0: "505 documentation pages and 13088 tracked files: every link lands".
    • knip:check exits 0, with only configuration hints.
    • format:check exits 0.
    • oxlint --type-aware in services/platform exits 0, and the platform's tsc --noEmit exits 0.
    • commitlint passes on the four new commit messages.
    • The tests of the four new commits pass: scripts/openapi/spec.test.ts, lib/chat/turn.test.ts and server.test.ts (373 tests), and the overview route test under vitest.ui.config.ts (6 tests).
    • The whole UI suite under vitest.ui.config.ts ran for 330 s and was stopped unfinished. It failed only in app/features/automations, which this train does not touch:
      • version-compare-page.test.tsx passes alone, so its failure was a time-out under load;
      • condition-text.test.ts's Swiss German case wants 1’000, and the worker's ICU gives 1'000.
  • At 13ec650da (2026-11-05 12:53–12:56Z):
    • knip:check exits 0, with only configuration hints.
    • lint:links exits 0: "505 documentation pages and 13088 tracked files: every link lands".
    • format:check exits 0: oxfmt on 9512 files and ruff on 53.
    • oxlint --type-aware in services/session-manager exits 0, and so does its tsc --noEmit.
    • commitlint passes on the new commit message.
    • fingerprints.test.ts passed in 10 runs out of 10, 118 tests each.
  • At f0f715be4 (2026-11-05 14:01–14:05Z):
    • knip:check exits 1: one unlisted dependency, jsdom`, in the guard's doc comment. With the branch's Knip commit applied, it exits 0 with only configuration hints.
    • lint:links exits 0: "505 documentation pages and 13089 tracked files: every link lands".
    • format:check exits 0: oxfmt on 9513 files and ruff on 53.
    • oxlint --type-aware in services/platform exits 0, and so does its tsc --noEmit.
    • commitlint passes on the new commit's message and on the branch's Knip commit message.
    • The guard test passes, 3 tests, before and after the Knip commit.
  • At 67e9ad9a9 (2026-11-05 14:08–14:17Z):
    • knip:check exits 1 on the same single finding from f0f715be4, and on nothing in 67e9ad9a9.
    • lint:links exits 0: "505 documentation pages and 13089 tracked files: every link lands".
    • format:check exits 0: oxfmt on 9513 files and ruff on 53.
    • lint:manual exits 0, over 2037 boxes.
    • oxlint --type-aware in services/platform exits 0, and so does its tsc --noEmit.
    • commitlint passes on the new commit's message.
    • Under vitest.ui.config.ts, 51 test files near the change pass, 677 tests: app/features/home, app/features/projects, chat-surface.test.tsx, thread-sharing.test.tsx and dashboard-lazy-failures.test.tsx. So does chat.loader.test.ts.
  • At the cut f1dbd1c84 (2026-11-05 15:35Z): knip:check exits 1 on the guard's single finding alone.
  • At this branch's head 176848981, the cut and the Knip commit (2026-11-05 15:31–15:38Z):
    • knip:check exits 0, with only configuration hints.
    • format:check exits 0: oxfmt on 9514 files and ruff on 53.
    • lint:links exits 0: "505 documentation pages and 13090 tracked files: every link lands".
    • lint:manual exits 0, over 2037 boxes.
    • oxlint --type-aware exits 0 in packages/ui and in services/platform, with 0 warnings and 0 errors.
    • commitlint passes on f1dbd1c84 and on the Knip commit.
    • @tale/ui's whole unit suite passes, 398 files and 4458 tests, src/markdown/shiki.test.ts among them. The guard test passes, 3 tests.
  • Not run on the worker:
    • the browser tests message-artifacts.browser.test.tsx, home-panel.browser.test.tsx, shiki.browser.test.tsx and document-preview-text.browser.test.tsx, because there is no Chromium 1234;
    • the end-to-end spec chat-agents.spec.ts;
    • Backend integration and the migrations 0236 and 0237, because there is no Postgres;
    • the full server unit suites;
    • turbo build at a32fb1586, 13ec650da, f0f715be4, 67e9ad9a9 and f1dbd1c84, including the docs build, and tsc --noEmit in packages/ui at f1dbd1c84;
    • the whole UI suite under vitest.ui.config.ts at f0f715be4 and 67e9ad9a9. f0f715be4 does not change vitest.ui.config.ts, and at 67e9ad9a9 only the tests near the change ran;
    • the Camoufox lane fingerprints.camoufox.test.ts, which 13ec650da does not change;
    • A11Y-A22, the manual check that 67e9ad9a9 adds for a person with a screen reader;
    • Windows.

Commits (14):

  • fix(platform): keep earlier tool results whole while the history fits
  • fix(platform): show a file a reply's text names by its reference once
  • feat(platform): let project agents answer in chat and propose changes
  • fix(platform): renew file links that run out while a page stays open
  • fix(sandbox): bound the session's docker run by the remaining budget
  • test(cli): give each historical stage schema its own test
  • test(platform): stub the chat agent section in the overview route test
  • fix(platform): keep two chat agent helpers private to their files
  • docs(platform): say which agent answers a chat sent over the API
  • test(platform): use a docs URL that does not redirect in a history test
  • test(session-manager): draw the fingerprint test pool with drawIdentity
  • test(platform): define the jsdom suite once, in vitest.ui.config.ts
  • fix(platform): read a project's name once beside its icon
  • fix(ui): highlight grammars outside the eager list in the browser

Task keys: TALE-441, TALE-444, TALE-372, TALE-451, TALE-456, TALE-458, TALE-459, TALE-461.

It rebase-merges when green (auto-merge). The Coder's merge-train role (TALE-234) works it until it is green. While it is open, no other stable-line train departs.

tale-code-bot and others added 15 commits November 5, 2026 08:05
A follow-up after a chat turn that read pages sent every earlier tool
result cut to 400 characters per string, even when the history fitted
the window, because fitHistory bounded each result before its budget
check. A detailed answer next to a stub of the page it came from reads
as an answer the model could not have known, so Claude Sonnet 5.5
opened its next reply by correcting a truthful answer and fetched the
pages again.

A history that fits the window is now sent as stored, every tool result
whole. Over budget, the oldest tool results are shortened first, each
beside a note that says it was read whole when its call ran and that
the answer which followed was written from all of it. Only when that
is not enough are the oldest messages dropped behind the notice, and
the room they free goes back to the newest results. Text a person or
the assistant wrote is never shortened.

Every tool round fits the history again around the reply's own
results, which go out whole, so a turn that reads more pages makes room
by shortening older results instead of overflowing the window. All
fits of a turn share one clock, so a history that still fits is sent
byte-identical and a provider's prefix cache holds.

The chat basics page (en, de, fr) said Tale displays a notice when
older messages are omitted, yet that notice reaches the model only. It
now says what is shortened or left out, and that the assistant is told.

Closes #5356

Task: TALE-441
A model that made a file sometimes wrote the reference its tool answered
with into the reply, as a picture or a link (`![nook](s3:…)`). The
renderer dropped the unknown `s3:` scheme, so the picture drew a second
time as a grey placeholder whose preview opened empty, under the copy
the reply already showed.

The chat's Markdown now keeps the `s3:` scheme where it asks for it. A
picture naming a file the reply made is not drawn in the text, since the
file shows under the reply; another stored picture is drawn only when
the reader may open it; a link to a stored file is a button that opens
its preview; and a picture nothing can draw reads as its description.
Copy leaves the references out. The file tools tell the model that the
files show under the reply and never to write their references.

Closes #5358
A chat filed in a project can now answer as one of the project's own
agents. The agent's instructions lead the reply, it loads its equipped
skills beside the ones the person chose, and it answers with its model
when the person may use that model in chat. Its runtime, connectors,
platform tools and secrets stay with its tasks. The message box names
the chat's project and who answers. A new chat starts with the
project's default chat agent, the first agent created unless an editor
chose another on the project's General page (saved against the value
the page read), and its owner switches in the message box. Moving a
chat takes the new project's default; moving one that is shared with
its project asks first, because the share ends. Each reply records the
agent it was written as, deleting an agent hands its chats back to the
assistant, and a task made from the chat starts with the chat's agent.
Migration 0236 adds the chat's agent and the project's default.

A chat can also propose changes to projects and agents. It can create
a project, change a project's name, description, instructions or
default chat agent, add an agent, or change an agent's name,
instructions, model or skills. Two tools read the person's projects
and keep a checked proposal (migration 0237); the reply shows it as a
card, and nothing changes until the chat's owner applies it, through
the same services as the project pages, once, with audit rows that name
the chat. A proposal whose subject changed since is refused and says
why. The tools are offered to editors and admins chatting in the app
only, and a chat filed in a project reaches that project alone.
Sharing, secrets, connectors, tool grants and deletion stay on the
project's pages.

The composer's pickers work by keyboard, and picking a project in a
chat's Move to project submenu now shuts the whole menu.

Closes #5361
Closes #5362
Closes #5363
Closes #5364
A chat kept the presigned links of its pictures for as long as the page
stayed open, while each link lives 15 minutes. Opening a picture after
that showed a broken image in Image preview: its link answered 403 and
nothing fetched a new one.

The object store and the app now read the lifetime from one constant
(FILE_LINK_LIFETIME_SEC). The batch of file links
(files/queries:getFileUrls) counts as fresh for 10 minutes and is
fetched again when the tab is looked at again, while a refusal stays as
it is. A picture or preview whose link no longer loads asks once per
link lifetime for a new link (useFileLinkRenewal), holds its place
meanwhile and draws from the new link. When that does not draw either,
it shows the file's card or chip, or its words in a reply's text. This
covers the pictures under a reply, a stored picture a reply's text
names, a message's attached photos and the previews of a task's
pictures.

CHAT-R33 and CHAT-R40 say so, and the manual box CHAT-B33 judges it
against a live store. The manual readme's total and its chat row are
the true box counts again.

Closes #5366

Task: TALE-444
The session's `docker run` had a fixed 30 s inside a create budget of
180 s (SANDBOX_SESSION_CREATE_TIMEOUT_MS). On a slow Docker host the CLI
was killed at 30 s with most of the budget left, and the create failed
with an error that said nothing, `docker run (session) failed: `,
answered as 502 create_failed. The Build workflow's smoke test failed
so on main and on the merge trains.

The run now gets whatever remains of the create's budget. The operation
budget records its deadline beside its signal, a nested budget ending
no later than the one it runs in, and operationRemainingMs() reads the
time left of the tightest one. A budget that runs out aborts with an
OperationDeadlineError, so a run killed by its own timer or by the
budget is told apart from one that failed: its error names the timeout,
how long the run had, the budget and its variable, and keeps any output
of the CLI. That verdict is taken as the run returns, so a slow cleanup
of a run that failed on its own does not turn its failure into a
timeout.

The create route rethrows a failed create to handleCreate, which
answers it as before with 502 create_failed. Answered in the route once
the budget had ended, the backend's message was replaced by the bare
"sandbox operation deadline exceeded".

The note on --pull=never, in the run's arguments and in sessions.md,
names the create's budget instead of the run's old 30 s.

A probe test runs the create in a short budget with a docker that
outlasts it, a run that times out on its own, one the budget kills and
one that fails while its cleanup outlasts the budget. Tests of
spawn-util and session-routes pin the remaining time, the deadline's
reason and the route's answer.

Closes #5280

Task: TALE-372
The test that stages historical catalogues staged two in a row, one of
schema 1 and one of schema 2, within one 30 s limit. On Build (windows)
of CLI run 41944571596 (attempt 1) the runner's git steps turned slow
for a while (a fixture commit took 5.7 s, an init 2.4 s): the first
stage took about 20 s and the second ran out of time in its fixture's
git add. Across 323 Build (windows) jobs since 2026-10-13 the test took
3.8 s at the median and 19.9 s at most when it passed; that run is its
one failure.

Each schema is now a test of its own with the same 30 s, the way
release.test.ts repeats a test per client. Each still stages its
catalogue offline and checks its sources and its repository
declaration, a failure names its schema, and no limit is raised.

Closes #5372

Task: TALE-451
The project overview route test mocks the project query hooks with
useProject alone, so the Default chat agent section that the General
page gained calls useProjectChatAgents on the mock, throws, and all six
navigation tests fail under vitest.ui.config.ts. Stub the section the
way the test already stubs the reviewer, sharing, archive and danger
zone sections: the test is about the identity form's drafts.
Knip reports the ProjectChatAgents type and the e2e fillComposer helper
as exports nothing imports. The type has no reader, so it goes;
fillComposer is file-private again, as before the chat agents spec,
which sends through sendInOpenThread.
The API reference and the OpenAPI descriptions still said that every
REST chat uses the built-in assistant. Since a chat's owner can choose
one of its project's agents in the app, a send over the API to that
chat answers as the agent. A chat the API creates starts with the
assistant, also in a project whose new chats start with an agent, and
no message read names the agent (CHAT-R14, CHAT-R41).
lint:links refuses https://docs.tale.dev/agents in the history test's
fetched-page fixture, because that address redirects to
/platform/projects/project-agents. Name that page instead; the test
reads only the fixture's length.
The fingerprint tests drew their pool of real fingerprints straight from
the generator, but drawIdentity refuses some of those: about 4 % of the
generator's Windows fingerprints have no navigator.oscpu. A test that
hands drawIdentity the same entry of the pool every time then failed
whenever that entry was one it refuses, about 1 run in 10 of the file;
"draws again after a generator failure" failed the v0.5.100 candidate's
validation so.

Draw the pool with drawIdentity itself, with the real generator and the
stand-in for camoufox-js, so that it holds only fingerprints drawIdentity
takes. The test that failed now also checks that drawIdentity draws
exactly once more after the generator failure.

Closes #5385

Task: TALE-456
vitest.config.ts held a `client` project, a second jsdom suite that no
script, workflow or doc ran but every bare `bunx vitest --run` did. It
drifted from vitest.ui.config.ts, the suite test:ui runs and CI shards.
It ran without `css: true`, so the date picker in the API key dialog,
which a CSS module makes clickable inside a dialog, kept the dialog's
`pointer-events: none` and three tests failed there that pass in CI.
It also left out the 35 route tests.

Remove the project, so vitest.ui.config.ts is the jsdom suite alone. As
a project it could not carry that config's root-only settings (the
worker cap, the console filter). A new guard asks Vitest which files
each config runs, and fails when a project of vitest.config.ts runs in
jsdom or runs a file of test:ui again. test:ui runs the same 846 files;
server and pii run the same files plus the guard. The platform tests
README says how to run one jsdom test file.

Closes #5381
Task: TALE-458
ProjectAvatar was always an image named after the project, so where it
sits beside the visible name a screen reader read the name twice: a Home
project row ("Launch site Launch site"), a Home chat row's project
marker, the chat header's project and the Projects list's name cell.

The avatar now follows the rule of @tale/ui's Avatar: it is a named
image only when it is given a label, and decorative (aria-hidden)
otherwise. The rows, links, header and cell beside the name pass none,
so the name is read once, from the text. The composer's project control
and the Move to project rows, which already named themselves, drop the
unused name too. The Change icon and color trigger and its color and
icon options, where no text beside the avatar names it, keep their name
through the label. The Projects list's loading skeleton no longer
renders an image with an empty name.

Tests assert the accessible names: the avatar is decorative without a
label and named with one (axe both ways), a Home project row's link and
a Home chat row carry the project's name once, the chat header has no
image named after the project, the table's name cell reads its key and
name once, and the identity trigger keeps the project's name. The
manual accessibility suite gains A11Y-A22 for a real screen reader.

Closes #5382

Task: TALE-459
The shared Shiki highlighter loaded a grammar outside its 39 eager ones
through a template import of `shiki/langs/<id>.mjs` that Vite was told to
leave alone. The browser received a bare specifier it cannot resolve, so
CSV and every other such language showed as plain text with a console
warning, in file previews and in Markdown code blocks alike. Node resolves
bare specifiers, so the unit tests never saw it.

The highlighter now looks the grammar up in Shiki's own map,
`bundledLanguages` from `shiki/langs`, loaded on first need. It names
every grammar in an import of its own, so each becomes a lazy chunk of
the build. A name Shiki has no grammar for, prototype keys included, is
plain text without a warning; a grammar that fails to load still warns.

A browser test covers the CSV highlight and a csv fence in Markdown, and
the platform's file preview test a planets.csv file.

Closes #5384

Task: TALE-461
Knip reads `@vitest-environment <name>` in any comment as an import of
the environment's package. The jsdom suite guard's doc comment quoted
the pragma in a code span, so Knip took "jsdom`" with the closing
backtick as a package and knip:check failed on an unlisted dependency.
Name the pragma without a value: the comment says the same, and
neither Knip nor Vitest reads it.

Refs #5381
@tale-code-bot tale-code-bot added the merge-train A merge train's pull request into main label Nov 5, 2026
@tale-code-bot
tale-code-bot enabled auto-merge (rebase) November 5, 2026 15:41
@tale-code-bot
tale-code-bot merged commit f21fd15 into main Nov 5, 2026
128 of 136 checks passed
@tale-code-bot
tale-code-bot deleted the train-20261105-1540 branch November 5, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment