Skip to content

simlock lease --requires and MCP lease_simulator requires #1845

Done

Description

@V3RON

Part of #1832.

Scope

A user can run simlock lease --requires bank-network,eu-west, locally or with --url. An agent can pass requires to the MCP lease_simulator tool, locally or in farm mode. Either way the lease goes only to a worker that has every name.

If this task goes wrong, the flag or field is accepted but the names never reach the daemon, so the lease lands on any worker.

Technical spec

Commit 200afe5.

Rows

  • Behaviours: B7, B8
  • Interfaces: I4, I5
  • Existing code: X14, X15, X17

Facts

# Fact Source
F1 Today simlock lease --platform android --requires bank-network prints {"error":{"code":"USAGE","message":"Unknown option '--requires'. …"}}, exit 2 ran node dist/cli/main.js lease --platform android --requires bank-network on main
F2 --except is split on , the same way --requires will be src/cli/commands/lease.ts:322
F3 The MCP server lists lease_simulator from leaseSimulatorInputSchema's shape; removing requires from the omit lists it src/mcp/contracts.ts:46; src/mcp/server.test.ts:61

Modules touched

src/cli (lease command and its help), src/mcp (lease_simulator input), website reference/cli.mdx, reference/mcp-tools.mdx, reference/errors.mdx:57. Searches: leaseSimulatorInputSchema, except: in src/cli/commands/lease.ts, requires in website/src/content/docs.

Rules in play

  • ADR 0091 §4: every frontend can pass requires.
  • src/mcp/AGENTS.md: the MCP server reaches the daemon only through simlock/client, so it adds no check of its own.
  • src/cli/AGENTS.md: no decision logic in the CLI; the contract checks the names.
  • Documentation rule 9: cli.mdx, mcp-tools.mdx and errors.mdx :57 (CAPABILITY_MISSING: the CLI and MCP now ask too).

Tests

Seam: the lease command with a fake client, and lease_simulator through the MCP server with a fake client. Model them on src/cli/index-lease-run-id.test.ts and src/mcp/server.test.ts.

  • B7: simlock lease --requires: bank-network; bank-network,eu-west; with --url the request carries both requires and idempotencyKey; --requires "" prints the daemon's BAD_REQUEST, exit 2; --help shows [--requires <capability,...>]
  • B8: MCP lease_simulator with requires: local ["bank-network"]; farm mode sends both requires and idempotencyKey; none given, none sent; the listed input schema has requires

Done when

  • pnpm test:changed and pnpm typecheck pass.
  • cli.mdx and mcp-tools.mdx document --requires and requires.

Out of scope

Depends on

#1843 and #1839 change the same lease command, and #1843 also changes the same MCP contracts file and doc sections.

Written by an agent.

Activity

  1. added
    task:draft
    on Nov 25, 2026
  2. added
    task:ready
    and removed
    task:draft
    on Nov 25, 2026
  3. self-assigned this
    on Nov 25, 2026
  4. added a commit that references this issue on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

task:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions