Conversation
Extend the per-ticket runtime pin (XERK-473 dsh) to accept qwen, so a board
ticket dispatches to the Qwen Code runtime through the same spawn path. The
runtime choice is presentational plumbing over the existing spawnTicket agentType.
Hub (turma/server.js):
- POST /api/jira/<siteKey>/<issueKey>/runtime accepts {runtime:qwen}, gated by
the new orgOffersQwen (the orgOffersDsh twin); setTicketRuntime unchanged.
- findTicketHost generalises its wantDsh gate into a per-runtime wantRuntime plus
runtimeOfferedBy check, so a qwen-pinned ticket routes only to a qwen.available
host - blocked (not full) when none offers it, checked ahead of capacity.
Board (board.js + board.html, vendored board.cjs kept byte-identical):
- mergeSites gains qwenAvailable; the Runtime picker a Qwen Code option gated on
it; prettyRuntime(qwen) renders Qwen Code.
Android (core/Board.kt, ui/BoardScreen.kt):
- BoardSite.qwenAvailable plus qwenBySite (gated on Runtime.QWEN_ENABLED),
runtimeEditable(dshAvailable, qwenAvailable, pin), RuntimePicker qwen row.
Agent side unchanged: spawn_ticket already forwards agentType to spawn(),
resolve_agent_type already validates qwen, _launch_tmux already dispatches to
_launch_qwen which appends the ticket-branch directive - no new launch code.
Tests: qwen /runtime + spawnTicket + findTicketHost cases in server.test.js,
qwen runtime picker cases in board.test.js, qwen board cases in BoardTest.kt.
Docs: [Qwen I] in .claude/rules/qwen.md, turma-board/agent-board/PARITY updates.
# Conflicts: # .claude/rules/qwen.md
# Conflicts: # .claude/rules/qwen.md
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.
XERK-515 [Qwen I] — a board ticket can run on the qwen runtime
Extends the per-ticket board runtime pin (previously
claude/dsh, XERK-473 [I]) to also acceptqwen(Qwen Code, XERK-504), so a board ticket dispatches to the qwen runtime through the samespawnTicketpath. The runtime choice is presentational plumbing over the existing spawn path — thedsh [I] analogue, mirrored field-for-field.
Hub (
turma/server.js)POST /api/jira/<siteKey>/<issueKey>/runtimeaccepts{runtime:"qwen"}, gated by the neworgOffersQwen(theorgOffersDshtwin).setTicketRuntimeneeded no body change — onlyclaude/{auto}release, so a qwen pin stores/carries exactly like a dsh one and rides thespawnTicketcommand asagentType.findTicketHostgeneralises its singlewantDshgate into awantRuntimestring + aruntimeOfferedBy(a)check (dshAvailable/qwenAvailable), so a qwen-pinned ticket routes onlyto a
qwen.availablehost — checked ahead of capacity so "no host offers qwen" reads as blocked(ages out) not full. A pinned host lacking qwen is reported, never routed around.
Board (
turma/public/board.js+board.html; glassesboard.cjskept byte-identical)mergeSitesgainsqwenAvailable; the Runtime picker a "Qwen Code" option gated on it;prettyRuntime("qwen")→ "Qwen Code". An existing qwen pin is always carried back so it staysreleasable after the last qwen host leaves.
Android (
core/Board.kt,ui/BoardScreen.kt) — Web ⇄ Android parityBoardSite.qwenAvailable+qwenBySite(gated onRuntime.QWEN_ENABLED),runtimeEditable(dshAvailable, qwenAvailable, pin)(signature change — every caller updated), andthe
RuntimePickerqwen row.PARITY.mdupdated.Agent side — unchanged (the point of the [A]/[B] shape)
spawn_ticketalready forwardsagentTypetospawn(),resolve_agent_typealready validatesqwen, and_launch_tmuxalready dispatches to_launch_qwen(which appends the ticket-branchdirective + delivers the ticket prompt). No new launch code. Collectors, the two tracker writes and
the
_board_columnmirrors are runtime-agnostic and untouched.Note:
QWEN_ENABLEDships False fleet-wide (andRuntime.QWEN_ENABLED=falseon Android), so thewhole qwen surface is inert in production until a later fleet-enable milestone — verified below in
both states.
Verification
node --test turma/tests/server.test.js turma/tests/board.test.js→ 808/808 pass(new qwen
/runtime+spawnTicket+findTicketHostcases inserver.test.js; qwen runtimepicker cases in
board.test.js; qwen board cases inBoardTest.kt).states:
QWEN_ENABLEDoff (standalone hub): a host reportingqwen:{available:true}is served{available:false}on/api/agents; a qwen pin is refused 400 — the surface is fully inert.QWEN_ENABLEDon (__setQwenEnabled(true)):{runtime:"qwen"}→ 200, pin stored, ridesticketRuntimes; the queuedspawnTicketcarriedagentType:"qwen";findTicketHostrouted aqwen ticket only to a qwen host and returned a blocked (not
full) 503 when none offered it;gpt→ 400 "runtime must be claude, dsh or qwen"; unknown org → 404.orgOffersQwen, thefindTicketHostqwenarm, the
/runtimeorg-check, the/runtimevalue check) → each turns a test red; tree restored.cmp turma/public/board.js glasses/src/vendor/board.cjs).Not verified (out of scope / no tooling in the pod)
port with matching
BoardTest.ktcases, but not run here. Covered byandroid-ci.yml.QWEN_ENABLEDis False and qwen isn't installed, so no launch isreachable; the agent side is unchanged from [Qwen A]/[B].
Docs:
[Qwen I]section added to.claude/rules/qwen.md;turma-board.md,agent-board.md,android/PARITY.mdupdated.