Repository navigation
chore: merge upstream through 75d63d64c - #79
Merged
Merged
Conversation
…g#10409) Co-authored-by: Yash Singh <saiansh2525@gmail.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
…rotocol variables (pingdotgg#13492) Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…and WSL backends (pingdotgg#13641) Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…gg#13705) Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13699) Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…otgg#13720) Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
…13701) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…13685) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13684) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13698) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…equests (pingdotgg#13704) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gg#13694) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#13688) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pingdotgg#13693) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oading it twice (pingdotgg#13683) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… in memory (pingdotgg#13686) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he whole thread list (pingdotgg#13691) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ngdotgg#13697) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dotgg#13689) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…irectory (pingdotgg#13695) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
…otgg#13339) Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ents, and idle polls (pingdotgg#13756) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g into memory (pingdotgg#13763) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ates per comparison (pingdotgg#13759) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ngdotgg#13761) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…le (pingdotgg#13765) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#13767) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…per (pingdotgg#13774) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#13807) Co-authored-by: Cursor <cursoragent@cursor.com>
…tgg#13764) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…th failed repacks (pingdotgg#13812) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Second catch-up merge from pingdotgg/t3code, including upstream's Cursor, OpenCode and Antigravity usage readers (e5a46d6). Cursor usage is reconciled onto upstream's model: - Adopt upstream's reader (cursorUsageReader.ts, cursor.com dashboard), contract v6 (sourcePath buckets, keychain action), cursor-account:<hash> fingerprint, and the three Cursor limit pools. Delete the fork's duplicate: cursorUsage.ts, cursorDashboard.ts, their tests and fixtures, the account/unavailable fingerprint kinds, bucket sourceId, CURSOR_MONTHLY_WINDOW_ID, displayUsageLimits, budgetUsd, the GetMe accountIdentity, and the Cursor price-override exemption. - Keep the fork's per-instance read: every Cursor instance's login is read (upstream reads only the host's), and each account counts once. - Keep the fork's settled-history cache, now in cursorAccountHistory.ts on top of upstream's reader. - Cloud account routing ranks Cursor by the combined pool (totalPercentUsed), which Auto, the default model, draws down from either allowance. Without it, the roomier pool stands in. Other resolutions: - ChatView: upstream moved queued sends to chat/sendQueuedMessage.ts. The fork's heldCloudSend stays in onSend (it holds the live draft during cloud provisioning, never a queued message). #77's buildCloudHandoff is unchanged. Queued sends now wait out a handoff in QueuedMessageSender and Send now, as the fork's onSend did. - __root: mount both ThreadLifecycleOverlayCoordinator and QueuedMessageSender. - ProviderCommandReactor: keep upstream's TerminalManager and the fork's revival prompt; the error guards the fork removed stay removed. - CursorDriver: upstream's keychain setting plus the fork's log annotation and skills discovery. - cursorUsageLimits: upstream's pools and keychain, plus the fork's logged failure and billing-cycle pace marker. - usageAggregation/UsageService: upstream's sourcePath buckets, plus the fork's out-of-window fast path (addTranscript). - Usage UI: upstream's, keeping the fork's selected-environment queries. - package.json/lockfile: keep @namespacelabs/sdk and @napi-rs/keyring. - Migrations: comment on how later upstream migrations are numbered. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The sync failed silently every day from 09-22, and the fork drifted five days before anyone noticed. A failed merge now opens an issue titled "Upstream sync needs a manual merge" with the date, the run link and the resolution hint, or comments on the open one so it never duplicates. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
… runners It samples 2,000 values from the thread and project shell schemas. That takes under a second locally and on upstream's 8-vCPU runners, but 7s on this fork's shared ubuntu-latest runners under a parallel test load. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Merge this with a merge commit. Do not squash or rebase. A squash drops upstream's history, and the next sync would conflict on all 58 commits again.
This is the second catch-up merge from pingdotgg/t3code, through
75d63d64c5(upstream/main today). After it lands, the fork has every upstream commit and the dailysync-upstreamworkflow can fast-merge again. It includes upstream's Cursor/OpenCode/Antigravity usage readers (e5a46d6c5), which duplicated the fork's Cursor usage history. This PR converges the fork on upstream's version of that feature.A second, separate commit makes a failed daily sync open or update a single issue titled "Upstream sync needs a manual merge", so the fork cannot drift silently again.
Cursor usage: what changed
For users of the fork's host:
For whoever maintains this next: the fork's Cursor usage code is deleted, not kept alongside upstream's.
usage/cursorUsage.ts,provider/cursorDashboard.ts, their tests and two fixtures.account/unavailablefingerprint kinds, bucketsourceId,CURSOR_MONTHLY_WINDOW_ID,budgetUsd, andauth.accountIdentity(from the fork's GetMe call).displayUsageLimits, and the fork's exemption of Cursor from custom model prices.UsageService.ts.usage/cursorAccountHistory.tswrapping upstream'sreadCursorAccountUsage. It keeps rows older than an hour and re-reads only the unsettled tail once its 60s trust has passed. It drops the cache if a login now names a different account.headroomWindowsinpackages/shared/src/usageLimits.ts.Why routing ranks Cursor by the Overall pool
Cloud chats run Cursor's default model,
auto(DEFAULT_MODEL_BY_PROVIDER). Upstream's pool descriptions say Auto "can use either pool", and Overall is "combined usage across both allowances". Overall is therefore the remaining capacity for the model agents actually run. Ranking by the tightest pool would mark an account spent while its Auto turns still succeed; the fork already saw the API pool read 100% while Auto worked (#29). If a report lacks Overall, the roomier of the two pools stands in, for the same reason. The comment onheadroomWindowssays this too.Decision log
19 files conflicted, with 33 hunks.
packages/contracts/src/usage.tsUSAGE_CONTRACT_VERSIONto 6 with different Cursor shapes. Upstream's (sourcePath, theenableCursorKeychainaction, thecursor-account:<hash>fingerprint) wins so future syncs stay clean.packages/shared/src/usageMerge.ts(6 hunks),usageMerge.test.tspackages/shared/src/usageLimits.tsCURSOR_USAGE_WINDOWSanddisplayLimitWindows, plus the fork'srankAccounts/isAccountSpent, with a Cursor rule for which window counts.apps/server/src/usage/UsageService.ts(5 hunks)addTranscriptout-of-window fast path and a scan key that includesproviderInstances.usageAggregation.ts(2 hunks)sourcePathbucket key, plus the fork'sadmitswindow check.cursorUsageLimits.ts,CursorDriver.tsCursorProvider.test.ts(3 hunks)UsageService.test.ts(2 hunks)cursor.comsources and one total per account.ChatView.tsx(3 hunks)onSend. The fork'sheldCloudSendstays inonSend, and #77'sbuildCloudHandoffis unchanged.heldCloudSendholds the live draft of a cloud chat whose box is still provisioning. That thread has no server thread yet, so it never has a queue, andsendQueuedMessage.tsdoes not need it. What queued sends did lose was the fork's handoff hold, soQueuedMessageSenderand Send now wait out a handoff (new test).__root.tsxThreadLifecycleOverlayCoordinatorandQueuedMessageSender.ProviderCommandReactor.tsTerminalManagerimport, plus the fork's revival prompt. The error guards the fork removed stay removed.UsagePage/usageProviders, mobileUsageLimitsPooled/usageProvidersapps/server/package.json,pnpm-lock.yaml@namespacelabs/sdkand@napi-rs/keyring. The lockfile is regenerated withvp i.docs/user/usage.mdAlso in the merge commit:
Migrations.tsgives the numbering rule for later syncs: upstream migrations numbered 055 or higher become 058 or higher here, and one whose contents match a fork migration is matched by rename. Upstream adds no migrations in this range.usage.query.test.tsxmocks upstream's newprovidersValueAtom.UsageProviderChart.test.tsis upstream's.Follow-up commit:
test(client-runtime)givespersistence.test.tsa 30s timeout. That test comes from upstream (pingdotgg#13767) and samples 2,000 generated snapshots. It runs in under a second locally and on upstream's 8-vCPU runners. It timed out at 7s twice in a row on this fork's sharedubuntu-latestrunners (it is CPU-bound, not waiting on anything).Wire compatibility
Both the old fork and upstream call their contract v6, but the Cursor shapes differ. A client built from this branch cannot decode Cursor sources from a server that has not updated. It shows that environment as "could not report usage" until the server updates. Web clients update with the host. Only an older mobile build would see this, until the host deploys.
Verification
vp test run:apps/server/src/usage(including the newcursorAccountHistory.test.ts),CursorProvider,CursorDriver,cursorCredentialStore,cursorCredentialPath,ProviderCommandReactor,ProvisioningProviderProfile,accountLoad,claudeUsageLimits,057_ProjectionThreadsAutoSettleDisabledAt,handoff. All pass except two Cursor skills tests, which fail the same way on origin/main on macOS (/varvs/private/var).usageLimits,usageMerge,usageFormat, client-runtimeusage,ChatView.logic,usage.query,settingsSearch,components/usage,queuedMessageStore,QueuedMessageSender, and mobileUsageLimitsSectionandusageEnvironmentSelection. All pass.vp linton the touched files: no errors.@t3tools/*import in the 256 changed TS files, and all resolve. No identifier that upstream removed is still referenced.sync-upstream.ymlsteps with a fakegh. A failed merge creates the issue when none is open and comments on it when one is.f966dfe08.🤖 Generated with Claude Code