Repository navigation
Let a ticket's model attribute pick the model its worker launches on - #281
Conversation
thrawn01
left a comment
There was a problem hiding this comment.
Read the diff against ENG-719, with one fresh reviewer reading the branch. Nothing was re-run here; the green test check is the run. Three things I'd change before merge, then notes.
- A whitespace
modelon a local ticket wins over the config (inline onrules/shared.ts). - No test drives a relaunch, which is the ticket's first deliverable (inline on
ticket_model_test.go). - The docs still describe the old precedence in the places a reader looks first.
docs/config.md:100saysworker_modelis passed "for every build worker",:101-103the same fordesign_model,workeranddesign, and the precedence paragraph at:136goes repo table,[rules]table,worker_modelwith no attribute step. The override sentence landed in the[rules]intro at:96instead.rules/config.example.toml:4-5and:10say the same as:100. One clause in each row and one sentence at:136would do it.
Notes, no change asked:
dispatch explainshows the model only on thewantsline.history.CycleLinecopiesOptionsforWants(internal/history/history.go:533) and drops them forWaiting(:537) andCovered(:544), so a launch waiting on a slot prints no model until it is admitted. Fine for the ticket's purpose.- The Linear test sets the fake's
Attributesmap directly, so the## Attributesdescription path is covered end to end only byinternal/linear/client_test.go:537-581. Acceptable, since ENG-720 owns that parser. - Attribute keys are case-sensitive, so
Model: opusis ignored without a word. A clause indocs/rules.md:80would save someone a confused launch. - The
Kind == "launch"test in bothexplain.gobranches is redundant with the option lookup, since only launches carry those options. Harmless.
…de in the config docs
|
Docs: each |
|
Read d2ff7fa against the three asks. The trim covers the blank and padded local value and keeps the config fallback for blank, the relaunch test drives |
|
Added a sentence to |
Purpose
One ticket sometimes wants a stronger or cheaper model than the rest, and the only way was to edit config.toml and restart dispatch, which changes every later launch too. A ticket can now say which model its worker runs on.
The ticket's model wins over
worker_model,design_modeland anyharness.<name>table, for build workers, design sessions and every relaunch. A ticket with nomodelattribute launches as before.dispatch explainnow says what each launch wanted:Implementation
rules/shared.tslaunchAsreturns{ model }alone whent.attributes.modelis set. Every launch rule spreads it, so relaunches follow. An empty attribute counts as unset.internal/history/explain.goreads a launch'smodelorharnessoption into newmodelandharnessfields onExplainLine(--json) and printson model <name>oron harness.<name>in the text form.docs/config.mdanddocs/rules.mdname the attribute and say it wins.ticket_model_test.gocovers a local ticket, a Linear ticket that beats a repo table, a design ticket, and both explain forms.Verified with
make testandgo test -tags tests_slow ., both passing. I ran no separate review sub-agents, so the only checks are the tests and my own read of the diff. A misspelled model fails at launch, as a misspelledworker_modeldoes.Fixes ENG-719