Skip to content

fix(server): explain host CLI failures when PR watches stop - #35145

Open
ironyh wants to merge 3 commits into
pingdotgg:mainfrom
ironyh:fix/pr-watch-host-error
Open

ironyh wants to merge 3 commits into
pingdotgg:mainfrom
ironyh:fix/pr-watch-host-error

Conversation

@ironyh

@ironyh ironyh commented Nov 12, 2026

Copy link
Copy Markdown

An already-active PR watch loses PullRequestUnavailableError when it gives up after eight failed host reads. A missing or unauthenticated server CLI therefore produces only "could not read it", encouraging another watch attempt without fixing the blocker. This was observed with a Windows T3 server whose Gitea CLI was missing while repository access from WSL worked.

Carry the final typed CLI failure into the stop notification and tell the agent to install/authenticate the host CLI in the T3 Code server environment before rearming. Only two files change. Retry limits, watch termination, other failures, and watch registration keep their existing behavior; raw causes and subprocess output never enter the wake.

This complements #33389 (registration preflight) and #32694 (ongoing forbidden/unauthenticated provider access), which do not cover these ongoing cli-missing/cli-unauthenticated diagnostics.

Verification

  • Before the fix: the four added CLI cases failed with the generic summary; five existing cases passed. The final table also exercises activity-only CLI failures.
  • Final head 0286cbfb5e, based on dd9c2f8e21: 160/160 tests passed across runtimeLayer.test.ts and AgentContextBudget.test.ts. Format, lint, both Knip passes, GraphQL generation check, and Effect-tsgo typechecks for all three affected packages passed.
  • Direct reactor runtime with synthetic host I/O: each CLI category produced watching:false, exactly one wake, its specific summary, and server-environment recovery guidance after eight failures. No live installation or credentials were changed for verification.
  • One independent read-only diff review found no actionable defects.

vp run check:changed --concurrency 2 was attempted but its cache-input Git enumeration recursively traversed pnpm junctions on Windows, emitted Filename too long warnings, and was stopped before gates started. Its selected gates listed above were run separately and passed on the final head. Paid model evals were not run: this checkout has neither an Anthropic key nor the eval harness's vibeproxy configuration. The changed wake has not been exercised through a real agent turn.

Written with gpt-6.1-sol in the Codex harness; independently reviewed with gpt-6-luna.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 12, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 0286cbf

Macroscope's review found this PR approvable — Stopped PR watches now explain when the server’s host CLI is missing or unauthenticated and provide targeted recovery guidance. Existing retry thresholds and watch-stop behavior remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull-request watch now passes read failure causes to its stop handler. For applicable unavailable-host errors, it uses the host-provided message and a host-setup summary. Tests cover unauthenticated access and verify that private subprocess output is excluded.

Changes: Pull request watch failure guidance

Layer / File(s) Summary
Cause-aware stop messages
apps/server/src/orchestration-v2/PullRequestWatchReactor.ts, apps/server/src/orchestration-v2/runtimeLayer.test.ts
At the read-failure limit, the watch passes each target’s cause to giveUp. For unavailable-host errors other than provider-unsupported, the stop text uses the host-provided message and reports that the host is not set up. Tests cover unauthenticated access and confirm that the notification omits private subprocess output.

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

Change: Bug fix

Suggested reviewers: juliusmarminge, t3dotgg

Merge Risk: Minimal · up to caf2c

When a pull request watch stops after repeated host read failures, the stop message now uses the host's own setup guidance for missing or unauthenticated access. Existing retry and stop behavior is unchanged. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: when PR watches stop after host CLI failures, the stop notification now explains the host CLI problem. It follows the conventional commit format from the template. The…
Description check Passed The description follows the template well. It states the problem, the change, the scope (bug fix, with a related-issue context via #33389 and #32694 but no direct issue link), and detailed verificatio…
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: Title check

Explanation

The title names the main change: when PR watches stop after host CLI failures, the stop notification now explains the host CLI problem. It follows the conventional commit format from the template. The title is specific and matches the raw summary and PR objectives.

Full details: Description check

Explanation

The description follows the template well. It states the problem, the change, the scope (bug fix, with a related-issue context via #33389 and #32694 but no direct issue link), and detailed verification with results. It includes the agent/model attribution the template asks for. The Scope section does not link a bug-report issue or explain why none is needed, which is a minor gap.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0286cbf and caf2c9d.

Files selected for processing: 2

  • apps/server/src/orchestration-v2/PullRequestWatchReactor.ts
  • apps/server/src/orchestration-v2/runtimeLayer.test.ts

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

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 14, 2026
juliusmarminge and others added 2 commits November 14, 2026 17:55
Use the PullRequestUnavailableError message, which carries each host's
requirement text, instead of fixed "host CLI" wording that is wrong for
token and API-credential hosts. Trim the test to one case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Nov 14, 2026
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants