Skip to content

chore: merge train 20261102-1557 - #5328

Merged
tale-code-bot merged 7 commits into
mainfrom
train-20261102-1557
Nov 2, 2026
Merged

tale-code-bot merged 7 commits into
mainfrom
train-20261102-1557

Conversation

@tale-code-bot

@tale-code-bot tale-code-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Cut: 671d0b9

The stable line's merge train: the six commits between main and the cut. The Reviewer squashed four of them onto train behind the fast gate (formatting, typecheck, build). A maintainer pushed the third and the fifth to train directly, and the merge-train role checked them before departure (below). train carries the stable line (main, 0.5.x) only: fixes, and the tests, docs and CI about what main ships. Five commits are fix. TALE-357's is ci, for the documentation screenshot harness that main already ships. So nothing moved to feature-train before this departure. This pull request runs CI once for the whole train, in the scope its changed files select, 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 (917e48d41fac6147a45e3dbf33561ae05df01e3f, the merge of #5296, tagged v0.5.96) is the train's base: the cut sits directly on it, so the commits apply unchanged.

The train changes 61 files: 3406 lines added and 251 removed. Five files are added; none is deleted or renamed:

  • .github/workflows/docs-screenshots.yml;
  • services/db/migrations/knowledge-db/private_knowledge/00000000000017_documents_embedding_model.sql;
  • services/platform/backend/domains/knowledge/embedding-model.integration.ts and service.model-moved.test.ts;
  • services/platform/backend/domains/members/routes.list.test.ts.

The 61 files are:

  • 47 in services/platform;
  • one in services/db, the knowledge-db migration;
  • two in configs, the GitHub and Twilio connector definitions;
  • two in .github: CI.md and the new workflow;
  • two in tools/cli, the forgejo-port manifest and its README;
  • one in packages/shared;
  • six in docs, the same two pages in English, German and French.

Matched against .github/ci-scope.yml by a local reading of its globs (the scope job of this pull request decides), they fall in these scopes: all, added, build, build_image_inputs, build_platform, build_db, build_docs, build_storybook, build_ci_tests, e2e, e2e_platform, e2e_web, e2e_docs, integration and cli. That is not the full scope.

The new Docs screenshots workflow runs only on dispatch and on pushes to docs-screenshots/ branches, so this pull request does not run it. GitHub dispatches it once main holds it. Its CLI tests and the workflow guards run here.

Checked before departure:

  • As TALE-387 and TALE-388 landed: the platform server and UI tests of the changed members and projects code.
  • On the tree of 192e2c105, the train before the third commit:
    • bun run knip:check, the whole-repository lint (bunx turbo run lint), bun run lint:conflicts and bun run lint:links;
    • the platform's browser (test:browser, Chromium), UI (test:ui) and server (test, the server and pii projects) suites.
    • These suites failed only where the checking worker differs from CI:
      • a click that timed out under load and passes alone;
      • the two de-CH number tests that its newer ICU fails;
      • 16 server tests in golden-errors.test.ts and render_fetch.test.ts that its Node 24 fails, the same 16 as on main's tree.
  • On the tree of 4db8ab04c, for the third commit, all green:
    • the fast gate (bun install --frozen-lockfile, bun run format:check, bunx turbo run typecheck build): 24 of 26 tasks passed. @tale/cli#build and @tale/web#build stopped only at the downloads the checking worker cannot reach, and none of the commit's files is among their inputs;
    • the lint of @tale/platform, @tale/shared and @tale/docs;
    • bun run knip:check, bun run lint:links, bun run lint:conflicts and bun run lint:manual;
    • data-residency-settings.test.tsx under the UI configuration: 70 tests;
    • 16 server test files of catalog_fetch.ts, catalog_normalize.ts and their importers: 458 tests;
    • the docs suite: 778 tests.
  • On the tree of 66e26875c, for TALE-357, all green:
    • bun install --frozen-lockfile and bun run format:check;
    • 45 tools/cli test files, 1479 tests: the 38 that read .github/workflows or .github/CI.md, and the rest of the forgejo-port tests;
    • packages/e2e's config.test.ts (5 tests) and services/sandbox's e2e/incus/workflow.test.ts (13 tests);
    • the platform's turbo-inputs and integration-scope guards, tests/docs-screenshots/manifest.test.ts and lib/mocks/contract/openai-compat.test.ts: 124 tests;
    • the web site's capture-product-screenshots.test.ts and turbo-inputs.test.ts (11 tests), and the docs site's image-manifest.test.ts;
    • the lint of @tale/cli and @tale/platform;
    • bun run knip:check, bun run lint:links, bun run lint:conflicts and bun run lint:manual.
  • Not run for TALE-357:
    • the workflow itself;
    • ytdlp_live.test.ts, which runs only with YOUTUBE_LIVE_TEST=1.
  • On the tree of 66e26875c, the train's first four commits: the platform's server (test, the server and pii projects), UI (test:ui) and browser (test:browser, Chromium) suites. As on 192e2c105, they failed only where the checking worker differs from CI:
    • server: 91674 tests passed; the same 16 tests in golden-errors.test.ts and render_fetch.test.ts failed;
    • UI: 9280 passed; the same two de-CH number tests failed;
    • browser: 740 of 742 passed. The two that failed are clicks in automation-editor.browser.test.tsx that timed out under load; that file passes alone (27 tests).
  • Also on the tree of 66e26875c:
    • packages/shared's suite: 1143 tests, all green;
    • the platform's Storybook build (bunx turbo run storybook:build --filter=@tale/platform, what CI's Storybook job builds for the platform): green. The other three Storybooks take nothing from the train but a doc comment in packages/shared;
    • the CLI's full suite after bun run generate (bun test --timeout 30000): 3956 passed, 42 skipped. The 8 that failed need what the checking worker lacks: six historical rebuilds in src/lib/config/releases/ need git archive --mtime, and the two source archives of scripts/action-archive.test.ts exceed its 512 MiB file-size limit;
    • the platform's bun run configs:validate, which the Build job runs: 12 provider connectors, 9 model catalogs, 10 harnesses and 24 connectors validated;
    • the docs site's prerender suite (bunx turbo run test:prerender --filter=@tale/docs, which the Checks build job runs after the build): 11 tests in 2 files, all green;
    • bun run test:performance with 3 samples instead of the Performance job's 20: all 24 default workloads passed their correctness checks. Its latencies are measurements, not budgets.
  • On the cut's tree, for 8d148e30e and TALE-418, which reached train at 15:34 and 15:38 UTC:
    • the fast gate: bun install --frozen-lockfile and bun run format:check passed, and bunx turbo run typecheck build passed 24 of its 26 tasks. @tale/web#build stopped only at its fetch of the GitHub releases list, and none of the train's files is among its inputs. @tale/cli#build compiled the Linux binary and stopped at the download of Bun's macOS target. Neither commit's files are among its inputs, but TALE-357's forgejo-port manifest and README are, so this pull request's Build is its proof;
    • bunx commitlint --from 917e48d41fac6147a45e3dbf33561ae05df01e3f --to <cut>, the command of the Commitlint job: six commits, no problem;
    • the lint of @tale/platform and @tale/docs, bun run knip:check, bun run lint:links, bun run lint:conflicts and bun run lint:manual: all clean;
    • the platform's server suites (test, the server and pii projects): 91725 tests passed and 13 were skipped. The 16 that failed are the same 16 tests in golden-errors.test.ts and render_fetch.test.ts that the checking worker's Node 24 fails on main's tree;
    • the four test files of the data-residency settings under the UI configuration: 82 tests;
    • for the settings texts and data-residency pages it changes in English, German and French: the platform's lib/i18n/messages.test.ts (37 tests), packages/ui's i18n suite (231 tests) and the docs suite (778 tests);
    • bun run configs:validate: 12 provider connectors, 9 model catalogs, 10 harnesses and 24 connectors validated;
    • the CLI's full suite after bun run generate: 3956 passed and 42 were skipped. The 8 that failed are the same 8 as on 66e26875c, which need what the checking worker lacks.
  • Not run for 8d148e30e:
    • embedding-model.integration.ts and vector-width.integration.ts, which need a real Postgres. This pull request's Backend integration job runs the integration check, which the commit extends with checkEmbeddingModelChange;
    • its knowledge-db migration on a real database, and the db image build.
  • Not run: Opengrep (SAST). Its pinned engine is a download the checking worker cannot reach, so the train was read against its rules instead:
    • The new workflow passes inputs.* through env: and puts no ${{ }} in a run: script. It has no pull_request_target or workflow_run trigger and no actions/github-script. So the GitHub Actions injection and checkout rules do not apply.
    • Its curl calls to http://127.0.0.1 fall under curl-unencrypted-url, which tools/opengrep/excluded-rules.txt excludes.
    • The 42 rules with regex patterns (the regex and generic rules, read with Python's re) match nothing in the train's 61 files.
    • The code the train adds calls none of the sinks of the JavaScript and TypeScript rules: no child_process, eval, new Function, raw HTML or http:// request.
    • In 8d148e30e, the only http:// address is the base URL of the integration test's own loopback server. Its unsafe statements are built from module constants and pass every value as a parameter. The registry's insecure-transport rules match only http.request, http.get, axios, got and node-rest-client calls on an http:// literal, and its SQL injection rules cover pg, mysql, sequelize and knex.

This pull request runs the full suites again on CI's own runners.

git merge-tree --write-tree origin/feature-train <cut>, with feature-train at 51b88999169a0700ed8ce3bfa4faf465b081c055, conflicts in 12 files. Five come from the first four commits:

  • services/platform/app/lib/backend/contract/members.ts;
  • services/platform/app/lib/backend/documents.ts;
  • one row of services/platform/tests/manual/reference/automation/projects.md;
  • two rows of the suite table in services/platform/tests/manual/readme.md;
  • services/platform/tests/docs-screenshots/README.md, where both lines add a section after the capture steps.

The other seven come from 8d148e30e, the change of embedding model, which crosses the feature line's knowledge work: backend/core/knowledge/corpus.ts, indexing.ts, indexing.test.ts and search.test.ts, backend/domains/knowledge/message-index.ts and routes.test.ts, and backend/integration-check.ts.

One collision gives git no conflict at all. Both lines add a private_knowledge migration numbered 17 to the knowledge database: this train adds 00000000000017_documents_embedding_model.sql, and the feature line has 00000000000017_chunks_core_offset.sql and 00000000000018_chunk_vectors_org_index.sql. dbmate keys private_knowledge.schema_migrations by that number, so the two lines cannot both ship a 17. As with the requirement and case IDs the two lines share, the fix keeps its number once this train brings it to main, and the feature line's two migrations move to the next numbers free on both lines in its rebase.

The feature-train role's run of 15:25 UTC (its receipt on TALE-239) rehearsed its rebase of release/0.6 and feature-train against this train. It found this collision and one more that git does not flag: DocumentCorpusReader now takes the embedding model as a third argument, and nine calls the feature line adds pass two. Its decision for step 3: this train's migration keeps 17, the feature line's two become 18 and 19, and the nine calls pass the model. The resolutions of the text conflicts, and what the new workflow's artifact has to carry on the feature line, are on that task too.

Commits (6):

  • fix(platform): answer members' sign-in factors only to owners and admins (TALE-387)
  • fix(platform): keep an agent's pins and commit identity on dialog save (TALE-388)
  • fix(platform): fill the vector width of a gateway's embedding model (pushed to train by a maintainer; no task)
  • ci(docs): capture documentation screenshots in a workflow (TALE-357)
  • fix(platform): embed documents again after a change of embedding model (pushed to train by a maintainer; no task)
  • fix(platform): return only the declared fields of Twilio's get_account (TALE-418)

Task keys: TALE-387, TALE-388, TALE-357, TALE-418

Fixed on this branch by the merge-train role (the commit is not on train):

  • test(platform): drop the stated model before the residency check's save (076b8af22). Backend integration failed on 671d0b968 (Checks run 41476772536, job 125384699376) at the check "data residency: knowledge connection + embedding admin files", with a 503 from POST /api/app/knowledge/embedding. Since the maintainer's 8d148e30e, a save that names another embedding model is refused while the organization's knowledge database does not answer. The check's bring-your-own database never answers on CI: the pool takes sslmode: 'prefer' as TLS, which CI's Postgres lacks. The check now removes the stated model before it saves, and the change lets a removal go ahead.

tale-code-bot and others added 6 commits November 2, 2026 08:06
The member list now answers whether each member uses two-factor
authentication and how many passkeys they hold only to owners and
admins; every other role gets the same rows without those two fields.

Task: TALE-387
The app's project agent list now keeps each agent's credential pins and
commit identity from the backend's rows, so the agent dialog opens on
them as stored, and an edit sends them only when they differ from what
the dialog opened on. Before, the dialog opened on neither and saved
both as empty: an owner's or admin's save of any other setting cleared
the agent's pins and its commit identity, and an editor's save of a
pinned agent was refused. PROJ-R23 now says that a save keeps what it
does not change, and adapter and dialog tests hold it.

Task: TALE-388
Under Settings > Data residency > Embedding model, a custom provider in
front of a gateway lists the gateway's embedding models, but picking one
left Vector width empty: a listing carries no width Tale reads, and Tale's
own catalogs were asked about a gateway's row for its chat facts only. A
Bifrost gateway routing openrouter/qwen/qwen3-embedding-8b showed the
width error (before 0.5.96, Save went off without a word), although
OpenRouter's shipped catalog curates that very model at 1536.

A gateway's row for an embedding model now takes the width a shipped
catalog curates for it when the row names the model exactly as that
catalog does, or behind the catalog's provider as gateways do
(openai/text-embedding-3-small, openrouter/qwen/qwen3-embedding-8b), so
the pick fills the width and Save turns on. Only the width is taken,
never the catalog's recommendation. The same model under another
provider's name (alibaba/qwen3-embedding-8b) or another spelling carries
no width, since Qwen3 Embedding 8B answers 4096 dimensions unless asked
for fewer, and only the curating provider is known to honour the 1536 it
is asked for. A row Tale knows as an embedding model by id alone is now offered as
one instead of as nothing; a known speech or image model still is not.

Checked against a live Bifrost gateway on a local stack: the pick fills
1536, Save stores it, a document is indexed through the gateway at 1536
and a search's dense leg finds it. A saved model switched to the gateway
and back fills the width again at each pick, with Save off in between,
and a switch from a model of another width embeds the documents again
through the gateway. Docs (EN, DE, FR) and the manual box DATA-F14
describe the filled width and the switch.
A documentation screenshot could only be retaken on a person's machine,
with the disposable stack of the docs-screenshots runbook. The new Docs
screenshots workflow builds tale-db from services/db, starts it and the
pinned object store on the runner, boots the mock gateway and the
platform with the synthetic fixture config as the runbook does, and runs
bun run docs:screenshots for the shots and locales it is given. The
inputs reach the shell only through env and are checked against --list
before the stack starts.

It is dispatched by hand, or started by a push to a docs-screenshots/
branch, which captures agent-consent in English so that a change to the
workflow can be proven before the default branch holds it. It has
read-only contents permission, uses no secret and no model provider, and
uploads only the WebP files it wrote and the regenerated manifest, kept
for 7 days; the session state, the stack's logs and the image build's
record stay on the runner.

The runbook gains a Capture in CI section, CI.md names the job's runner,
and the Forgejo port ports the workflow without its push trigger.

Closes #5263
Task: TALE-357
A move to another embedding model of the same vector width kept the old
model's vectors. Vectors are kept per width, so the save found every
indexed document complete at that width and re-queued nothing, Reindex
skipped the unchanged document, and search by meaning compared the new
model's queries with vectors no query of it can match. Only a change of
width, or deleting and uploading again, refreshed them.

Each document and email body in the knowledge corpus now records the
model that embedded it, by the name the settings state (knowledge-db
migration 17, a nullable column). Indexing reuses stored chunks only
under that model: a document another model embedded is embedded again
from its first chunk, a slice run resumes only under its own model,
identical content is copied only from a document the model embedded,
and a run stops writing once a run of another model claimed its row.
Saving the embedding settings re-queues the indexed documents another
model embedded, beside those with no vector of the width, and search by
meaning reads only the vectors of the query's own model meanwhile. The
name and the width decide, never the provider: the same model saved
through another provider re-queues nothing.

Documents indexed before this change record no model and pass for the
model stated. Saving or removing the model first stamps them with the
model stated until then, read a page at a time, and a save that names
another model is refused while the knowledge database does not answer.
A file or an email body whose run read the settings before a save moved
them goes back in the queue once its run ends, for a change of width
too. The daily corpus reconcile re-queues whatever the stated model has
not embedded, which catches what a save could not reach, such as a
document the previous image indexed while a deployment rolled. The
width field's hint says that another model is embedded again.

Websites stay as they were: within one knowledge database a page is
stored once for every organization that tracks the site, with one vector
per width, so a change of model at the same width keeps the old model's
vectors there. The spec and the docs say so.

Proven by unit tests, the checkEmbeddingModelChange lane on real
Postgres, and a live run on a local stack with two models of one width
behind a mock gateway: the save embedded both documents again with the
new model, the same model through a second provider embedded nothing,
and Reindex embedded an outdated document again. Docs (EN, DE, FR), the
spec's KNOW-R17 and the manual box DATA-F15 describe it.

Refs #4935
Twilio's get_account now builds its four declared members from Twilio's
answer instead of handing the whole answer on. GitHub's repository,
issue, pull request and code search reads now hand their answers on
without temp_clone_token.

Task: TALE-418
@tale-code-bot tale-code-bot added the merge-train A merge train's pull request into main label Nov 2, 2026
@tale-code-bot
tale-code-bot enabled auto-merge (rebase) November 2, 2026 15:58
The data-residency check saves a bring-your-own knowledge connection
whose database never answers on CI (the pool takes `prefer` as TLS,
which the itest Postgres lacks), then saves another embedding model.
Since 8d148e3 a save that names another model than the stated one is
refused while that database does not answer, so the check failed with
a 503 on train-20261102-1557. A removal goes ahead regardless, so the
check now removes the model an earlier lane stated before it saves.
@tale-code-bot
tale-code-bot merged commit f8eb461 into main Nov 2, 2026
92 checks passed
@tale-code-bot
tale-code-bot deleted the train-20261102-1557 branch November 2, 2026 16:40
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.

2 participants