Skip to content

fix(ssh): log an unanswered native-deps probe instead of launching silently - #18000

Merged
nwparker merged 3 commits into
mainfrom
fix/native-deps-probe-unverifiable-log
Sep 2, 2026
Merged

nwparker merged 3 commits into
mainfrom
fix/native-deps-probe-unverifiable-log

Conversation

@nwparker

@nwparker nwparker commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​13 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10

Follow-up to #17979 (merged). Addresses valid review feedback: the fix made a real transport failure silent.

ELI5

#17979 stopped an unanswered native-deps probe from wiping a healthy relay. But the wrongful rebuild was the only visible symptom of a dropped exec channel — it surfaced as a loud Repairing missing native deps warning plus a visible build. Removing it means a genuine transport failure now leaves zero trace: the relay just launches.

This adds a console.warn on the unverifiable path, so lost contact is still reported without being acted on destructively.

The install-path sibling already does this — its callers log the same class of failure as [NATIVE-DEPS-REBUILD-FAIL] / [NPTY-MISSING]. This is the repair path catching up to it, which is the same twin-asymmetry that produced #17979 itself.

console.warn(
  `[ssh-relay] Native deps probe unanswered at ${remoteDir}; launching without repair: ${…}`
)

The error message is included, so a torn channel and a timed-out require() are distinguishable in logs.

User-facing regressions

None. Log-only — no control flow, no repair decision, no lock handling changes. The relay still launches exactly as #17979 made it.

Testing

Extends the existing launches an intact relay when the health probe never answers case rather than adding a parallel one, so the trace assertion sits directly beside the repair-avoidance assertions it complements.

Before (production change reverted, test in place):

 × launches an intact relay when the health probe never answers 4ms
AssertionError: an unanswered probe must still leave a trace: expected false to be true
    153|       'an unanswered probe must still leave a trace'
      Tests  1 failed | 3 passed (4)

After:

 Test Files  1 passed (1)
      Tests  4 passed (4)

pnpm tc:node clean. check:code-quality:changed → 0 new findings across 2 files.

Credit

Caught by automated review on #17979, which flagged that the install-path sibling surfaces this failure loudly while the repair path now swallows it. The observation was correct and worth acting on.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: d47b4d33-0626-4810-9e0e-24e6b8405618

📥 Commits

Reviewing files that changed from the base of the PR and between 817827b and f399778.

📒 Files selected for processing (3)
  • src/main/ssh/ssh-relay-deploy.ts
  • src/main/ssh/ssh-relay-native-deps-probe-verdict.test.ts
  • src/renderer/src/i18n/locales/en.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 1d18b58e-fc53-4c67-bfd2-1f2fb9676726

📥 Commits

Reviewing files that changed from the base of the PR and between bbcb7a1 and a5c47e5.

📒 Files selected for processing (2)
  • src/main/ssh/ssh-relay-deploy.ts
  • src/main/ssh/ssh-relay-native-deps-probe-verdict.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The native dependency probe now binds unanswered probe errors and logs a warning with the error text and relay directory. The probe still returns { status: 'unverifiable', missing: [] }. The relay deployment test now verifies that the warning contains Native deps probe unanswered.

Merge Risk: ⚪ Minimal · up to a5c47

The change only records a warning when the native-dependencies probe cannot be verified and does not alter relay launch or repair behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, implementation, behavior, and testing, but it omits several required template sections and checklist items. It does not include the required What Changed, Why, Li… Complete the required template sections. Add What Changed and Why, use an explicit linked issue entry such as "Fixes #17979" or explain the applicable relationship, add "N/A" with a reason for Visual Proof, complete or mark applicable AI Di…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: logging unanswered SSH native-dependencies probes instead of launching silently.
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.
Full details: Description check

Explanation

The description explains the problem, implementation, behavior, and testing, but it omits several required template sections and checklist items. It does not include the required What Changed, Why, Linked Issue, Visual Proof with an explicit N/A statement, AI Disclosure, Review, Agent skill upstream boundary, Notes, or Checklist sections.

Resolution

Complete the required template sections. Add What Changed and Why, use an explicit linked issue entry such as "Fixes #17979" or explain the applicable relationship, add "N/A" with a reason for Visual Proof, complete or mark applicable AI Disclosure and Agent skill upstream boundary sections, add Review and Notes responses, and complete the Checklist items.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@pullfrog pullfrog Bot 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.

ℹ️ Minor suggestions inline.

Reviewed changes

This run reviewed the addition of a console.warn trace on the unverifiable path of probeRequiredNativeDeps, plus a test assertion that the warning is emitted when a probe never answers. No control flow, repair decision, or lock handling changed.

  • Log an unanswered probe — probeRequiredNativeDeps now console.warns [ssh-relay] Native deps probe unanswered at … before returning unverifiable, so a dropped exec channel leaves a trace without triggering a destructive rebuild.
  • Trace assertion — the existing launches an intact relay when the health probe never answers case now also asserts the warning is present, sitting beside the repair-avoidance assertions it complements.

The test is real (it fails with the production line reverted, per the PR body), and console.warn with the [ssh-relay] prefix matches sibling logging in this file.

The one caveat is that the launching without repair claim is only true for the initial-probe call site — see the inline comment.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Comment thread src/main/ssh/ssh-relay-deploy.ts Resolved

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

This run reviewed the follow-up commit that resolves the prior review's inline feedback by rewording the unverifiable trace log.

  • Rephrased the unverifiable warning — the console.warn outcome clause changed from launching without repair to treating as unverifiable, which is accurate for both call sites: the initial probe launches as-is, while the locked re-probe still runs repair.
  • Adjusted the trace rationale comment — the // Why: note now states that the wrongful rebuild was the only visible symptom, rather than framing the log as "the silent path is the whole point."

The test is unchanged apart from a clarifying comment; the wording matches sibling logging in this file.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

…lently

The wrongful rebuild used to be the only visible symptom of a dropped exec
channel; #17979 removed it, so a real transport failure now leaves no trace.
Matches the install-path sibling, whose callers log the same class of failure.
@nwparker
nwparker force-pushed the fix/native-deps-probe-unverifiable-log branch from 3ccdc34 to f3261e5 Compare September 2, 2026 21:09
@nwparker

nwparker commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and re-applied on top rather than resolving by taking this branch's file.

The branch was stale on src/main/ssh/ssh-relay-deploy.ts, and its file content would have reverted #18011, #18033 and #17821. The conflict marker only covered the #18011 overlap; the other two sat outside it, so a "take ours" resolution would have silently dropped them. The final content is now main's file plus exactly these 9 lines:

-  } catch {
+  } catch (error) {
     signal?.throwIfAborted()
     // Why: an unanswered probe says nothing about the deps; ...
+    // Why: the wrongful rebuild was the only visible symptom, so without this line a dropped exec
+    // channel leaves no trace at all.
+    console.warn(
+      `[ssh-relay] Native deps probe unanswered at ${remoteDir}; treating as unverifiable: ${
+        error instanceof Error ? error.message : String(error)
+      }`
+    )
     return { status: 'unverifiable', missing: [] }

The change is still needed: main's catch is still a bare } catch {. #18011 added logging for the markerless-answer path only (NATIVE-DEPS-PROBE-UNPARSEABLE), not the throw path, so a dropped exec channel still leaves zero trace.

Wording adopted from the review: treating as unverifiable instead of launching without repair. The original was false at the second call site, where an unverifiable locked re-probe falls through to resetDeps = initialProbe.missing and runs installNativeDeps — and the new wording also prints the sanctioned verdict-vocabulary word.

Verified: pnpm tc, pnpm test src/main/ssh (1953 passing). The test fails without the source change (an unanswered probe must still leave a trace: expected false to be true).

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

This run reviewed the single commit landed since the prior pullfrog review, which restores an i18n key that a rebase dropped.

  • Restored activityOptions key — re-added activityOptions to the ActivityPrototypePage object in en.json with the missing trailing comma after showChildAgents. The key value is valid and matches the single consumer at activity-thread-options-menu.tsx:104 (auto.components.activity.ActivityPrototypePage.activityOptions); en.json now parses cleanly.

The SSH probe-logging changes from the earlier commits were already reviewed and approved; nothing about them changed in this delta.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker merged commit 07e1f95 into main Sep 2, 2026
27 of 28 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…lently (stablyai#18000)

* fix(ssh): log an unanswered native-deps probe instead of launching silently

The wrongful rebuild used to be the only visible symptom of a dropped exec
channel; stablyai#17979 removed it, so a real transport failure now leaves no trace.
Matches the install-path sibling, whose callers log the same class of failure.

* fix(i18n): restore the activity-options key the rebase dropped

* fix(i18n): union en.json with main so the rebase cannot drop keys
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