Repository navigation
chore: merge train 20261103-1047 - #5342
Merged
Merged
Conversation
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
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cut: 09fabf5
The stable line's merge train: the five commits between
039e4212f(the merge of #5334) and the cut.traindirectly, without a task. The first three came on 2026-11-02 between 18:03 and 18:08 UTC: afixthat refers to Follow-ups from the #4157 review: bytes kept for a mail or chat holder are orphaned when it ends, and a chat attachment can outlive a retention destruction #4208, and twodocschanges about whatmainships. The fourth came on 2026-11-03 at 09:26 UTC: afixof API-mirrored conversations.fixontotrainbehind the fast gate (formatting, typecheck and build), and it landed by 19:05 UTC on 2026-11-02.All five are stable-line, so nothing moved to
feature-trainbefore 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 intomain, which is now at046de90b5c0b8adc608820721d218f6ee0b75505:2741e5bfc) changes onlyservices/sandbox/e2e/incus/lab.sh, which the train does not touch.046de90b5, merged on 2026-11-03 at 10:41 UTC) adds the Session Manager service. It changes 811 files, 728 of them in the newservices/session-manager/, and alsobun.lock,package.json, four workflows,.github/ci-scope.ymlandpackages/ui. It adds no migration. It shares two files with the train,.agents/repo.mdand.github/RELEASING.md, where its hunks lie hundreds of lines away from the train's.git merge-tree --write-tree origin/main <cut>is clean (tree5e4807591), so the rebase merge replays the five commits onto046de90b5without a conflict. No check before departure ran on the train together with #5332.When #5334 merged, the role rebased
trainonto it, and each commit kept its tree. So the checks below ran on the same trees as the commits' earlier names:24286d63c8e6b739a2e9ac986f774d6d1bd8940cef8bffd7d20014201c38475654054a2c09fabf551was pushed onto201c38475and has not been renamed.The train changes 28 files: 1642 lines added and 224 removed.
24286d63c, inservices/platform/backend/domains/files/:firstForeignUploadtakes the intent locks in sorted order, so two sends that name the same files in opposite order no longer deadlock.reject-blob.integration.tsproves both on real Postgres.upload-intents.test.ts,blob-holders.tsandspec.mdfollow;spec.mdrewordsFILE-R6.e9ac986f7, in the English, German and French API reference:task_review) takes, with a minimal example.services/platform/tests/manual/reference/error-codes.mdsays so too.940cef8bf:.github/RELEASING.mdsays 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.tsbuilds the knowledge connection test's TLS options with the pool'ssslOptionsFor. Before,preferfell back to plaintext andverify-cabecameverify-full.test_datastore_connection.test.tspins this for every mode.backend/integration-check.tsprobes the itest Postgres withdisableand expects apreferprobe to fail.main.09fabf551, inservices/platform/backend/domains/conversations/andbackend/rest/v1-conversations.ts:INTEGRATION_NOT_OWNED.IntegrationViewerwhose owner is required.0235_conversation_api_source_owners.sqladds the owner to the bindings and backfills it fromapi_key_ownerswithin each binding's organization. A trigger fills it for the rows the previous image inserts during a roll;.agents/repo.mdrecords that trigger as debt. The number 0235 is above both lines:mainends at 0224 and the feature line at 0234.checkConversationApilane inapi-sync.integration.tsproves the rotation, the roll and the backfill on real Postgres.main.I matched the changed files against
.github/ci-scope.ymlby 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,integrationandcli. That is not the full scope.Checked before departure:
The maintainer's first three commits, on the tree of
fd7d20014(now940cef8bf): all green. The merge-train role's run3eb1bfbechecked them under a host lease, on 2026-11-02 from 18:17:34 to 18:22:35 UTC.bun install --frozen-lockfileandbun run format:check.bunx turbo run typecheck build --continue: 24 of 26 tasks passed, among them@tale/platform#typecheckand#build.@tale/cli#buildand@tale/web#buildfailed only on downloads the checking worker cannot reach, andturbo run build --dry=jsonlists 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, andbunx commitlinton the three messages.backend/domains/files/directory and every importer ofupload-intentsandblob-holders.tools/lint-manual(51),tools/lint-links(16),services/docs(778 in 41 files),packages/ui'ssuggest-pages(4), and the CLI'sscripts/release-candidate-gate.test.ts, which readsRELEASING.md(277).The CLI's full suite on the same tree, because the files domain is in the
cliscope. Run861502f1ranbun run generate, thenbun test --timeout 30000, from 18:54:42 to 19:01:09 UTC.src/lib/config/releases/tests needgit archive --mtime, which the worker's git 2.39.5 lacks. Twoscripts/action-archivetests hit the worker's 512 MiB file-size limit.TALE-425, on the tree of
654054a2c(now201c38475): all green. Run388507cdchecked it under a host lease, on 2026-11-02 from 21:48:40 to 21:51:39 UTC.bun install --frozen-lockfileandbun run format:check.backend/core/deployment/,backend/db/andbackend/domains/knowledge/, and the knowledge pool's other users. The newtest_datastore_connection.test.tshas 18 of them.bun run knip:check,bunx turbo run lint(16 of 16 tasks),bun run lint:conflicts,bun run lint:links, andbunx commitlinton its message.tools/cli,bun run generate, then 121 tests in four files that read the embedded platform sources.09fabf551, on the cut: all green. Run3bf3749cchecked it under a host lease, on 2026-11-03 from 09:47:25 to 09:57:41 UTC.bun install --frozen-lockfileandbun run format:check.bunx turbo run typecheck build --continue: 24 of 26 tasks passed, none cached, among them@tale/platform#typecheckand#build.@tale/cli#buildand@tale/web#buildfailed only on the same unreachable downloads, andturbo run build --dry=jsonlists none of the train's 28 changed files among their inputs.backend/domains/conversations/,backend/rest/,backend/db/,scripts/openapi/(including the check thatpublic/openapi.jsonmatchesspec.ts) andtests/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, andbunx commitlinton its message.services/docs: 778 tests in 41 files.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:
reject-blob.integration.ts), the data-residency check thatintegration-check.tschanges, and the conversation API lane's rotation, roll and0235replay checks. The itest database serves no TLS, so the residency check'spreferprobe should now answerok: false, as the check asserts.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 reachedtrain. On 2026-11-03 at 10:46 UTC, withfeature-trainat0160174f1(the feature train that departed as #5341 intorelease/0.6), it gave tree4744ff1bdwith four files in conflict. That is the same tree as at 10:07 UTC withfeature-trainat4003de347, since the feature-train role's rebase onto2741e5bfckept its tree:services/platform/tests/manual/reference/error-codes.md:TASK_REVIEW_HUMAN_COMPETENCE_REQUIREDrow, ande9ac986f7rewrites theTASK_REVIEW_BUSYrow. 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.09fabf551rewrites how they start, and the feature line appends itsAPI_KEY_PERSONAL_REFUSEDclause.scripts/openapi/spec.tsmerges 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.6ontomainafter 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 after09fabf551reachedtrain. Run388507cdalso replayed TALE-425's commit ontofeature-trainand ran 466 server tests on the result.Commits (5):
Task keys: TALE-425