Repository navigation
fix(server): allow more time for Pi model discovery - #15529
MarcusNeufeldt wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This focused fix increases the default Pi RPC discovery deadline from 15 to 30 seconds, changing startup behavior for existing users while delaying fallback on stalled discovery. Because it changes a product default, human review is required under the applicable policy. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughPi RPC discovery now waits up to 30 seconds before applying the existing timeout handling. Tests cover delayed startup that completes within the timeout and startup that exceeds it. ChangesPi RPC discovery
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Pi model discovery has more time to include extension models while retaining the existing timeout fallback. No actionable merge-blocking risk is established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The startup wait remains bounded, and existing failure handling and cleanup are preserved. Each attempt may now run twice as long; the limits on simultaneous attempts across separate configurations have not been fully established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
Problem
Pi's model picker can fall back to only the default and manually configured models when an extension-heavy Pi installation takes too long to start. Expected behavior is to discover the user's configured models, including extension-registered providers.
This occurred on Windows with T3 nightly
0.0.46-nightly.20261004.2644and Pi0.99.1. The provider cache showed the discovery-timeout fallback. Direct RPC probes returned 543 models and took 12.2 to 13.9 seconds to start, leaving little headroom under the 15-second deadline. This larger configuration may expose a startup limit that a minimal setup does not. Model count alone has not been established as the cause.Change
Increase the Pi RPC discovery deadline from 15 to 30 seconds. Successful discovery still returns immediately, with no fixed delay. Keep extensions enabled so their registered models remain available.
The production change is one constant. Tests cover successful discovery after a 20-second startup and fallback for a stalled startup. The mock executable name avoids resolving an installed Windows
pi.cmdduring these tests.Scope and approval
Submitted under the small, focused bug-fix exception. This restores existing model discovery for a supported Pi setup without introducing a feature, setting, dependency, or alternate discovery path. The deadline remains bounded. No prior maintainer approval is claimed.
Verification
pnpm exec vp test run apps/server/src/provider/Layers/PiProvider.test.ts: all four tests pass, including stalled-startup fallback and existing compatibility checks.vp lint,vp fmt --check, andgit diff --check: pass.Full typecheck, the full suite, and other operating systems were not checked. Direct-probe timings are not exact measurements of the failed T3 startup.
Model: GPT-6.1 Sol. Harness: Pi.