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 — test(server): the ACP process-tree test no longer collides with the runner's own pid by yordis · Pull Request #17647 · pingdotgg/t3code

Conversation

@yordis

@yordis yordis commented Oct 9, 2026

Copy link
Copy Markdown
Contributor
  • The "rotates more than 64 live parents" test gives its synthetic parents pids and process groups 1000 to 1129, while the server fixture's process group is the test runner's real pid.
  • A fresh CI container hands out small, sequential pids, so the runner can land inside that range. Termination then skips the matching parent as if it were the server's own group, and the test fails for reasons unrelated to the code under test.
  • Choosing the range on the side away from the runner's pid makes the overlap impossible, including on hosts with a large pid_max.

Sorry, something went wrong.

Uh oh!

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

All reactions
@yordis
test(server): the ACP process-tree test no longer collides with the r…
96de128
…unner's own pid

Signed-off-by: Yordis Prieto <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 9, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 9, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 96de128

Macroscope's review found this PR approvable — This PR only adjusts an ignored ACP process-tree test to avoid a runner PID collision. Its impact is limited to test execution and does not change product behavior, defaults, or static-analysis configuration.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

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

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 755e1300-b410-474b-b468-41293450971b

📥 Commits

Reviewing files that changed from the base of the PR and between 6cd02e9 and 96de128.


📒 Files selected for processing (1)
  • apps/server/src/provider/acp/AcpSessionRuntime.processTree.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.



📝 Walkthrough

Walkthrough

The bounded ownership-ledger test now selects its synthetic parent PID base based on the test runner PID. The remaining test setup and assertions are unchanged.

Changes

Process-tree test PID isolation

Layer / File(s) Summary
Select synthetic PID base
apps/server/src/provider/acp/AcpSessionRuntime.processTree.test.ts
The test uses a base of 500_000 when process.pid is lower than that value; otherwise it uses 1_000. It builds 130 synthetic parent identities from the selected base.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: juliusmarminge


Merge Risk: ⚪ Minimal · up to 96de1

This change is limited to test-fixture PID selection; no production behavior or merge-blocking risk is identified.

Architecture Summary

Architecture risk: 🔵 Low · up to 96de1

The change affects 1 system.

Changed systems: apps/server

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — apps/server (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in apps/server/src/provider/acp/AcpSessionRuntime.processTree.test.ts: The test now selects a synthetic parent PID base of 500_000 when process.pid < 500_000, otherwise 1_000, and builds its 130 parent identities from that base instead of always starting at 1_000. Comments describe the process-group collision this avoids.

Pre-merge checks | Passed 3 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check Warning The description explains the PID collision problem and the intended fix, but it does not use the required Problem, Change, Scope and approval, and Verification sections. It also provides no verificati… Rewrite the description using the required sections. Include the expected behavior and reproduction context under Problem, explain the PID-base change under Change, document the linked issue or maintainer approval or explain why the focused…
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the ACP process-tree test and the PID collision it prevents. It is concise, specific, and follows the repository's conventional commit style.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Description check

Explanation

The description explains the PID collision problem and the intended fix, but it does not use the required Problem, Change, Scope and approval, and Verification sections. It also provides no verification results or approval or exemption information.

Resolution

Rewrite the description using the required sections. Include the expected behavior and reproduction context under Problem, explain the PID-base change under Change, document the linked issue or maintainer approval or explain why the focused fix qualifies under Scope and approval, and list the focused test run with observed results under Verification.



  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

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

coderabbitai[bot]
coderabbitai Bot approved these changes Oct 9, 2026
View reviewed changes
@maria-rcks
maria-rcks merged commit 202b954 into pingdotgg:main Oct 10, 2026
29 checks passed

Uh oh!

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

github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 10, 2026
@github-actions
nightly: 0.0.46-nightly.20261010.2908
cffdfb5
## What's Changed
* chore(deps): upgrade Effect to 4.0.2 by @juliusmarminge in pingdotgg/t3code#17571
* fix(devices): recover stalled video without losing simulator input by @juliusmarminge in pingdotgg/t3code#17566
* fix(web): keep checkout stable while pr actions load by @maria-rcks in pingdotgg/t3code#16625
* fix(mobile): show waiting thread status by @maria-rcks in pingdotgg/t3code#16693
* feat(web): add parent thread breadcrumb navigation by @maria-rcks in pingdotgg/t3code#16666
* fix(server): restart inactivity after snoozed threads wake by @maria-rcks in pingdotgg/t3code#16674
* feat(desktop): passkeys in the in-app browser on macOS by @juliusmarminge in pingdotgg/t3code#16952
* fix(client): load earlier turns works for MCP threads over T3 Connect by @juliusmarminge in pingdotgg/t3code#17599
* refactor(client): sign relay request URLs built from the HttpApi contract by @juliusmarminge in pingdotgg/t3code#17602
* refactor(source-control): add @t3tools/source-control-core by @juliusmarminge in pingdotgg/t3code#17573
* refactor(source-control): Forgejo lives in @t3tools/source-control-forgejo by @juliusmarminge in pingdotgg/t3code#17581
* refactor(source-control): Azure DevOps lives in @t3tools/source-control-azure-devops by @juliusmarminge in pingdotgg/t3code#17592
* refactor(source-control): GitLab lives in @t3tools/source-control-gitlab by @juliusmarminge in pingdotgg/t3code#17594
* refactor(source-control): Bitbucket lives in @t3tools/source-control-bitbucket by @juliusmarminge in pingdotgg/t3code#17597
* refactor(source-control): GitHub lives in @t3tools/source-control-github by @juliusmarminge in pingdotgg/t3code#17607
* refactor(usage): transcript readers come from their drivers by @juliusmarminge in pingdotgg/t3code#17576
* refactor(usage): OpenCode usage comes from provider-opencode by @juliusmarminge in pingdotgg/t3code#17577
* refactor(usage): Cursor account usage comes from provider-cursor by @juliusmarminge in pingdotgg/t3code#17578
* refactor(usage): Antigravity usage is a reader on its driver by @juliusmarminge in pingdotgg/t3code#17579
* refactor(usage): usage readers use Effect FileSystem and SqlClient by @juliusmarminge in pingdotgg/t3code#17615
* fix(web): composer context strip pads both edges evenly by @limineol in pingdotgg/t3code#17562
* test(usage): v4 cache upgrade test waits for the migrated cache write by @Mnigos in pingdotgg/t3code#17553
* feat(mobile): support Duo in the shared iOS app by @juliusmarminge in pingdotgg/t3code#12648
* refactor(source-control): GitManager reads provider resolvers, not host kinds by @juliusmarminge in pingdotgg/t3code#17617
* refactor(source-control): PullRequestService reads GitHub resolvers, not its kind by @juliusmarminge in pingdotgg/t3code#17619
* refactor(source-control): Forgejo identity and Azure DevOps addressing move into their packages by @juliusmarminge in pingdotgg/t3code#17624
* refactor: home directory comes from a HostProcessHomeDirectory reference by @juliusmarminge in pingdotgg/t3code#17628
* refactor(shared): host process references live in a HostProcess module by @juliusmarminge in pingdotgg/t3code#17641
* feat(web): filter PR comments by bots and resolved threads by @juliusmarminge in pingdotgg/t3code#17645
* fix(clients): remove redundant prefix from PR watch status by @extoci in pingdotgg/t3code#17635
* fix(web): pending requests wait until you stop typing by @maria-rcks in pingdotgg/t3code#17637
* fix(models): remove new badges from Claude Opus and Sonnet 5.5 by @extoci in pingdotgg/t3code#17646
* fix(ui): keep focus and selection borders visible across the app by @maria-rcks in pingdotgg/t3code#16675
* fix(mobile): prevent row presses during native back swipes by @juliusmarminge in pingdotgg/t3code#17648
* fix(server): Codex shadow homes replace stray sqlite maintenance locks by @juliusmarminge in pingdotgg/t3code#17663
* feat(desktop): T3 Code can be your default web browser on macOS by @juliusmarminge in pingdotgg/t3code#17587
* test(server): the ACP process-tree test no longer collides with the runner's own pid by @yordis in pingdotgg/t3code#17647
* fix(web): keep branch restore action inline in narrow composers by @Saikrishna1876 in pingdotgg/t3code#14811
* fix(web): composer banner actions stay inline whenever they fit by @maria-rcks in pingdotgg/t3code#17640


**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261009.2886...v0.0.46-nightly.20261010.2908

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261010.2908
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 10, 2026
@github-actions
nightly: 0.0.46-nightly.20261010.2908
8fc3b95
## What's Changed
* chore(deps): upgrade Effect to 4.0.2 by @juliusmarminge in pingdotgg/t3code#17571
* fix(devices): recover stalled video without losing simulator input by @juliusmarminge in pingdotgg/t3code#17566
* fix(web): keep checkout stable while pr actions load by @maria-rcks in pingdotgg/t3code#16625
* fix(mobile): show waiting thread status by @maria-rcks in pingdotgg/t3code#16693
* feat(web): add parent thread breadcrumb navigation by @maria-rcks in pingdotgg/t3code#16666
* fix(server): restart inactivity after snoozed threads wake by @maria-rcks in pingdotgg/t3code#16674
* feat(desktop): passkeys in the in-app browser on macOS by @juliusmarminge in pingdotgg/t3code#16952
* fix(client): load earlier turns works for MCP threads over T3 Connect by @juliusmarminge in pingdotgg/t3code#17599
* refactor(client): sign relay request URLs built from the HttpApi contract by @juliusmarminge in pingdotgg/t3code#17602
* refactor(source-control): add @t3tools/source-control-core by @juliusmarminge in pingdotgg/t3code#17573
* refactor(source-control): Forgejo lives in @t3tools/source-control-forgejo by @juliusmarminge in pingdotgg/t3code#17581
* refactor(source-control): Azure DevOps lives in @t3tools/source-control-azure-devops by @juliusmarminge in pingdotgg/t3code#17592
* refactor(source-control): GitLab lives in @t3tools/source-control-gitlab by @juliusmarminge in pingdotgg/t3code#17594
* refactor(source-control): Bitbucket lives in @t3tools/source-control-bitbucket by @juliusmarminge in pingdotgg/t3code#17597
* refactor(source-control): GitHub lives in @t3tools/source-control-github by @juliusmarminge in pingdotgg/t3code#17607
* refactor(usage): transcript readers come from their drivers by @juliusmarminge in pingdotgg/t3code#17576
* refactor(usage): OpenCode usage comes from provider-opencode by @juliusmarminge in pingdotgg/t3code#17577
* refactor(usage): Cursor account usage comes from provider-cursor by @juliusmarminge in pingdotgg/t3code#17578
* refactor(usage): Antigravity usage is a reader on its driver by @juliusmarminge in pingdotgg/t3code#17579
* refactor(usage): usage readers use Effect FileSystem and SqlClient by @juliusmarminge in pingdotgg/t3code#17615
* fix(web): composer context strip pads both edges evenly by @limineol in pingdotgg/t3code#17562
* test(usage): v4 cache upgrade test waits for the migrated cache write by @Mnigos in pingdotgg/t3code#17553
* feat(mobile): support Duo in the shared iOS app by @juliusmarminge in pingdotgg/t3code#12648
* refactor(source-control): GitManager reads provider resolvers, not host kinds by @juliusmarminge in pingdotgg/t3code#17617
* refactor(source-control): PullRequestService reads GitHub resolvers, not its kind by @juliusmarminge in pingdotgg/t3code#17619
* refactor(source-control): Forgejo identity and Azure DevOps addressing move into their packages by @juliusmarminge in pingdotgg/t3code#17624
* refactor: home directory comes from a HostProcessHomeDirectory reference by @juliusmarminge in pingdotgg/t3code#17628
* refactor(shared): host process references live in a HostProcess module by @juliusmarminge in pingdotgg/t3code#17641
* feat(web): filter PR comments by bots and resolved threads by @juliusmarminge in pingdotgg/t3code#17645
* fix(clients): remove redundant prefix from PR watch status by @extoci in pingdotgg/t3code#17635
* fix(web): pending requests wait until you stop typing by @maria-rcks in pingdotgg/t3code#17637
* fix(models): remove new badges from Claude Opus and Sonnet 5.5 by @extoci in pingdotgg/t3code#17646
* fix(ui): keep focus and selection borders visible across the app by @maria-rcks in pingdotgg/t3code#16675
* fix(mobile): prevent row presses during native back swipes by @juliusmarminge in pingdotgg/t3code#17648
* fix(server): Codex shadow homes replace stray sqlite maintenance locks by @juliusmarminge in pingdotgg/t3code#17663
* feat(desktop): T3 Code can be your default web browser on macOS by @juliusmarminge in pingdotgg/t3code#17587
* test(server): the ACP process-tree test no longer collides with the runner's own pid by @yordis in pingdotgg/t3code#17647
* fix(web): keep branch restore action inline in narrow composers by @Saikrishna1876 in pingdotgg/t3code#14811
* fix(web): composer banner actions stay inline whenever they fit by @maria-rcks in pingdotgg/t3code#17640


**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261009.2886...v0.0.46-nightly.20261010.2908

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261010.2908
@yordis
yordis deleted the yordis/test-acp-process-tree-pid-collision branch October 10, 2026 17:43
Rylaa pushed a commit to Rylaa/t3code that referenced this pull request Oct 12, 2026
@yordis @Rylaa
test(server): the ACP process-tree test no longer collides with the r…
d37b11f
…unner's own pid (pingdotgg#17647)

Signed-off-by: Yordis Prieto <[email protected]>
(cherry picked from commit 202b954)
incognitojam pushed a commit to incognitojam/styal that referenced this pull request Oct 20, 2026
@yordis @incognitojam
test(server): the ACP process-tree test no longer collides with the r…
388bfa5
…unner's own pid (pingdotgg#17647)

Signed-off-by: Yordis Prieto <[email protected]>
(cherry picked from commit 202b954)
Upstream-PR: 17647
@olafura olafura mentioned this pull request Nov 7, 2026
test(features): ledger upstream T3 Code through 99544c9c19 hal-c2/hal-c2#1085
Merged
lastobelus added a commit to lastobelus/lastCode that referenced this pull request Nov 15, 2026
@lastobelus
test: move fork-only assertions into fork-owned test suites (#729)
6a8293b
Part of #720.

Fork-only assertions sitting inside upstream-owned test files conflict with the nightly sync whenever upstream edits those files. This PR moves that coverage into fork-owned suites, so the upstream files carry less fork text for nightly to collide with. Coverage is kept: the setup, terminal, persistence and delivery cases move unchanged except one setup test, deleted because a pinned upstream test covers all of its assertions. Migration assertions extend the existing fork database suite. Production code is unchanged.

## 🧭 Summary

| Area                           | Moved                                | Deleted                                           | Fork-owned destination                                     |
| ------------------------------ | ------------------------------------ | ------------------------------------------------- | ---------------------------------------------------------- |
| Migrations (#279)              | 2 tests' assertions (3 rows below)   | 1 fork-owned file (`055_OrchestrationV2.test.ts`) | Existing `DatabaseMigrations.test.ts`                      |
| Setup runner (#499)            | 18 declarations                      | 1 (startup-exit duplicate)                        | `ProjectSetupScriptRunner.lastcode.test.ts`                |
| Terminal manager (#499)        | 2 declarations                       | none                                              | `Manager.lastcode.test.ts`                                 |
| Foundation persistence (#485)  | 9 cases                              | none                                              | `FoundationPersistence.lastcode.test.ts`                   |
| Delegated delivery (#484)      | 4 cases                              | none                                              | `DelegatedCompletionDelivery.lastcode.test.ts`             |
| Pairing grants (#318)          | 2 rejected-scope rows                | none                                              | `PairingGrantStore.lastcode.test.ts`                       |
| Workspace alias reads (#266)   | 2 assertions in one lower-layer case | none                                              | `AntigravityClientFiles.lastcode.test.ts`                  |
| HTTP media cache policy (#235) | 1 case                               | none                                              | `http.lastcode.test.ts`                                    |
| Pi attachments (#490)          | 1 integration case                   | none                                              | `packages/provider-pi/src/server/adapter.lastcode.test.ts` |
| Process-tree fixture (#308)    | none                                 | Fork fixture changes only; test retained          | Restored pinned upstream fixture                           |
| Codex mode coverage (#483)     | none                                 | none; already reconciled                          | Existing upstream tests unchanged                          |

- **Net effect on upstream-owned files:** the ten upstream-owned test files lose a net 1,704 lines (1,720 deletions, 16 insertions). Deleting the fork-owned `055_OrchestrationV2.test.ts` is separate from that count.
- **Moved setup, terminal, persistence and delivery bodies are byte-for-byte copies.** Names, parameters, setup, barriers and assertions are unchanged. Supporting fixtures are copied into each new file, so no test module imports another and upstream files need no new exports.
- **Naming:** `docs/lastcode/fork-conventions.md` (including #721) defines ownership but no suffix. New sibling suites use `<Module>.lastcode.test.ts`; the alias-read suite sits beside the `AntigravityClientFiles` helper it exercises. All eight are absent from `origin/main`, as is the existing `DatabaseMigrations.test.ts`.
- **Comparison point:** pinned nightly [`db2cc2026427c5eb647a08538c12402341db0fab`](https://github.com/pingdotgg/t3code/tree/db2cc2026427c5eb647a08538c12402341db0fab), the merge base with `origin/main`. Attribution was traced from original base `20bcf5d6ca`. The branch was then cleanly rebased onto `c1eb9dd53fc1dd8d4c3fc61834dd65975c17a707`, and nightly is unchanged.
- **Upstream provenance:** #499 ↔ [#24775](https://redirect.github.com/pingdotgg/t3code/pull/24775), #485 ↔ [#24836](https://redirect.github.com/pingdotgg/t3code/pull/24836), #484 ↔ [#23542](https://redirect.github.com/pingdotgg/t3code/pull/23542). The migration assertions came from #279.

## 🗑️ The one deleted test

**`does not type into a shell that exits during startup`** (from #499). The pinned upstream test that covers it is **`does not type into a shell that exits during startup (before shell lookup: %s)`**, [`ProjectSetupScriptRunner.test.ts:213`](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/apps/server/src/project/ProjectSetupScriptRunner.test.ts#L213).

- Its `false` row emits the same exit event after startup, asserts abandoned completion (`exitCode: null`), advances the same virtual minute, and asserts no write and zero listeners.
- Its `true` row also covers shell lookup finding no running terminal.
- None of the fork case's assertions is lost.

## ✅ Validation

- **`pnpm exec vp run check:changed origin/lastcode/main`** exited 0 on head `8e12f78e4bcd6f35fa92ccc66c2c2dc3e869d276` / base `c1eb9dd53fc1dd8d4c3fc61834dd65975c17a707`. All 809 tests in 20 files passed. Format, lint, knip (both passes), GraphQL and typecheck (9 packages) passed.
- **Targeted suites:** 38 migration tests, 205 persistence/delegated-delivery tests, 209 additional retirement tests, and the two final Pi/alias regressions passed.
- **Quick CI** passed for the exact current head and base, including all 41 workspace checks. Its receipt matches the commit, canonical base ref, base commit and gate version. Required GitHub CI remains a merge gate.
- No product behavior or UI changes, so no client QA.

## 📐 Upstream-owned files vs pinned nightly

| File                                                     | State                                                                                                                     |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `persistence/reconcileV2PreviewMigration.test.ts`        | Byte-identical to nightly                                                                                                 |
| `project/ProjectSetupScriptRunner.test.ts`               | 4 remaining harness/assertion differences, explained below                                                                |
| `terminal/Manager.test.ts`                               | Pre-existing fork differences unrelated to the moved #499 cases, inventoried below                                        |
| `orchestration-v2/FoundationPersistence.test.ts`         | 7 pre-existing hunks, inventoried below                                                                                   |
| `orchestration-v2/DelegatedCompletionDelivery.test.ts`   | Pre-existing Action/watch/fixture differences, inventoried below                                                          |
| `provider/acp/AcpSessionRuntime.processTree.test.ts`     | Byte-identical to nightly                                                                                                 |
| `auth/PairingGrantStore.test.ts`                         | Byte-identical to nightly                                                                                                 |
| `orchestration-v2/Adapters/AntigravityAdapterV2.test.ts` | Byte-identical to nightly                                                                                                 |
| `http.test.ts`                                           | Existing CORS/range/header tests; audio cache-policy case is absent because it moved to the fork suite; inventoried below |
| `packages/provider-pi/src/server/adapter.test.ts`        | Only the existing custom settings-path test remains                                                                       |

`persistence/Migrations/055_OrchestrationV2.test.ts` does not exist at nightly. Despite its upstream-shaped name it was fork-owned, and it is now removed. This PR does not claim the other six files equal nightly. The remaining differences are inventoried below, including the fork-adapted HTTP cache-policy case moved out of the upstream suite.

<details>
<summary><b>Migrations (#279): moved assertions</b></summary>

| Original case/assertion                                                                                                                                                            | Coverage after change                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `reconcileV2PreviewMigration.test.ts`: `upgrades a published preview without replaying V2 or losing import progress` (production migration runner plus appended LastCode manifest) | `DatabaseMigrations.test.ts`: `LastCode V2 preview ledger (existing LastCode: false)` / `normalizes the published upstream preview before checking both ledgers`. It asserts the combined return list, both persisted ledgers, the creator evidence index, import progress, and that a repeat startup does nothing. The `true` row keeps the existing partially migrated LastCode scenario. |
| Same case: ledger entry `12_ThreadCreatorEvidenceIndex` and physical index `orchestration_events_v2_thread_created_target_idx`                                                     | Both preview rows call `assertCurrent`, which checks the complete LastCode ledger and the physical index.                                                                                                                                                                                                                                                                                   |
| `Migrations/055_OrchestrationV2.test.ts`: `upgrades released schema 53 with the creator evidence index`                                                                            | New `53` row in `DatabaseMigrations.test.ts` / `upgrades an upstream-only database`. `assertCurrent` checks the complete ledgers and physical index, and a repeat production startup returns `[]`.                                                                                                                                                                                          |

No upstream migration list is copied into the fork suite.

</details>

<details>
<summary><b>Setup runner (#499): 18 moved declarations</b></summary>

All moved bodies and the admission harness are byte-for-byte copies from original base `20bcf5d6ca`.

| Moved test                                                                      | Origin                    | Why it stays as fork coverage                                                                                                                                                                |
| ------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| uses the restored path when preparing setup command environment                 | Later workspace coverage  | Restored cwd and `T3CODE_WORKTREE_PATH`; no pinned equivalent.                                                                                                                               |
| rejects setup before opening a terminal while update admission is closed        | Pre-#499, adapted by #499 | Fork update admission: no terminal, write or listener after admission closes.                                                                                                                |
| returns no-script during update drain without starting a terminal               | Pre-#499                  | Fork admission must not turn a no-script call into an error or open a terminal.                                                                                                              |
| holds admission through command write and releases it before setup completion   | Pre-#499, adapted by #499 | Fork admission lifetime/order and completion after drain closes. Pinned readiness tests do not exercise admission.                                                                           |
| preserves an opted-in setup Action's profile in its own terminal                | Pre-#499                  | Fork link-profile propagation and Action terminal identity.                                                                                                                                  |
| clears a reused setup terminal's profile after the Action removes its selection | Pre-#499                  | Fork profile clearing on reuse.                                                                                                                                                              |
| shows a startup prompt and types only once the line editor starts               | #499                      | Goes beyond the same-named upstream test: split readiness-marker chunks, exactly one write, sentinel completion, `closeIdle`, listener cleanup.                                              |
| rejects the deferred write when update drain activates during shell startup     | #499                      | Deferred-write admission rejection, abandoned completion, listener cleanup.                                                                                                                  |
| types into a quiet shell without trusting restored line editor history          | #499                      | Combined case: restored ready history must not write immediately, then the quiet fallback writes once. Pinned tests cover the two conditions separately, so strict equivalence is uncertain. |
| accepts foreground readiness while background output arrives during inspection  | #499                      | Foreground probe stays valid when background output arrives mid-probe.                                                                                                                       |
| discards a foreground result invalidated by %s while inspection is pending      | #499                      | All three rows (`restart`, `activity`, `editor`): stale-probe invalidation and recovery on a fresh readiness marker.                                                                         |
| drops terminal listeners when cancelled while the terminal opens                | #499                      | Fork single-listener count (one before cancellation, zero after); pinned upstream expects two before.                                                                                        |
| forgets a busy startup child when the shell restarts                            | #499                      | Restart fallback combined with restored ready history and one write; the same-named pinned test starts without restored history.                                                             |
| abandons pending completion and removes listeners when its service stops        | #499                      | Service-stop completion and cleanup; pinned tests interrupt an opening call instead.                                                                                                         |
| abandons a pending setup when a new run replaces its terminal launch context    | #499                      | Worktree/profile supersession: one write, first completion abandoned, replacement succeeds, no listeners left.                                                                               |
| keeps a reused terminal busy without requiring another activity transition      | #499                      | Reuse preserves busy state, replaces the pending run, abandons cleanly on close.                                                                                                             |
| discards old readiness and exit signals while opening a replacement shell       | #499                      | Staged events must not mark a replacement shell ready or exited.                                                                                                                             |
| does not let a terminating predecessor keep an idle reused shell waiting        | #499                      | Retained predecessor metadata must not block foreground readiness of the current shell.                                                                                                      |

</details>

<details>
<summary><b>Terminal manager (#499): 2 moved declarations</b></summary>

| Moved test                                                                                   | Why it stays as fork coverage                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| setup proceeds with a retained background writer after the foreground startup prompt returns | Separate foreground-startup, same-group-startup and background-only stages with continuous output. Setup stays blocked until the foreground prompt returns, writes once, completes, and keeps background ownership and activity without killing the PTY. Neither #24775 nor pinned `Manager.test.ts` has an equivalent. |
| reads foreground activity while a previous shell is still terminating                        | Foreground queries hit the current PTY while predecessor termination metadata is still visible, before and after foreground activity and predecessor exit. No upstream equivalent.                                                                                                                                      |

`FakePtyProcess`, `FakePtyAdapter`, `openInput` and both test bodies are byte-for-byte copies. A new local `createManager` keeps the original temp directory, history limit, PTY allocation, 1 ms kill grace, 10 ms exit wait, workspace test layer, event subscription/finalizer and per-case options. Its option type includes only the options these two cases use. The `it.layer` dependencies, `excludeTestServices: true` and per-case platform/TestClock overrides are unchanged. The unrelated global SynchronizedRef mock is not imported.

</details>

<details>
<summary><b>Foundation persistence (#485): 9 moved cases</b></summary>

The 434-line block exactly matches #485's merge tree (`1dace6e4d8`). SHA-256 of the moved block: `0ae4d4ac347039f983b9102d1cf04b1b5b2b3139fb3794f9717539c4b57de2b4`.

`$caller preserves event consistency and allows later writes after $scenario`:

| Caller              | Scenario             | What it keeps                                                                                      |
| ------------------- | -------------------- | -------------------------------------------------------------------------------------------------- |
| `write`             | `cancel transaction` | Run and outbox roll back; zero fork run metrics/notifications; application and live history match. |
| `write`             | `fail transaction`   | Same invariants on transaction failure.                                                            |
| `write`             | `cancel publication` | One committed run outcome, outbox notification, application/live ordering after cancellation.      |
| `writeIfRunCurrent` | `cancel transaction` | Plus stale-attempt rejection and no outbox side effect. Upstream does not exercise this caller.    |
| `writeIfRunCurrent` | `fail transaction`   | Failure/rollback proof and stale-attempt guard.                                                    |
| `writeIfRunCurrent` | `cancel publication` | Commit/publication, outcome and later-write proof.                                                 |

| Test                                                                        | What it keeps                                                                                                                                                                                  |
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rolls back a writer cancelled while waiting for committed publication`     | Barriers at the publication lane and second writer's preparation; no second thread/outbox row persisted or published; later writes progress. No lane-wait cancellation case exists at nightly. |
| `preserves project command consistency when cancelled %s` (`before commit`) | Project/event/receipt rollback; later project commands progress on LastCode's application-event path.                                                                                          |
| `preserves project command consistency when cancelled %s` (`after commit`)  | Committed project/receipt and ordered application-event publication after writer cancellation.                                                                                                 |

Pinned upstream's [`preserves event consistency and allows later writes after %s`](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/apps/server/src/orchestration-v2/FoundationPersistence.test.ts#L4251) is unchanged. It checks thread projection/outbox persistence and live order through `writeWithEffects`, which does not cover the fork assertions, so nothing was deleted.

The `Metric` and application-event-store imports and the exposed application-event-store fixture moved with the tests. The upstream file's event-store fixture is restored to nightly's `EventStore.layer.pipe(Layer.provideMerge(layerDatabase))`, because `EventStore.layer` already provides `OrchestrationEventStore.layer`. The new file is 536 lines and omits the upstream worker-thread recording mock, compaction/replay helpers and unrelated tests.

</details>

<details>
<summary><b>Delegated delivery (#484): 4 moved cases, and one #485 case left in place</b></summary>

The 238-line block exactly matches #484's merge tree (`5d3e8b1527`). SHA-256: `6532eefab249c22d0dcb30098b65958fba8ad1af21b4ee055b7ac2132544365f`.

`delegated background wakes` / `handles a background command's wake after the original result while %s`:

| State         | What it keeps                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `active`      | Kept conservatively. Pinned upstream covers follow-up registration, result and parent wake. This case also dispatches the reserved parent delivery and runs recovery twice, asserting one follow-up task, two result transfers and one delivery run. It also uses a command-completion notification where upstream now uses a monitor notification, so the overlap is not enough to delete it. |
| `paused`      | Admission while paused, queued run with no task result, resume, final parent delivery, recovery idempotence.                                                                                                                                                                                                                                                                                   |
| `released`    | `ownershipReleased` / disposed delivery: no delegated task, parent tasks/runs untouched.                                                                                                                                                                                                                                                                                                       |
| `independent` | Independent lineage: no delegated task, parent tasks/runs untouched.                                                                                                                                                                                                                                                                                                                           |

Pinned upstream's [`delivers the run a background command's wake starts after the original result (%s)`](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts#L2565) (`live`, `checkpoint-retry`, `checkpoint-offer-retry`) is unchanged and was not replaced by the fork cases.

`layerFollowups` and its resumed-pause fixture moved. The now-unused `EnvironmentPauseStore` import was removed; `makePausedEnvironment` stays because the watch tests use it. The new file is 730 lines and registers only these four cases.

**Not moved:** `recovers an unpublished child failure after its completion delivery was disposed` (#485 ↔ #24836) appears once and is byte-identical to [nightly](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts#L4977). Upstream owns it now, there is no fork residue to move, and deleting it would remove upstream coverage.

</details>

<details>
<summary><b>Remaining diff: <code>ProjectSetupScriptRunner.test.ts</code></b></summary>

- **Imports** `UpdateDrainAdmission` and `WorkspaceAcquisitionTestkit`, needed to construct the fork service without exercising admission or workspace acquisition.
- **Harness `busy` state:** `hasForegroundSubprocess` mock, with `emit` updating `busy` on `started`/`restarted`/`activity`. The fork foreground-readiness implementation needs these; without them, pinned readiness cases fail or call an unmocked method.
- **Harness layers:** workspace test layer and a passthrough `admit` mock for fork service dependencies.
- **Cancellation case** drops upstream's `expect(listeners.size).toBe(2)` before interruption, because the fork implementation has one listener. The upstream test still waits for opening, interrupts, and asserts zero listeners. The fork's exact one-then-zero count lives in the moved cancellation case.

No other upstream setup test body differs.

</details>

<details>
<summary><b>Remaining diff: <code>Manager.test.ts</code></b></summary>

The file equals original base `20bcf5d6ca` minus the two #499 blocks. Everything below already existed there and is untouched. No pinned terminal test was deleted, and no upstream equivalence is claimed for these additions.

**Supporting code and imports**

- Provider-instance config import from fork `providerInstanceConfig.ts` instead of upstream `ProviderInstanceRegistryHydration.ts`.
- Extra imports: `TerminalMetadataStreamEvent`, `TerminalSummary`, `Scheduler`, `UpdateDrainAdmission`, workspace acquisition types/testkit, `registerWorkspaceLeaseRoot`. `terminalOutputStream` is absent; fork tests use the manager-owned output stream API.
- The stale upstream WebAssembly comment after `vi.mock` is absent (no runtime effect).
- `FakePtyProcess` adds kill failures, cached/one-time exit delivery, exit-on-kill, exit-listener clearing and a typed `onKill` argument, all for retained-process shutdown tests.
- `multiTerminalHistoryLogPath` for terminal-scoped profile and archive cases.
- `CreateManagerOptions` adds workspace acquisition, log directory, local CI settings path, process-exit wait, unregister hook and spawned-shell identity; reorders the registration-hook property. `createManager` forwards them, defaults exit wait to 10 ms, and provides the selected workspace acquisition layer.
- In-suite helpers `exitSnapshotTestProcesses` and `createSnapshotBoundaryManager`, placed between the multiple-terminal test (body unchanged) and the first snapshot test.

**Modified pinned cases (5)**

| Pinned test                                                                           | Change                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| closes idle shells and opted-in actions on settlement without stopping other commands | Explicit `/bin/zsh` fixture identity for fork shell classification.                                                                                                                          |
| writes completion syntax for the fallback shell instead of the configured fish shell  | Supplies fork workspace-acquisition and passthrough admission dependencies; assertions kept.                                                                                                 |
| closes an idle cmd fallback before rejecting its completion wrapper                   | Same dependency adapters (Windows case, untouched).                                                                                                                                          |
| finishes shell startup when its creating attachment is cancelled                      | `manager.attachOutputStream(input, "startup-viewer")` instead of upstream's `terminalOutputStream` wrapper.                                                                                  |
| resyncs bounded history and follows close/reopen across a stalled stream              | Manager-owned stream API; expects fork `deleteHistory: false` on close; puts the lock-holding terminal in another workspace (fixture `baseDir`) so the workspace lease doesn't block reopen. |

All other common case bodies match nightly.

**Added fork cases (85), by behavior covered**

- **Workspace restoration, acquisition failure, lease cancellation, setup/terminal lock order (5):** opens a restored checkout using its new cwd and Action environment · starts no shell when saved-workspace acquisition blocks open or reopen · completes setup and concurrent terminal $operation (restored: $restored) without reversing workspace/thread locks · allows close and cancellation while terminal %s waits for a workspace lease · attaches to a running shell without reacquiring an unavailable workspace
- **Action link-profile intent, retained output, corruption/failure, independent Action terminals (9):** retains Action profile intent in metadata and attached snapshots, clearing it on ordinary reuse · restores named Action links with retained output after %s without launch intent · an explicit ordinary launch clears retained Action output and profile together · keeps retained output when explicit %s matches readable intent · rejects unreadable retained Action intent %s before starting another process · replaces corrupt retained Action intent with explicit $profileName ($raw) · blocks explicit Action intent $profileName when retained transcript clearing fails · does not retain a failed Action launch or disturb other terminal opens · keeps independent Action commands, profiles, and output in separate terminals
- **Attachment safety during close/shutdown/retained termination (7):** refuses to create a missing terminal for read-only attach · rejects attachment queued during shutdown when %s and permits a fresh attachment afterward · does not auto-open an attachment queued behind a committed idle close · keeps concurrent shutdown protected after interruption and clears it after completion · does not recreate a detached terminal from metadata during normal kill grace · keeps failed retained terminals visible without respawning on repeated attachment · blocks processless session attachment but attaches to an explicit live replacement
- **Process-snapshot ownership, first-input ordering, stale-result invalidation, shared-query cancellation (23):** forwards first input at 100 ms while the same thread's %s idle snapshot is stalled · keeps newly active input after a same-thread %s idle inspection returns its stale result · keeps the replacement PTY after $replacement during a same-thread $source idle inspection · keeps the existing PTY after active $operation during a same-thread $source idle inspection · closes an idle PTY after passive observation and metadata reads during its %s inspection · captures the actual wrapper shell after $boundary during an older $source snapshot · retains a childless exec after input succeeds during an older %s snapshot · retains exec roots and child commands after output invalidates a held post-write %s poll · preserves fresh exec ownership and activity after $boundary invalidates an older $source poll · records $command ownership despite output during every $source refresh · prunes exited children while preserving activity through output-invalidated %s scans · reconciles ownership when $boundary invalidates a $source scan during registration · keeps a quiet terminal's exec ownership and activity when another terminal invalidates a held %s poll · takes independent fresh $source cleanup snapshots after an older idle poll before $state · gives overlapping cleanup callers independent fresh %s snapshots after drained output invalidates a held poll · revalidates a queued %s shell snapshot when the first writer acquires its thread lock · keeps overlapping %s shell scans shared while an unrelated terminal drains output · requires consecutive pre-input $source shell observations before failed capture fallback when confirmed=$confirmed · restarts %s shell confirmation when this terminal outputs between accepted samples · shares a held fresh $source wrapper confirmation round across $grouping · shares overlapping first-input $source snapshots across $grouping and refreshes later shells · abandons a shared $source snapshot across $grouping after its last waiter leaves via $outcome · keeps the real $source child basename $childName distinct from its login-shell root
- **POSIX shell/exec classification, cleanup ownership, first-input lifecycle races (22; the Windows row is untouched):** batches idle checks while excluding managed preview terminals · keeps a childless exec command while closing idle shells on %s · attributes exec roots and descendants during preview metadata refresh · reports the command that replaced the shell through terminal activity · uses the successful fallback shell identity when checking idle terminals · recognizes an idle custom shell without a shell-name allowlist · closes full custom shells before input and protects ambiguous or changed roots after input for $shellName · Linux login-shell $scenario stays safe through $source first input and cleanup · retains a childless matching-prefix exec and ownership when configured shell is %s · uses only pre-input wrapper identity after $source capture $scenario · uses a late pre-input $source observation while the first writer queues: $scenario · settles $source wrapper identity from $startupName configured as $configuredName before forwarding when resolved=$resolves · closes an idle shell started through a differently named wrapper · keeps later input behind the first PTY write after capture completes · rejects queued input from the original process after %s · preserves three-chunk input order when the queued middle chunk must %s · keeps forwarded exec active when its writer is canceled before resuming · freezes wrapper identity while first input and %s overlap · skips reserved first input when %s idle cleanup queues before its writer · protects first input queued behind idle cleanup and releases pending input after %s · bounds first input when the process monitor stalls without adopting the later exec · keeps Windows root detection based on child processes
- **Output persistence/flush, replay-unsafe query filtering (2):** flushes pending terminal output before reading persisted history · strips replay-unsafe terminal query and reply sequences from persisted history
- **Archive cleanup that retains preview-owned history (2):** archives a thread without deleting retained preview history · archives ordinary terminals while conservatively retaining unknown preview ownership
- **Retained-process exit confirmation, signaling failure/retry, shutdown isolation, explicit close events (14):** keeps a closing terminal in blocker metadata until kill escalation finishes · accepts an exit replayed while detaching a terminal without sending signals · accepts synchronous %s exit confirmation and releases its subscription · holds shutdown until delayed SIGKILL exit while keeping other threads usable · times out unconfirmed exit and retries only the selected retained process · removes retained metadata when actual exit arrives after the confirmation timeout · releases a retained exit subscription when the manager scope closes · keeps a closing terminal blocked when process signaling fails · retries only failed handles for the selected thread without duplicating cleanup · delivers successful cleanup after an in-flight retained metadata update · keeps opens and reopens outside the selected thread's shutdown interval · waits for the selected thread's cleanup without waiting for another thread · reports failed termination after the asynchronous close has returned · publishes closed events when terminals are explicitly closed
- **Action terminal environment uses the server settings path (1):** binds action terminals to the server settings path over shell overrides

</details>

<details>
<summary><b>Remaining diff: <code>FoundationPersistence.test.ts</code> (7 hunks)</b></summary>

| Difference                                                                                                                                                                                                                                                                                                                            | Coverage it supports                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OrchestrationV2Subagent` type import                                                                                                                                                                                                                                                                                                 | The recovered-background ownership fixture at the end of the file.                                                                                                                                                                                |
| Three worker mocks gain `awaitIncomingSummaryWork`, `runIncomingSummaryOnce`, `nextIncomingSummaryClaimableAt` (3 hunks)                                                                                                                                                                                                              | Fixture shape for the fork incoming-summary worker, in `groups shutdown commits with rollback=%s`, `atomically cancels stale runs and their process-bound effects`, `settles a native subagent's child thread when its provider process is gone`. |
| `keeps a delayed preparation retry from holding back later thread work`                                                                                                                                                                                                                                                               | A future prepared-run retry does not block a ready provider effect, then becomes claimable when TestClock advances.                                                                                                                               |
| Extra `prepared-run.auto-retry` row in `retires live provider effects and requeues $type after process loss`                                                                                                                                                                                                                          | Retry-effect startup requeue.                                                                                                                                                                                                                     |
| One appended hunk holding three tests: `commits recovery checkpoint effects only with the exact running attempt` · `selects unfinished recovery receipts for startup even without live provider work` · `guards recovered background rows against completed history and independent work (during finalization: %s)` (`true`, `false`) | Recovery-checkpoint commit/effect fencing and duplicate-admission protection; startup selection of idle threads with unfinished recovery receipts; finalization/provider-owner write guards.                                                      |

</details>

<details>
<summary><b>Remaining diff: <code>DelegatedCompletionDelivery.test.ts</code></b></summary>

| Difference                                                                                                                                                                                                                                                                                                                                                                                                                             | Coverage it supports                                                                                                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| MCP/peer/Action imports: `OrchestratorMcp`, `ThreadReadBroker`, `PeerForwarding`, `RemoteDelegation`, `ThreadLaunch`, `GitVcsDriver`, `ProviderRegistry`, `ProviderAdapterRegistry`, `ScheduledTaskService`, `SecretRequests`, `CommandReceipts`, `ActionResume`, `ActionRunStore`, `ThreadManagement`, `ProjectStore`, `TerminalManager`, `WorkspaceAcquisitionTestkit`, `ProviderRegistryMock`, `ACTION_RUN_ID_ENV`, `TerminalEvent` | The real Action launch/result matrix.                                                                                                                                                                                |
| Environment imports: `SuspensionRegistryTestkit`, `ServerEnvironment`, `EnvironmentId`, `UpdateDrainAdmissionTestkit`, `ProviderInstallationGate`, `makePausedEnvironment`                                                                                                                                                                                                                                                             | Workspace, drain, provider-installation, identity, pause and continuation fixtures; `EnvironmentId` also types remote ownership selectors in the nested-wake test.                                                   |
| Watch/replay imports: `SourceControlProviderKind`, `PullRequestOperationError`, `PullRequestDetail`, `RunAttemptId`, `Ref`, `Option`, `ProjectionStore`, `PullRequestWatchReactor`, `PullRequestService`, `ProjectionReplay`, `EventStore`                                                                                                                                                                                             | Watch obligations, host replies/errors, action state, exact attempt ownership, projection replay.                                                                                                                    |
| `layerTest` adds action-run/projection/replay/outbox/receipt/project-store layers                                                                                                                                                                                                                                                                                                                                                      | Services for the Action and watch tests. The extra `EffectOutbox.layer` duplicates one already in the original merge and is left as it was.                                                                          |
| `layerTest` adds environment identity, open drain admission, provider-installation gate, suspension registry; settings/platform go from `provide` to `provideMerge`                                                                                                                                                                                                                                                                    | Fork runtime dependencies; keeps settings/platform available to other tests.                                                                                                                                         |
| Upstream `keeps a checkpoint completion committed between finalize's read and write` replaced by `keeps checkpoint completion and %s ownership through a nested wake` (`local`, `remote`, `remote-disposed`)                                                                                                                                                                                                                           | Keeps the finalize race assertions and adds inherited local/remote ownership, completion-wake selection, and rejection when remote ownership is disposed.                                                            |
| `delivers a %s follow-up independently of the original task` gains `cancelled-before-start` and its branches                                                                                                                                                                                                                                                                                                                           | Queue behind unrelated work, cancel before start, keep unrelated background tasks, report `cancelled`, skip the never-created pending question. Covers the outcomes row and adjacent indentation/status hunks.       |
| `serializes a recovered child answer with its parent and tracks the follow-up`: parent ID `thread:question-answer-0-parent` plus comment                                                                                                                                                                                                                                                                                               | Lock-order fixture fix: parent must sort before child so the test blocks on the intended lock.                                                                                                                       |
| Appended `keeps the %s task open across a real Action launch and result` (36 rows, 1,282 lines incl. local fixtures/mocks)                                                                                                                                                                                                                                                                                                             | Local/remote ownership, pending/running cancellation races, stopped/disposed/independent ownership, reservation failures, discard/archive/shutdown/provider loss, held/nested work, combined Action/watch lifecycle. |
| Appended `owned pull request watch continuations` group (1,178 lines incl. shared seed helper)                                                                                                                                                                                                                                                                                                                                         | Six tests, listed below.                                                                                                                                                                                             |

Watch group:

1. `retains exact Task ownership through %s`: `terminal`, `later-terminal`, `later-task-cancel`, `external-unwatch`, `unlink`, `stack-dismiss`, `replace`, `owner-unwatch`, `settle`, `stop`, `task-cancel`, `archive`, `delete`.
2. `replays the saved terminal event after rejected admission and a reactor restart without reading the host`.
3. `retains an earlier pending update and a racing final event, including cancellation before the final wake starts`.
4. `keeps a %s automatic watch wake outstanding without starting it`: `paused`, `held`.
5. `preserves remote source-task association until %s`: `complete`, `disposed`.
6. `processes an owned reactor %s event`: `merged`, `closed`, `comment-limit`, `quiet`, `unreadable-merged`.

Upstream's `finalizes a child whose run ended before %s settled` is unchanged and follows the inserted Action matrix. A histogram diff shows the matrix as a pure insertion.

</details>

## Additional authorized retirements

All comparisons use the same pinned nightly. Product code, including #654 and #236, is unchanged.

| Fork / adopted upstream fix                                                                                                        | Test or fixture                                                                                                                                                 | Decision and exact upstream coverage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| #308 / [#17647](https://redirect.github.com/pingdotgg/t3code/pull/17647), merge `202b95403a7d6b7b01390b6a90457fa76e1be439`         | `rotates more than 64 live parents without scanning retained tombstones`                                                                                        | Keep the test and all assertions; restore its fixture byte-for-byte to nightly. Upstream chooses synthetic parent PIDs away from the worker PID, preventing the reported 1038/11038 collisions. Rotation, tombstone, 64-operation, 10-snapshot and cleanup assertions remain.                                                                                                                                                                                                                                                                                                                |
| #490 / [#21356](https://redirect.github.com/pingdotgg/t3code/pull/21356), original head `550f119c3ac12b2df070c4fd545ab8b41222debb` | `keeps native image bytes, saved paths, and untrusted window context in the prompt`                                                                             | Moved unchanged to `adapter.lastcode.test.ts`. Pinned Pi `keeps native image bytes and the saved path in the prompt` covers saved path/native `AQID` image payload, and provider-core `frames captured-window context as escaped untrusted JSON` covers formatting. The fork integration case additionally proves Pi forwards capture metadata alongside the native image into its prompt, so it is retained. Both upstream tests stay unchanged. The fork suite uses the same real adapter/runtime and host layers, with a fake RPC process limited to the ordinary open/ensure/start path. |
| #483 / [#24737](https://redirect.github.com/pingdotgg/t3code/pull/24737), merge `c79ef8c454e1268ff79da5a9dcb74572e86f7861`         | `selects native collaboration modes without prompt overrides with hasT3Mcp=%s`; Default collaboration replay expectations; `Codex runtime context` suite rename | Already reconciled at nightly. The matrix, `codexReplayPreamble`, `stops asking for commands the user allowed for the session` replay expectation and runtime-context rename are upstream's versions. No Codex files or transcripts changed.                                                                                                                                                                                                                                                                                                                                                 |
| #318 / [#16730](https://redirect.github.com/pingdotgg/t3code/pull/16730), merge `4daec109cdf8e3e92b392017d7564e735e54f6fd`         | `preserves a one-time grant after an $label scope request`, `empty` and `ungranted` rows                                                                        | Moved unchanged to the sibling suite. Upstream `accepts lowercase one-time tokens exactly once` covers omitted scopes and reuse, while the bound-proof test covers rejection then explicit-scope success. Neither covers the complete rejected request → same grant succeeds with omitted scopes and exactly `orchestration:read` → reuse fails sequence. Real SQLite/config/Node services remain.                                                                                                                                                                                           |
| #266 / [#26184](https://redirect.github.com/pingdotgg/t3code/pull/26184), merge `82515785bb6ec7b1b14894016977117864627b33`         | Alias assertions in `serves confined reads and leaves edits to the agent's diff tools`                                                                          | Moved to sibling `resolves missing nested paths through a workspace alias before reading`. Missing nested read through an external alias into the workspace must return resource-not-found rather than containment denial; after canonical creation the same alias reads `nested`. Upstream covers an internal existing-file symlink and escaping-link rejection, not this sequence. The sibling calls the actual `readAntigravityClientTextFile` helper with the same allowed root and real filesystem; upstream keeps ACP adapter wiring coverage.                                         |
| #235 / [#12326](https://redirect.github.com/pingdotgg/t3code/pull/12326), merge `d547e3b12a1af79e9dd81e422255a12d6ecf70d1`         | `keeps attachment media out of the cache once its signed URL expires`                                                                                           | Moved intact to `http.lastcode.test.ts`. Effect's upgrade fixed compression, but LastCode still emits `private, no-store, no-transform` where nightly expects `private, no-store`. Moving the whole case preserves its audio cache-policy and range assertions without changing product code or leaving a cache-policy test that only checks ranges.                                                                                                                                                                                                                                         |

Pinned covering sources: [Pi native image test](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/packages/provider-pi/src/server/adapter.test.ts#L1030), [shared escaped-context test](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/packages/provider-core/src/server/attachmentPrompt.test.ts#L62), [pairing tests](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/apps/server/src/auth/PairingGrantStore.test.ts#L50), [alias integration test](https://github.com/pingdotgg/t3code/blob/db2cc2026427c5eb647a08538c12402341db0fab/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts#L277).

<details>
<summary><b>Remaining differences in the additional touched upstream files</b></summary>

- `AcpSessionRuntime.processTree.test.ts`, `PairingGrantStore.test.ts`, and `AntigravityAdapterV2.test.ts` are byte-identical to nightly.
- Pi `adapter.test.ts`: the entire remaining diff is the unchanged 37-line `binds spawned provider shells to the host's custom settings path` case. It checks fork host settings/environment precedence. Imports and fixtures match nightly.
- `http.test.ts`: unchanged `makeDevHandler` and two CORS tables (83 lines) allow the four desktop app origins and reject hostile origins; unchanged `streams guarded file ranges, including suffixes and conditional requests` (40 lines) checks descriptor-backed ranges, conditional fallback, cache policy, validators and contents; the upstream audio cache-policy case is absent because it moved with its fork-specific header assertion; unchanged `does not apply document policy to raster images` and `serves inline videos with their declared mime type` (19 lines) assert fork asset headers. No other differences remain.
- Codex files were inspected for #483 and left untouched; their unrelated existing fork differences are outside this PR.

</details>

Local review: 3 rounds with gpt-6.1-terra (xhigh) and claude-opus-5-5 (xhigh), approved. Scope expanded after Terra approved round 1; the old-scope Opus run was cancelled. Round 2’s Pi coverage finding is fixed and both reviewers approved round 3. After a checkpoint rewrote the base, the identical patch was revalidated and both reviewers approved the refreshed head.

Implemented with GPT-6.1 Sol (xhigh), Codex harness in T3 Code.

Carry-Source-Ref: refs/lastcode/carry-sources/pr-729/8e12f78e4bcd6f35fa92ccc66c2c2dc3e869d276
Carry-Source-Base: c1eb9dd53fc1dd8d4c3fc61834dd65975c17a707
Carry-Source-Head: 8e12f78e4bcd6f35fa92ccc66c2c2dc3e869d276
@InM1nd InM1nd mentioned this pull request Nov 24, 2026
fix(server): backport upstream fixes for two Linux-only server test failures InM1nd/t3code-jcode#56
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] approved these changes
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted 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.

2 participants

@yordis @maria-rcks
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.