Skip to content

notebook-query: migrate to StyleFamily + PlannerStyleExt (fix main build)#107

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/fix-notebook-query-stylefamily
Jul 13, 2026
Merged

notebook-query: migrate to StyleFamily + PlannerStyleExt (fix main build)#107
AdaWorldAPI merged 1 commit into
mainfrom
claude/fix-notebook-query-stylefamily

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 13, 2026

Copy link
Copy Markdown
Owner

What

Fixes the broken cockpit-server build on main (Railway):

error[E0599]: no method named `default_modulation` found for reference `&StyleFamily`
error[E0599]: no method named `cluster` found for reference `&StyleFamily`  (×3)

Why

lance-graph-planner (upstream PR #688, which Railway now builds against) 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 those methods can no longer be inherent.

Against the pinned lance-graph this broke the planner-feature build: 4 E0599 "method not found on &StyleFamily" errors in diagnostics.rs (the trait was not in scope), plus 33 ThinkingStyle deprecation warnings across diagnostics.rs and lib.rs.

The fix

Migrate both consumers off the deprecated alias to the canonical type:

  • diagnostics.rs — import {PlannerStyleExt, StyleFamily}; the all_styles array uses StyleFamily::*. With the trait in scope, cluster() / default_modulation() resolve.
  • lib.rs — the style-name match only constructs variants, so it imports StyleFamily (no trait needed) and uses StyleFamily::*.

No behavior change — StyleFamily is the type ThinkingStyle aliased, so the variants, the plan_with_style calls, and the modulation fields are identical.

Verification

cargo build -p notebook-query --features planner, run against lance-graph origin/main (the exact commit Railway builds — 757c3e8):

warning: `notebook-query` (lib) generated 7 warnings   # pre-existing, unrelated
warning: `lance-graph` (lib) generated 8 warnings
    Finished `dev` profile [optimized + debuginfo] target(s) in 18m 21s

0 errors; the 33 ThinkingStyle deprecation warnings are gone. The 7 remaining notebook-query warnings are pre-existing and unrelated (unused HashMap/Instant imports, a dead node_type field).

Rust-only change to a stub crate; no quarto-core / WASM surface touched.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Refactor
    • Updated planner style handling to use the current style family definitions.
    • Preserved existing style options, ordering, parsing behavior, and default fallback behavior.
    • Improved compatibility for planner style extensions without changing the user-visible functionality.

… 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
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cf1edc41-1887-496d-9e54-8b8e088ae2c3

📥 Commits

Reviewing files that changed from the base of the PR and between c1a8cb8 and afb0a16.

📒 Files selected for processing (2)
  • crates/stubs/notebook-query/src/diagnostics.rs
  • crates/stubs/notebook-query/src/lib.rs

📝 Walkthrough

Walkthrough

Planner style construction now uses the canonical StyleFamily type across option parsing and diagnostic analysis, while preserving supported names, fallback behavior, and the twelve-style ordering.

Changes

Planner style family migration

Layer / File(s) Summary
Style override selection
crates/stubs/notebook-query/src/lib.rs
Style override strings now construct StyleFamily variants, with the analytical default retained for unknown values.
Demo style enumeration
crates/stubs/notebook-query/src/diagnostics.rs
Diagnostic analysis uses PlannerStyleExt and enumerates the same twelve styles through StyleFamily.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: claude, cursoragent

Poem

I’m a rabbit with styles in a row,
Twelve bright paths ready to go.
Deprecated names hop away,
Canonical families guide the day.
Planner and demo now flow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating notebook-query to StyleFamily and PlannerStyleExt to fix the build.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI merged commit e67cc2f into main Jul 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants