Skip to content

keep-web: order after network-online.target when dialing the state relay#94

Merged
kwsantiago merged 1 commit into
mainfrom
keep-web-network-online
Jul 12, 2026
Merged

keep-web: order after network-online.target when dialing the state relay#94
kwsantiago merged 1 commit into
mainfrom
keep-web-network-online

Conversation

@kwsantiago

Copy link
Copy Markdown
Contributor

What

Order the keep-web unit after network-online.target (with a matching wants) when stateRelay is set, instead of only after network.target.

Why

With keep-state replication enabled, keep-web dials out to the Nostr state relay at startup. network.target only means networking has been configured, not that it is routable — so on a real boot the daemon can start before the network is actually up and fail its initial dial. network-online.target is the correct ordering for a service that makes outbound connections (and pulls in the wait-online service).

The ordering is gated on stateRelay != null, so a purely-local keep-web (no outbound dial) is not delayed at boot.

Until now this was masked only by Restart=on-failure — a retry loop papering over a boot race, not a fix.

Verification

Evaluated the unit for both cases:

stateRelay after wants
set network.target, network-online.target network-online.target
null network.target (none)

Matches intent exactly. The keep-state-replication VM test (which sets stateRelay) exercises this path.

Closes keep-node-pw5.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 23 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: c21c356b-6318-4529-86cb-7951ef79ca82

📥 Commits

Reviewing files that changed from the base of the PR and between 1d7695d and 645b852.

📒 Files selected for processing (1)
  • nixos/keep-web.nix
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch keep-web-network-online

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.

@kwsantiago
kwsantiago merged commit 8612665 into main Jul 12, 2026
37 checks passed
@kwsantiago
kwsantiago deleted the keep-web-network-online branch July 12, 2026 02:15
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