Repository navigation
feat(runtime): preserve explicit reasoning effort in compiled plans - #76
Merged
Merged
Conversation
J6a: trusted configuration and profiles pin effort independently of Jev. Preserve omission, record descriptor 8 identity, distinguish cache overrides and reject unsupported adapters before auth. Workspace 1579 passed, 5 ignored; formatting, Clippy, build and independent reviews pass. Automatic routing and post-change routing qualification remain open.
lg2m
marked this pull request as ready for review
September 18, 2026 23:54
lg2m
added a commit
that referenced
this pull request
Sep 22, 2026
…122) Reasoning effort has been configurable since PR #76 (config + profiles), but only at plan-compile time; there was no way to see or change it from the TUI. This makes effort a first-class per-session control. Protocol 26: - `SessionCommand::CreateSession.reasoning_effort` (optional) - `SessionCommand::SetSessionEffort { session_id, effort }` - `CommandOutcome::SessionEffortSet` - `SessionSummary.reasoning_effort` (optional, omitted when unset) - `/effort` is reserved as a client slash command Omission keeps the compiled plan's configured/profile choice; an explicit value is applied at the next claimed run. Children inherit the parent pin. Store schema 34 adds nullable `sessions.reasoning_effort`, threaded through claim -> RuntimeLoadRequest so the runtime honours the pin. TUI: - `/effort` picker (default / none / minimal / low / medium / high / xhigh) - with a session focused: sets that session; refused mid-run like /profile - with nothing focused: becomes the default for the next CreateSession - `StatusItem::Effort` badge shows only when a pin is set Regression fix found on the way: every earlier migration guard listed "33" as already-applied but not "34", so a fully migrated store failed its second open with Persistence(Constraint). Added "34" to all guards and a reopen regression test that would have caught it. `ReasoningEffort` gains `ALL` and `as_str()` so the wire spelling has one source across codec, TUI, and pickers. Verification: cargo test --workspace, fmt --check, clippy -D warnings, qq-provider --no-default-features --features test-support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
J6a: preserve explicit reasoning effort
A configured effort choice now survives plan compilation and every model turn. Trusted top-level settings, profiles and runtime overrides use the existing provider transport; omission preserves provider defaults, and explicit
noneremains distinct.Stacked on #74 (
feat/eng-791-jev-opt-in, 1405ff0). This small follow-up is independently useful and establishes the pinned choice that optional routing must preserve. It does not implement automatic routing.Spec: J6. Tracking: ENG-791; tracker connector still requires reauthentication.
Behavior and compatibility
Verification
At ecc6a1f: 1,579 workspace tests passed, five ignored, zero failures.
env -u NO_COLOR cargo test --workspace --locked --offline --quiet, workspace formatting, all-target/all-feature Clippy with-D warnings, and workspace build passed using the shared target directory.Independent Spec and Standards reviews approved the bounded change. Tests cover omission versus explicit none, profile/override precedence, workspace re-trust, cache isolation, unsupported adapters and unchanged effort across a real tool turn.
Performance — unresolved gate
30 release A/B pairs against the retained #74 binary, plus 30 A/A pairs:
The tool-loop 5% gate is not met. Its sample p95 rose 71,741→85,339 ns. Same-binary control median changed −5.42% and p95 82,130→80,980 ns; host I/O some avg10 was 31.38–47.17%. A quiet-host repeat is required; these noisy results do not waive the gate or establish a Jev speed benefit. Raw evidence is untracked at
target/qq-perf/jev-effort-2026-09-18/paired.json.Docs and remaining work
ADR-0031, architecture/protocol docs, the Jev runbook, plan and ledger are updated. This PR remains draft pending performance and hosted qualification. J6b authorized automatic routing, its spend accounting, and J7 passive advisory observation remain follow-ups under the broader goal. No merge or paid evaluation performed.