feat(linearbot): per-turn-type reasoning effort - #1539
Open
0xAlcibiades wants to merge 1 commit into
Open
Conversation
The harness already accepts a per-turn effort -- the blocks-protocol reasoning field maps onto codex turn/start.effort, and slackbotv2 drives it from -rsn. linearbot cloned that overrides parser without the reasoning field, and its turns are mostly autonomous anyway: assignment kickoffs pass an empty overrides object and comment turns forward harness, model and provider only. Every turn therefore ran at the harness global default. That default fits neither end. An assignment turn implementing a whole ticket wants deep thinking; a comment reply does not. With one global setting a deployment chooses between saturating a shared inference backend on assignment bursts and having implementation turns underthink. LINEARBOT_EFFORT_ASSIGNMENT and LINEARBOT_EFFORT_COMMENT set them independently, threaded through the reasoning field that already existed on the wire. Setting one does not imply the other, and both unset keep today's behaviour exactly. Unrecognised values are dropped rather than forwarded. A typo forwarded verbatim reaches the harness as an invalid turn/start.effort and fails the turn, which is far worse than running at the default for config set once at deploy time. The accepted aliases are slackbotv2's, so a word that works in a -rsn flag works here too.
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.
Closes #1557.
Part of #1512 — direction 1, for linearbot. See the scope note at the end.
Change
LINEARBOT_EFFORT_ASSIGNMENTandLINEARBOT_EFFORT_COMMENT(chart:linearbot.reasoningEffort.assignment/.comment) set reasoning effort perturn type, threaded through the
reasoningfield that already exists on thewire and already maps onto codex
turn/start.effort.Both unset keep today's behaviour exactly — no
reasoningis emitted and theharness default applies. Setting one does not imply the other: a deployment
that wants deep assignment turns has not thereby asked for deep comment
replies, and a test pins that.
Two decisions
Unrecognised values are dropped, not forwarded. A typo forwarded verbatim
reaches the harness as an invalid
turn/start.effortand fails the turn.Running at the default is a much better failure for config that is set once at
deploy time, where nobody is watching for it.
The accepted aliases are slackbotv2's.
min,med,hi,xhi,x-highall normalize the same way they do for-rsn, so a value that works ina flag works in this config. Two surfaces disagreeing about the same word would
be worse than either one being stricter.
Scope
This is direction 1 for linearbot. Deliberately not included:
different (review, issue-work, CI-completed) and worth naming in their own
PR rather than guessing at the taxonomy here.
thinking-xhighon an issue isthe most useful half of linearbot/githubbot: per-turn-type reasoning-effort policy for autonomous turns (slackbotv2 has -rsn; no flag surface here) #1512, because it puts the decision where the
knowledge is — a human triaging the ticket. It needs
labelsadded tofetchLinearIssueContext's query plus a configurable prefix, and it composescleanly on top of this: the label would override the per-turn-type default.
-rsnin comment text (direction 3). Parity, and independent of both.Happy to follow up with any of them; splitting keeps each reviewable.
Testing
Seven new tests: every codex effort accepted, slackbotv2's aliases accepted,
case and whitespace insensitivity, unrecognised and blank values dropped, the
two turn types resolving independently, one set not implying the other, and
unconfigured falling through to the harness default.
bun testinservices/linearbot: 115 pass.bun run check:typesclean.helm lintpasses;helm templaterenders each env only when its value is set.