GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — perf(server): avoid historical scans during startup recovery by tensenlabs · Pull Request #22554 · pingdotgg/t3code

perf(server): avoid historical scans during startup recovery #22554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tensenlabs wants to merge 4 commits into pingdotgg:main from tensenlabs:fix/startup-recovery-indexes
+192 −8
Closed

perf(server): avoid historical scans during startup recovery #22554

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit Hold shift + click to select a range
4e3e1ad
perf(server): avoid historical scans during startup recovery
tensenlabs Oct 20, 2026
ad46cba
fix(server): merge main into startup recovery indexes
maria-rcks Oct 26, 2026
8540e29
fix(server): merge main into startup recovery indexes
maria-rcks Oct 30, 2026
2dda29e
fix(server): merge main into startup recovery indexes
maria-rcks Oct 31, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Uh oh!

There was an error while loading. Please reload this page.

Prev Previous commit
Next Next commit
fix(server): merge main into startup recovery indexes
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks
maria-rcks committed Oct 26, 2026
commit ad46cba6602e1ce14bf64bd1829c8a5bf7c5359a
The diff you're trying to view is too large. We only load the first 3000 changed files.

There are no files selected for viewing

16 changes: 13 additions & 3 deletions 16 .agents/skills/test-t3-mobile/SKILL.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@ when inspecting or seeding SQLite. Stop the test server before fixture writes.
From the checkout being tested on the selected device host, run:

```bash
node scripts/mobile-native-client.ts ensure <ios|android> <device-id>
vp run mobile:install <ios|android> <device-id>
```

This reuses a matching native client or builds and installs one. Authorized
mobile verification includes that build step unless the user prohibits it.
This installs the dev client for the checkout's native fingerprint: from the
device, the local cache, or the shared cache in seconds, building once only
when no machine has that fingerprint yet (5-15 minutes, logged to the file it
names). The device id may be omitted when exactly one device is booted. It
prints one JSON line; on failure it names the next command. Authorized mobile
verification includes that step unless the user prohibits it.

For a device you opened in an agent-device session elsewhere (a device pool,
cloud, or remote host), run `vp run mobile:install <ios|android> --session <s>`
from the directory you opened the session in. It installs the cached build into
that session (`--abi arm64-v8a` for an ARM Android device; `--metro <url>` also
opens it against Metro) and never builds.

Start `vp run dev:client` from `apps/mobile`, or reuse a healthy Metro belonging
to this checkout. Open its printed development-client URL with AgentDevice
Expand Down
4 changes: 2 additions & 2 deletions 4 .devcontainer/devcontainer.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Dev container for T3 Code. Mirrors CI (ubuntu-24.04, Node 24, Rust stable)
// Dev container for T3 Code. Mirrors CI (ubuntu-24.04, Node 26, Rust stable)
// and the canonical setup in docs/operations/development.md: global `vp`, `vp i`.
// Contributor doc: docs/internals/devcontainer.md
{
Expand All @@ -8,7 +8,7 @@
// nodeGypDependencies (default true) brings python3/make/g++, which Linux
// needs for node-pty's node-gyp fallback (its prebuilds are mac/win only).
"ghcr.io/devcontainers/features/node:2": {
"version": "24"
"version": "26"
},
// native/resource-monitor (edition 2024, needs stable >= 1.85). The server
// degrades gracefully without the binary, but CI checks cargo fmt + test.
Expand Down
44 changes: 41 additions & 3 deletions 44 .github/actions/setup-ci-deps/action.yml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,24 +1,45 @@
name: Setup CI dependencies
description: Install Vite+ and the workspace dependencies from cache.
inputs:
task-cache-read-token:
description: Read-only credential for the private maintainer task cache
required: false
default: ""
runs:
using: composite
steps:
# setup-vp reuses an installed exact version, so restoring its home skips the
# installer download on every job.
# ~/.vite-plus holds vp, the Node.js runtime, and pnpm. A cache entry never
# updates, so the key names all three versions; otherwise a pnpm or Node.js
# bump makes every job download them from npm again.
- name: Resolve Vite+ version
id: vp
shell: bash
run: |
echo "version=$(sed -nE 's/^ vite-plus: ([0-9][^ ]*)$/\1/p' pnpm-workspace.yaml)" >> "$GITHUB_OUTPUT"
echo "node=$(jq -r '.engines.node' package.json)" >> "$GITHUB_OUTPUT"
echo "pnpm=$(jq -r '.packageManager' package.json)" >> "$GITHUB_OUTPUT"
- name: Cache Vite+
id: vp_cache
if: steps.vp.outputs.version != ''
uses: actions/cache@v6
with:
path: ~/.vite-plus
key: vite-plus-home-v1-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}
key: vite-plus-home-v2-${{ runner.os }}-${{ runner.arch }}-${{ steps.vp.outputs.version }}-node${{ steps.vp.outputs.node }}-${{ steps.vp.outputs.pnpm }}

# setup-vp always runs the installer, which fetches vp from npm even when
# this exact version is installed. A cache hit already has everything, so
# skip setup-vp and do its remaining work here. This keeps npm outages from
# failing jobs.
- name: Use cached Vite+
if: steps.vp_cache.outputs.cache-hit == 'true'
shell: bash
run: |
echo "$HOME/.vite-plus/bin" >> "$GITHUB_PATH"
"$HOME/.vite-plus/bin/vp" env use "${{ steps.vp.outputs.node }}"
- name: Setup Vite+
if: steps.vp_cache.outputs.cache-hit != 'true'
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
Expand Down Expand Up @@ -49,3 +70,20 @@ runs:
- name: Install dependencies
shell: bash
run: vp install

- name: Enable shared task cache
if: >-
github.repository == 'pingdotgg/t3code' &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
hashFiles('.task-cache.json') != '' &&
inputs.task-cache-read-token != ''
shell: bash
env:
T3_TASK_CACHE_READ_TOKEN: ${{ inputs.task-cache-read-token }}
run: |
node infra/task-cache/scripts/install-ci.ts
if [[ ( "$GITHUB_EVENT_NAME" == pull_request && "$GITHUB_BASE_REF" == main ) || ( "$GITHUB_EVENT_NAME" == push && "$GITHUB_REF" == refs/heads/main ) ]]; then
echo 'VP_REMOTE_CACHE=read-write' >> "$GITHUB_ENV"
else
echo 'VP_REMOTE_CACHE=read' >> "$GITHUB_ENV"
fi
45 changes: 0 additions & 45 deletions 45 .github/scripts/check-nightly-release.test.cjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ for (const releaseChannel of ["stable", "nightly"]) {
);
assert.equal(calls.length, 0);
});

test(`allows a manual ${releaseChannel} release from main`, async () => {
const { options, calls } = releaseSourceFixture();
await assertReleaseSource({ ...options, releaseChannel });
assert.equal(calls[0].basehead, "candidate...main");
});
}

for (const comparisonStatus of ["behind", "diverged"]) {
Expand All @@ -79,13 +73,6 @@ for (const comparisonStatus of ["behind", "diverged"]) {
});
}

test("accepts a release commit already contained in main", async () => {
for (const comparisonStatus of ["ahead", "identical"]) {
const { options } = releaseSourceFixture({ comparisonStatus, eventName: "push" });
await assertCommitOnDefaultBranch({ ...options, sha: "release-commit" });
}
});

function fixture({ releases = [nightly(7)], comparisonStatus = "ahead" } = {}) {
const calls = [];
return {
Expand Down Expand Up @@ -119,26 +106,6 @@ test("releases the first nightly when no nightly is published", async () => {
assert.equal(await shouldReleaseNightly(options), true);
});

test("waits six hours after publication, including manual nightlies", async () => {
for (const age of [0, 3, 6 - 1 / 3600]) {
const { options, calls } = fixture({ releases: [nightly(age)] });
assert.equal(await shouldReleaseNightly(options), false);
assert.equal(calls.length, 0);
}
});

test("releases new commits at six hours and after an idle period", async () => {
for (const age of [6, 7, 24]) {
const { options } = fixture({ releases: [nightly(age)] });
assert.equal(await shouldReleaseNightly(options), true);
}
});

test("skips unchanged commits after the gap", async () => {
const { options } = fixture({ comparisonStatus: "identical" });
assert.equal(await shouldReleaseNightly(options), false);
});

test("uses publication time, not release order or the tagged commit date", async () => {
const { options } = fixture({
releases: [nightly(10), nightly(1), nightly(20, { tag_name: "nightly-v0.9.0" })],
Expand All @@ -153,13 +120,6 @@ test("ignores stable releases and drafts when checking the gap", async () => {
assert.equal(await shouldReleaseNightly(options), true);
});

test("compares against the published tag, including legacy nightly tags", async () => {
const tag = "nightly-v0.9.0";
const { options, calls } = fixture({ releases: [nightly(7, { tag_name: tag })] });
assert.equal(await shouldReleaseNightly(options), true);
assert.equal(calls[0].basehead, `${tag}...new`);
});

test("fails instead of releasing when GitHub cannot supply release state", async () => {
const { options } = fixture();
options.github.paginate = async () => {
Expand Down Expand Up @@ -211,8 +171,3 @@ test("stable releases derive the version from legacy nightly tags", async () =>
});
assert.equal((await resolveLatestNightlyCommit(options)).version, "0.9.0");
});

test("stable releases fail without a published nightly", async () => {
const { options } = nightlyCommitFixture({ releases: [nightly(0, { tag_name: "v1.0.0" })] });
await assert.rejects(resolveLatestNightlyCommit(options), /No published nightly/);
});
38 changes: 10 additions & 28 deletions 38 .github/scripts/ci-changes.cjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
// Decides which CI jobs a change needs. Prints `key=value` lines for
// $GITHUB_OUTPUT; a job runs unless its key is "false".
//
// node ci-changes.cjs --paths <file> gate by the listed paths
// node ci-changes.cjs --paths <file> --full run every Linux job, gate only the macOS lint
// node ci-changes.cjs changed paths unknown: run everything
//
// Every changed path maps to workspace packages, which then pull in their
// dependents from package.json. A path this file does not recognize runs
// everything, so a new root file or directory can only cost minutes.
// Unknown paths run every job; recognized packages pull in their dependents.
// scripts/check-changed.ts shares these decisions so local checks match CI.
const fs = require("node:fs");
const path = require("node:path");

const root = path.resolve(__dirname, "../..");

// Never read by a build, typecheck, or test. Lint still formats them.
const INERT = [
/^docs\//,
/^\.(agents|cursor|vscode|devcontainer|macroscope|repos)\//,
/^[^/]+\.md$/,
/^LICENSE$/,
];

// Run everything: the root vite.config.ts loads the first as setup for every
// package's tests, and the vendored mobile tarballs are installed dependencies.
// Shared test setup and vendored mobile dependencies affect every package.
const RUNS_EVERYTHING = [
/^packages\/shared\/src\/(HostProcess|testing\/longTempDir)\.ts$/,
/^apps\/mobile\/deps\//,
];

// Paths outside a package, or files inside one that other packages read
// through relative imports rather than a package.json dependency.
// Includes cross-package reads absent from package.json dependencies.
const EXTRA_OWNERS = [
// Vite configs and tsconfigs of these apps import scripts/lib directly.
[/^scripts\/lib\//, ["@t3tools/desktop", "@t3tools/mobile", "@t3tools/web", "t3"]],
Expand All @@ -41,9 +30,7 @@ const EXTRA_OWNERS = [
];
const RUST = /^native\/(resource-monitor|kde-snap-shot|hyprland-snap-shot)\//;

// Tests that read another package's files without declaring it. The scripts
// tests read app manifests, assets, and sources (cursor-sdk-packaging,
// third-party-licenses, brand-assets, build-desktop-artifact).
// These tests read other packages without declaring dependencies.
const TEST_ONLY_DEPS = {
"@t3tools/provider-pi": ["@t3tools/client-runtime"],
"@t3tools/scripts": [
Expand All @@ -54,17 +41,12 @@ const TEST_ONLY_DEPS = {
"@t3tools/provider-cursor",
],
};
// Declared dependencies that only feed a build step: the server bundles the
// built web app (apps/server/vite.config.ts) but never imports it.
// The server bundles the web build without importing it.
const BUILD_ONLY_DEPS = { t3: ["@t3tools/web"] };

// Sources scripts/mobile-native-static-check.ts lints, plus the tool and rule
// configuration that decides how it lints them, plus the root package.json
// that defines the lint:mobile command.
const MOBILE_NATIVE =
/^apps\/mobile\/.*\.(swift|kt|kts)$|^apps\/mobile\/(\.swiftlint\.yml|detekt\.yml|\.editorconfig|Brewfile)$|^scripts\/mobile-native-static-check\.ts$|^package\.json$|^\.github\/workflows\/ci\.yml$|^\.github\/scripts\/ci-changes\.cjs$|^\.github\/actions\/ci-changes\//;

// Jobs that test every package except these, which have jobs of their own.
const OWN_TEST_JOB = new Set(["t3", "@t3tools/web", "@t3tools/monorepo"]);

function readWorkspace() {
Expand Down Expand Up @@ -106,8 +88,7 @@ function readWorkspace() {
return packages;
}

// Returns the packages a path touches, [] for an inert path, or null when the
// path is not understood and everything must run.
// [] means inert; null means unknown and requires every job.
function ownersOf(file, packages) {
if (INERT.some((pattern) => pattern.test(file))) return [];
// A manifest can change dependencies or versions other packages read.
Expand Down Expand Up @@ -146,7 +127,6 @@ function decide(files, packages, full) {
if (everything) {
affected = all;
} else {
// Add dependents until nothing changes.
let grew = true;
while (grew) {
grew = false;
Expand Down Expand Up @@ -201,4 +181,6 @@ function main() {
for (const [key, value] of Object.entries(outputs)) console.log(`${key}=${value}`);
}

main();
module.exports = { readWorkspace, decide };

if (require.main === module) main();
27 changes: 27 additions & 0 deletions 27 .github/scripts/ci-changes.d.cts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
interface WorkspacePackage {
readonly name: string;
readonly dir: string;
readonly hasTest: boolean;
readonly deps: ReadonlyArray<string>;
}

export function readWorkspace(): Array<WorkspacePackage>;

export function decide(
files: ReadonlyArray<string> | null,
packages: ReadonlyArray<WorkspacePackage>,
full: boolean,
): {
affected: Array<string>;
outputs: {
typecheck: boolean;
build: boolean;
test: boolean;
test_packages: string;
test_web: boolean;
test_server: boolean;
rust: boolean;
release_smoke: boolean;
mobile_native: boolean;
};
};
13 changes: 3 additions & 10 deletions 13 .github/scripts/mirror-play-apk.cjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Publishes closed-testing betas, or downloads the internal APK for a normal
// nightly release. Play generates and signs the APK from the
// uploaded bundle with the app signing key, so it carries the same signature
// as the Play Store install. Run by .github/workflows/mobile-android-apk.yml.
// Play signs generated APKs with the app signing key, matching Play Store installs.
const { execFileSync } = require("node:child_process");
const crypto = require("node:crypto");
const fs = require("node:fs");
Expand Down Expand Up @@ -50,10 +47,7 @@ async function play(token, method, url) {
return response;
}

// Highest version code the track serves, with its release name. Play names a
// release after the bundle's versionName unless the uploader sets one. This
// endpoint reads without opening an edit; an edit would invalidate any open
// EAS Submit edit made with the same service account.
// Opening an edit would invalidate any EAS Submit edit using the same service account.
async function newestTrackBuild(token, appUrl, trackName) {
const { releases = [] } = await (
await play(token, "GET", `${appUrl}/tracks/${trackName}/releases`)
Expand Down Expand Up @@ -82,8 +76,7 @@ function readRelease(tag) {
}
}

// Download to a temporary directory so a failed request cannot leave a partial
// APK among the release assets.
// Stage downloads so failed requests cannot leave partial release assets.
async function downloadApk({ token, appUrl, build, apkName }) {
const generated = await (
await play(token, "GET", `${appUrl}/generatedApks/${build.versionCode}`)
Expand Down
7 changes: 2 additions & 5 deletions 7 .github/scripts/stage-preview-bundle.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"server/dist/client/index.html",
"desktop/dist-electron/main.cjs",
}
# The current bundle is about 32 MiB compressed. Bound extraction on the
# trusted runner even when the PR replaces the uploader entirely.
# Bound trusted-runner extraction even when a PR replaces the uploader.
MAX_ARCHIVE_BYTES = 512 * 1024 * 1024
MAX_EXPANDED_BYTES = 2 * 1024 * 1024 * 1024
MAX_ENTRIES = 50_000
Expand Down Expand Up @@ -58,9 +57,7 @@ def stage_bundle(archive: Path, destination: Path):
files.add(name)
if not REQUIRED_FILES <= files:
raise ValueError("Preview bundle is missing required entry points")
# Validate all names before writing anything. This is a fresh directory
# outside the checkout; neither pre-existing links nor trusted files
# can be followed or overwritten. ZIP permissions are never restored.
# Validate before writing into a fresh directory so existing links/files cannot be followed or overwritten.
destination.mkdir(parents=True, exist_ok=False)
for entry in entries:
target = destination / entry.filename
Expand Down
3 changes: 1 addition & 2 deletions 3 .github/scripts/thread-transfer-report.cjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ async function resolve({ github, context, core }) {

const sourceArtifacts = await artifactsForRun(github, owner, repo, source.id);
const sourceArtifact = findResultArtifact(sourceArtifacts);
// CI requires the artifact whenever the server tests run, so a passing run
// without one skipped them because the PR cannot affect the server.
// Successful server tests require this artifact; its absence means CI skipped them.
if (!sourceArtifact && source.conclusion === "success") {
core.info("CI skipped the server tests for this change; nothing to report.");
core.setOutput("publish", "false");
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.