Skip to content

fix: skip compaction when promoting queued messages (chase 261028 B02) - #1921

Closed
lidge-jun wants to merge 14 commits into
devfrom
chase/261028-b02-steer-compaction
Closed

lidge-jun wants to merge 14 commits into
devfrom
chase/261028-b02-steer-compaction

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

#1891 must land first. The B02 delta is git diff origin/chase/261028-b01-server-runs...HEAD. This PR targets dev to enable normal GOAT CI, so its displayed diff also includes B01.

Promoting a queued message during /compact previously rejected the request or left it waiting behind compaction. Promotion now skips compaction and puts the selected message first in the remaining user queue.

Adapted from upstream commit ad068d7c93744f11a0ca1e816897b8e3128292ef (pingdotgg/t3code#25837).

GOAT keeps delegated-delivery priority, held-queue policy, and its timeline/queue presentation. The shared client availability reaches web, desktop, and mobile; MCP uses the same server command. Interruption uses the existing provider operation, with no wire or adapter changes. Upstream timeline folding and tooltip changes remain excluded.

Review round 1

  • Major 1 — interrupt result type and startup cancellation: fixed in be35cb6e3d0a9758a2b0a1f5cce4dc5d8a74c88e. The extracted helper accepts the dispatcher's cancellation-descriptor-or-undefined result and returns it after merging events/effects, allowing dispatchOnce and the event sink to cancel and signal unsettled starts. The existing integration table now covers ordinary and /goal promotion across unclaimed startup, startup suspended at the provider boundary, and running compaction. Pending-start cases assert durable outbox cancellation; the suspended cases use Deferred coordination and await worker cancellation before checking provider input and remaining queue order. These assertions would fail without descriptor propagation; red/green execution is not claimed.
  • Major 2 — missing server/typecheck evidence and CI-ineligible stacked base: retargeted fix: skip compaction when promoting queued messages (chase 261028 B02) #1921 from the B01 branch to dev after pushing the fix above, making normal PR goat-ci eligible (check, affected typecheck, changed/related tests). B01 is still 8204d2d89d98b586a2a03deb46e02c2aa05e7b4b, already contained in this head; no merge was necessary. Completed server regression/typecheck and red/green evidence remain outstanding. The maintainer explicitly requires no local suites and handback immediately after push without waiting for CI; no green CI claim is made.

CI triggered for this head: goat-ci run 40563582388, with goat-scope and goat-screenshot-gate queued at handback. This is a real PR run after the base edit; it is not completed server/typecheck evidence.

Verification for review-round fix:

  • vp fmt apps/server/src/orchestration-v2/goat/QueuedCommandInterruption.ts apps/server/src/orchestration-v2/SteeringCompletion.integration.test.ts apps/server/src/orchestration-v2/testkit/SteeringHarness.ts — exit 0, 3 files.
  • node scripts/goat-rename.ts --check — exit 0, zero residue.
  • git diff --check and git diff --check origin/chase/261028-b01-server-runs — exit 0 before commit.

NOT RUN: focused server/client tests, server red/green regression execution, vp run check:changed (including the lockf-wrapped command), vp run typecheck, vitest and all other local suites, lint, and real-client verification, per the maintainer's cheap-static-only override. The commit hook was bypassed for this commit to avoid invoking vp staged; the changed files were formatted explicitly. No CI waiting, merge, or review request was performed.

Known baseline: origin/dev's goat-check failure in apps/server/src/cua/ComputerUseLeases.ts (code budget, #1871; tracked by #1890) is outside this fix.

Model: gpt-6.1-sol via GOAT implementation sub-agent (Codex harness).

CI fixes

  • 30136d2be0fed00905b406f6b6df63fbbbdf13fa — fix the compaction-promotion fixture's worker phases and the SteeringHarness TS377047 error. Exact failure logs: goat-test-changed job 122414039128, goat-typecheck job 122414039122.
  • The logs show both unclaimed cases observing running instead of starting, and both suspended cases timing out. The initial unbounded drain consumed the checkpoint and then claimed compaction startup. The fixture now drains only the checkpoint, awaits compaction's persisted starting event, and deliberately selects unclaimed, suspended, or running startup. Existing status expectations, durable cancellation checks, provider input, and queue-order assertions remain; pending/claimed outbox assertions and a persisted promotion-start milestone make the phases explicit. No production behavior was changed, and no sleeps or polling were added.
  • openSession now uses Effect.fn("SteeringHarness.openSession")(function* ...). The existing goal fixture moved into SteeringHarness so the integration file stays below its recorded line budget; moved reusable effects use named Effect.fn functions.
  • Static checks: vp fmt on both changed files (exit 0); node scripts/goat-rename.ts --check (exit 0, zero residue); git diff --check (exit 0); vp exec oxlint --format json on both changed files (exit 0, 2 files, 96 rules, zero diagnostics). The oxlint command initially lacked its executable link; it was linked to the already installed pinned oxlint package without installing dependencies. The commit hook was bypassed to avoid vp staged.
  • NOT RUN: local SteeringCompletion.integration.test.ts execution, all other focused/related/local test suites, red/green regression execution, vp run check:changed (including lockf-wrapped runs), vp run typecheck, vitest, and real-client verification, per the maintainer's restriction. CI on this new head remains the behavior/type verification and was not awaited. The DesktopTargetHost.test.ts code-budget regression (test(server): dev's computer use tests pass and fit the code budget again #1972) remains outside this lane. No merge or watch was requested.

Model: gpt-6.1-sol, Codex harness via GOAT implementation sub-agent.

juliusmarminge and others added 11 commits October 28, 2026 01:14
…(#25672)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 32bf48f428200efc95295ed109526f7b88d9d68a)
Merge only delegated completion fields at command commit time, preserving concurrent completion and checkpoint state through GOAT's existing notification path.

Upstream: d033768ec73d728a1d10a75c53cf2ab195d1c867 (#25666)
…t (#25675)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 36d4d711b79c73eb33131944f73ea4a8c6156484)
Restore retained branches or recreate a removed branch from the project's current checkout, and fail explicitly when recovery cannot succeed. Keep GOAT's workspace lease, deadline, cloud preflight, and interruption behavior.

Upstream: 0604547a3ae7bca2e5cad1c17b40be5de17dd2cc (#18359)
Apply the required chase rename pass to existing source control and palette fixtures so the branch-wide residue gate stays clean.
Rename search shorthands and GitHub head-repository names alongside their repository references so the required chase normalization preserves the fixtures' behavior.
Extract delegated completion merging, effect execution policy, and worktree recovery into GOAT modules. Move shared test fixtures out of oversized test files while keeping the regression cases in place, and lower the affected file budgets.
Upstream: ad068d7c93744f11a0ca1e816897b8e3128292ef (#25837)
Reuse queued-command interruption while preserving GOAT queue ordering and
pending-start abandonment. Cover ordinary and goal messages during starting
and running compaction without changing the timeline presentation.

Upstream: ad068d7c93744f11a0ca1e816897b8e3128292ef (#25837)
@lidge-jun
lidge-jun changed the base branch from chase/261028-b01-server-runs to dev October 27, 2026 18:49
The completion fixture drained past the first turn's checkpoint and into
queued compaction startup. Unclaimed cases therefore observed running
instead of starting, while suspended cases blocked in that first drain.
Keep both status expectations: unclaimed compaction must still be starting,
and the start service persists running before entering the provider gate.

Drain only the first checkpoint effect, then await the persisted compaction
starting event before choosing whether to claim its start. Await promotion's
starting event before the final drain, and assert pending/running outbox
states before cancellation. No sleeps or polling are introduced.

Use a named Effect.fn for openSession to address TS377047. Move the existing
goal fixture into SteeringHarness to stay within the test file's line budget;
its moved reusable effects also use named Effect.fn functions.

Static validation: formatter, rename check, git diff --check, and oxlint on
the two changed files (2 files, 96 rules, zero diagnostics). Local test suites,
red/green execution, typecheck, check:changed, and real-client verification
were not run under the maintainer's cheap-static-only instruction. CI must
verify the behavior and types. Bypass the commit hook to avoid vp staged.
@lidge-jun

Copy link
Copy Markdown
Contributor Author

Landed as part of the combined chase PR #1982 (squash 5a9569e), at the user's request to merge the rest of cycle 261028 as one PR. Closing.

@lidge-jun lidge-jun closed this Oct 27, 2026
@lidge-jun

Copy link
Copy Markdown
Contributor Author

Landed as part of the combined chase PR #1982 (squash 5a9569e), at the user's request to merge the rest of cycle 261028 as one PR. Closing.

@lidge-jun
lidge-jun deleted the chase/261028-b02-steer-compaction branch October 30, 2026 05:56
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.

2 participants