Conversation
Run one wizard program through runProgram, or one agent through runAgent, against the wizard checkout in WIZARD_REPO. The package scripts start tsx with the checkout's tsconfig, so the wizard's path aliases resolve there. --check loads the modules a run needs and exits before any env read or request. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
runProgram is now host-only: it takes the run definition in input.run and the program-level settings in input.program, and drops integration effects and framework config. The program route builds both from the program's ProgramConfig, as the wizard's legacy adapter does: it calls run(session) on a session from buildSession, after it installs the headless UI that --ci installs. posthog-integration still detects its framework here, now onto the session that run(session) reads. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
The program route builds a ProgramRunHost from the headless UI, the way the wizard's legacy adapter does, and passes it to the program's run. Its program settings drop the audit and event-plan fields runProgram no longer takes. The agent route binds its run the way agentic detection does, with a switchboard context, and passes no inference auth. The runner mints its own gateway token from the personal key, so the harness no longer reads WIZARD_CI_GATEWAY_TOKEN_FILE or loads @shared/ci-gateway-auth. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
…m id The agent route minted its gateway token under e2e-agent, an id the gateway may refuse. Agentic detection passes its caller's real program id, so the route now defaults to posthog-integration. PROGRAM overrides it, as it does for the program route. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
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 wizard carried its own headless harness for running one program through
runProgram, or one agent throughrunAgent. The workbench owns the fixture apps and the assertions, so the harness belongs here, importing the callable API from a wizard checkout.Change
services/wizard-program/runs one program (pnpm wizard-program) or one agent on a localquackskill (pnpm wizard-agent) against the wizard checkout inWIZARD_REPO.--tsconfig "$WIZARD_REPO/tsconfig.json", so the wizard's path aliases (@programs,@agent,@shared/*) resolve against that checkout. Each alias must resolve insideWIZARD_REPO, and each module must export the names the route calls.--checkloads every module a run needs, prints where each one resolved, and exits before it reads credentials or makes a request.harness.test.tspins the shared env contract and runs in Checks.PostHog/wizard#1308 removes the wizard-side routes.
Checks
tsc --noEmitpasses.pnpm test:wizard-program: 6 of 6 pass.pnpm wizard-program --checkandpnpm wizard-agent --checkagainst refactor(programs): B4 runner context — programs stop calling getUI() wizard#1357 atcbbe9fa2, whoserunProgramtakes a run host and whoserunAgentmints its own gateway token, under a preload that makes any TCP connection, DNS lookup or fetch throw: both exit 0 with nothing blocked. A control fetch under the same preload was blocked.Created with PostHog Desktop