Repository navigation
fix(pi): await model discovery before disabling configured chains - #656
Conversation
|
Harness coverage advisory: these conventional twins were not touched:
Cover every shipped harness or explain why the surface does not exist there. See CONTRIBUTING.md. This is advisory only; no draft state is changed. |
|
Design gate skipped: the |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks for this, and for the clear description of the startup race. Before review, please address the two open bot findings. They describe the same gap from two sides:
The re-check should be recorded as done only after the awaited refresh has finished, and it should read the model registry fresh at that point. A test that interleaves a second readiness check while the first refresh is still pending would cover both. Once the findings are resolved, we'll take it through review. |
|
Addressed both discovery race reports in 7ffeeff. Pending refreshes now defer every report; settled callbacks resolve current session/project state and check configuration generation. Three lifecycle regressions cover repeated events, session switching, and configuration replacement. All 12 focused tests, Pi-package typecheck, and build passed. OpenCode has no Pi ModelRegistry API: it receives historian chains from Rust and dispatches via server HTTP, so this registry-readiness defect has no equivalent in packages/plugin/src/index.ts. Refs #658 for maintainer design approval. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Follow-up: deferred reports now require the waiting project to match the active session, preserving the inactive project notice budget. The updated cross-project regression, all 12 focused tests, typecheck and build pass. |
|
Addressed post-refresh rejection handling in 1c423f8. The callback catches configuration-resolution failures and logs a warning. Regression proves no escaping rejection and a subsequent event still reports the settled catalogue. All 13 focused lifecycle tests and Pi typecheck passed. |
|
Thanks for the update; the race findings are resolved. One cubic finding is still open, from the new commit: the post-refresh callback ( |
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
View guided diff | Re-trigger cubic
|
Updated in ec989ba: prefer awaitInitialBackgroundRefresh when the host exposes it, which also waits when boot discovery has not started. Retain awaitBackgroundRefresh for older hosts. Regression covers session_start before discovery starts, verifies no premature warning, then hydrates the catalogue and settles discovery. 57 focused tests, typecheck and build pass. @coderabbitai review @greptileai review |
|
@cubic-dev-ai @greptile-apps Please review the latest head ec989ba, including the initial-background-discovery readiness change. |
@randomvariable I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Merged, thank you. It passed the full plugin, Pi and CLI suites on current master, and it ships in the next release. The only change on our side was a 2-line formatter fix (55ede24) so the lint gate passes. Issue 658 stays open until the release. |
Refs #658
Defer disabled model-chain reports until background provider discovery settles. Preserve correctness across concurrent lifecycle events and configuration/project changes.
Independent of PR #655. Initial standalone verification: typecheck and 53 focused tests. Review concurrency regressions are being addressed.

Confidence Score: 5/5
The PR appears safe to merge; both previous findings are fixed and no new blocking issues remain.Summary
The PR waits for model discovery before reporting configured chains as disabled.
Reviews (9) · Last reviewed commit: "style: format the model-chain generation..." · Reviewed by Greptile