Skip to content

refactor(up): modernize WithSignals with signal.NotifyContext#684

Merged
skevetter merged 1 commit into
mainfrom
refactor/with-signals-notifycontext
Jul 18, 2026
Merged

refactor(up): modernize WithSignals with signal.NotifyContext#684
skevetter merged 1 commit into
mainfrom
refactor/with-signals-notifycontext

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Modernizes WithSignals in cmd/workspace/up/up.go to use signal.NotifyContext (Go 1.16+) for first-signal cancellation, instead of the hand-rolled context.WithCancel + signal-forwarding goroutine. This matches the pattern already used elsewhere in the repo (cmd/internal/daemon_local.go, cmd/internal/agentcontainer/daemon.go).

The two-signal behavior is preserved: the first signal cancels the context (so deferred cleanup runs), and a second signal forces os.Exit(1) via a small watchForForceShutdown helper.

No behavior change.

Context

Extracted from #603 per review feedback to keep that PR focused on the devsy ci feature. This is a prerequisite refactor and targets main directly.

Replace the hand-rolled context.WithCancel + signal goroutine with
signal.NotifyContext for first-signal cancellation, matching the pattern
already used in cmd/internal. The second-signal force-exit behavior is
preserved via a small watchForForceShutdown helper. No behavior change.
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 995c155
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a5bb14eb8887d0008565769

@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 995c155
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a5bb14e1283210008bf51f7

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@skevetter, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cf9709c6-99d2-48c4-88d2-b5c4bec337d1

📥 Commits

Reviewing files that changed from the base of the PR and between 789ddd8 and 995c155.

📒 Files selected for processing (1)
  • cmd/workspace/up/up.go

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.

@skevetter
skevetter enabled auto-merge (squash) July 18, 2026 17:48
@skevetter
skevetter merged commit aa28ea2 into main Jul 18, 2026
64 checks passed
@skevetter
skevetter deleted the refactor/with-signals-notifycontext branch July 18, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant