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 — ci(fork): run the project's own CI matrix on this branch by vifar · Pull Request #2 · vifar/t3code

Conversation

@vifar

@vifar vifar commented Oct 22, 2026

Copy link
Copy Markdown
Owner

This is a fork-only pull request whose only purpose is to obtain the project's own CI signal on
perf/reader-connection-mcp-projection-reads, which is the exact head of the upstream pull request
pingdotgg/t3code#23689.

Why it exists. Upstream's CI workflow runs on Blacksmith runners (blacksmith-*-vcpu-ubuntu-2404).
This fork has no Blacksmith app, so every job queued against those labels and no job ever started — the
16 non-aggregate jobs sat in started for 15 minutes and were cancelled when the earlier fork pull request
closed, and the aggregate Check job has been queued ever since. On the upstream pull request the same
workflows sit at action_required, which needs a maintainer to approve them.

What it changes. The base branch here carries one fork-only commit that swaps the runner labels for the
same Ubuntu 24.04 and macOS images on GitHub-hosted runners:

  • blacksmith-2vcpu-ubuntu-2404, blacksmith-4vcpu-ubuntu-2404, blacksmith-8vcpu-ubuntu-2404 -> ubuntu-24.04
  • blacksmith-6vcpu-macos-26 -> macos-latest

Nothing else changes. Same steps, same composite actions, same scripts, same test suites, same job selection.
setup-apt-mirrors creates its own mirror file, so it is runner-agnostic. The workflow needs no secrets.

What is under test. The merge commit of this pull request is the upstream head
f266207430 plus the one workflow commit, so the code being tested is byte-identical to the upstream pull
request's head. The base is the upstream commit that branch forked from, so the ci-changes detector sees
exactly the same diff the upstream pull request would see and selects the same jobs.

This pull request is tooling for the fork. It is not a contribution and nothing here is meant to be merged
into upstream.

Sorry, something went wrong.

Uh oh!

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

All reactions
vifar and others added 19 commits October 22, 2026 11:42
@vifar
perf(server): the projection read path takes the lock on the reader c…
8daf351
…onnection

The MCP read path is the server's hottest read: every `t3_thread_read` goes
through `getThreadRecords`, and the shell list goes through
`getShellSnapshot` and `getThreadShell`. All three ran on the writer
connection, so a read had to take the write lock.

On a host whose state database is large and whose writer is busy, that is
where the time goes. Measured on such a host, over a ten-minute window:

```
MCP tool calls:            1,857 in ~10 minutes (peak 506 in one minute)
DB lock waits > 100 ms:    1,608   (518 seconds of lock wait in that window)
correlation calls/min vs
  total lock wait/min:     r = 0.751
sqlite ops by connection:
   18,408   (writer, read)     <-- reads also go through the writer
      234   (writer, write)
```

78.5% of every query in that window ran inside an MCP call. The worst single
lock wait was 6,622 ms, on
`SELECT payload_json FROM orchestration_v2_projection_nodes WHERE node_id = ?`.

The reader connection already exists - `nodeSqliteClient` starts a reader
worker for a file-backed database, and `NodeSqliteClient.readOnly` routes a
read to it. It was barely used: 8 transactions in the window, averaging
497 ms, which is the reader pool starved exactly when the writer is busy.

These three reads are pure reads, so they belong on the reader. The change
moves them and nothing else: the queries, the transaction shape and the
results are unchanged.
@only21mil @codex
fix(chat): mark tool images beyond the preview limit (pingdotgg#23595)
f055995
Co-authored-by: GPT-6.1 Sol <[email protected]>
@vifar
test(server): the load test's writer must actually write
e73f725
The lock-wait measurement's writer inserted rows with columns that
`orchestration_v2_projection_checkpoints` does not have, and the insert was
wrapped in `Effect.ignore`, so every row was rejected and the "under write
load" measurement had no write load in it.

The writer now uses the table's own columns, generates a unique scope per
row, and does not swallow failures: the test counts the rows the writer
reports and counts the rows on disk, and asserts they are the same. Both
measurements now assert the lock wait is reported, so the before/after is
compared on the measure the server logs.
@flamboh
fix(web): provider updates no longer pop toasts on launch (pingdotgg#…
b9aaff4
…23233)
@UtkarshUsername
fix(server): probe the Windows startup environment asynchronously (pi…
f460ddb
…ngdotgg#21720)
@vifar
test(server): the load test's read must overlap the writes
cdfa669
The writer signalled its milestone only after every insert had finished, so
the read ran against a writer that was already done. The measurement was of
a read with no write load in it, which is the opposite of what the test
claims to measure.

The milestone is now signalled part way through the inserts, and the writer
keeps writing while the read runs. The test asserts that the writer was still
going when the read started, so the overlap is pinned rather than assumed.
@PixPMusic
fix(usage): count initial Codex requests with inherited totals (pingd…
5e8c5eb
…otgg#23729)
@t3-code-bot @codex
chore(mobile): bump app version to 2.1.0
4eae8ae
Co-authored-by: codex <[email protected]>
@Yash-Singh1
fix(web): let toast content use the full accordion width (pingdotgg#2…
e54e71d
…3777)
@juliusmarminge @claude
fix(web): sidebar follows the active thread after history navigation (p…
044f072
…ingdotgg#23519)

Co-authored-by: Claude Opus 5.5 <[email protected]>
@vifar
test(server): hold the write lock while the read runs, so the overlap…
d91bce4
… is guaranteed

The writer streamed inserts and signalled a milestone part way through, so
the read could still start after the writer had finished: the reader's
transaction opens with an asynchronous BEGIN, and the writer can use that
window to complete its inserts. The test then measured a read with no write
load in it.

The writer now HOLDS the write lock for the whole read, so the overlap is
guaranteed by construction rather than by timing. With the lock held, the
two connections behave differently, and the difference is the change:

    read-on-reader: connection=reader lock_wait_ms=0.022 lock_held_for_ms=12
    read-on-writer: outcome=Failure  lock_held_for_ms=3002 connections_acquired=0

The read on the reader connection completes while the writer holds the
lock. The same read on the writer connection cannot even acquire a
connection - it waits for the lock until the bound expires, and there is no
db.connection span for it because the acquisition never finished.
@Yash-Singh1
fix(server): keep subagent transcript updates off shell stream (pingd…
fd1063b
…otgg#23783)
@vifar
test(server): prove the write was in flight, and that the block was a…
376e1ae
… timeout

Two assertions were weaker than the claims they carried.

The reader case asserted that the lock was held for the whole read by
checking the elapsed time, which is a 1 ms-resolution clock reading: a fast
read can finish inside the same millisecond, so the assertion could fail
intermittently, and it did not prove what its comment said. The lock is
held by construction - the writer holds its transaction until the read has
finished - and what proves it is that the writer's row was still
uncommitted, and so invisible to the reader, when the read finished. The
test now asserts that.

The writer case accepted any failure. Effect.timeout can preserve an
earlier SQL failure, so "it failed" did not mean "it was blocked by the
lock". The failure is now asserted to be the timeout, and to have waited
for the bound, which a read that failed for another reason would not do.
@juliusmarminge
fix(deps): pin all patched package versions (pingdotgg#23798)
22840ab
@juliusmarminge @claude
docs: document the GitCafe mirror and refresh the dev setup (pingdotg…
52c2b38
…g#23808)

Co-authored-by: Claude Opus 5.5 <[email protected]>
@t3dotgg @claude
fix: no more em dashes in product copy (pingdotgg#23799)
d7f3b72
Co-authored-by: Claude Opus 5.5 <[email protected]>
@vifar
perf(server): the startup-recovery and settlement reads take the lock…
f266207
… on the reader too

A triage note on issue pingdotgg#21840 named four ProjectionStore reads that still
default to the writer on main, because neither they nor their callers opt
into readOnly. Two of them - getShellSnapshot and getThreadRecords - are
covered by the previous commits. This covers the other two:

- getRecoveryThreadIds, the startup-recovery query;
- getSettlementCandidates, the auto-settlement sweep.

Both are pure reads, so both belong on the reader connection: startup
recovery and the settlement sweep must not take the write lock.

Together with getThreadShell, that is every read the note named.
@t3-code-bot
chore(release): prepare v0.1.2
ef92441
@wobsoriano @juliusmarminge @claude
chore(mobile): bump Clerk Expo SDKs to the new native client sync (pi…
2c8bdf6
…ngdotgg#23047)

Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Claude Haiku 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 5.0 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.9 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 5.0 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 21.2 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: ddc3c41 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vifar
Merge branch 'main' into perf/reader-connection-mcp-projection-reads
095dece
@github-actions github-actions Bot added size:XXL and removed size:M labels Oct 22, 2026
@vifar
test(server): fix the typecheck errors the project's own CI found
ddc3c41
The server typecheck was never actually run locally: `vp run --filter
@t3tools/server typecheck` matches no package, so it exits 0 having done
nothing. The package is `t3`, and `tsc --noEmit` in apps/server reports
twelve errors in the two new test files, which the project's CI caught and
this commit fixes.

- `ModelSelection` was used but never imported.
- `withWriteLockHeld` declared neither the `uncommittedRows` it returns nor
  the `SqlError` its queries can fail with.
- The span attribute is read as `{} | null`, so it needs narrowing before it
  can be used as a connection name.
- `console.log` inside Effect code is rejected by the effect language
  service, and `Effect.log` is swallowed by the test runner, so the
  measurement is printed through a suppressed `console.log` instead.
- `Fiber.join` propagates the writer's failure rather than returning it, so
  a row that did not insert now fails the test instead of passing as write
  load. The writer also releases the reader if the write fails, instead of
  leaving it to time out.
- The two layer merges that provided `NodeServices.layer` alongside other
  layers raised a warning and made `tsc` exit non-zero with no errors at
  all. They now provide it with `Layer.provideMerge`, the way the rest of
  the repository does.

`tsc --noEmit` in apps/server now exits 0 with no errors and no warnings,
and the seven tests in the two files pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

9 participants

@vifar @only21mil @flamboh @UtkarshUsername @PixPMusic @Yash-Singh1 @juliusmarminge @t3dotgg @wobsoriano
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 01402775 — 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.