notebook-query: migrate to StyleFamily + PlannerStyleExt (fix main build)#107
Conversation
… drift)
lance-graph-planner (PR #688 upstream) reshaped the thinking-style API:
- the 12-family orchestration space is now `StyleFamily` (canonical type in
lance_graph_contract::style_family, re-exported from thinking::style);
- `ThinkingStyle` became a deprecated alias for it;
- the planner-local semantics `cluster()` and `default_modulation()` moved
onto the `PlannerStyleExt` extension trait (StyleFamily is a foreign
contract type, so the methods can't be inherent).
Against the pinned lance-graph this broke the `planner`-feature build of the
cockpit-server: 4 E0599 "method not found on &StyleFamily" errors in
diagnostics.rs (the trait was not in scope) plus 33 deprecation warnings.
Migrate both consumers to the canonical type:
- diagnostics.rs: import `{PlannerStyleExt, StyleFamily}`; the all_styles
array uses `StyleFamily::*`. Trait in scope -> cluster()/default_modulation()
resolve.
- lib.rs: the style-name match constructs variants only, so import
`StyleFamily` (no trait needed) and use `StyleFamily::*`.
Verified: `cargo build -p notebook-query --features planner` finishes clean
against lance-graph origin/main (the commit Railway builds) — 0 errors, and
the 33 ThinkingStyle deprecation warnings are gone.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jEwwaT5JZ5x8qWvcnaMYC
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1876801a-dbdc-4cdc-99dd-040dc5d3de55) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPlanner style construction now uses the canonical ChangesPlanner style family migration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
What
Fixes the broken
cockpit-serverbuild onmain(Railway):Why
lance-graph-planner(upstream PR #688, which Railway now builds against) reshaped the thinking-style API:StyleFamily(canonical type inlance_graph_contract::style_family, re-exported fromthinking::style);ThinkingStylebecame a deprecated alias for it;cluster()anddefault_modulation()moved onto thePlannerStyleExtextension trait —StyleFamilyis a foreign (contract) type, so those methods can no longer be inherent.Against the pinned lance-graph this broke the
planner-feature build: 4E0599"method not found on&StyleFamily" errors indiagnostics.rs(the trait was not in scope), plus 33ThinkingStyledeprecation warnings acrossdiagnostics.rsandlib.rs.The fix
Migrate both consumers off the deprecated alias to the canonical type:
diagnostics.rs— import{PlannerStyleExt, StyleFamily}; theall_stylesarray usesStyleFamily::*. With the trait in scope,cluster()/default_modulation()resolve.lib.rs— the style-name match only constructs variants, so it importsStyleFamily(no trait needed) and usesStyleFamily::*.No behavior change —
StyleFamilyis the typeThinkingStylealiased, so the variants, theplan_with_stylecalls, and the modulation fields are identical.Verification
cargo build -p notebook-query --features planner, run againstlance-graphorigin/main(the exact commit Railway builds —757c3e8):0 errors; the 33
ThinkingStyledeprecation warnings are gone. The 7 remainingnotebook-querywarnings are pre-existing and unrelated (unusedHashMap/Instantimports, a deadnode_typefield).Rust-only change to a stub crate; no
quarto-core/ WASM surface touched.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit