stacklok / stacklok/mecatl

bug: selecting auto reasoning effort inherits the previous override

Open
#1,485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
152
Forks
16
Avg merge
14h 48m
Merged PRs (30d)
536

Description

Problem

Selecting auto in the mecatui /effort picker does not clear an explicit reasoning-effort override.

The UI encodes auto as an empty string, but the fork API and server interpret an empty reasoning_effort as “inherit the source session's effort.” The operation still creates and adopts a successor session, while its effective effort remains unchanged.

Reproduction

  1. Start a session with an explicit reasoning effort, for example high.
  2. Open /effort.
  3. Select auto.
  4. Inspect the effective effort on the successor session.

Actual behavior

A successor session is created, but it inherits high.

Expected behavior

An explicit auto selection clears the session override and lets the operator/provider default apply.

Cause

  • The picker maps auto to "": cmd/mecatui/ui/effort.go (effortValue) and cmd/mecatui/ui/effort_test.go (TestEffortPickAutoSendsEmpty).
  • successorProviderSelector only overrides the source effort when the request value is non-empty: internal/adapter/server/placement_successor.go.
  • ForkSessionRequest.reasoning_effort is a non-presence-aware string, so omitted/inherit cannot be distinguished from explicitly empty/reset: contracts/proto/mecatl/v1/harness.proto.

Acceptance criteria

  • The fork contract distinguishes “inherit source effort” from “explicitly reset to auto.”
  • Selecting auto after an explicit effort produces a successor whose effective effort reflects the operator/provider default rather than the source override.
  • Omitting an effort override continues to inherit the source effort.
  • gRPC and HTTP behavior agree.
  • Tests cover explicit reset, omitted inheritance, and a non-empty override.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cmd/mecatui/ui/effort.go and effort_test.go, then trace ForkSessionRequest in contracts/proto/mecatl/v1/harness.proto into internal/adapter/server/placement_successor.go. Run the relevant Go tests and inspect the gRPC and HTTP paths. Done means explicit auto resets the effort, omission inherits it, non-empty overrides still work, and tests cover all three cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, grpc
Domain
api, backend-api-design, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.