Skip to content

chore: sync upstream through 37e14f5c - #101

Merged
e-kotov merged 90 commits into
mainfrom
sync/upstream-2026-11-20
Nov 20, 2026
Merged

e-kotov merged 90 commits into
mainfrom
sync/upstream-2026-11-20

Conversation

@e-kotov

@e-kotov e-kotov commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Merges upstream pingdotgg/t3code main through 37e14f5c81 (84 commits) into the fork. The scheduled upstream sync has failed on conflicts for six days; this PR resolves them by hand. Merge commit: 6c6ce02904.

Decided: upstream renews agent links; fork renewal keeps client pairings

Upstream pingdotgg#39399 (f6d941fa4f, "links between environments renew while they are used") makes the receiving host extend a peer-link session to 30 days from now when an MCP call uses it (at most once a day). There is no off-switch or cap. It also adds SessionStore.extend. The fork had its own linking-side renewal for the same links. Egor chose upstream's renewal as the only mechanism for agent links (commit 8d2e5121bf):

  • Removed (agent links only): apps/server/src/peer/ForkPeerLinkRenewal.ts and its test. Its mounts are gone too. apps/server/src/peer/PeerLinks.ts (resolveForRenewal, Renewing) and PeerLinks.testkit.ts (routes, peerLinks parameters) are byte-identical to upstream again. server.ts mounts plain PeerLinks.layer. Nothing else used these.
  • Fork renewal now refuses agent links: in ForkSessionRenewal.ts, isRenewable accepts only bearer one-time-token pairings. The fork endpoint therefore never moves a peer-link session row, so it cannot fight upstream's extend. An older fork host still asking gets refused/not_renewable. A new row in the existing "never renews" test table covers this.
  • Kept (client pairings): phone, browser and desktop pairings use the renewal endpoint, the client driver/supervisor mounts, DPoP refresh limits, T3CODE_SESSION_RENEWAL, _WINDOW_DAYS, _MAX_AGE_DAYS and the managed-policy stop, all unchanged. For agent links, all three bounds (off-switch, yearly cap, and stopping when managed policy forbids remote clients) no longer apply: upstream's on-use renewal has none of them.
  • Tripwires:
    • The surface snapshot now includes extend.
    • Two peer-link-only tripwire checks are removed because no fork code depends on them any more: the "agent link's token ends at its signed 30-day expiry" case and the peer_environment_links column snapshot. Reviewer, please confirm this. The runbook's Behavior and Surface bullets are rewritten to match.
  • Docs and CI:
    • docs/user/connection-renewal.md: the settings apply to client pairings. Linked environments renew while used, stay valid 30 days after the last use, have no cap, and both machines need this version.
    • The feature summary and the generated README line are updated.
    • fork-session-renewal.yml no longer runs the deleted test or upstream's PeerLinks.test.ts, and no longer triggers on peer/**.
    • The dated record docs/operations/session-renewal-device-key-review.md is left unchanged as history.
  • Mixed versions: a link renews only when the receiving host runs this build, and the linking host records the new expiry only if it runs it too. Until both are updated, a link lapses at its current expiry. This changes server code, so GWDG needs the upgrade for its links to keep renewing.

What came in

Conflicts and resolutions

scripts/fork-merge-upstream.sh reported 16 conflicted files. mergiraf 0.20.0 resolved 13 of them; I reviewed each of those three-way. I resolved the other 3 by hand.

File Resolution
apps/web/src/browser/previewRuntime.ts (browser-proxy) Upstream's new desktopLoadsLoopback argument and allowsPreviewTunnel atom are kept. The fork's snapshot.proxyUrl guard still returns null first, so a proxied tab is never offered "move to desktop" and keeps streaming from the server browser. The server still forces runtime: "server" for proxied tabs (browserProxyTabOptions). The only caller, PreviewView.tsx, already passes the new argument.
apps/mobile/src/features/browser/BrowserTabMenu.tsx (browser-proxy) tunnelOff ? null : loopbackUrlForDevice(browserTabUrl(tab), tab.proxyUrl): upstream's tunnel-off check plus the fork's proxy guard, so a proxied tab never opens directly on the device.
apps/server/src/provider/antigravityUsageLimits.ts (antigravity) The fork's quota family, user agent, runtimeVersion and summaryOnly behaviour sit on top of upstream's new keyring / antigravity-oauth-token path and its projectId refactor. The AntigravityDriver call site still passes summaryOnly and runtimeVersion.
apps/mobile/src/i18n/translations/*.json (10 files) Checked as a three-way merge of keys: every key added or changed by either side is present with the expected value, and nothing extra was added. One deliberate change beyond the merge: earlier syncs (#90, #93, #98) appended English duplicates of b9185b31f8d03aaa ("Add an optional comment…") and ede9a884a11b7972 ("Assistant quote"), which upstream translates. Because JSON takes the last value, the English copy overrode the translation in 9 locales. I dropped the duplicates, so upstream's translations apply again.
apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts Kept the fork's claudeInstance fixture and two-instance registry inside upstream's new Layer.merge(ModelManifest.layerTest, …) wrapper.
apps/server/src/provider/agentContextBudget.json mcpToolListJsonBytes: 58819 = the fork's 58841 minus upstream's −22 bytes. Upstream dropped " Claude/OpenCode only." from the t3_background_wait description (pingdotgg#38348); the fork does not touch that tool. This value is computed, not measured.
packages/client-runtime/src/connection/supervisor.test.ts Both sides appended a describe block at the end of the file: the fork's learnLabel block and upstream's "background fibers" block. Both are kept. The fork block's helpers (RELAY_TARGET, preparedFor, makeHarness with prepare and initialConfig) and EnvironmentSupervisor.make's learnLabel option are still present.

Dropped-mount check: I measured the fork diff against the upstream base for all 254 upstream-owned files the fork edits, before and after the merge. Every file has the same line count, except the mobile catalogs, which are each 2 lines smaller because of the duplicate removal above. The fork's client session-renewal mounts are still present: the driver's ForkDirectSessionRenewal.make and the supervisor's followRenewedBearer. (The later agent-link retirement then deliberately removed the PeerLinks.ts, PeerLinks.testkit.ts and server.ts peer-link mounts; see above.) Upstream added no new preview-open call sites that would need the fork's proxyUrl handling.

Footprint findings

scripts/fork-footprint-budget.py already warned on fork main that some budgets exceed the real diffs. I traced each warning through fork main's history. No fork feature lost code. Each shrink came from an upstream refactor or an intentional extraction:

Recorded with --write in aea0693fd7: the six traced shrinks, the 10 catalogs, server.ts 33 → 30, and the removal of the PeerLinks.ts (13) and PeerLinks.testkit.ts (7) entries, now identical to upstream. No other entry changed.

Fork main merged in

origin/main (53ec4fc28b, including #96 CI caching and its scripts/fork-prune-actions-caches.test.py) was merged in f6bbe539ff without conflicts. #99 was already on the branch's base, and #97 is still open.

Checks

On head aea0693fd7:

  • Passed: python3 scripts/fork-feature-guard.py check (34 features, 216 protecting tests).
  • Passed: python3 scripts/fork-footprint-budget.py (10422 changed lines in 252 upstream files, no warnings).
  • Passed: scripts/fork-upstream-sync.sh footprint. No PeerLinks* file is listed any more.
  • Passed: python3 -B scripts/fork-prune-actions-caches.test.py (4 tests).
  • No conflict markers remain, and git diff --check is clean for the new commits.
  • Removed-symbol check: git grep finds no reference to ForkPeerLinkRenewal, resolveForRenewal, Renewing, the testkit's routes/peerLinks parameters or renewalRoutes. The contract exports the deleted module used (FORK_SESSION_RENEWAL_PATH, ForkSessionRenewalResponse) still have live users.
  • Verified by reading the code: MCP-client sessions are rejected outside /mcp (rejectMcpClientAudience). So the fork's change to awaitInvalidation (non-DPoP sockets close at the expiry they opened with) never applies to peer links, whose rows upstream now moves.
  • Not run locally (no dependencies on this Mac): typecheck, tests (including the edited ForkSessionRenewal.test.ts and the tripwire test), knip, formatter/lint, vp install --frozen-lockfile after the auto-merged pnpm-lock.yaml and pnpm-workspace.yaml, the i18n check, and a measurement of agentContextBudget.json. CI decides these.

Done by Claude Opus 5.5 (claude-opus-5-5) in Claude Code (via T3 Code), as an implementation sub-agent.

Review follow-up (Claude Opus 5.5, coordinator): the live HTTP tests of client pairing renewal (bearer renewal and revocation, cookie refusal, off-switch and unreadable cap, managed-policy refusal) lived in the removed agent-link test file. They now live in apps/server/src/auth/ForkSessionRenewalHttp.test.ts, registered under the renewal feature and in fork-session-renewal.yml; PeerLinks.testkit.ts keeps its optional routes parameter for them (4 budgeted lines). The guide now says a used link stays valid about 30 days after last use, with the expiry moving at most once a day.

juliusmarminge and others added 30 commits November 19, 2026 14:46
…dotgg#39395)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…el (pingdotgg#39415)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…elegating (pingdotgg#39413)

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ect loop for good (pingdotgg#39420)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ain (pingdotgg#37419)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…t and @ (pingdotgg#38323)

Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ider versions (pingdotgg#39427)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…fest (pingdotgg#39434)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…urn ends (pingdotgg#38869)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…s parent (pingdotgg#39455)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
StiensWout and others added 27 commits November 19, 2026 23:25
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ingdotgg#39548)

Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
pingdotgg#39562)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…n closes (pingdotgg#39569)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…dotgg#39579)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: MarcoDotIO <20867620+MarcoDotIO@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#39598)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…otgg#39605)

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…when they exit (pingdotgg#38348)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…a failure (pingdotgg#39596)

Co-authored-by: Ryan McDonough <Ryan@r2n.io>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…ands (pingdotgg#39618)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…lized scroll windows (pingdotgg#39574)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…es (pingdotgg#39636)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#39643)

Co-authored-by: Geezy <igor.licko@gloryck.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Resolved by mergiraf 0.20.0 (reviewed): apps/mobile/src/features/browser/BrowserTabMenu.tsx,
apps/mobile/src/i18n/translations/{de,en,es,fr,ja,ko,pt-BR,ru,sv,zh}.json,
apps/server/src/provider/antigravityUsageLimits.ts, apps/web/src/browser/previewRuntime.ts.

Resolved by hand: apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts,
apps/server/src/provider/agentContextBudget.json,
packages/client-runtime/src/connection/supervisor.test.ts.

Mobile catalogs: dropped the stale English duplicates of b9185b31f8d03aaa and
ede9a884a11b7972 that earlier syncs appended, so upstream's translations apply again.
Upstream pingdotgg#39399 renews a peer-link session on the receiving host while the
link is used. Egor chose that as the only mechanism for agent links, so the
fork's linking-side renewal (ForkPeerLinkRenewal) and its PeerLinks and
server mounts are removed, restoring upstream's lines. Fork renewal now
refuses agent-link sessions, so it cannot move the rows upstream's
SessionStore.extend maintains. Client-pairing renewal, its off-switch and
yearly cap are unchanged.

The surface tripwire records upstream's new `extend` member; the agent-link
expiry case and peer_environment_links snapshot are dropped because no fork
code depends on them any more.
Six shrinks traced to earlier syncs, the ten mobile catalogs that lost
duplicate English keys, and the PeerLinks, testkit and server.ts lines
restored to upstream when agent-link renewal was retired.
Removing the agent-link renewal tests also dropped the only tests of the
renewal endpoint itself: bearer renewal and revocation, cookie refusal,
the off-switch and unreadable cap, and managed-policy refusal. Move them
to an auth test, restoring the testkit's optional routes parameter.
@e-kotov
e-kotov merged commit d4a4cd3 into main Nov 20, 2026
14 checks passed
@e-kotov
e-kotov deleted the sync/upstream-2026-11-20 branch November 20, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.