Skip to content

test: move fork-only assertions into fork-owned test suites - #729

Open
lastobelus wants to merge 6 commits into
lastcode/mainfrom
lastcode/sync-churn-test-hygiene
Open

lastobelus wants to merge 6 commits into
lastcode/mainfrom
lastcode/sync-churn-test-hygiene

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

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

🗑️ 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.

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

Migrations (#279): moved assertions
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.

Setup runner (#499): 18 moved declarations

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.
Terminal manager (#499): 2 moved declarations
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 pingdotgg#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.

Foundation persistence (#485): 9 moved cases

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

Delegated delivery (#484): 4 moved cases, and one #485 case left in place

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) (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 ↔ pingdotgg#24836) appears once and is byte-identical to nightly. Upstream owns it now, there is no fork residue to move, and deleting it would remove upstream coverage.

Remaining diff: ProjectSetupScriptRunner.test.ts
  • 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.

Remaining diff: Manager.test.ts

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
Remaining diff: FoundationPersistence.test.ts (7 hunks)
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.
Remaining diff: DelegatedCompletionDelivery.test.ts
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.

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, 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, 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, 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, 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, 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, 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, shared escaped-context test, pairing tests, alias integration test.

Remaining differences in the additional touched upstream files
  • 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 fix(codex): send the selected Plan/Default mode on every turn #483 and left untouched; their unrelated existing fork differences are outside this PR.

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.

@lastobelus lastobelus changed the title test(lastcode): move fork assertions out of upstream tests test(server): move fork-only assertions into fork-owned test suites Nov 15, 2026
Part of #720. Restore the preview test to the pinned nightly and preserve the LastCode ledger, evidence index, preview import and released-schema upgrade checks in DatabaseMigrations.test.ts.

Carry-Group: incubator

Carry-Fix: #720

Carry-Observation: Migration coverage follows the existing Incubator-owned DatabaseMigrations suite; no database behavior changes.
Part of #720. Keep fork-only publication and background-wake cases in sibling LastCode suites while retaining the upstream regressions.

Upstream coverage compared with https://redirect.github.com/pingdotgg/t3code/pull/24836 and https://redirect.github.com/pingdotgg/t3code/pull/23542.

Carry-Group: incubator

Carry-Fix: #720

Carry-Observation: Preserve Incubator-specific conditional persistence, application event history, Pause and ownership assertions outside upstream test files.
Part of #720. Move fork setup and terminal lifecycle tests into sibling LastCode suites; remove the startup-exit duplicate covered by the upstream parameterized regression.

Upstream coverage compared with https://redirect.github.com/pingdotgg/t3code/pull/24775.

Carry-Group: incubator

Carry-Fix: #720

Carry-Observation: Retained fork setup-readiness, admission and terminal-ownership tests follow the Incubator capability; upstream tests retain only required fork fixture adaptations.
Part of #720. Restore upstream process-tree PID fixture coverage and preserve the remaining fork audio cache-policy assertion in a fork-owned suite. Product code is unchanged.

Compared upstream https://redirect.github.com/pingdotgg/t3code/pull/17647 at 202b954 and https://redirect.github.com/pingdotgg/t3code/pull/12326 at d547e3b.

Carry-Group: upstream-bugfixes

Carry-Fix: #720
Part of #720. The pinned native-image prompt test plus shared-helper escaped untrusted JSON test cover the removed combined case. Preserve the unrelated fork host-settings regression.

Compared upstream https://redirect.github.com/pingdotgg/t3code/pull/21356 at 550f119.

Carry-Group: incubator

Carry-Fix: #720
Part of #720. Retain the full Pi captured-window/native-image prompt case in a fork-owned suite, and place alias-read coverage beside the actual client-files helper.

Compared upstream https://redirect.github.com/pingdotgg/t3code/pull/21356 at 550f119 and https://redirect.github.com/pingdotgg/t3code/pull/26184 at 8251578.

Carry-Group: incubator

Carry-Fix: #720
@lastobelus
lastobelus force-pushed the lastcode/sync-churn-test-hygiene branch from 22e2d95 to 8e12f78 Compare November 15, 2026 10:01
@lastobelus lastobelus changed the title test(server): move fork-only assertions into fork-owned test suites test: move fork-only assertions into fork-owned test suites Nov 15, 2026
@lastobelus
lastobelus marked this pull request as ready for review November 15, 2026 10:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T10:10:32.093075Z 8e12f78 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 8e12f78e4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant