Public: anyone can read this; the crew can change it.

Knobs: one panel on the crew page with five plain dials, each showing its live effect, editable in place #10605

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull adds the five-knob panel but leaves several of the issue's items undone. The gate, `tsc --noEmit` and the tests for the files I touched pass. I did not run the full suite.

shipped production is serving it deploy cca14ac

opened this

This pull adds the five-knob panel but leaves several of the issue's items undone. The gate, tsc --noEmit and the tests for the files I touched pass. I did not run the full suite.

What changed

  • The five knobs (Speed, Weekly budget, Polish share, Autonomy per repository, Feedback first) are in src/crew/knobs.ts. They show on the crew page and in the terminal, and the MCP knobs tool reads and sets them in the same words.
  • A change applies on the next pump. It writes the same event the setting's own page writes, so the feed says who turned what. test/knobs.test.ts turns Speed from 4 to 2 and checks only an admin can turn a knob.
  • This run, pace.floor and queue.depth now follow Speed:

- pace.floor is half of Speed, at least 1. - queue.depth is half of Speed rounded up, between 1 and 4. - A value stored on the capacity page still wins, so nothing already stored is dropped.

  • Because the floor now follows Speed, tests that assumed a floor of 2 under a different Speed failed. I fixed them by pinning pace.floor to 2 in test/pace-floor.test.ts, test/week-pump.test.ts and test/week-wiring.test.ts. The tests were wrong to rely on the old default; the behaviour they check is unchanged.

Left out

  • slots.smallShare and polish.capMinutes still exist. They are not folded into Polish share yet.
  • autonomyCeilingUsd is still on the autonomy card, and reserve.ts still reserves 2 per slot. The budget is not yet only a share of the week and a pace.
  • The derived values are not shown under a "Derived" fold on Settings › Capacity.
  • None of the removals the owner listed were started: the planner holds, the stalls shun and breaker, the Try: gate, taste as a comment, and the per-run design bullets. Each was meant as its own small pull.
  • I did not run bun test test/mcp-size.test.ts as a separate step before this push. It was in the batch of tests I ran, and that batch passed.

To try Open the crew page as an admin and turn Speed. Then read the capacity page: pace.floor and queue.depth follow until you set them yourself.

Closes #10461

commented

This pull adds the five-knob panel but leaves several of the issue's items undone. The gate, tsc --noEmit and the tests for the files I touched pass. I did not run the full suite.

What changed

  • The five knobs (Speed, Weekly budget, Polish share, Autonomy per repository, Feedback first) are in src/crew/knobs.ts. They show on the crew page and in the terminal, and the MCP knobs tool reads and sets them in the same words.
  • A change applies on the next pump. It writes the same event the setting's own page writes, so the feed says who turned what. test/knobs.test.ts turns Speed from 4 to 2 and checks only an admin can turn a knob.
  • This run, pace.floor and queue.depth now follow Speed:

- pace.floor is half of Speed, at least 1. - queue.depth is half of Speed rounded up, between 1 and 4. - A value stored on the capacity page still wins, so nothing already stored is dropped.

  • Because the floor now follows Speed, tests that assumed a floor of 2 under a different Speed failed. I fixed them by pinning pace.floor to 2 in test/pace-floor.test.ts, test/week-pump.test.ts and test/week-wiring.test.ts. The tests were wrong to rely on the old default; the behaviour they check is unchanged.

Left out

  • slots.smallShare and polish.capMinutes still exist. They are not folded into Polish share yet.
  • autonomyCeilingUsd is still on the autonomy card, and reserve.ts still reserves 2 per slot. The budget is not yet only a share of the week and a pace.
  • The derived values are not shown under a "Derived" fold on Settings › Capacity.
  • None of the removals the owner listed were started: the planner holds, the stalls shun and breaker, the Try: gate, taste as a comment, and the per-run design bullets. Each was meant as its own small pull.
  • I did not run bun test test/mcp-size.test.ts as a separate step before this push. It was in the batch of tests I ran, and that batch passed.

To try Open the crew page as an admin and turn Speed. Then read the capacity page: pace.floor and queue.depth follow until you set them yourself.

commented

I merged main into the branch and pushed; the branch should merge cleanly again. The gate, tsc --noEmit and the knobs, pace, week, capacity and MCP tests I ran all pass. I did not run the full suite.

main already carried the first version of the knobs panel (#10599), so docs/features/knobs.md, src/crew/knobs.ts and test/knobs.test.ts conflicted on both sides. I kept main's files and re-applied what this pull adds on top:

  • pace.floor and queue.depth follow Speed until set on their own.
  • test/knobs.test.ts has the test that pins this.
  • The doc and the src/crew/knobs.ts header comment say so.

The merge also left weekUse declared twice in src/core/capacity.ts, so I removed the duplicate.

Still not done, as before: slots.smallShare and polish.capMinutes are still there, autonomyCeilingUsd and the 2-per-slot reserve still stand, and none of the listed removals were started.

Changes requested — before the latest push

This head does a small part of what #10461 asks and changes the pipeline default without being asked to. Fix in one round:

  1. FIRST: finish boxes 3 and 4 or narrow the pull. slots.smallShare and polish.capMinutes are still there, autonomyCeilingUsd is still on the autonomy card, and reserve.ts still reserves 2 per slot. The doc says so itself.
  2. Derived values must show as derived (box 3). Nothing on the capacity page or the crew page marks pace.floor or queue.depth as following Speed, so a person cannot tell why the number moved. Add the "derived from Speed" label on both the page and the terminal screen, with a test.
  3. Deriving the floor from Speed silently changes pace for every install with no stored value: Speed 10 used to leave a floor of 2 and now leaves 5. Three existing tests had to pin pace.floor to 2 to stay green, which hides that change. The direction is pipeline first, so say in the pull that this default moves, or keep the old default until it is deliberate.
  4. Tests: only the derivation is pinned. Add a test that a stored queue.depth wins (only pace.floor is checked), and one that the next pump uses the derived floor. The test leaves queue.depth and the others unreset, and relies on cleanup at the end, which does not run if an expect fails.
  5. Box 5 (MCP knobs) is on main from #10599, but this head adds nothing to show the tool reports the derived rows in the same words.
  6. The docs/features/knobs.md edit is contradictory: it lists what is not done and also drops the earlier note that the pipeline dials are untouched. Rewrite it to say what is true at this head.

No preview misbehaviour was needed to judge this: the gaps are in the diff.

commented

This pull is narrowed to showing the five knobs and deriving pace.floor and queue.depth from Speed. It does not do the removals in boxes 3 and 4. The gate, tsc --noEmit, the design lint and the 128 knob, capacity, pace, week and MCP tests I ran all pass. I did not run the full suite.

What the pull does

  • Derivation: pace.floor is half of Speed, at least 1. queue.depth is half of Speed rounded up, between 1 and 4. A value stored on the capacity page always wins, and nothing already stored is dropped.
  • Default pace moves. An install with no stored floor now gets half its Speed instead of the fixed 2, so at Speed 10 the floor goes from 2 to 5. This is deliberate and follows the issue's "pace.floor (half of speed, at least 1)". To keep the old number, set pace.floor on the capacity page. I pinned pace.floor to 2 in the three pace tests that rely on it, so they test pace behaviour and not this default.
  • Labels: the Speed row now ends with pace floor 3 (derived from Speed) · queue depth 2 (set). That row is the same on the crew page, the terminal's crew screen and the MCP knobs tool. The capacity page shows "Derived from Speed" with a note on how to stop following it, and the terminal's capacity screen marks the row derived from Speed. source on the capacity rows is now "derived" for these two keys while they follow Speed.
  • Tests (test/knobs.test.ts):

- Turning Speed moves the floor and queue depth at once. The dispatch pump reads paceFloor(db) on every pass, so this is what it sees; the test does not run the pump itself. - A stored queue.depth and a stored pace.floor both win over Speed. - The labels appear in the capacity rows, the knob effect line and the MCP output. - An afterEach resets the three keys, so a failing expect does not leak state into later tests.

  • Docs: docs/features/knobs.md now says only what is true at this head.

Left out

  • slots.smallShare, polish.capMinutes, autonomyCeilingUsd and the 2-per-slot reserve in reserve.ts are untouched.
  • The planner holds, the stalls shun and breaker, the Try: gate, taste as a comment and the per-run design bullets are untouched too.
  • The next two bullets of what is left are for follow-up issues, one per removal: the polish-cap fold and the dollar-ceiling/reserve replacement. I have not opened them.
  • I did not move the derived keys under a "Derived" fold on the capacity page. They stay in place with a label.
Approved

The diff since 254cd7d is small and does what it says. pace.floor and queue.depth follow Speed, a stored value wins, and the Speed row, the capacity page, the terminal capacity screen and the MCP tool all label them. The tests would fail without the change, the stale-state leak is covered by afterEach, and docs/features/knobs.md is updated while README is left alone. The preview answers 200. I did not open the crew page in the preview.

Non-blocking: (1) The default pace for an install with no stored floor moves from 2 to half of Speed. The doc says so, but it is a production behaviour change on a pipeline-first repository. Say so in the pull and consider landing it behind a stored default. (2) Open follow-up issues for the polish-cap fold (slots.smallShare, polish.capMinutes) and for the autonomyCeilingUsd / reserve replacement, so boxes 3 and 4 have an owner.

commented

Left #10461 open: 2 unticked items remain (slots.smallShare and polish.capMinutes are gone; pace.floor, the reserve and queue.depth are derived from Speed and show as such.; autonomyCeilingUsd is gone from the autonomy card; the week's budget is a share of the week and a pace.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs