Repository navigation
Conversation
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
gewenyu99
added this pull request to stack #1372
September 27, 2026 15:28
Tests for the previous PR's behavior. Tests that only restated types, literals or other tests are deleted. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
gewenyu99
force-pushed
the
posthog/functional-c2c-control
branch
from
September 29, 2026 03:42
fd1b0b8 to
3878185
Compare
This was referenced Sep 29, 2026
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The logic in #1313 gives each host one job:
runProgramruns a program on its session store, the TUI and headless hosts resolve an exit code, and only the CLI exits. Tools run on their own throughrunTuiTool. Those behaviors need tests that fail when they break. Some older tests only check what the compiler already guarantees, or compare a literal with itself. They cost review time and lock nothing.Changes
This PR adds the tests for the behavior #1313 introduces, and deletes the tests that lock nothing. It touches test files only. The suite goes from 3,260 to 3,515 tests.
src/tui/__tests__/screen-exits.test.tsxdrives every screen to its exit by keyboard and checks the code it passes torequestExit.src/tui/__tests__/run.test.tscoversrunTuiTool, Ctrl-C exiting 130, and an abort resolving once its outro is dismissed.src/tui/__tests__/run-program-on-screens.test.tscoversrunProgramOnScreens.src/headless/__tests__/run.test.tscovers a headless run, including a signal resolving 143.src/headless/control/__tests__/server.test.ts,src/tui/control/__tests__/control.test.tsandsrc/programs/session/__tests__/control.test.tscheck thatsessionControlTargetroutes every public store method, and that partial control refuses setters.src/cli/__tests__/mcp-cli.test.tscoversmcpCommand,control-flags.test.tscovers the control flags, andsrc/cli/runners/__tests__/signals.test.tscovers how signals end a run.runDoctorReportandaddMcpServerresolve 0 or 1 (src/tools/doctor/__tests__/report.test.ts,src/tools/mcp/__tests__/console.test.ts).tuiWorkflow,AGENT_SKILL_STEPS, the program and tool flows,logIn,missingOAuthScopes,extractZipArchiveandextractBundle(zip-slip is rejected).src/agent/__tests__/warlock-smoke.no-jest.tsscans one fixture per category with the real@posthog/warlockpackage.vi.mock(import('…'))replaces string paths in the touched tests, so a mock whose path stops resolving fails to compile.src/agent/__tests__/commandments.test.ts,src/shared/errors/__tests__/codes.test.ts, part ofhandoff-schema-parity.test.ts, and the stale snapshots forpost-auth-gatesandflow-traces.Stack: #1311 moves, #1369 contracts, #1313 logic, #1370 tests, #1315 fences, #1371 docs.
Test plan
On this PR's tree:
pnpm exec tsc --noEmit: 0 errors.pnpm exec vitest run: 3,515 tests pass.pnpm test:warlockrunswarlock-smoke.no-jest.tsfrom build: C2d — fence every layer with TypeScript project references #1315 on, where the script points at the new path.Created with PostHog Desktop