From d6acab56f847aea57e3598e0ae86a0c6adf88a63 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 11:10:02 +0000 Subject: [PATCH 1/8] fix(desktop): sign macOS builds without Apple passkey profiles Self-signed fork releases need --signed without a Developer ID team id or provisioning profile. Skip passkeys and notarization in that case, keep the upstream passkey path when those env vars are set, and remap Blacksmith CI runners on this fork. Co-authored-by: amartya18 --- .github/workflows/ci.yml | 20 ++--- .../workflows/mobile-fingerprint-check.yml | 2 +- FORK.md | 32 +++++++ PATCH.md | 30 +++++++ scripts/build-desktop-artifact.test.ts | 86 +++++++++++++++++++ scripts/build-desktop-artifact.ts | 20 ++++- 6 files changed, 177 insertions(+), 13 deletions(-) create mode 100644 FORK.md create mode 100644 PATCH.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4c45728c234..1d35e923cfe3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: # open: if the diff cannot be resolved, everything runs. changes: name: Changes - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 5 outputs: typecheck: ${{ steps.detect.outputs.typecheck }} @@ -63,7 +63,7 @@ jobs: contents: read id-token: write name: Lint - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -119,7 +119,7 @@ jobs: name: Build and Typecheck needs: changes if: ${{ !cancelled() && (needs.changes.outputs.build != 'false' || needs.changes.outputs.typecheck != 'false') }} - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -213,7 +213,7 @@ jobs: name: Test needs: changes if: ${{ !cancelled() && needs.changes.outputs.test != 'false' }} - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -289,7 +289,7 @@ jobs: name: Test Web needs: changes if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }} - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -353,7 +353,7 @@ jobs: contents: read id-token: write name: Test Server ${{ matrix.shard }} - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }} # Shards take 2-5 minutes. When the shared task cache throttles reads, each # failed fetch stalls vp for 15-90s, which pushed shards past 10 minutes. timeout-minutes: 20 @@ -469,7 +469,7 @@ jobs: name: Rust needs: changes if: ${{ !cancelled() && needs.changes.outputs.rust != 'false' }} - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -502,7 +502,7 @@ jobs: name: Mobile Native Static Analysis needs: changes if: ${{ !cancelled() && needs.changes.outputs.mobile_native != 'false' }} - runs-on: blacksmith-6vcpu-macos-26 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-6vcpu-macos-26' || 'macos-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -535,7 +535,7 @@ jobs: name: Release Smoke needs: changes if: ${{ !cancelled() && needs.changes.outputs.release_smoke != 'false' }} - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 10 steps: - name: Checkout @@ -575,7 +575,7 @@ jobs: mobile_native_static_analysis, release_smoke, ] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} timeout-minutes: 5 steps: - name: Require every job to pass diff --git a/.github/workflows/mobile-fingerprint-check.yml b/.github/workflows/mobile-fingerprint-check.yml index 9fabb3a5f2ad..ec27e7189ac9 100644 --- a/.github/workflows/mobile-fingerprint-check.yml +++ b/.github/workflows/mobile-fingerprint-check.yml @@ -25,7 +25,7 @@ concurrency: jobs: fingerprint: name: Native fingerprint diff - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} permissions: contents: read env: diff --git a/FORK.md b/FORK.md new file mode 100644 index 000000000000..23f7f39d23ae --- /dev/null +++ b/FORK.md @@ -0,0 +1,32 @@ +# Amartya's T3 Code fork + +This repository tracks [pingdotgg/t3code](https://github.com/pingdotgg/t3code). `main` is a 1:1 mirror. Fork behavior lives on `patches` and is cherry-picked onto each upstream **stable** tag by `.github/workflows/fork-stable-release.yml`. + +The contract for those patches is [PATCH.md](PATCH.md). + +## First install + +1. Wait for a GitHub Release on [amartya18/t3code](https://github.com/amartya18/t3code/releases) with a macOS zip or dmg and `latest-mac.yml`. +2. Download the arm64 zip or dmg. This is a self-signed build, not a Developer ID build. +3. Open it. Gatekeeper will warn. Open anyway from System Settings → Privacy & Security, or right-click Open. +4. Keychain may ask to trust the signing identity. Allow it. Later updates from this fork use the same identity, so Squirrel.Mac accepts them. +5. Do not replace an official T3 Code install in place and expect the official updater to switch feeds. Official builds look at pingdotgg/t3code. This fork's `app-update.yml` looks at amartya18/t3code. Install this build as your daily app if you want fork updates. Bundle id and user-data dir match upstream (`com.t3tools.t3code`, `~/Library/Application Support/t3code` with legacy `T3 Code (Alpha)`), so existing threads stay. + +## Add or change a patch + +1. Branch from `patches`. +2. Make one concern. Keep it rebase-friendly. +3. Update [PATCH.md](PATCH.md) in the same change. +4. Open a PR that targets `patches`, not `main`. Do not merge into `main`. + +## Conflicts + +The daily workflow cherry-picks `patches` onto the newest upstream stable tag. If git cannot apply a patch, it opens a GitHub issue and publishes nothing. Rebase `patches` onto the new tag, restore the PATCH.md invariants, and re-run the workflow. + +Prefer upstream on conflicted hunks, then re-apply only the contract in PATCH.md. If the invariant cannot be re-expressed without changing behavior, leave the conflict and say which invariant is at risk. + +## Rollback + +- App: download an older fork release zip and replace the `.app`. Same signing identity, so this is a downgrade the updater will try to replace on the next check. +- Patches: reset `patches` to the last known-good commit. `main` stays a mirror; do not rewind it with fork commits. +- Stop taking updates: quit the app, or switch back to an official pingdotgg build (that is a different signing identity; it will not consume this feed). diff --git a/PATCH.md b/PATCH.md new file mode 100644 index 000000000000..091329fc30d4 --- /dev/null +++ b/PATCH.md @@ -0,0 +1,30 @@ +# Fork patches + +This branch (`patches`) is the personal [amartya18/t3code](https://github.com/amartya18/t3code) stack. Cherry-pick it onto any upstream **stable** tag. `main` is a 1:1 mirror of [pingdotgg/t3code](https://github.com/pingdotgg/t3code) and must not receive these commits. + +See [FORK.md](FORK.md) for install, adding patches, conflicts, and rollback. + +## Behavioral contract + +### Signed macOS builds without Apple Developer ID + +1. `--signed` on macOS still codesigns via `scripts/sign-macos.ts` and `CSC_LINK`. +2. If `T3CODE_APPLE_TEAM_ID` and `T3CODE_MACOS_PROVISIONING_PROFILE` are both unset or empty, the build does **not** resolve passkey signing, does **not** embed a provisioning profile, and sets `mac.notarize: false`. +3. If either Apple variable is set, the upstream passkey path still runs and still fails closed on a missing profile, bad team id, or bad RP domain. +4. Bundle id stays `com.t3tools.t3code`. User-data directory stays `t3code` (legacy `T3 Code (Alpha)`). + +### GitHub-hosted CI on this fork + +5. `ci.yml` and `mobile-fingerprint-check.yml` use GitHub-hosted runners when `github.repository_owner != pingdotgg`. pingdotgg keeps Blacksmith. + +## Maintained files + +- `scripts/build-desktop-artifact.ts` (+ `.test.ts`) +- `.github/workflows/ci.yml` +- `.github/workflows/mobile-fingerprint-check.yml` + +## Dropped from upstream signing + +- Notarization (no Apple notary credentials) +- Associated-domain / passkey entitlements (no Apple team provisioning profile) +- Clerk desktop passkeys on this fork diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index 165ca80cb30a..78e23c997e02 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -40,6 +40,7 @@ import { renderMacPasskeyEntitlements, resolveMacWebAuthnEntitlements, resolveMacPasskeySigningConfiguration, + shouldResolveMacPasskeySigning, resolveMergedStageDependencies, resolveBuildOptions, stageWslRuntimeArchive, @@ -546,6 +547,70 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { ), ); + it.effect("signed macOS builds without a passkey profile skip notarization and provisioning", () => + Effect.gen(function* () { + const signedSelf = yield* createBuildConfig( + "mac", + "dmg", + "0.1.6", + true, + false, + undefined, + undefined, + ); + const mac = signedSelf.mac as Record; + assert.equal(mac.notarize, false); + assert.match(String(mac.sign), /scripts[\\/]sign-macos\.ts$/); + assert.notProperty(mac, "provisioningProfile"); + assert.notProperty(mac, "entitlements"); + + const signedPasskeys = yield* createBuildConfig("mac", "dmg", "0.1.6", true, false, undefined, { + entitlementsPath: "/tmp/entitlements.mac.plist", + provisioningProfilePath: "/tmp/t3code.provisionprofile", + }); + const passkeyMac = signedPasskeys.mac as Record; + assert.notProperty(passkeyMac, "notarize"); + assert.equal(passkeyMac.provisioningProfile, "/tmp/t3code.provisionprofile"); + assert.equal(passkeyMac.entitlements, "/tmp/entitlements.mac.plist"); + }).pipe( + Effect.provide( + ConfigProvider.layer( + ConfigProvider.fromEnv({ env: { GITHUB_REPOSITORY: "amartya18/t3code" } }), + ), + ), + ), + ); + + it.effect("resolves the GitHub update feed from T3CODE_DESKTOP_UPDATE_REPOSITORY", () => + Effect.gen(function* () { + const config = yield* createBuildConfig( + "mac", + "dmg", + "0.1.6", + false, + false, + undefined, + undefined, + ); + assert.deepStrictEqual(config.publish, [ + { + provider: "github", + owner: "amartya18", + repo: "t3code", + releaseType: "release", + }, + ]); + }).pipe( + Effect.provide( + ConfigProvider.layer( + ConfigProvider.fromEnv({ + env: { T3CODE_DESKTOP_UPDATE_REPOSITORY: "amartya18/t3code" }, + }), + ), + ), + ), + ); + // pnpm writes "set this to true or false" placeholders into allowBuilds when a // tarball changes. pnpm ignores them, but the release build decode rejects them. it.effect("decodes the repo allowBuilds and every file: tarball it names exists", () => @@ -1490,6 +1555,27 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { ); }); + it("skips passkey resolution when Apple team id and provisioning profile are both absent", () => { + assert.equal(shouldResolveMacPasskeySigning({}), false); + assert.equal( + shouldResolveMacPasskeySigning({ + T3CODE_APPLE_TEAM_ID: " ", + T3CODE_MACOS_PROVISIONING_PROFILE: "", + }), + false, + ); + assert.equal( + shouldResolveMacPasskeySigning({ T3CODE_APPLE_TEAM_ID: "ABC1234567" }), + true, + ); + assert.equal( + shouldResolveMacPasskeySigning({ + T3CODE_MACOS_PROVISIONING_PROFILE: "/tmp/t3code.provisionprofile", + }), + true, + ); + }); + it("rejects incomplete macOS passkey signing configuration", () => { const captureError = (env: Readonly>) => { try { diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index 8ba7f1adcbbd..a4b69a9d51d6 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -1243,6 +1243,15 @@ function normalizePasskeyRpDomain(value: string): string { return parsed.hostname; } +/** True when the env asks for Developer ID passkey signing. Empty means self-signed, no passkeys. */ +export function shouldResolveMacPasskeySigning( + env: Readonly>, +): boolean { + const teamId = env.T3CODE_APPLE_TEAM_ID?.trim() ?? ""; + const provisioningProfilePath = env.T3CODE_MACOS_PROVISIONING_PROFILE?.trim() ?? ""; + return teamId.length > 0 || provisioningProfilePath.length > 0; +} + export function resolveMacPasskeySigningConfiguration( env: Readonly>, ): MacPasskeySigningConfiguration { @@ -2856,6 +2865,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( }, ], ...(signed ? { sign: path.join(repoRoot, "scripts/sign-macos.ts") } : {}), + ...(signed && !macPasskeySigning ? { notarize: false } : {}), ...(macPasskeySigning ? { entitlements: macPasskeySigning.entitlementsPath, @@ -3794,10 +3804,11 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f const stageProdResourcesDir = path.join(stageAppDir, "apps/desktop/prod-resources"); yield* fs.copy(stageResourcesDir, stageProdResourcesDir); + const repoEnv = loadRepoEnv({ repoRoot }); const configuredMacPasskeySigning = - options.platform === "mac" && options.signed + options.platform === "mac" && options.signed && shouldResolveMacPasskeySigning(repoEnv) ? yield* Effect.try({ - try: () => resolveMacPasskeySigningConfiguration(loadRepoEnv({ repoRoot })), + try: () => resolveMacPasskeySigningConfiguration(repoEnv), catch: MacPasskeySigningConfigurationResolutionError.fromCause, }) : undefined; @@ -3810,6 +3821,11 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f ), } : undefined; + if (options.platform === "mac" && options.signed && macPasskeySigning === undefined) { + yield* Effect.log( + "[desktop-artifact] macOS signing without passkey entitlements or notarization (no Apple team id / provisioning profile).", + ); + } const macEntitlementsPath = macPasskeySigning ? path.join(stageAppDir, "entitlements.mac.plist") : undefined; From 098273bba6a3aaa2b4c0be919afdb8e492614228 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 11:24:12 +0000 Subject: [PATCH 2/8] fix(ci): run fork GitHub-hosted jobs on Ubuntu 24.04 ubuntu-latest is Ubuntu 26, and Playwright 1.60 cannot install chromium-headless-shell there. Pin the fork remap to ubuntu-24.04 and format the new desktop artifact tests so vp check passes. Co-authored-by: amartya18 --- .github/workflows/ci.yml | 18 ++--- .../workflows/mobile-fingerprint-check.yml | 2 +- PATCH.md | 2 +- scripts/build-desktop-artifact.test.ts | 75 ++++++++++--------- 4 files changed, 52 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d35e923cfe3..59683bef2d2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: # open: if the diff cannot be resolved, everything runs. changes: name: Changes - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 5 outputs: typecheck: ${{ steps.detect.outputs.typecheck }} @@ -63,7 +63,7 @@ jobs: contents: read id-token: write name: Lint - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 10 steps: - name: Checkout @@ -119,7 +119,7 @@ jobs: name: Build and Typecheck needs: changes if: ${{ !cancelled() && (needs.changes.outputs.build != 'false' || needs.changes.outputs.typecheck != 'false') }} - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 10 steps: - name: Checkout @@ -213,7 +213,7 @@ jobs: name: Test needs: changes if: ${{ !cancelled() && needs.changes.outputs.test != 'false' }} - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 10 steps: - name: Checkout @@ -289,7 +289,7 @@ jobs: name: Test Web needs: changes if: ${{ !cancelled() && needs.changes.outputs.test_web != 'false' }} - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 10 steps: - name: Checkout @@ -353,7 +353,7 @@ jobs: contents: read id-token: write name: Test Server ${{ matrix.shard }} - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }} # Shards take 2-5 minutes. When the shared task cache throttles reads, each # failed fetch stalls vp for 15-90s, which pushed shards past 10 minutes. timeout-minutes: 20 @@ -469,7 +469,7 @@ jobs: name: Rust needs: changes if: ${{ !cancelled() && needs.changes.outputs.rust != 'false' }} - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 10 steps: - name: Checkout @@ -535,7 +535,7 @@ jobs: name: Release Smoke needs: changes if: ${{ !cancelled() && needs.changes.outputs.release_smoke != 'false' }} - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 10 steps: - name: Checkout @@ -575,7 +575,7 @@ jobs: mobile_native_static_analysis, release_smoke, ] - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-24.04' }} timeout-minutes: 5 steps: - name: Require every job to pass diff --git a/.github/workflows/mobile-fingerprint-check.yml b/.github/workflows/mobile-fingerprint-check.yml index ec27e7189ac9..3ba993344d6a 100644 --- a/.github/workflows/mobile-fingerprint-check.yml +++ b/.github/workflows/mobile-fingerprint-check.yml @@ -25,7 +25,7 @@ concurrency: jobs: fingerprint: name: Native fingerprint diff - runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }} + runs-on: ${{ github.repository_owner == 'pingdotgg' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }} permissions: contents: read env: diff --git a/PATCH.md b/PATCH.md index 091329fc30d4..6bc1ac1a290d 100644 --- a/PATCH.md +++ b/PATCH.md @@ -15,7 +15,7 @@ See [FORK.md](FORK.md) for install, adding patches, conflicts, and rollback. ### GitHub-hosted CI on this fork -5. `ci.yml` and `mobile-fingerprint-check.yml` use GitHub-hosted runners when `github.repository_owner != pingdotgg`. pingdotgg keeps Blacksmith. +5. `ci.yml` and `mobile-fingerprint-check.yml` use GitHub-hosted `ubuntu-24.04` / `macos-latest` when `github.repository_owner != pingdotgg`. pingdotgg keeps Blacksmith. `ubuntu-latest` is Ubuntu 26, which Playwright 1.60 cannot install Chromium on. ## Maintained files diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index 78e23c997e02..43fc42cd42bb 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -547,38 +547,48 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { ), ); - it.effect("signed macOS builds without a passkey profile skip notarization and provisioning", () => - Effect.gen(function* () { - const signedSelf = yield* createBuildConfig( - "mac", - "dmg", - "0.1.6", - true, - false, - undefined, - undefined, - ); - const mac = signedSelf.mac as Record; - assert.equal(mac.notarize, false); - assert.match(String(mac.sign), /scripts[\\/]sign-macos\.ts$/); - assert.notProperty(mac, "provisioningProfile"); - assert.notProperty(mac, "entitlements"); - - const signedPasskeys = yield* createBuildConfig("mac", "dmg", "0.1.6", true, false, undefined, { - entitlementsPath: "/tmp/entitlements.mac.plist", - provisioningProfilePath: "/tmp/t3code.provisionprofile", - }); - const passkeyMac = signedPasskeys.mac as Record; - assert.notProperty(passkeyMac, "notarize"); - assert.equal(passkeyMac.provisioningProfile, "/tmp/t3code.provisionprofile"); - assert.equal(passkeyMac.entitlements, "/tmp/entitlements.mac.plist"); - }).pipe( - Effect.provide( - ConfigProvider.layer( - ConfigProvider.fromEnv({ env: { GITHUB_REPOSITORY: "amartya18/t3code" } }), + it.effect( + "signed macOS builds without a passkey profile skip notarization and provisioning", + () => + Effect.gen(function* () { + const signedSelf = yield* createBuildConfig( + "mac", + "dmg", + "0.1.6", + true, + false, + undefined, + undefined, + ); + const mac = signedSelf.mac as Record; + assert.equal(mac.notarize, false); + assert.match(String(mac.sign), /scripts[\\/]sign-macos\.ts$/); + assert.notProperty(mac, "provisioningProfile"); + assert.notProperty(mac, "entitlements"); + + const signedPasskeys = yield* createBuildConfig( + "mac", + "dmg", + "0.1.6", + true, + false, + undefined, + { + entitlementsPath: "/tmp/entitlements.mac.plist", + provisioningProfilePath: "/tmp/t3code.provisionprofile", + }, + ); + const passkeyMac = signedPasskeys.mac as Record; + assert.notProperty(passkeyMac, "notarize"); + assert.equal(passkeyMac.provisioningProfile, "/tmp/t3code.provisionprofile"); + assert.equal(passkeyMac.entitlements, "/tmp/entitlements.mac.plist"); + }).pipe( + Effect.provide( + ConfigProvider.layer( + ConfigProvider.fromEnv({ env: { GITHUB_REPOSITORY: "amartya18/t3code" } }), + ), ), ), - ), ); it.effect("resolves the GitHub update feed from T3CODE_DESKTOP_UPDATE_REPOSITORY", () => @@ -1564,10 +1574,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { }), false, ); - assert.equal( - shouldResolveMacPasskeySigning({ T3CODE_APPLE_TEAM_ID: "ABC1234567" }), - true, - ); + assert.equal(shouldResolveMacPasskeySigning({ T3CODE_APPLE_TEAM_ID: "ABC1234567" }), true); assert.equal( shouldResolveMacPasskeySigning({ T3CODE_MACOS_PROVISIONING_PROFILE: "/tmp/t3code.provisionprofile", From 3c13d168e8d550afd80db2ce982623d68cb26405 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 11:37:40 +0000 Subject: [PATCH 3/8] fix(ci): keep v0.1.6 GitHub-hosted tests inside git 2.56 and 92-day usage retention Storage cleanup treated a missing gitdir as a branch change; Git 2.56 on GitHub-hosted runners fatals instead. The usage "windows it reaches" fixture used 2026-08-01, which is older than the 92-day cache retention as of November 2026. Neither change is fork product behavior. Co-authored-by: amartya18 --- PATCH.md | 3 +++ apps/server/src/storageCleanup.test.ts | 11 ++++++++- apps/server/src/usage/UsageService.test.ts | 28 ++++++++++++++++------ 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/PATCH.md b/PATCH.md index 6bc1ac1a290d..2521e121fa41 100644 --- a/PATCH.md +++ b/PATCH.md @@ -16,12 +16,15 @@ See [FORK.md](FORK.md) for install, adding patches, conflicts, and rollback. ### GitHub-hosted CI on this fork 5. `ci.yml` and `mobile-fingerprint-check.yml` use GitHub-hosted `ubuntu-24.04` / `macos-latest` when `github.repository_owner != pingdotgg`. pingdotgg keeps Blacksmith. `ubuntu-latest` is Ubuntu 26, which Playwright 1.60 cannot install Chromium on. +6. Two v0.1.6 tests are adjusted so GitHub-hosted CI can go green: storage cleanup accepts Git 2.56's gitfile fatal instead of treating a missing gitdir as a branch change, and the usage "windows it reaches" fixture stays inside the 92-day cache retention window. ## Maintained files - `scripts/build-desktop-artifact.ts` (+ `.test.ts`) - `.github/workflows/ci.yml` - `.github/workflows/mobile-fingerprint-check.yml` +- `apps/server/src/storageCleanup.test.ts` +- `apps/server/src/usage/UsageService.test.ts` ## Dropped from upstream signing diff --git a/apps/server/src/storageCleanup.test.ts b/apps/server/src/storageCleanup.test.ts index 9604e67cfcf6..007c62cf3365 100644 --- a/apps/server/src/storageCleanup.test.ts +++ b/apps/server/src/storageCleanup.test.ts @@ -2050,7 +2050,16 @@ describe("storage cleanup reports and local file policies", () => { yield* fs.remove(`${index.trim()}.lock`); const gitFile = yield* fs.readFileString(`${worktree}/.git`); yield* fs.writeFileString(`${worktree}/.git`, "gitdir: /missing-git-directory\n"); - expect((yield* service.runNow).entries[0]).toMatchObject(changed); + // Git 2.43 treats a missing gitdir as a branch change (kept). Git 2.56 + // on GitHub-hosted runners fatals ("gitfile does not point to a valid + // repository"). Either way the worktree must not be removed. + const missingGit = (yield* service.runNow).entries[0]; + expect(missingGit?.outcome).not.toBe("removed"); + if (missingGit?.outcome === "failed") { + expect(missingGit.reason).toContain("gitfile"); + } else { + expect(missingGit).toMatchObject(changed); + } yield* fs.writeFileString(`${worktree}/.git`, gitFile); expect((yield* service.runNow).entries[0]).toMatchObject({ outcome: "removed" }); expect(fullStatusCalls()).toBe(0); diff --git a/apps/server/src/usage/UsageService.test.ts b/apps/server/src/usage/UsageService.test.ts index 9600f0a45adf..9832eb7e1769 100644 --- a/apps/server/src/usage/UsageService.test.ts +++ b/apps/server/src/usage/UsageService.test.ts @@ -2609,27 +2609,41 @@ describe("UsageService", () => { it.live("reports saved usage of a removed directory only for windows it reaches", () => Effect.gen(function* () { const { transcript, settings, home } = yield* setup; + // Cache retention is 92 days. Hard-coded 2026-08-01 dates fall out of + // that window once "now" is early November 2026, so the file mtime and + // the windows under test stay 10 days behind the live clock. + const fileMs = Date.now() - 10 * 24 * 60 * 60 * 1000; + const utcDay = (ms: number) => new Date(ms).toISOString().slice(0, 10); + const fileDay = utcDay(fileMs); + const window = { + timeZone: "UTC" as const, + sinceDay: UsageDay.make(utcDay(fileMs - 24 * 60 * 60 * 1000)), + untilDay: UsageDay.make(utcDay(fileMs + 24 * 60 * 60 * 1000)), + }; yield* Effect.promise(async () => { - await NodeFSP.writeFile(transcript, claudeLine(1, 5)); - const lastWrite = Date.parse("2026-08-01T10:00:00Z") / 1000; - await NodeFSP.utimes(transcript, lastWrite, lastWrite); + await NodeFSP.writeFile( + transcript, + claudeLine(1, 5).replace("2026-08-01T10:00:00Z", new Date(fileMs).toISOString()), + ); + await NodeFSP.utimes(transcript, fileMs / 1000, fileMs / 1000); }); const service = yield* UsageService.make.pipe( Effect.provide(layerService({ prefix: "usage-service-saved-window-test", home, settings })), ); - const first = yield* service.readSummary(WINDOW); + const first = yield* service.readSummary(window); + assert.strictEqual(first.buckets[0]?.day, fileDay); yield* Effect.promise(() => NodeFSP.rm(NodePath.join(home, "claude", "projects"), { recursive: true }), ); - const reached = yield* service.readSummary(WINDOW); + const reached = yield* service.readSummary(window); assert.deepStrictEqual(reached.buckets, first.buckets); assert.strictEqual(reached.sources[0]?.status, "ok"); const later = yield* service.readSummary({ timeZone: "UTC", - sinceDay: UsageDay.make("2026-08-10"), - untilDay: UsageDay.make("2026-08-12"), + sinceDay: UsageDay.make(utcDay(fileMs + 9 * 24 * 60 * 60 * 1000)), + untilDay: UsageDay.make(utcDay(fileMs + 11 * 24 * 60 * 60 * 1000)), }); assert.deepStrictEqual(later.buckets, []); assert.strictEqual(later.sources[0]?.status, "missing"); From 72c8f86e794216d56dff5cf8cfd4c5bb30916510 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 11:46:42 +0000 Subject: [PATCH 4/8] fix(ci): Clock usage fixture and self-signed mac entitlements Date.now in the 92-day usage retention test trips t3code/no-wall-clock-in-tests. Read the live clock through Effect Clock instead. Self-signed --signed mac builds now force code signing, keep notarize off, and embed hardened-runtime entitlements (JIT, disable-library-validation, camera, microphone) without Apple team or associated-domain claims. Co-authored-by: amartya18 --- PATCH.md | 4 +- apps/server/src/usage/UsageService.test.ts | 2 +- scripts/build-desktop-artifact.test.ts | 32 ++++++++---- scripts/build-desktop-artifact.ts | 58 +++++++++++++++++----- 4 files changed, 70 insertions(+), 26 deletions(-) diff --git a/PATCH.md b/PATCH.md index 2521e121fa41..aaf688358732 100644 --- a/PATCH.md +++ b/PATCH.md @@ -9,14 +9,14 @@ See [FORK.md](FORK.md) for install, adding patches, conflicts, and rollback. ### Signed macOS builds without Apple Developer ID 1. `--signed` on macOS still codesigns via `scripts/sign-macos.ts` and `CSC_LINK`. -2. If `T3CODE_APPLE_TEAM_ID` and `T3CODE_MACOS_PROVISIONING_PROFILE` are both unset or empty, the build does **not** resolve passkey signing, does **not** embed a provisioning profile, and sets `mac.notarize: false`. +2. If `T3CODE_APPLE_TEAM_ID` and `T3CODE_MACOS_PROVISIONING_PROFILE` are both unset or empty, the build does **not** resolve passkey signing, does **not** embed a provisioning profile, sets `mac.notarize: false` and `mac.forceCodeSigning: true`, and signs with hardened-runtime entitlements (JIT, disable-library-validation, camera, microphone) that do **not** include associated-domains or a team identifier. 3. If either Apple variable is set, the upstream passkey path still runs and still fails closed on a missing profile, bad team id, or bad RP domain. 4. Bundle id stays `com.t3tools.t3code`. User-data directory stays `t3code` (legacy `T3 Code (Alpha)`). ### GitHub-hosted CI on this fork 5. `ci.yml` and `mobile-fingerprint-check.yml` use GitHub-hosted `ubuntu-24.04` / `macos-latest` when `github.repository_owner != pingdotgg`. pingdotgg keeps Blacksmith. `ubuntu-latest` is Ubuntu 26, which Playwright 1.60 cannot install Chromium on. -6. Two v0.1.6 tests are adjusted so GitHub-hosted CI can go green: storage cleanup accepts Git 2.56's gitfile fatal instead of treating a missing gitdir as a branch change, and the usage "windows it reaches" fixture stays inside the 92-day cache retention window. +6. Two v0.1.6 tests are adjusted so GitHub-hosted CI can go green: storage cleanup accepts Git 2.56's gitfile fatal instead of treating a missing gitdir as a branch change, and the usage "windows it reaches" fixture stays inside the 92-day cache retention window via `Clock.currentTimeMillis` (not `Date.now()`, which lint forbids in tests). ## Maintained files diff --git a/apps/server/src/usage/UsageService.test.ts b/apps/server/src/usage/UsageService.test.ts index 9832eb7e1769..c3255d77a352 100644 --- a/apps/server/src/usage/UsageService.test.ts +++ b/apps/server/src/usage/UsageService.test.ts @@ -2612,7 +2612,7 @@ describe("UsageService", () => { // Cache retention is 92 days. Hard-coded 2026-08-01 dates fall out of // that window once "now" is early November 2026, so the file mtime and // the windows under test stay 10 days behind the live clock. - const fileMs = Date.now() - 10 * 24 * 60 * 60 * 1000; + const fileMs = (yield* Clock.currentTimeMillis) - 10 * 24 * 60 * 60 * 1000; const utcDay = (ms: number) => new Date(ms).toISOString().slice(0, 10); const fileDay = utcDay(fileMs); const window = { diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts index 43fc42cd42bb..b9952a155ed9 100644 --- a/scripts/build-desktop-artifact.test.ts +++ b/scripts/build-desktop-artifact.test.ts @@ -38,6 +38,7 @@ import { packWindowsServerAsar, preflightWindowsDesktopBuild, renderMacPasskeyEntitlements, + renderMacSelfSignedEntitlements, resolveMacWebAuthnEntitlements, resolveMacPasskeySigningConfiguration, shouldResolveMacPasskeySigning, @@ -551,20 +552,15 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { "signed macOS builds without a passkey profile skip notarization and provisioning", () => Effect.gen(function* () { - const signedSelf = yield* createBuildConfig( - "mac", - "dmg", - "0.1.6", - true, - false, - undefined, - undefined, - ); + const signedSelf = yield* createBuildConfig("mac", "dmg", "0.1.6", true, false, undefined, { + entitlementsPath: "/tmp/entitlements.mac.plist", + }); const mac = signedSelf.mac as Record; assert.equal(mac.notarize, false); + assert.equal(mac.forceCodeSigning, true); assert.match(String(mac.sign), /scripts[\\/]sign-macos\.ts$/); assert.notProperty(mac, "provisioningProfile"); - assert.notProperty(mac, "entitlements"); + assert.equal(mac.entitlements, "/tmp/entitlements.mac.plist"); const signedPasskeys = yield* createBuildConfig( "mac", @@ -580,6 +576,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { ); const passkeyMac = signedPasskeys.mac as Record; assert.notProperty(passkeyMac, "notarize"); + assert.equal(passkeyMac.forceCodeSigning, true); assert.equal(passkeyMac.provisioningProfile, "/tmp/t3code.provisionprofile"); assert.equal(passkeyMac.entitlements, "/tmp/entitlements.mac.plist"); }).pipe( @@ -1565,6 +1562,21 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { ); }); + it("self-signed mac entitlements keep camera, mic, and JIT without Apple team claims", () => { + const entitlements = renderMacSelfSignedEntitlements(); + assert.match(entitlements, /com\.apple\.security\.cs\.allow-jit<\/key>\s*/u); + assert.match( + entitlements, + /com\.apple\.security\.cs\.disable-library-validation<\/key>\s*/u, + ); + assert.match(entitlements, /com\.apple\.security\.device\.camera<\/key>\s*/u); + assert.match(entitlements, /com\.apple\.security\.device\.audio-input<\/key>\s*/u); + assert.notInclude(entitlements, "com.apple.application-identifier"); + assert.notInclude(entitlements, "com.apple.developer.team-identifier"); + assert.notInclude(entitlements, "com.apple.developer.associated-domains"); + assert.notInclude(entitlements, "webcredentials:"); + }); + it("skips passkey resolution when Apple team id and provisioning profile are both absent", () => { assert.equal(shouldResolveMacPasskeySigning({}), false); assert.equal( diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts index a4b69a9d51d6..c1b5869e6be4 100644 --- a/scripts/build-desktop-artifact.ts +++ b/scripts/build-desktop-artifact.ts @@ -1401,6 +1401,31 @@ ${associatedDomains} `; } +/** Hardened-runtime claims a self-signed build can make without a provisioning profile. */ +export function renderMacSelfSignedEntitlements(): string { + return ` + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + + com.apple.security.device.camera + + com.apple.security.device.audio-input + + + +`; +} + export function resolveFffNativeDependencies( platform: typeof BuildPlatform.Type, arch: typeof BuildArch.Type, @@ -2773,7 +2798,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( macPasskeySigning: | { readonly entitlementsPath: string; - readonly provisioningProfilePath: string; + readonly provisioningProfilePath?: string; } | undefined, wslRuntimeBundled = false, @@ -2864,13 +2889,15 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* ( role: "Viewer", }, ], - ...(signed ? { sign: path.join(repoRoot, "scripts/sign-macos.ts") } : {}), - ...(signed && !macPasskeySigning ? { notarize: false } : {}), - ...(macPasskeySigning - ? { - entitlements: macPasskeySigning.entitlementsPath, - provisioningProfile: macPasskeySigning.provisioningProfilePath, - } + ...(signed + ? { sign: path.join(repoRoot, "scripts/sign-macos.ts"), forceCodeSigning: true } + : {}), + ...(signed && macPasskeySigning?.provisioningProfilePath === undefined + ? { notarize: false } + : {}), + ...(macPasskeySigning ? { entitlements: macPasskeySigning.entitlementsPath } : {}), + ...(macPasskeySigning?.provisioningProfilePath !== undefined + ? { provisioningProfile: macPasskeySigning.provisioningProfilePath } : {}), }; } @@ -3826,9 +3853,10 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f "[desktop-artifact] macOS signing without passkey entitlements or notarization (no Apple team id / provisioning profile).", ); } - const macEntitlementsPath = macPasskeySigning - ? path.join(stageAppDir, "entitlements.mac.plist") - : undefined; + const macEntitlementsPath = + options.platform === "mac" && options.signed + ? path.join(stageAppDir, "entitlements.mac.plist") + : undefined; let macWebAuthn: MacWebAuthnEntitlements | undefined; if (macPasskeySigning && macEntitlementsPath) { if (!(yield* fs.exists(macPasskeySigning.provisioningProfilePath))) { @@ -3847,6 +3875,8 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f macEntitlementsPath, renderMacPasskeyEntitlements(macPasskeySigning, macWebAuthn), ); + } else if (macEntitlementsPath !== undefined) { + yield* fs.writeFileString(macEntitlementsPath, renderMacSelfSignedEntitlements()); } const stageDependencies = @@ -3889,10 +3919,12 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f options.signed, options.mockUpdates, options.mockUpdateServerPort, - macPasskeySigning && macEntitlementsPath + macEntitlementsPath !== undefined ? { entitlementsPath: macEntitlementsPath, - provisioningProfilePath: macPasskeySigning.provisioningProfilePath, + ...(macPasskeySigning !== undefined + ? { provisioningProfilePath: macPasskeySigning.provisioningProfilePath } + : {}), } : undefined, bundlesWslRuntime({ platform: options.platform, runtimeArchivePath: options.wslRuntime }), From 9884c50842332a5b9f2ee0d0ccc86d9084181f7f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 11:55:58 +0000 Subject: [PATCH 5/8] fix(ci): format usage retention days with DateTime, not Date Clock.currentTimeMillis cleared the wall-clock lint, but typecheck still rejects new Date() in Effect tests. Use DateTime.makeUnsafe/formatIso for the UTC day and transcript timestamp. Co-authored-by: amartya18 --- apps/server/src/usage/UsageService.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/server/src/usage/UsageService.test.ts b/apps/server/src/usage/UsageService.test.ts index c3255d77a352..429c10e4c331 100644 --- a/apps/server/src/usage/UsageService.test.ts +++ b/apps/server/src/usage/UsageService.test.ts @@ -22,6 +22,7 @@ import { type UsageSummaryInput, } from "@t3tools/contracts"; import * as Duration from "effect/Duration"; +import * as DateTime from "effect/DateTime"; import * as Clock from "effect/Clock"; import * as Deferred from "effect/Deferred"; import * as Effect from "effect/Effect"; @@ -2613,7 +2614,7 @@ describe("UsageService", () => { // that window once "now" is early November 2026, so the file mtime and // the windows under test stay 10 days behind the live clock. const fileMs = (yield* Clock.currentTimeMillis) - 10 * 24 * 60 * 60 * 1000; - const utcDay = (ms: number) => new Date(ms).toISOString().slice(0, 10); + const utcDay = (ms: number) => DateTime.formatIso(DateTime.makeUnsafe(ms)).slice(0, 10); const fileDay = utcDay(fileMs); const window = { timeZone: "UTC" as const, @@ -2623,7 +2624,10 @@ describe("UsageService", () => { yield* Effect.promise(async () => { await NodeFSP.writeFile( transcript, - claudeLine(1, 5).replace("2026-08-01T10:00:00Z", new Date(fileMs).toISOString()), + claudeLine(1, 5).replace( + "2026-08-01T10:00:00Z", + DateTime.formatIso(DateTime.makeUnsafe(fileMs)), + ), ); await NodeFSP.utimes(transcript, fileMs / 1000, fileMs / 1000); }); From 2f8aafdbec80877949e4ec689c01163fab757733 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 12:17:42 +0000 Subject: [PATCH 6/8] ci: retrigger Test Web after PDF preview flake The Check job only failed because Test Web hit a pre-existing AttachmentFilePreview timeout. PR 14 already passed the same suite on this stack. Co-authored-by: amartya18 From 93d8d92cc61db07f8729d97e60e1b9fdeab1ea54 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 12:33:41 +0000 Subject: [PATCH 7/8] fix(web): wait longer for PDF first page in browser tests GitHub-hosted ubuntu-24.04 paints the workspace PDF slower than Blacksmith 8vcpu, so the scroll/zoom test missed 1 / 3 pages inside the 15s default. Wait 30s for that label and give the test 60s. Co-authored-by: amartya18 --- PATCH.md | 2 ++ .../files/AttachmentFilePreview.browser.test.tsx | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PATCH.md b/PATCH.md index aaf688358732..6bc3a3cb3495 100644 --- a/PATCH.md +++ b/PATCH.md @@ -17,6 +17,7 @@ See [FORK.md](FORK.md) for install, adding patches, conflicts, and rollback. 5. `ci.yml` and `mobile-fingerprint-check.yml` use GitHub-hosted `ubuntu-24.04` / `macos-latest` when `github.repository_owner != pingdotgg`. pingdotgg keeps Blacksmith. `ubuntu-latest` is Ubuntu 26, which Playwright 1.60 cannot install Chromium on. 6. Two v0.1.6 tests are adjusted so GitHub-hosted CI can go green: storage cleanup accepts Git 2.56's gitfile fatal instead of treating a missing gitdir as a branch change, and the usage "windows it reaches" fixture stays inside the 92-day cache retention window via `Clock.currentTimeMillis` (not `Date.now()`, which lint forbids in tests). +7. The workspace PDF scroll/zoom browser test waits up to 30s for `1 / 3 pages` and has a 60s test budget. GitHub-hosted `ubuntu-24.04` (4 vCPU) is slower than Blacksmith 8vcpu; the 15s default cuts off first paint. ## Maintained files @@ -25,6 +26,7 @@ See [FORK.md](FORK.md) for install, adding patches, conflicts, and rollback. - `.github/workflows/mobile-fingerprint-check.yml` - `apps/server/src/storageCleanup.test.ts` - `apps/server/src/usage/UsageService.test.ts` +- `apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx` ## Dropped from upstream signing diff --git a/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx b/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx index fc5a1aa7b91f..890d6595453f 100644 --- a/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx +++ b/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx @@ -2520,7 +2520,11 @@ it("keeps workspace PDF scroll and zoom after reloads", async () => { using fixture = await workspacePdfPreview(); const { preview, urls } = fixture; await using screen = await render(preview(urls.original, "one")); - await expect.element(screen.getByText("1 / 3 pages", { exact: true })).toBeVisible(); + // GitHub-hosted ubuntu-24.04 paints this PDF slower than Blacksmith 8vcpu; 15s cuts off page 1. + await expect + .element(screen.getByText("1 / 3 pages", { exact: true }), { timeout: 30_000 }) + .toBeVisible(); + await screen.getByRole("button", { name: "Next page", exact: true }).click(); await vi.waitFor(() => expect(screen.container.textContent).toContain("2 / 3 pages")); await screen.getByRole("button", { name: "Next page", exact: true }).click(); @@ -2575,7 +2579,7 @@ it("keeps workspace PDF scroll and zoom after reloads", async () => { expect(region().scrollTop).toBe(0); expect(region().scrollLeft).toBe(0); }); -}); +}, 60_000); it("clamps workspace PDF scroll when pages shrink or disappear", async () => { using fixture = await workspacePdfPreview(); From 3b32ec0c3e9229a4fb8cdbda4a4ee8bf242808c7 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 2 Nov 2026 12:37:28 +0000 Subject: [PATCH 8/8] fix(web): reason the PDF browser test timeout for GitHub-hosted CI Lint forbids an unreasoned per-test timeout. Keep the 30s wait for 1 / 3 pages and a 60s ceiling so first paint can finish. Co-authored-by: amartya18 --- .../src/components/files/AttachmentFilePreview.browser.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx b/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx index 890d6595453f..bec91a295953 100644 --- a/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx +++ b/apps/web/src/components/files/AttachmentFilePreview.browser.test.tsx @@ -2516,11 +2516,11 @@ function pdfScroll(screen: Screen) { return { region, canvas, offset, scrollTo }; } +// oxlint-disable-next-line t3code/no-test-timeout-or-unreasoned-skip -- PDF first paint on GitHub-hosted 4vcpu, not a hidden wait. it("keeps workspace PDF scroll and zoom after reloads", async () => { using fixture = await workspacePdfPreview(); const { preview, urls } = fixture; await using screen = await render(preview(urls.original, "one")); - // GitHub-hosted ubuntu-24.04 paints this PDF slower than Blacksmith 8vcpu; 15s cuts off page 1. await expect .element(screen.getByText("1 / 3 pages", { exact: true }), { timeout: 30_000 }) .toBeVisible();