Skip to content

Fix degraded integration recovery guidance - #204

Open
willwashburn wants to merge 1 commit into
mainfrom
fix/203-degraded-connection-remediation
Open

Fix degraded integration recovery guidance#204
willwashburn wants to merge 1 commit into
mainfrom
fix/203-degraded-connection-remediation

Conversation

@willwashburn

@willwashburn willwashburn commented Jul 29, 2026

Copy link
Copy Markdown
Member

Fixes #203.

When Relayfile reports an integration as degraded after initial sync is already complete, Factory now directs the operator to have a workspace owner repair or reconnect the provider. It no longer tells them to wait for an initial sync that has finished.

Verification:

  • npx vitest run src/mount/relayfile-integration-preflight.test.ts (10 passed)
  • npm run build
  • git diff --check

Summary by cubic

Improve degraded integration recovery guidance by detecting when an integration is degraded after initial sync has completed. Operators now see clear instructions to ask a workspace owner to repair or reconnect the provider instead of waiting.

  • Bug Fixes
    • When state: degraded and initialSyncState: complete, show a repair/reconnect message and avoid the misleading “wait for initial sync” guidance.

Written for commit 5f1c2a4. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Relayfile preflight

Layer / File(s) Summary
Completed degraded-state handling
src/mount/relayfile-integration-preflight.ts, src/mount/relayfile-integration-preflight.test.ts
Completed degraded integrations now produce repair or reconnect guidance, with coverage confirming no connection or wait calls occur during dry-run preflight.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: khaliqgant

Poem

A rabbit found a sync gone gray,
“Don’t wait,” it thumped, “repair today!”
The preflight spoke with clearer cheer,
No needless OAuth hops appeared.
Fresh guidance now bounds through the burrow.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: handling degraded integrations with better recovery guidance.
Description check ✅ Passed The description matches the code changes and the linked issue's degraded-after-sync guidance update.
Linked Issues check ✅ Passed The changes implement #203 by detecting degraded, complete syncs and directing owners to repair or reconnect.
Out of Scope Changes check ✅ Passed The diff stays focused on the degraded-integration guidance and its test coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 fix/203-degraded-connection-remediation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/mount/relayfile-integration-preflight.test.ts (1)

135-155: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the new state-normalization path.

This fixture only uses canonical lowercase values, so it would still pass if .trim().toLowerCase() were removed. Add a mixed-case/whitespace case and assert the intended diagnostic formatting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/mount/relayfile-integration-preflight.test.ts` around lines 135 - 155,
Extend the test for ensureFactoryIntegrations with mixed-case and
surrounding-whitespace state values, such as state and initialSyncState, to
exercise the normalization path. Update the expected rejection assertion to
verify the diagnostic displays the normalized lowercase values, while preserving
the existing assertions that no connection or wait calls occur.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/mount/relayfile-integration-preflight.test.ts`:
- Around line 135-155: Extend the test for ensureFactoryIntegrations with
mixed-case and surrounding-whitespace state values, such as state and
initialSyncState, to exercise the normalization path. Update the expected
rejection assertion to verify the diagnostic displays the normalized lowercase
values, while preserving the existing assertions that no connection or wait
calls occur.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dead6eaa-169f-4cd9-bb0a-cc38f9cbe03c

📥 Commits

Reviewing files that changed from the base of the PR and between 565690e and 5f1c2a4.

📒 Files selected for processing (2)
  • src/mount/relayfile-integration-preflight.test.ts
  • src/mount/relayfile-integration-preflight.ts

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.

Integration preflight gives impossible wait advice for degraded completed syncs

1 participant