Repository navigation
TC-940: merge the 1.20.1 release line into main (main = prod) - #263
Conversation
…roman/tinychat-native-release-20260915
…roman/tinychat-native-release-20260915
Durable, re-delegatable Policy/v3 sessions; the policy gate on the decrypt and signed KV routes; email delivery for email-domain shares; the email-domain freshness pin (from #238); policy owners must hold the authority their roots grant (registration and mint); the exact-email delivery contract kept for mixed-case mailboxes. Two independent reviews (release review and security review), all findings fixed; cargo test --workspace, clippy -Dwarnings and fmt clean; joined gate passed against this head with SDK 3.0.0-beta.19 and Share #105. Details in #239.
…ud.xyz (TC-513) (#242) The dstack-ingress sidecar CNAMEs DOMAIN to GATEWAY_DOMAIN on every fresh container start. It was _.${DSTACK_GATEWAY_DOMAIN}; Android's resolver (bionic res_hnok) rejects a CNAME target whose first label is '_', so tee.node.tinycloud.xyz does not resolve on Android (WebView and native). Use gateway.${DSTACK_GATEWAY_DOMAIN}: the CNAME target Phala Cloud advertises for this CVM (gateway.cname) and upstream dstack-ingress documents since Dstack-TEE/dstack-examples#123. It resolves to the same gateway IP; the gateway still routes by SNI + the _dstack-app-address TXT record, so TLS remains terminated inside the CVM. (cherry picked from commit 091688b)
Run the ordinary invocation authorization (signature, delegation chain, revocation, time windows) and the Policy/v3 gate before the hooks ticket and webhook routes read an invocation's capabilities, matching /signed/kv. Scope checks now accept only a verified invocation. Clients must hold a delegated tinycloud.hooks/* ability for the scope they request. (cherry picked from commit 6daf117)
…et hook state Hooks routes no longer reuse verify_auth, whose TinyCloud::invoke records the invocation and executes input-free operations such as kv/del before the route rejects the request. Each hooks request now: - refuses any capability outside tinycloud.hooks/* on the hooks service; - applies /invoke's admission (signature, lifetime cap) and the read-only invocation kernel (delegation chain, revocation, time windows) via the new SpaceDatabase::authorize_admitted, with no space lookup; - passes the Policy/v3 gate, then the route's scope check; - only then spends the invocation in the /invoke replay cache. A refused request writes nothing. Unregistering a subscription the caller may not touch now looks the same as unregistering a missing one. Existing state is reset on upgrade: - a migration deactivates every existing webhook subscription (rows carry no delegation reference, so they cannot be re-verified); owners re-register. It logs the count and the (space, subscriber) pairs only; - the hook ticket MAC key context moves to tinycloud/hooks/tickets/v2, so tickets minted before this change stop verifying. Bounded residual: a ticket's lifetime is capped by the immediate parent delegation's expiry and max_ticket_ttl (300 s by default), not by ancestors, so revoking an ancestor takes effect on open streams within that window. (cherry picked from commit f9f4889)
create_hook_ticket recorded the invocation in the replay cache before mint_hook_ticket checked the effective expiry, so a request refused for an immediately-expiring TTL still consumed its header and a valid retry got 409. The ticket is now built and signed first; the invocation is spent only when the request will succeed. Document that the Policy/v3 root-authority probe must be signed by the content space's owner. (cherry picked from commit 8ac8990)
GET /hooks/webhooks filtered rows with sea-orm starts_with, an unescaped LIKE 'prefix/%'. `_` and `%` matched any character and SQLite LIKE ignores ASCII case, so a hooks/list grant on kv/my_docs also returned other subscribers' rows (callbackUrl, subscriberDid) under MY_DOCS/, myXdocs/ and my%docs/. The route now re-checks every returned row against the requested space, service and scope with the exact-or-'/'-boundary rule its authorization uses. (cherry picked from commit 9ccb7ac)
…0 N3, 1.20.0) TC-780: SQL identity isolation (N3) for tinycloud-node 1.20.0
… only added unique single-path databases Block 05 checks the 17:52 metadata snapshot against serving prod and records the serving inventory (with timestamp and allowed additions) as the drift baseline. Steps 4-5 check the outage inventory and artifact-metadata identities against that baseline. Allowed drift: added durable databases classified unique with one path and no collision. Removed or changed identities, new ambiguous/unattributed databases and any collision abort. Approved by the TC-780 orchestrator (a69fffe1); rehearsed locally on 10 cases.
feat(TC-908): allow root kv sync
…-buffers fix ingress request header buffer capacity
has_covering_chain walked SQL/DuckDB proofs to a parentless root, so an owner-issued grant citing a foreign proof (e.g. another user's KV grant) got 401, although registration already treats an owner-issued delegation as the authority boundary. Stop at a delegation issued by the owner of the invoked space; every non-owner ancestor must still cover the database, ability and caveats. Port of the owner-boundary half of ebf86d6 (TC-825, 1.19 line).
Ports the tc825_ route tests (0374e7e, incl. T2.6 tc825_owner_issued_sql_capability_terminates_chain_despite_foreign_proof), the three-hop caveat test (f5fc6c7) and the restored helper comment (a10df21) onto the 1.20 fixture, keeping 1.20's /info route and KV root helpers. Without the fix only the owner-issued test fails.
The ported resource_in helper made an empty path pathless for every
service, so device_invocation("") signed {space}/kv instead of
{space}/kv/ and the TC-908 root-spelling test compared one spelling with
itself. KV keeps the explicit path again, and the test asserts the two
signed spellings differ (found by the Sol review).
…1.20 fix(TC-894): SQL/DuckDB chain check stops at the space owner; release 1.20.1
Pins ghcr.io/tinycloudlabs/tinycloud-node-ingress at the digest published by docker.yml run 38202180076 (build of 7019f7e, the 1.20.1 merge): the pinned dstack-ingress base plus large_client_header_buffers 4 32k (#256). Roll back by restoring dstacktee/dstack-ingress:20250924@sha256:40429d78060ef3066b5f93676bf3ba7c2e9ac47d4648440febfdda558aed4b32.
…pper-1.20.1 deploy(TC-910): pin the ingress wrapper for 1.20.1
Brings main level with production: tinycloud-node 1.20.1, image sha256:687090118997ad1d54d26c59fffffc37fcb30fc6f9ba02e10f944c0ed479cd80 (revision 1acc86c), plus #260 (--no-public-logs, TC-959). Conflicts resolved to the release line (prod) except where main had a later change the release line lacks: - keep main's CORS preflight Access-Control-Max-Age (#240) in lib.rs; - restore main's 1.16.1 CHANGELOG section. Every other main-only commit (TC-498, TC-500 preflight, TC-513, TC-541, TC-626, TC-730/815, TC-731, TC-732) already has a later port on the release line, which wins. See the PR description for each decision.
|
Review (openai-codex/gpt-6-astra) FindingsNo blocking correctness or authorization regression found in merge Tree and production parity
All ten main-only commits, compared directly
SQL/DuckDB inspection also confirms admission before execution ( Nits (non-blocking)
Verification
VERDICT: APPROVE |
…es' lockfiles rust.yml runs m1-realdata-e2e and w5-policy-runtime-node-e2e with --locked; the release line never ran rust.yml, so both lockfiles still named 1.19.0/1.20.0.
|
Review (Claude Opus 5.5) Independent read-only review of Findings1. Blocking (medium): merging tags and publishes
|
rust.yml only runs for PRs into main, so the release line never ran these.
- m1-realdata seeded its SQL fixture under the pre-TC-780 final-segment
name ("conversations"); the node now resolves the full-path digest, and a
non-digest artifact is an unmigrated legacy database that fences SQL with
503. Seed under database_identity::logical_name(SQL_PATH) instead.
- w5-node-e2e depends on the private policy-engine repository by git, which
the workflow token cannot clone; the job has never run. Drop it and record
that the suite runs locally until CI has a read token.
TC-940 parity proof (no deploy)All of this ran locally on this branch. The suites ran at Suites PostgreSQL is
Compared three nodes:
The main and prod-image nodes both ran on PG 18.6.
TC-910 header test Each ingress image ran with a mirror of the TLS + http2 server block that dstack-ingress generates. Status codes by
End-to-end smoke Run against both the main build and the prod image with the
Both succeed and return the same results. The only behavioural difference
|
|
Review (openai-codex/gpt-6-astra) Final-head re-review of FindingsNo blocking findings or new nits. My approval applies to this final head, not just the original merge.
Evidence and CI statusRead the final-head parity proof: it reports 1304 passing workspace/DuckDB tests with PostgreSQL 18.6, m1 13 passing, w5 11 passing, production-image comparisons and CLI/header smoke results. Those are the author's recorded results, not new runs by this reviewer.
This is source-review approval, not an all-green-CI claim. Preserve the remaining CI merge gates. The annotated production tag, empty release-plz dry-run result and accepted mutable-image-tag movement are supplied release-coordination evidence; I did not rerun or change them. Read-only review; no repository changes, deployment, or containers created in this pass. VERDICT: APPROVE |
|
Review (Claude Opus 5.5): final-head re-review at Release-plz blocker: resolved
|
Linear: TC-940: make
maincontain everything production runs.This is a merge commit, not a rebase. It merges
feat/tc-780-release-lineat18caf93eintomain. After it lands,mainbuilds what production runs today, plus onemain-only performance change (#240) that the release line never got. The 200 MB ingress change (#261) is on the other release branch and arrives in a follow-up PR. It is not part of prod parity.What prod runs (2026-10-12)
https://tee.node.tinycloud.xyz/info)ghcr.io/tinycloudlabs/tinycloud-node@sha256:687090118997ad1d54d26c59fffffc37fcb30fc6f9ba02e10f944c0ed479cd801acc86ce92e36d686edc06414e8cf5bcf7972219(merge of #258)feat/tc-780-release-line, digest promotion,sql_identity_fence=falsedocker-compose.dstack-postgres.yamlat1acc86c. docker.yml rewrites only the nodeimage:to the promoted digest.ghcr.io/tinycloudlabs/tinycloud-node-ingress@sha256:726c6d35858e50c5524cc97e789c2c8f09620e77d708bb71bdc9370e3d80ed3e. This is the TC-910 wrapper:dstack-ingress:20250924pluslarge_client_header_buffers 4 32k. It is built fromdeploy/ingress/on the release line and pinned in the compose by #258./infofeatureskv, delegation, sharing, sql, hooks, signed-urls, encryption, kv-sync-v1, kv-sync-root, teeWhich branch.
1acc86cis onfeat/tc-780-release-line, which built and deployed it. TonightCodex/roman/rollback-meeting-node-20260915was fast-forwarded to the same commit, and #261 was then merged on top of it (3bac7ad, not deployed). The 32 KB header setting is not a deploy-time patch, and it comes from no other repo. It is the TC-910 wrapper image, built from this repo'sdeploy/ingress/and pinned by digest in the release line's compose.Every branch docker.yml has ever built from (all
workflow_dispatchruns):Codex/roman/rollback-meeting-node-20260915up to1acc86cCodex/roman/tinychat-native-release-20260915recovery/tc-500-node-1.17.0skgbafa/tc-541-hotfix-1.17.4v1.17.1main:main,v1.4.9,v1.6.0,v1.6.1,v1.8.0,feat/email-claim-n4-integration,skgbafa/prod-rollback-1fba9b4,skgbafa/tc-277-bench-image. The patch fromskgbafa/tc-465-phala-trust-bundleis also already onmain.feature/tc-234-phala-cvms: bench image toggleskgbafa/dns-aid-rollout: DNS-AID workflowskgbafa/phala-prod-debug: temporary debug workflowsops/phala-recovery: its commits no longer existCodex/roman/rollback-meeting-node-20260915at3bac7ad, which adds fix: allow 200 MB uploads through node ingress #261.Inventory: release line commits not on
main(80)TC-894: the SQL/DuckDB covering-chain check stops at the space owner (1.20.1, #257)
d914579fix8b99dc7port of the TC-825 tests36b3964test helper pathbf7d47erecords prod 1.20.0c2d5245in the ancestry7019f7emerge of fix(TC-894): SQL/DuckDB chain check stops at the space owner; release 1.20.1 #257a60dcferelease 1.20.1TC-908: root
kv/sync,kv-sync-root(#255)81045b7,dda919d9ac42eamergeTC-910: ingress header buffers, 32 KB (#256, pin #258)
24bdb93wrapper image5d83660publishing gated25fec0merge87e134epin726c6d35…1acc86cmerge (the prod revision)TC-959:
--no-public-logson the Phala deploy (#260)18caf93TC-957, TC-899, TC-930: not on any branch. They are 1.20.2 scope with no PRs yet, and will land on
main.TC-780: SQL/DuckDB isolation by full resource path, plus the identity cutover (1.20.0)
6370add,24c5018,dc391c4,0ef6550,0f65c13,26ee215,a94a3a9,7d1fcc4,09df8d1,da41525,fd6792a,9bed848,6af0864,9b240fb,6b32b5a,a7132bf,9d030c5,99bd2d6,5858bc2,9a73a3fc3950bbandc2d5245(prod 1.20.0)TC-730 / TC-815: hooks ticket revocation and bounded ancestry (1.19.2, #251/#252, TC-818)
eb2b8ca,fc4bcc7a10b235mergeTC-541: hooks authorization (1.17.4 hotfix, 1.19.1, #249, TC-767)
fe7960c,9530c78,f4d90c6,61837ceb774101,8411ae5,541251areleases033b516and6f57583Release-line CI and docker.yml (Phala ancestry guard, digest promotion, deploy probes)
75e709b,332ccc9,38844ab,572feb1f365fa9TC-513 Android-resolvable CNAME (fix(deploy): ship the Android-resolvable tee.node CNAME in 1.17.3 (TC-605, cherry-pick #241) #242)kv/sync change feed and list fixes (1.19.0, TC-746/TC-731/TC-732, #248)
309e052TC-626: storage-full reads and structured errors (1.18.0, #244)
c99b3121.17.3 (TC-529, TC-530, TC-597, #239)
05c6a93TC-500: TinyChat meeting publication v3 and the native release (1.17.0–1.17.2)
74173f9,c56e09b,f48c020,690f269,bbba444,6f41c5b,ec1dc20,c3622ba,12adf89,a99e2fa,bebf5bc,20464be,59dfcc1,0b8ef1cbc2aae7(feat(TC-500): integrate native sharing into TinyChat release #234)7a58693(1.17.1, chore(release): tinycloud-node 1.17.1 (TC-500) #235)b80cbb9and461e387Meeting rollback ops (prod 1.20.0 was built from this line)
0987776,15c0ee5,08dc006,344c46bread-only rollback audit60c3ab8withdraws the meeting publication and restores legacy SQL writesConflict decisions
There were 17 conflicted files. The rule: keep prod's behaviour unless
mainhas a later, intended change that the release line lacks. I resolved conflict hunks to the release line, then reviewedgit diff origin/feat/tc-780-release-line HEAD. Every survivingmain-only line is accounted for below.main-only commit4f7bea7CORS preflightAccess-Control-Max-Age: 7200(#240)lib.rs, with its tests)/policy/v3/*is untouched. This is the only behavioural difference from prod.fe29051TC-626 forward port (#245)c99b312(#244). The only differing line is the release line'sgrows_content, which ismain'ssql_request_is_writeplus the TC-500 meeting-publication exemption (ec1dc20). Test helpers that auto-merged twice were dropped.b0082dcTC-730/815 (#251)eb2b8ca).2166578TC-541 (#243)f4d90c6,9530c78,61837ce, and the same hook ticket key contextv3(main's #243 introducedv2;b0082dc/eb2b8carotated both lines tov3).d7f511fTC-732kv/sync(#247)mainrequired a non-empty KV prefix. Prod deliberately allows the root (TC-908,kv-sync-root).a11ea8fTC-731 list prefixes (#246)kv_prefix_conditionandbyte_ordered_resourcein the 1.19.0 port.f894564TC-500 runtime preflight (#236)docker.ymland probe scriptdocker.ymlhas the preflight plus the ancestry guard and digest promotion prod uses.main's stricter probe-script assertion (unsigned delivery must be exactly 401) does not match the release line's probe, which accepts 401 or 400/422. Prod's deploy check was kept.12f3aa6TC-513 (#241)f365fa9).4a441adTC-498 (#229),834c72a1.16.1.github/workflows/*,docker-compose*.yaml,deploy/ingress/*,Cargo.toml(version 1.20.1) andCargo.lockare byte-identical to the release line.Follow-up commit
2732cfb: rust.yml (which never ran on the release line) buildstest/m1-realdata-e2eandtest/w5-policy-runtime-node-e2ewith--locked. Their lockfiles still namedtinycloud-node1.19.0 / 1.20.0, so it bumps both to 1.20.1. That is a one-line version change in each lockfile.Follow-up commit
aa64c47makes the excluded e2e CI jobs runnable. They had never run on the release line.conversations. After TC-780 the node resolves the full-path digest, and it treats a non-digest artifact as an unmigrated legacy database, which fences SQL with 503. The fixture now seeds underdatabase_identity::logical_name(SQL_PATH). The node is unchanged.TinyCloudLabs/policy-enginein as a git dependency. The workflow token can't clone it, and the job has never passed (see the TC-780 N1 PR run 37566895448). I removed the job and documented the gap inrust.yml: the suite runs locally before a release (11/11 passed on this branch), and restoring a CI job needs a read token. Switching to m1's vendored copy doesn't compile, because theEvidenceSatisfactionAPI differs.Verification
See the PR comments. The full workspace suite runs on SQLite and on PostgreSQL 18.6, plus the DuckDB-enabled core tests. Also checked:
/infoagainst prod, and the TC-910 32 KB header test through the pinned ingress wrapper in front of a node built from this branch.Not in this PR
Codex/roman/rollback-meeting-node-20260915. It comes in a follow-up PR that ships with the firstmainrelease.mainafter this merges.