Skip to content

chore: merge train 20261103-1047 - #5342

Merged
tale-code-bot merged 7 commits into
mainfrom
train-20261103-1047
Nov 3, 2026
Merged

tale-code-bot merged 7 commits into
mainfrom
train-20261103-1047

Conversation

@tale-code-bot

Copy link
Copy Markdown
Collaborator

Cut: 09fabf5

The stable line's merge train: the five commits between 039e4212f (the merge of #5334) and the cut.

All five are stable-line, 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. It rebase-merges when green (auto-merge). The Coder's merge-train role works it until it is green, and while it is open no other stable-line train departs.

The cut sits on 039e4212f4a935e435a7fa2a341e847bf5b3f9ca. Since then maintainers merged two pull requests into main, which is now at 046de90b5c0b8adc608820721d218f6ee0b75505:

git merge-tree --write-tree origin/main <cut> is clean (tree 5e4807591), so the rebase merge replays the five commits onto 046de90b5 without a conflict. No check before departure ran on the train together with #5332.

When #5334 merged, the role rebased train onto it, and each commit kept its tree. So the checks below ran on the same trees as the commits' earlier names:

Now Before #5334 merged
24286d63c 8e6b739a2
e9ac986f7 74d6d1bd8
940cef8bf fd7d20014
201c38475 654054a2c

09fabf551 was pushed onto 201c38475 and has not been renamed.

The train changes 28 files: 1642 lines added and 224 removed.

  • 24286d63c, in services/platform/backend/domains/files/:
    • The upload mint path's intent sweep materializes at most 25 candidates per expensive arm, oldest first, and skips locked rows.
    • A row whose delete failed moves inside the grace horizon for a minute.
    • firstForeignUpload takes the intent locks in sorted order, so two sends that name the same files in opposite order no longer deadlock.
    • The new reject-blob.integration.ts proves both on real Postgres.
    • upload-intents.test.ts, blob-holders.ts and spec.md follow; spec.md rewords FILE-R6.
  • e9ac986f7, in the English, German and French API reference:
    • It documents the evidence a native review verdict (task_review) takes, with a minimal example.
    • It says that native refusals are workspace-tool results and that the source and staleness checks run before the busy gate. services/platform/tests/manual/reference/error-codes.md says so too.
    • Two French platform pages now quote the picker's inherited reviewer choices as they ship.
  • 940cef8bf: .github/RELEASING.md says how a release recovers when the tag-bound CLI run fails to attach to a release that exists.
  • 201c38475 (TALE-425):
    • backend/core/deployment/test_datastore_connection.ts builds the knowledge connection test's TLS options with the pool's sslOptionsFor. Before, prefer fell back to plaintext and verify-ca became verify-full.
    • The new test_datastore_connection.test.ts pins this for every mode.
    • backend/integration-check.ts probes the itest Postgres with disable and expects a prefer probe to fail.
    • Its commit message's footer names fix(platform): resolve the knowledge connection test's TLS through sslOptionsFor #5330, which GitHub closes once the commit is on main.
  • 09fabf551, in services/platform/backend/domains/conversations/ and backend/rest/v1-conversations.ts:
    • An API-mirrored conversation now belongs to the integration that created it, which is whoever the key belongs to.
      • A person's own key, and a key made for a member, act as that person.
      • A key made for a team or for the organization acts for it. So that key's replacement continues the mirror, lists it, and claims the replies queued before the swap, where before these were stranded behind INTEGRATION_NOT_OWNED.
      • Any other key is still refused.
    • The mirror functions take an IntegrationViewer whose owner is required.
    • Migration 0235_conversation_api_source_owners.sql adds the owner to the bindings and backfills it from api_key_owners within each binding's organization. A trigger fills it for the rows the previous image inserts during a roll; .agents/repo.md records that trigger as debt. The number 0235 is above both lines: main ends at 0224 and the feature line at 0234.
    • The spec rule CONV-R14, the API reference (en, de and fr) and the OpenAPI descriptions say so. Only descriptions change, so the API contract fingerprint is unchanged.
    • The checkConversationApi lane in api-sync.integration.ts proves the rotation, the roll and the backfill on real Postgres.
    • It builds on fix: preserve conversation source ownership #5008 by Israeltheminer. Its commit message's footer names preserve conversation source ownership across API key rotation #5007, which GitHub closes once the commit is on main.

I matched the changed files against .github/ci-scope.yml by a local reading of its globs, as the file was before #5332 and as #5332 left it with two new session-manager scopes; both readings agree, and neither session-manager scope matches a file of the train. This pull request's scope job decides. They fall in these scopes: all, added, build, build_platform, build_docs, build_storybook, build_ci_tests, e2e, e2e_platform, e2e_docs, integration and cli. That is not the full scope.

Checked before departure:

  • The maintainer's first three commits, on the tree of fd7d20014 (now 940cef8bf): all green. The merge-train role's run 3eb1bfbe checked them under a host lease, on 2026-11-02 from 18:17:34 to 18:22:35 UTC.

    • bun install --frozen-lockfile and bun run format:check.
    • bunx turbo run typecheck build --continue: 24 of 26 tasks passed, among them @tale/platform#typecheck and #build. @tale/cli#build and @tale/web#build failed only on downloads the checking worker cannot reach, and turbo run build --dry=json lists none of the 12 changed files among their inputs.
    • bunx turbo run lint (16 of 16 tasks), bun run knip:check, bun run lint:links, bun run lint:manual, bun run lint:conflicts, and bunx commitlint on the three messages.
    • 31 platform server test files with 454 tests: the whole backend/domains/files/ directory and every importer of upload-intents and blob-holders.
    • Other suites: the API docs page's UI test (4 tests), tools/lint-manual (51), tools/lint-links (16), services/docs (778 in 41 files), packages/ui's suggest-pages (4), and the CLI's scripts/release-candidate-gate.test.ts, which reads RELEASING.md (277).
  • The CLI's full suite on the same tree, because the files domain is in the cli scope. Run 861502f1 ran bun run generate, then bun test --timeout 30000, from 18:54:42 to 19:01:09 UTC.

    • Of 4006 tests in 211 files, 3956 passed, 42 were skipped and 8 failed.
    • All 8 failures come from the checking worker. Six src/lib/config/releases/ tests need git archive --mtime, which the worker's git 2.39.5 lacks. Two scripts/action-archive tests hit the worker's 512 MiB file-size limit.
    • The same 8 failed on that worker at chore: merge train 20261103-0247 #5334's cut.
  • TALE-425, on the tree of 654054a2c (now 201c38475): all green. Run 388507cd checked it under a host lease, on 2026-11-02 from 21:48:40 to 21:51:39 UTC.

    • bun install --frozen-lockfile and bun run format:check.
    • 73 platform server test files with 1033 tests: all of backend/core/deployment/, backend/db/ and backend/domains/knowledge/, and the knowledge pool's other users. The new test_datastore_connection.test.ts has 18 of them.
    • bun run knip:check, bunx turbo run lint (16 of 16 tasks), bun run lint:conflicts, bun run lint:links, and bunx commitlint on its message.
    • In tools/cli, bun run generate, then 121 tests in four files that read the embedded platform sources.
    • Typecheck and build: the Reviewer's landing gate ran them before it pushed the commit.
  • 09fabf551, on the cut: all green. Run 3bf3749c checked it under a host lease, on 2026-11-03 from 09:47:25 to 09:57:41 UTC.

    • bun install --frozen-lockfile and bun run format:check.
    • bunx turbo run typecheck build --continue: 24 of 26 tasks passed, none cached, among them @tale/platform#typecheck and #build. @tale/cli#build and @tale/web#build failed only on the same unreachable downloads, and turbo run build --dry=json lists none of the train's 28 changed files among their inputs.
    • 129 platform server test files with 2731 tests. They cover the whole of backend/domains/conversations/, backend/rest/, backend/db/, scripts/openapi/ (including the check that public/openapi.json matches spec.ts) and tests/guards/, plus every test that names the integration check, the migrations, the error-code manual or the OpenAPI file.
    • bunx turbo run lint (16 of 16 tasks), bun run knip:check, bun run lint:conflicts, bun run lint:links, bun run lint:manual, and bunx commitlint on its message.
    • services/docs: 778 tests in 41 files.
    • In tools/cli, bun run generate, then the 8 test files that read the platform's migrations (source-migrations, rollback, the automation cutover and protocol files, runtime-apply-sandbox, release-notes, ci-cli-publication): 186 tests.
  • Not run:

    • Backend integration. No checking worker has Postgres or Docker, so these were not run: the files domain's real-Postgres proof (reject-blob.integration.ts), the data-residency check that integration-check.ts changes, and the conversation API lane's rotation, roll and 0235 replay checks. The itest database serves no TLS, so the residency check's prefer probe should now answer ok: false, as the check asserts.
    • The CLI's full suite on the cut's tree, and the CLI on macOS and Windows.
    • E2E, the Storybook build, and the platform's other UI tests.
    • Opengrep (SAST): its pinned engine is a download the checking worker cannot reach.

    This pull request runs them on CI's runners.

git merge-tree --write-tree origin/feature-train <cut> conflicts, as it has since the maintainer's pushes reached train. On 2026-11-03 at 10:46 UTC, with feature-train at 0160174f1 (the feature train that departed as #5341 into release/0.6), it gave tree 4744ff1bd with four files in conflict. That is the same tree as at 10:07 UTC with feature-train at 4003de347, since the feature-train role's rebase onto 2741e5bfc kept its tree:

  • services/platform/tests/manual/reference/error-codes.md:
    • The feature line renames "competence rules" to "qualification rules" in the TASK_REVIEW_HUMAN_COMPETENCE_REQUIRED row, and e9ac986f7 rewrites the TASK_REVIEW_BUSY row. Each side's own row wins.
  • docs/de/develop/api-reference.md, at the review tool:
    • e9ac986f7's new paragraphs win, with the feature line's "Geforderte menschliche Qualifikationen" in place of "Menschliche Kompetenzanforderungen".
  • services/platform/public/openapi.json: ten 403 descriptions.
    • 09fabf551 rewrites how they start, and the feature line appends its API_KEY_PERSONAL_REFUSED clause.
    • scripts/openapi/spec.ts merges cleanly with both, so the file is regenerated from it (bun run generate:openapi).
  • services/platform/tests/manual/reference/automation/conversations.md: each side appends one row after the mailbox-sync row, and both rows stay.

The feature-train role meets these conflicts when it rebases release/0.6 onto main after this pull request merges, and the resolutions are on its task (TALE-239). The first two have been there since 2026-11-02 at 18:28 UTC, together with one German wording point that merges without a conflict. The last two were added on 2026-11-03 after 09fabf551 reached train. Run 388507cd also replayed TALE-425's commit onto feature-train and ran 466 server tests on the result.

Commits (5):

  • fix(platform): bound upload-intent sweeps and order ownership locks
  • docs(platform): clarify native review evidence and refusals
  • docs: say how a release recovers a failed CLI attach
  • fix(platform): test a knowledge connection with the pool's TLS rules (TALE-425)
  • fix(platform): keep API mirror ownership across key rotation

Task keys: TALE-425

yannickmonney and others added 5 commits November 3, 2026 03:20
The upload mint path sweeps its organization's intent ledger. The sweep
ran the holder scan for every expired row that a holder still named,
with no limit, so a store that refuses deletes made every later upload
dearer. Both expensive arms now materialize at most 25 candidates,
oldest first and skipping locked rows, before they scan. A row whose
delete failed moves just inside the grace horizon for a minute, so it
cannot pin the batch ahead of held rows for good.

firstForeignUpload walked the refs in the client's order, so two sends
that named the same files in opposite order took the intent locks in
opposite order and could deadlock under READ COMMITTED. It walks them
sorted now.

The real-Postgres proof is two checks in the reject-blob lane: a backlog
of 60 held intents drains 25 per sweep, and ten rounds of reversed
proofs finish without a deadlock. Both fail on the code before this
change.

Refs #4208
The API reference now documents the strict evidence a native review
verdict (`task_review`) takes, in English, German and French: the bounds
of the checks, the pull requests and the feedback in UTF-16 code units,
the exact shapes of a pull request URL and head SHA, that an approval
needs every supplied result to have passed, and a minimal example.
Tale records the reviewer's attestation; it does not read GitHub.

Native review feedback posts a comment with its notifications and
activity but dispatches no event and no mention. A later edit that adds
a mention can emit `comment.mentioned`, which the event table says now.
Native refusals are workspace-tool results (`invalid_args` inside an
HTTP 200), not REST error envelopes, and the source and staleness checks
run before the busy gate; the manual error-code reference says so too.

The French pages quote the picker's inherited reviewer choices as they
ship (`Choix du projet · personne`). The German pages call a tool grant
a Berechtigung and keep Genehmigung for an approval.
While v0.5.88 was published, CI's GitHub API budget ran out for about
ten minutes. The tag-bound CLI run's `Wait for release to exist` step
reads any failed `gh release view` as a missing release, so `Attach to
release` failed ten times for a release that existed, after all five
builds had passed. RELEASING.md now says what to do: confirm the
release, then dispatch the publication again on the tag ref instead of
rerunning the failed job, because the adopter wants every job of one
attempt.
The knowledge connection's test mapped `sslmode` itself and handed
postgres.js its own strings, while the organization's pool resolves TLS
through `sslOptionsFor` (`backend/db/ssl.ts`). The two disagreed:

- `prefer` fell back to plaintext in the test, while the pool asks for TLS.
  A database without TLS passed the test and then never answered the pool,
  so an organization's later save of another embedding model was refused.
- `verify-ca` became `verify-full` in the test, which checks the hostname
  and reads no CA bundle. A server signed by a private CA worked in the
  pool, against `POSTGRES_CA_FILE`, and failed the test.

The test now builds its `ssl` option with `sslOptionsFor`, and its own
mapping is gone. The pool's rules are unchanged. A unit test pins that the
test hands postgres.js what the pool's factory does, for every mode and for
`POSTGRES_CA_FILE` unset, readable and unreadable.

The data-residency integration check probes the itest Postgres, which
serves no TLS, with `disable`, and expects a `prefer` probe to fail now.
The saved connection keeps `prefer`, so the organization's pool still
never bootstraps a corpus into the app database.

Closes #5330
Task: TALE-425
An API-mirrored conversation recorded the identity of the key that first
sent it and refused every other identity. A key made for a team or the
organization authenticates as a service identity of its own, so
replacing it stranded the mirrors and the replies queued for them
(INTEGRATION_NOT_OWNED), with no way to hand them over.

A mirror now belongs to the integration that created it, which is whom
the key belongs to. A person's own key and a key made for a member act
as that person. A key made for a team or the organization acts for it,
so its replacement continues the mirror, lists it and claims the replies
queued before the swap. A key of anyone else is still refused. A
project's key never reaches these routes. Two keys made for the same
team or organization are one integration and share their mirrors; the
spec rule, the API reference (EN, DE, FR) and the OpenAPI descriptions
say so.

Migration 0235 adds the owner to the bindings. It fills it from
api_key_owners, within the binding's organization, for the keys made
for a team or the organization (every other binding belongs to its
user, as it always did) and keeps a trigger that fills it for the rows
the previous image inserts during a roll. It takes the number above
both release lines.

The mirror functions take an IntegrationViewer whose owner is required,
so a caller cannot fall back to the key's own identity and strand the
mirrors again.

Builds on #5008 by Israeltheminer, which found the cause and the shape
of the fix. Three things differ from it: a member's key maps to the
person, as the backfill stores it, instead of an owner kind no row
carries, which left that key reading none of its own mirrors; the
backfill matches the key's organization; and the rotation, the roll and
the backfill are proved on a real Postgres in the conversation API lane,
which fails on the code before this change.

Fixes #5007
@tale-code-bot tale-code-bot added the merge-train A merge train's pull request into main label Nov 3, 2026
@tale-code-bot
tale-code-bot enabled auto-merge (rebase) November 3, 2026 10:47
The case for MCP-R21 and MCP-R26 read the day's initialize row by
organization, user and method alone. The user's other lanes call
initialize on keys of their own, and the activity is counted per key,
so the read returned one row per key in no set order and the case
judged whichever came first. On merge train #5342 (Checks run
41622237195, Backend integration job 125872805258) that was another
lane's `itestclient` row, and the case failed while this key's
`itest-legacy-script` row was there.

Read the rows of the lane's own key: the create response's `id` is the
key row's id, which the door records as the activity's credential.
The case timed the first deriveTravels call over two million reads, so
its 250 ms bound also paid for warming up the code that call runs. On
merge train #5342 (Checks run 41622237195, Unit (platform 2/2) job
125870579654) it measured 251.3 ms and failed, in code the train does
not touch. Call it once before timing, as the ten-thousand items case
beside it already does, so the bound measures the derivation alone.
@tale-code-bot
tale-code-bot merged commit ee8e36b into main Nov 3, 2026
106 of 108 checks passed
@tale-code-bot
tale-code-bot deleted the train-20261103-1047 branch November 3, 2026 12:55
tale-code-bot added a commit that referenced this pull request Nov 3, 2026
The case for MCP-R21 and MCP-R26 read the day's initialize row by
organization, user and method alone. The user's other lanes call
initialize on keys of their own, and the activity is counted per key,
so the read returned one row per key in no set order and the case
judged whichever came first. On merge train #5342 (Checks run
41622237195, Backend integration job 125872805258) that was another
lane's `itestclient` row, and the case failed while this key's
`itest-legacy-script` row was there.

Read the rows of the lane's own key: the create response's `id` is the
key row's id, which the door records as the activity's credential.
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.

3 participants