fix(test): relax dev_mode_port assertion to match get_daemon_port contract#103
fix(test): relax dev_mode_port assertion to match get_daemon_port contract#103
Conversation
…tract (closes #88) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 23 minutes and 21 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Superseded by #98 (same fix, merged independently). |
Closes #88.
crates/fbuild-paths/src/lib.rs:230assertedport == 8765 || port == 8865, butget_daemon_port()honorsFBUILD_DAEMON_PORTenv var and port-file entries — it can legitimately return any u16. Test was flaky whenever a stale port file existed (e.g.~/.fbuild/prod/daemon/daemon.portholding18900).Relaxed to
assert!(port > 0)to match the function's public contract. The in-source comment already stated the intent was "returns a valid port" — the strict assertion contradicted that.Test plan
uv run cargo test -p fbuild-paths --lib dev_mode_portuv run cargo test -p fbuild-paths(9 passing)uv run cargo clippy --workspace --all-targets -- -D warningsuv run cargo fmt --all -- --check🤖 Generated with Claude Code