Skip to content

fix(warehouse): give the standalone command the same credential ask timeout - #1214

Open
Gilbert09 wants to merge 1 commit into
mainfrom
posthog/warehouse-command-ask-timeout
Open

fix(warehouse): give the standalone command the same credential ask timeout#1214
Gilbert09 wants to merge 1 commit into
mainfrom
posthog/warehouse-command-ask-timeout

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

The wizard collects data-source credentials in two places, through the same
skill and the same wizard_ask prompts:

  1. the orchestrator's seeded warehouse task, inside a normal wizard run, and
  2. npx @posthog/wizard warehouse — the command the outro points at when the
    user 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 database
console or minting a restricted API key, not on a model. The standalone
command never set askTimeoutMs, so it ran on the 5-minute default — a
quarter 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

  • New shared CREDENTIAL_ASK_TIMEOUT_MS (20 min) in wizard-ask-bridge.ts,
    next to DEFAULT_ASK_TIMEOUT_MS.
  • orchestrator-runner.ts's TASK_ASK_TIMEOUT_MS now reads it instead of
    inlining the value.
  • The warehouse program's run() sets askTimeoutMs to it, the same way the
    source-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

  • New warehouse-ask-timeout.test.ts asserts the resolved program run carries
    the shared allowance and that it exceeds the default.
  • pnpm build && pnpm test && pnpm fix — 2638 tests pass, lint clean.

Created with PostHog Desktop

…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
@Gilbert09
Gilbert09 requested review from a team as code owners September 5, 2026 11:57
Copilot AI lite review requested due to automatic review settings September 5, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run 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:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a Context Mill branch:

  • /wizard-ci all context-mill:my-branch

Add context-mill:<branch> to any command above to pin the Context Mill branch. It defaults to main.

Results will be posted here when complete.

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