fix(warehouse): give the standalone command the same credential ask timeout - #1214
Open
Gilbert09 wants to merge 1 commit into
Open
fix(warehouse): give the standalone command the same credential ask timeout#1214Gilbert09 wants to merge 1 commit into
Gilbert09 wants to merge 1 commit into
Conversation
…imeout The seeded warehouse task allows 20 minutes per credential question, on the reasoning that the user is being sent to a database console or an API-key page. `wizard warehouse` asks the same questions through the same skill and was left on the 5-minute default, so the fallback route the outro points declines and browser handoffs at gave a quarter of the time. Hoist the 20-minute allowance into `wizard-ask-bridge` as CREDENTIAL_ASK_TIMEOUT_MS and use it from both paths, so the two cannot drift again. Generated-By: PostHog Desktop Task-Id: 84b5b248-2d87-4c49-a31a-109eab181d07
🧙 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. |
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 collects data-source credentials in two places, through the same
skill and the same
wizard_askprompts:wizardrun, andnpx @posthog/wizard warehouse— the command the outro points at when theuser declines the in-run offer, and the route every source that falls back
to browser setup ends up on.
The seeded task allows 20 minutes per question, with an explicit rationale in
orchestrator-runner.ts: these questions wait on a person opening a databaseconsole or minting a restricted API key, not on a model. The standalone
command never set
askTimeoutMs, so it ran on the 5-minute default — aquarter of the allowance, for identical questions.
Past that timeout every unanswered field resolves to the cancellation
sentinel, which the task reads as "the user declined" and drops to its
browser-handoff fallback. A user who stepped away to fetch a password came
back to a prompt that had already given up. Timeouts at this prompt are
observable even with the 20-minute allowance, so the shorter one is not
theoretical — and it applies precisely to the recovery path we send people to
after the first attempt did not work out.
Changes
CREDENTIAL_ASK_TIMEOUT_MS(20 min) inwizard-ask-bridge.ts,next to
DEFAULT_ASK_TIMEOUT_MS.orchestrator-runner.ts'sTASK_ASK_TIMEOUT_MSnow reads it instead ofinlining the value.
run()setsaskTimeoutMsto it, the same way thesource-map upload and self-driving programs already raise theirs.
Shared rather than inlined on both sides because the drift is the bug: the two
routes ask the same questions and should not offer different allowances.
Nothing else changes — the cancellation contract, the ask cap and its refund,
and the browser fallback are all untouched.
Test plan
warehouse-ask-timeout.test.tsasserts the resolved program run carriesthe shared allowance and that it exceeds the default.
pnpm build && pnpm test && pnpm fix— 2638 tests pass, lint clean.Created with PostHog Desktop