fix(core): collect fields when reusing setup token - #955
Merged
ralyodio merged 1 commit intoAug 12, 2026
Conversation
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.
Reproduction
tokenSetup()returns immediately after a user confirms reuse of an existing token. That skips every configuredfieldsprompt. A Telegram setup with an existingTELEGRAM_BOT_TOKEN, for example, reports success as{ ok: true, config: {} }instead of collectingchatId;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:
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.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.