Skip to content

fix(deploy): cover integration connect preflight#110

Merged
khaliqgant merged 2 commits into
mainfrom
codex/deploy-v1-review-feedback-workforce
May 13, 2026
Merged

fix(deploy): cover integration connect preflight#110
khaliqgant merged 2 commits into
mainfrom
codex/deploy-v1-review-feedback-workforce

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

Follow-up to merged workforce#109 review feedback.\n\nWhat changed:\n- Added deploy-loop coverage for missing github+notion integrations where both connect successfully and deploy proceeds.\n- Added deploy-loop coverage where one integration connect fails and deploy aborts before launch.\n- Wired --no-prompt into the integration preflight path so missing integrations fail immediately with clear guidance and without opening a connect flow.\n\nVerification:\n- corepack pnpm --filter @agentworkforce/deploy test

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d983b79a-8d59-44e9-961f-d7d15eb12208

📥 Commits

Reviewing files that changed from the base of the PR and between a21c0c7 and 079f2f4.

📒 Files selected for processing (2)
  • packages/deploy/src/connect.test.ts
  • packages/deploy/src/connect.ts

📝 Walkthrough

Walkthrough

Adds an optional --no-prompt path: ConnectAllInput gains noPrompt, connectIntegrations aborts early (records a failed outcome or throws for subscription flows) when a provider is not connected and noPrompt is set; deploy forwards the flag and tests validate behaviors.

Changes

no-prompt integration connection fail-fast

Layer / File(s) Summary
noPrompt flag definition and connection handler
packages/deploy/src/connect.ts
ConnectAllInput gains noPrompt?: boolean. connectIntegrations detects noPrompt when a provider is not connected, records a failed outcome with message not connected (--no-prompt was set), returns early (skipping further providers), and for persona.useSubscription flows throws when subscription connectivity cannot be established without prompting.
Deploy function integration
packages/deploy/src/deploy.ts
deploy() forwards opts.noPrompt into connectAndCollectIntegrations (passes { noPrompt: true } when --no-prompt is present).
Integration connection test coverage
packages/deploy/src/deploy.test.ts, packages/deploy/src/connect.test.ts
Added test helpers (successfulBundleStager, successfulDevLauncher) and tests: successful connection of multiple missing integrations before launch; abort when an integration connect fails (logs provider-specific error, does not launch); and fail-fast when --no-prompt is set (checks only first provider, does not call connect, aborts mentioning --no-prompt was passed). Also a unit test asserting connectIntegrations honors noPrompt for subscription setup (rejects, does not call io.confirm or subscription connect).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped in with a flag held tight,
"No prompts today," I cried outright.
If a provider's missing, we won't stall—
fail fast, log loud, skip the call.
Tests bundled, launcher waits no more, I bounce away—encore! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding test coverage and implementing the --no-prompt flag for the integration connection preflight step in the deploy process.
Description check ✅ Passed The description is directly related to the changeset, detailing the test coverage additions, the --no-prompt wiring, and verification steps that align with the code changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/deploy-v1-review-feedback-workforce

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

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.

🔴 noPrompt flag not checked in subscription section, allowing interactive prompt despite --no-prompt

When noPrompt is true but all declared integrations are already connected, the integration loop completes normally and execution falls through to the subscription check (line 250). The subscription section at line 259-264 only gates on input.noConnect, not input.noPrompt. If the subscription is not connected, input.io.confirm(...) is called at line 265, prompting the user interactively — directly contradicting the --no-prompt flag whose documented purpose is "Fail instead of prompting for cloud auth/integration setup" (packages/deploy/src/types.ts:24-25). In a CI/non-interactive environment this would block waiting on stdin.

(Refers to lines 259-264)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Resolve the connect.ts conflict with the integration auth fail-fast changes and make subscription provider setup honor --no-prompt without prompting.
@khaliqgant khaliqgant merged commit cb3165d into main May 13, 2026
2 checks passed
@khaliqgant khaliqgant deleted the codex/deploy-v1-review-feedback-workforce branch May 13, 2026 16:45
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.

1 participant