fix(quorum): prefer slash-path providers.json so Daintree slots are visible#165
Conversation
…isible quorum-preflight.cjs and call-quorum-slot.cjs both searched for providers.json at __dirname (nf-bin/) first, then ~/.claude/nf-bin/. But /nf:link-daintree writes preset-cloned slots to the slash path (~/.claude/nf/bin/) — which is also what mcpServers UNIFIED_PROVIDERS_CONFIG references and the canonical runtime source. The dash path lags behind for Daintree fan-out additions. Result: every quorum run silently omitted Daintree-imported slots. Reported live today — /nf:quorum dispatched 5 slots (codex-1, gemini-1, opencode-1, copilot-1, claude-1) when 7 were available (claude-z-ai and claude-minimax missing from the team JSON). Fix: prefer the slash path in both findProviders helpers. Also skip empty files (the shipped repo source is empty by design) so resolution falls through to the next candidate instead of returning a no-slots list. Verified: `quorum-preflight.cjs --team` now returns all 7 slots after syncing the fix; previously returned 5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WalkthroughBoth ChangesProvider discovery and health probing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bin/quorum-preflight.cjs (1)
297-310: ⚡ Quick winLayer 2 constraint correctly isolates HTTP probing; update outdated documentation.
Layer 2 is correctly constrained to HTTP-only slots. Non-HTTP (CLI/CCR) slots skip Layer 2 with
reason: 'no upstream API'and remain healthy/unhealthy based on Layer 1 (binary probe) and Layer 3 (inference history fromquorum-failures.json). No existing workflows are broken—health detection for all slot types is intact.However, the file header comment (line 22) still documents Layer 2 as "Upstream API probe — GET /models for ccr-backed slots," which contradicts the implementation. Update it to reflect that Layer 2 is HTTP-only.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bin/quorum-preflight.cjs` around lines 297 - 310, Update the file header comment that currently reads "Upstream API probe — GET /models for ccr-backed slots" to accurately reflect the implementation that Layer 2 is HTTP-only: note that Layer 2 probes use baseUrl/apiKey for HTTP slots (isHttp true), and non-HTTP slots are skipped (layer2Promise resolves with { ok: true, skipped: true, reason: 'no upstream API' } or 'baseUrl not configured'). Mention that Layer 2 is skipped for CLI/CCR slots and that health for those slots is determined by Layer 1 and Layer 3 (binary probe and quorum-failures.json/inference history), so the header comment aligns with the behavior around isHttp, layer2Promise, baseUrl and apiKey.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@bin/quorum-preflight.cjs`:
- Around line 297-310: Update the file header comment that currently reads
"Upstream API probe — GET /models for ccr-backed slots" to accurately reflect
the implementation that Layer 2 is HTTP-only: note that Layer 2 probes use
baseUrl/apiKey for HTTP slots (isHttp true), and non-HTTP slots are skipped
(layer2Promise resolves with { ok: true, skipped: true, reason: 'no upstream
API' } or 'baseUrl not configured'). Mention that Layer 2 is skipped for CLI/CCR
slots and that health for those slots is determined by Layer 1 and Layer 3
(binary probe and quorum-failures.json/inference history), so the header comment
aligns with the behavior around isHttp, layer2Promise, baseUrl and apiKey.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 757e981e-19f0-4c9c-84ec-b11bfeea3c9a
📒 Files selected for processing (2)
bin/call-quorum-slot.cjsbin/quorum-preflight.cjs
Summary
/nf:quorumsilently omitted Daintree-imported slots from the team. Reported live today — a fresh-session quorum run dispatched 5 slots (codex-1, gemini-1, opencode-1, copilot-1, claude-1) when 7 were available (claude-z-ai, claude-minimax missing from the team JSON).Root cause
quorum-preflight.cjs --teamreads providers.json from one of:__dirname/providers.json(=~/.claude/nf-bin/)~/.claude/nf-bin/providers.json(same as 1 in installed state)But
/nf:link-daintreewrites preset-cloned slots to~/.claude/nf/bin/providers.json(slash) — which is also what mcpServers'UNIFIED_PROVIDERS_CONFIGreferences and the canonical runtime source. The dash path lags behind for fan-out additions.So the preflight saw 5 slots, never the 7 the user actually had.
Fix
Both
quorum-preflight.cjsandcall-quorum-slot.cjs:findProviders().Verified live
Test plan
npm run test:ci— 1550 pass, 0 fail--teamnow returns all 7 slots/nf:quorum <q>includes claude-z-ai/claude-minimax in available slots🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Improvements