Skip to content

chore(stage): merge upstream t3code v0.1.7-nightly.20261103.4119 - #365

Merged
bk-agent-01 merged 1856 commits into
stagefrom
tushar/stage-upstream-2026-11-03
Nov 3, 2026
Merged

bk-agent-01 merged 1856 commits into
stagefrom
tushar/stage-upstream-2026-11-03

Conversation

@bk-agent-01

@bk-agent-01 bk-agent-01 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Refs: no ticket (requested in T3 session "Update Stage With Upstream T3" by tushar).

Summary

This PR merges upstream pingdotgg/t3code main cefb544af3 (tag v0.1.7-nightly.20261103.4119) into stage. Upstream has 1,838 new commits since the last sync (05b697f6a2, 2026-10-21).

  • 220 files conflicted (about 520 hunks). Opus subagents resolved them by area, then 12 CI rounds fixed what broke without a conflict.
  • Every fork feature is kept. Fork code was replaced only where upstream now ships the same behaviour (table below).
  • Upstream migrations 068–078 register at fork ids 1060–1070 (stage and bkt3 databases are both at 1059). 063 (DropUnusedV1Projections) stays unregistered.
  • The fork marker check passes. CI is green: typecheck, lint, all 8 server shards, web, package tests, markers and the stage validate build.

Upstream replaced fork code

Area Fork code Upstream now Why upstream is kept
Queue held-queue adapter continuation (QueueHeldContinuation.expbkt3.ts, deleted) wakeSkipsHold (pingdotgg#17885) Same behaviour, stricter Stop check, own tests
Queue nextStartableQueuedRun, steer-during-stop skip, canStartQueuedRun SQL identical upstream code Same behaviour
Questions messageAnswerText multi-select join isMessageQuestionAnswer validation Validates before resolving; blank entries now rejected
Connect connectDiscoveryCache.expbkt3.ts (deleted) built-in stale-while-revalidate cache (pingdotgg#14519) Same, no extra layer
Presence background-policy lease redaction (deleted) background-policy RPCs removed upstream Nothing left to redact
SQLite fork reader pool upstream reader pool Same core; fork busy weighting and configurable size kept on top
Composer isConnecting send-block exceptions; plan-review dock scroll aliasing isConnecting and the collapsing composer removed upstream Offline durable sends are never blocked now
Traits picker planModeEnabled → planModeAvailable prop rename upstream exported TraitsSelectionInput Cosmetic; planModeAvailable (default on) still drives it
Mobile thread deep-link reset, overlay list, terminal remount, Shiki time limit, card toolbar workspaceDetailLinkAction, registerPresentedRoutes, terminal writer, native tokenizer, new composer Superset, or the problem no longer exists
Desktop branded linuxWmClass, catalog clear lock removed upstream (setDesktopName sets the class) Brand still applied
MCP results JsonToolResult workaround effect 4.1.2 accepts any structuredContent Fork helper kept, now harmless

Decisions

  1. Kept the fork's client.connected analytics event (TEC-1631) although upstream removed its own (fix(server): analytics stop counting reconnects, retries, and dev servers pingdotgg/t3code#24601).
  2. Restored GET /api/auth/pairing-links and GET /api/auth/clients (deleted upstream as unreached); fork web uses them for member self-service.
  3. Restored V1 ProviderSession / providerRuntime schemas and the change-request presentation helpers; fork code still uses them.
  4. Added the fork thread-access gate to new upstream thread RPCs (forceStopThread, getNativeChildWork, getThreadFamily, getWorktreeThreadIds, getOlderSettledThreads, searchThreads) and to scratch-thread promotion (every moved thread).
  5. The fork shell never trims older settled threads (omitOlderSettled forced off), and filtered users get no cross-user counts; the fork sidebar has no settled pager.
  6. Linked MCP peers always get the full tool list; the fork's short per-caller list had broken upstream's new peer links. Access checks still apply per call.
  7. cliReleaseChannelOf reads -stage-nightly, -production-nightly and .upstream.g<sha> as nightly, so BK desktop keeps offering updates.
  8. Fork settings pages moved under upstream's settings modal; the phase-grouped sidebar stays while Settings is open.
  9. Re-exported GitHubRest and GitHubRequestPolicy from @t3tools/source-control-github for per-user GitHub profiles (no public replacement upstream).
  10. Fork-owned files that predate upstream's new lint and Effect style rules are on marked ratchet lists (scripts/lib/forkLintStyleDebt.expbkt3.ts + vite.config.ts, tsconfig.base.json) instead of mass rewrites. Upstream-owned files are never on them.
  11. The context-budget test measures upstream toolkits only, against a fork budget file (agentContextBudget.expbkt3.json); upstream's budget file is unchanged.
  12. apps/web pins typescript: catalog:; otherwise the fork's Plate packages pulled real TypeScript and a second vite-plus, which broke every @effect/vitest web test.
  13. Restored three fork features an earlier merge (a3f26f98de) had lost: source-control profile on clone/publish/lookup, the "convert origin to HTTPS" toast, the machine badge on the draft screen.
  14. Fixed fork regressions found by CI: archive navigation after the archive guard, the update pill's React import, t3-merge-base read for new worktrees, fork control MCP tool services (now provided per request).

Acceptance check

Item Proof
No conflict markers; every fork marker accounted for check-fork-markers.ts passes; per-file marker drops traced to worker reports
Typecheck, lint, tests green CI on the head (all required jobs green)
Cross-model review clean Codex gpt-6.1-sol, 4 rounds; all findings fixed or deferred (below)
Migrations 1060–1070 apply on the stage DB stage deploy, effect_sql_migrations max = 1070 (after merge)
stagebkt3 serves the merge ~/.t3/stage-dev/deployed-sha = merge commit, service active (after merge)

Follow-ups (not in this PR)

  • P2 (pre-existing): tracked clones (projectCloneStart) ignore the user's source-control profile.
  • Pre-existing: the thread-cache eviction sweep lost its call site in a3f26f98de.
  • Pre-existing: startWithHandoffs rebuilds provider text from userText, which may drop fork thread-comment and plan-policy text on handoff turns.
  • The stage deploy timer's GitHub token (~/.config/t3-deploy/gh-token) returns 401 since 2026-10-31; stage did not auto-install feat(claude-accounts): pace to reset and credits run-rate in the account picker #364.

How I tested

No local build or test (dev-server-1 policy). CI on the PR head is the gate. The stage deploy is the runtime proof.

🤖 Generated with Claude Code

Kamkmgamer and others added 30 commits November 1, 2026 21:48
)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dotgg#28364)

Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
…ngdotgg#28419)

Co-authored-by: PR Batch Tester <agent@local.test>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ut (pingdotgg#28491)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
… chat (pingdotgg#28563)

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
…#28582)

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
… runs in (pingdotgg#28592)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…run (pingdotgg#28610)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t3dotgg and others added 5 commits November 2, 2026 22:56
…29909)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Upstream tip v0.1.7-nightly.20261103.4119: 1,838 commits since the
last sync (05b697f). 220 files conflicted (~520 hunks); fork
features kept, with fork code replaced only where upstream now ships
the same behaviour. Upstream migrations 068-078 register at fork ids
1060-1070; 063 stays unregistered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 361b354.

This comment will update automatically after the next completed run.

bk-agent-01 and others added 16 commits November 3, 2026 14:33
- Lint: unused imports, long comments, hoisted schema decoder.
- Desktop tests: SecureRandom layer; allowDowngrade now stays off (upstream).
- Restore fork features lost in an earlier merge: source-control profile on
  clone/publish/lookup, convert-origin-to-HTTPS toast, machine badge.
- Gate scratch-thread promotion on access to every thread it moves.
- Never trim older settled threads for the per-user shell; drop cross-user counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ebt ratchets

- Fork files move from effect/Crypto to SecureRandom; fork tools pass the new
  startsThreads origin options; presence keeps a fork BackgroundPolicy feed.
- Re-export GitHubRest and GitHubRequestPolicy for per-user GitHub profiles.
- Restore @formkit/auto-animate for the phase sidebar.
- Fork-owned files that predate upstream's new comment/effect lint and Effect
  style diagnostics go on marked ratchet lists instead of mass rewrites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e declarations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revert before merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry MCP tool, client regressions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fork statusDetails reads upstream's t3-merge-base before gh-merge-base.
- Context budget test measures upstream toolkits only.
- Transfer budget follows the fork's untrimmed settled shell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ork context budget

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ainst its own

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed task mock

- Toolyard settings test: the Input mock no longer awaits the real module,
  which upstream's menu now imports in a cycle.
- Side-chat /goal test: route the shared fake event queue per provider session,
  since the fork opens one session per thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pes, scheduled task mock

apps/web pins typescript to the catalog: the fork's Plate packages have a
typescript peer, which made pnpm resolve real TypeScript and a second
vite-plus/@effect/vitest copy, so every @effect/vitest web test lost its runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ver mock

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fork control toolkit registration uses upstream's provideRegistrationServices,
  so its tool services no longer leak into the CLI graph.
- Web UI bridge provides NpmRelease.
- Fork-owned files that predate upstream's Effect style rules join the ratchet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bk-agent-01

Copy link
Copy Markdown
Collaborator Author

Cross-model review record (reviewer: Codex gpt-6.1-sol, author: Claude Opus 5.5)

Round Head Findings Outcome
1 d4a29badba P1 scratch-thread promotion ungated; P2 older-settled counts leak; P2 short pages after post-LIMIT filter; P2 fork sidebar loses older settled sessions Fixed in 7db6e01aae (promotion authorizes every moved thread; fork shell never trims settled threads; filtered users get no cross-user counts). Short pages: accepted residual, no fork client pages.
2 7db6e01aae P2 tracked clones (projectCloneStart) ignore the source-control profile Pre-existing on stage before this merge; deferred as a follow-up.
3 7c9832f0cf P2 fork snooze countdown only updates at wake time Fixed in 361b354094.
4 361b354094 none Clean.

@bk-agent-01
bk-agent-01 marked this pull request as ready for review November 3, 2026 18:28
@bk-agent-01
bk-agent-01 merged commit c08d813 into stage Nov 3, 2026
45 of 48 checks passed
@bk-agent-01

Copy link
Copy Markdown
Collaborator Author

Merged into stage as c08d81302f, pinned to reviewed head 361b354094 (CI green on newest runs; cross-model review clean, record above). Requested by tushar in the T3 session. Installing on stagebkt3 next.

bk-agent-01 added a commit that referenced this pull request Nov 4, 2026
Promote stage to bkt3 (2026-11-04): process host (#367), PR-sweep git fingerprint (#366), upstream nightly (#365)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.