Skip to content

fix(core): collect fields when reusing setup token - #955

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
evanbrown3000:fix/token-setup-reuse-fields
Aug 12, 2026
Merged

fix(core): collect fields when reusing setup token#955
ralyodio merged 1 commit into
profullstack:masterfrom
evanbrown3000:fix/token-setup-reuse-fields

Conversation

@evanbrown3000

Copy link
Copy Markdown
Contributor

Reproduction

tokenSetup() returns immediately after a user confirms reuse of an existing token. That skips every configured fields prompt. A Telegram setup with an existing TELEGRAM_BOT_TOKEN, for example, reports success as { ok: true, config: {} } instead of collecting chatId; runSetup() then persists that empty config and subsequent sends have no chat ID. The same control flow drops GitHub/Gitea owner and repo fields and the GitLab project ID.

The new regression test reproduces this by supplying an existing token, confirming reuse, and then supplying the required Telegram chat ID. Before the fix it fails with:

Expected: { ok: true, config: { chatId: "-1001234567890" } }
Received: { ok: true, config: {} }

Fix

Reuse now skips only the token instructions and token prompt. Setup continues through the existing field-collection loop, preserving the token while returning the required adapter configuration. Fresh-token and token-replacement paths retain their prior behavior.

Verification

  • corepack pnpm exec vitest run packages/core/src/setup-helpers.test.ts packages/core/src/config-store.test.ts packages/core/src/exec.test.ts packages/core/src/mcp-server.test.ts — 4 files passed, 6 tests passed, 1 platform-specific skip.
  • Rebuilt core, then corepack pnpm exec vitest run packages/core packages/vcs packages/webhooks — 12 files passed, 59 tests passed, 1 platform-specific skip.
  • corepack pnpm --filter @profullstack/sh1pt-core typecheck — passed.
  • git diff --check — passed.

@ralyodio
ralyodio merged commit 396e7e0 into profullstack:master Aug 12, 2026
6 checks passed
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