Skip to content

Commit b5b0009

Browse files
authored
Merge branch 'main' into chore/macroscope-gpt-6-1-sol
2 parents 62f22f7 + 8d84666 commit b5b0009

2,090 files changed

Lines changed: 402492 additions & 210526 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/contribution-triage/SKILL.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ trusted policy and reassess changed submission evidence; neither example grants
109109

110110
## Apply the outcome
111111

112+
Do not automatically close a PR if a maintainer in the trusted `TRIAGE_EXEMPTIONS.td` list has
113+
commented or submitted a review, including on earlier heads, or if `triage:keep-open` is present.
114+
Leave protected PRs open for maintainer decision. This does not grant an author exemption,
115+
eligibility, or review approval.
116+
112117
In enforcement mode, execute the applicable outcome within the established scope, using the state and
113118
retry safeguards below. In a dry run or without the required authority, prepare the same action and
114119
comment text but do not write to GitHub. Keep the eligibility finding separate from action completion.

‎.agents/skills/test-t3-app/references/sqlite-fixtures.md‎

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Load this reference only when inspecting or seeding local T3 state directly.
44

55
## Select the correct database
66

7-
When `--base-dir` or `--home-dir` is explicit, runtime state lives under `<base-dir>/userdata` and the database path is `<base-dir>/userdata/state.sqlite`. The `<base-dir>/dev` state directory is only the fallback for an implicit development home, preventing an ordinary `vp run dev` from touching production state.
7+
When `--base-dir` or `--home-dir` is explicit, runtime state lives under `<base-dir>/userdata` and the database path is `<base-dir>/userdata/statev2.sqlite`. The `<base-dir>/dev` state directory is only the fallback for an implicit development home, preventing an ordinary `vp run dev` from touching production state.
8+
9+
The server copies the V1 `state.sqlite` into `statev2.sqlite` only when `statev2.sqlite` is missing. After the first start, edits to `state.sqlite` change nothing.
810

911
Start the target runtime once before seeding so all migrations have run. Use an isolated base directory. Stop the server before writes to avoid racing application state or an active projection.
1012

@@ -23,7 +25,7 @@ Inspect current columns before writing a fixture:
2325
```bash
2426
node apps/server/scripts/t3-sqlite-state.ts query \
2527
--base-dir <base-dir> \
26-
--sql "PRAGMA table_info(projection_threads)"
28+
--sql "PRAGMA table_info(orchestration_v2_projection_threads)"
2729
```
2830

2931
Apply a SQL fixture from a file:
@@ -38,21 +40,10 @@ Use one statement per invocation for both `query` and `exec`; the helper wraps w
3840

3941
## Seed projection data carefully
4042

41-
The web UI primarily reads these projection tables:
42-
43-
- `projection_projects`
44-
- `projection_threads`
45-
- `projection_thread_messages`
46-
- `projection_thread_activities`
47-
- `projection_thread_sessions`
48-
- `projection_turns`
49-
- `projection_pending_approvals`
50-
- `projection_thread_proposed_plans`
51-
52-
Inspect `PRAGMA table_info(<table>)` and the current migrations under `apps/server/src/persistence/Migrations/` before constructing inserts. Keep identifiers unique, timestamps as ISO strings, JSON columns valid, and related project/thread/turn IDs consistent.
43+
Clients read projects from `projection_projects` and everything else from the `orchestration_v2_projection_*` tables: threads, runs, messages, turn items, runtime requests, plans, and provider sessions. The older `projection_thread*` tables hold V1 history, which the server imports once per thread at startup; later edits there do not reach the UI.
5344

54-
For a substantial current example, inspect `seedDatabase` in `scripts/mobile-showcase-environment.ts`. Adapt its column set to the target database instead of assuming copied SQL remains current.
45+
Most V2 rows carry a `payload_json` that must decode against the schemas in `packages/contracts/src/orchestrationV2.ts`. The safest start is a row the app wrote itself: create a thread through the UI, copy its rows, and edit them. Keep identifiers unique, timestamps as ISO strings, and related project, thread, and run IDs consistent.
5546

56-
Direct projection writes are appropriate for ephemeral visual states, edge-case counts, long titles, activity lists, and similar UI fixtures. They do not create a coherent orchestration event history. Do not modify `orchestration_events` unless the test specifically exercises projector internals, and do not use direct projection writes to claim backend business behavior works.
47+
Direct projection writes are appropriate for ephemeral visual states, edge-case counts, long titles, long timelines, and similar UI fixtures. They do not create a coherent event history. Leave the event log (`orchestration_events`) unchanged, and do not use direct projection writes to claim backend business behavior works.
5748

5849
Use the app's commands or APIs for behavior tests. Use `node apps/server/src/bin.ts auth ...` for auth state rather than editing `auth_pairing_links` or `auth_sessions`.

‎.github/TRIAGE_EXEMPTIONS.td‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Explicit contribution-triage exemptions; independent of VOUCHED.td.
22
# Syntax: github:username (one entry per line; no denouncements).
33
# Keep entries sorted alphabetically. Only the trusted upstream main copy applies.
4+
github:bmdavis419
45
github:juliusmarminge
56
github:maria-rcks
7+
github:markflorkowski
68
github:t3dotgg
9+
github:Yash-Singh1

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ jobs:
148148
!/.repos/
149149
sparse-checkout-cone-mode: false
150150

151+
# Blacksmith boots GitHub's Ubuntu runner image (gcc is usually present),
152+
# but ACP process-tree live tests compile a small pthread fixture with `cc`
153+
# and soft-skip when it is missing. Install build-essential so that path
154+
# always runs in CI instead of silently no-oping.
155+
- name: Install C toolchain for process-tree fixtures
156+
run: |
157+
sudo apt-get update
158+
sudo apt-get install -y --no-install-recommends build-essential
159+
command -v cc
160+
151161
- uses: ./.github/actions/setup-apt-mirrors
152162

153163
# The desktop tests compile the browser secret helper. The install runs in
@@ -251,7 +261,7 @@ jobs:
251261
T3CODE_TRANSFER_BUDGET_RESULT_PATH: ${{ runner.temp }}/thread-transfer-result.json
252262
run: vp run --filter t3 test --shard ${{ matrix.shard }}/${{ strategy.job-total }}
253263

254-
# src/server.test.ts writes the budget report, so exactly one shard
264+
# integration/transferBudgetV2.integration.test.ts writes the report; exactly one shard
255265
# produces these files. Gating the upload on their presence keeps a
256266
# single `thread-transfer-results` artifact per run, which is the name
257267
# thread-transfer-report.yml resolves.
@@ -283,6 +293,17 @@ jobs:
283293
if-no-files-found: ignore
284294
retention-days: 30
285295

296+
transfer-report:
297+
name: Transfer report artifact
298+
needs: test_server
299+
runs-on: ubuntu-24.04
300+
steps:
301+
- name: Require transfer measurements
302+
uses: actions/download-artifact@v8
303+
with:
304+
name: thread-transfer-results
305+
path: ${{ runner.temp }}/thread-transfer
306+
286307
# Split out of Check and Test: both paid ~7-9s to install a Rust toolchain
287308
# for checks that take under 3s, on the critical path of every PR.
288309
rust:
@@ -466,6 +487,7 @@ jobs:
466487
test,
467488
test_web,
468489
test_server,
490+
transfer-report,
469491
rust,
470492
mobile_native_changes,
471493
mobile_native_static_analysis,

‎.github/workflows/mobile-eas-preview.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ jobs:
6666
if: steps.expo-token.outputs.present == 'true'
6767
uses: expo/expo-github-action@v8
6868
with:
69-
eas-version: latest
69+
# eas-cli 22 renamed `project` to `app` in build JSON, and
70+
# continuous-deploy-fingerprint still reads `build.project.ownerAccount`.
71+
# Unpin once https://github.com/expo/expo-github-action/issues/358 is fixed.
72+
eas-version: 21.8.0
7073
token: ${{ secrets.EXPO_TOKEN }}
7174
# npm, not pnpm: this only installs eas-cli into the action's own
7275
# tool dir, and pnpm 11 hard-fails that install on dtrace-provider's

‎.github/workflows/mobile-eas-production.yml‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,31 @@ name: Mobile EAS Production
1818
# Store stays a manual App Store Connect step.
1919
# 2. OTA: publish a production-channel update for each platform where at
2020
# least one finished production build matches the current native
21-
# fingerprint. Old-version binaries with a matching fingerprint receive
22-
# it too. When native drift means no binary could install the update,
21+
# fingerprint. Older binaries of the same major version with a matching
22+
# fingerprint receive it too; the major version is part of the
23+
# fingerprint (apps/mobile/fingerprint.config.js), so a new major never
24+
# reaches the previous major's store binaries over the air. When native
25+
# drift means no binary could install the update,
2326
# it is skipped and flagged in the job summary instead of published
2427
# into the void.
2528
# workflow_dispatch remains as a manual override for both modes (e.g. to
2629
# retry an errored build or force an OTA).
2730
# Manual v2-preview builds keep the production app identity and disable OTA.
31+
# They auto-submit to TestFlight and the Google Play closed testing track v2.
2832
# Select the v2 branch when dispatching a preview build.
2933
on:
3034
workflow_dispatch:
3135
inputs:
3236
mode:
33-
description: "build (+ auto-submit to TestFlight) or update (OTA)"
37+
description: "build (+ auto-submit to TestFlight / Google Play) or update (OTA)"
3438
required: true
3539
type: choice
3640
default: build
3741
options:
3842
- build
3943
- update
4044
profile:
41-
description: "Store build profile (v2-preview supports build mode only)"
45+
description: "Store build profile (v2-preview: TestFlight + Play closed track v2; build only)"
4246
required: true
4347
type: choice
4448
default: production
@@ -49,7 +53,7 @@ on:
4953
description: "Target platform"
5054
required: true
5155
type: choice
52-
default: ios
56+
default: all
5357
options:
5458
- ios
5559
- android

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ squashfs-root/
2727
.vercel
2828
.gstack/
2929
.plans/
30+
/audits/
3031
dist-electron/
3132
.electron-runtime/
3233
.showcase/

‎.macroscope/check-run-agents/effect-service-conventions.md‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ showToolCalls: true
2222

2323
# Effect service review
2424

25-
Review changed TypeScript for the conventions below. They apply when a pull request creates, moves, refactors, or consumes an Effect service. Review only the lines the PR changed; older code in the same file that predates these conventions is not a finding. Do not demand repository-wide cleanup.
25+
Review changed TypeScript for the conventions below. They apply when a pull request creates, moves, refactors, or consumes an Effect service, or adds server behavior. Authors read the same rules in `docs/internals/effect-services.md`; keep the two in step. Review only the lines the PR changed; older code in the same file that predates these conventions is not a finding. Do not demand repository-wide cleanup.
2626

2727
## Imports and module namespaces
2828

@@ -31,11 +31,16 @@ Review changed TypeScript for the conventions below. They apply when a pull requ
3131
- Named imports stay correct for whole packages such as `@t3tools/contracts` and for modules used only for a pure helper, error, schema, config value, or type. Do not request `import type * as Contracts`.
3232
- When a barrel exposes a whole service module, prefer `export * as TokenStore from "./tokenStore.ts"` over individually renamed `make` and `layer` exports.
3333

34+
## Placement
35+
36+
- Flag new or broadened feature logic in a transport handler: a WebSocket RPC handler in `apps/server/src/ws.ts`, an HTTP route handler, or an MCP tool handler. A handler decodes input, calls one service method, and maps the service's errors to the transport's error. Filesystem, Git, process, or persistence work, folder naming, multi-step command dispatch, retries, or rollback inside a handler belongs in a service method; ask for it to move to the domain's existing service, or a new one when none owns the domain. Existing inline handlers are legacy; flag only changed lines.
37+
- Flag a new exported free function that does a server capability's effectful work (filesystem, Git, processes, persisted state) and is called from a handler, when it should be a service method. Plain functions for pure work (formatting, naming, parsing) are fine.
38+
3439
## Service definition
3540

3641
- One canonical module per service in this order: imports, error and schema declarations, the `Context.Service` tag with its interface inline, `make`, then `layer`.
3742
- Define the interface inline in `Context.Service`. Do not add a standalone `FooShape` interface; refer to the inferred type as `Foo["Service"]`.
38-
- Export a real `make` when the module owns construction. Do not write `make = Effect.succeed(...)` only to force `Layer.effect`; use `Layer.succeed`, `Layer.scoped`, or whichever constructor matches.
43+
- Define a real `make` when the module owns construction, and export it only when another module imports it; knip fails CI on an unused export, so do not ask for an export nothing uses. Do not write `make = Effect.succeed(...)` only to force `Layer.effect`; use `Layer.succeed`, `Layer.scoped`, or whichever constructor matches.
3944
- Use plain `make` and `layer` in a module named for its implementation (`BunPtyAdapter.ts`). Keep implementation-specific names when one abstract port module holds several implementations (`makeCloudflaredRelayClient`, `layerCloudflared` in `RelayClient.ts`). `infra/relay/src/db.ts` may keep its inline `Layer.succeed(RelayDb, db)`.
4045
- When a service moves, delete the old files and update every consumer, including orchestration, MCP, tests, and integration harnesses. Do not leave compatibility re-export shims.
4146

0 commit comments

Comments
 (0)