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

Sibling pulls of one tell share a group: `variants: n` on tell and the MCP starts n builders, and each pull and run carries the group id #1416

Closed opened this
Closed without merging

variants: n on a tell now opens n issues, each routed to a builder, and the n runs and the pulls they open share one group id. tsc --noEmit is clean, and test/variants.test.ts and test/check-list.test.ts pass. I did not run the full check.

Notes

stopped closed without shipping deploy 6acb3a7

opened this

variants: n on a tell now opens n issues, each routed to a builder, and the n runs and the pulls they open share one group id. tsc --noEmit is clean, and test/variants.test.ts and test/check-list.test.ts pass. I did not run the full check.

What changed

  • Schema: a new migration adds a nullable variant_group column, with a partial index, to both run and pull.
  • Tell action (src/actions/tell.ts): tell() takes variants (default 1). parseVariants is the one boundary check: a whole number 1–4 as a number or a form string, anything else is refused with invalid_variants. For n > 1 it makes a group id and opens n issues. Each builder pick counts the earlier picks as load, so the variants spread across the crew. The group is stamped on each run right after its assignment queues it. A refused variants opens nothing.
  • Pulls: when a run opens its pull, the runner passes the run's group, so pull.variant_group is set. siblingNumbers() returns the other pulls in a group.
  • Doors:
    • The API tell, POST /api/v1/feed/tells, takes variants and returns variantGroup and issues when n > 1.
    • The MCP tell tool takes variants.
    • The studio tell form has a 1–4 "tries" select.
  • Reading: pull JSON (list and single) carries variantGroup and siblings. The MCP has no tool that reads a single pull, so I added variantGroup to the now rows and siblings on its pull rows.
  • Tests and gate: test/variants.test.ts is added to GATE.

Unchanged for n = 1

  • queueAgentRun and the event routing in dispatch.ts are untouched.
  • The plain-tell path does the same work as before; the one addition is that tell() now returns variantGroup: null and an issues list.

Left out

  • The new test file covers tell(), parseVariants, run grouping, and pulls with a group via openPull. It does not call the HTTP and MCP endpoints, so those two refusals are untested.
  • dispatch.ts was not touched. Stamping the group in tell kept the shared run path unchanged.
  • The group is not stamped on the issue, only on runs and pulls.
  • Nothing yet lands one variant and closes its siblings.

Not run here

  • In this sandbox test/crew-direction.test.ts and test/migrate.test.ts fail, and neither touches this change. The first can't bind its unix socket (EPERM), and the second throws on forgejo.stop in its setup. I didn't run them on a clean checkout, so that is the sandbox, not a regression I checked for.
  • The check's own run of those files is the real answer.

Try it

  • Tell with {"app": "owner/name", "text": "…", "variants": 2} to /api/v1/feed/tells, or pass variants: 2 to the MCP tell tool.
  • Then read /api/v1/repos/:owner/:name/pulls/:n and look at variantGroup and siblings.

🤖 Generated with Claude Code

Closes #1409

commented

Parked by the crew: the check failed ("the gate's list > every test/*.test.ts is in exactly one list, and every entry exists") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs