Skip to content

A doctor says what would stop a run - #421

Merged
VeryComplexAndLongName merged 1 commit into
mainfrom
a-doctor-says-what-would-stop-a-run
Sep 12, 2026
Merged

A doctor says what would stop a run#421
VeryComplexAndLongName merged 1 commit into
mainfrom
a-doctor-says-what-would-stop-a-run

Conversation

@VeryComplexAndLongName

Copy link
Copy Markdown
Owner

Second of the six. Based on proposals-simpler-for-the-user (#417),
not on main
— the change it implements is proposed there, and the
quality workflow only runs on pull requests targeting main, so this
gets its checks when #417 merges and this retargets itself. Run locally
in the meantime: npm run verify exit 0, 2015 tests across 159 files.

resolveChainStart already resolves every precondition of a run before
anything is spent — and only when somebody names a change and asks to
run it. Setting this up on a new machine means finding out what is
missing by being refused, which is the shape a-lease-says-who rejected
for the workspace lease.

openspec-ui-cli doctor asks directly: the runtime against the pinned
engines, the openspec CLI, which agents are installed, whether the
harness configuration reads, who holds the workspace, whether a git
identity is configured. Each finding says whether it stops a run or is
only worth knowing, and carries a remedy where one exists.
--change <id> adds the preflight's own answer for one change.

Nothing decides anything twice. Agent presence comes from
detectAvailableAgentsDetailed — the function the REST route, the VS
Code bridge and the agent picker already read — and openspec/npm go
through that same probe, exported as detectExecutable, rather than a
second one written beside it. This is a correction to the proposal made
while reading the code: it originally said a binary must be resolved and
never executed, which would have made this command answer "is this agent
here" differently from the picker in the same build.

A held workspace exits 0. Being busy is not being broken, and lease
already answers that way.

Live evidence, quoted in full in the tasks:

  • This repository: Nothing here would stop a run., exit 0.
  • PATH cut back to Node and the system directories: four findings —
    Node v24.18.0 against >=22 <23, npm 12.0.1 against >=10 <11, no
    openspec, no agent — exit 1.
  • While a real openspec-ui-cli run held a scratch workspace: the
    holder reported with its pid and git author under "Worth knowing",
    exit 0.
  • doctor --change two-steps-to-a-run: the preflight's own refusal and
    the setting that governs this is autonomyLevel, exit 1.

The range comparator is deliberately small: it reads the clause forms
this repository pins, on the major version, and reports a range it
cannot read as exactly that rather than treating it as satisfied.

🤖 Generated with Claude Code

`resolveChainStart` already resolves every precondition of a run before
anything is spent, and answers only when somebody names a change and
asks to run it. A person setting this up on a new machine finds out what
is missing by being refused — the shape `a-lease-says-who` rejected for
the workspace lease.

`openspec-ui-cli doctor` asks instead: the runtime against the pinned
`engines`, the `openspec` CLI, which agents are installed, whether the
harness configuration reads, who holds the workspace, and whether a git
identity is configured. Each finding says whether it stops a run or is
only worth knowing, and names a remedy where this repository has a
command for one. `--change <id>` adds the preflight's own answer for one
change, including the setting that governs any refusal.

Nothing here decides anything twice. Agent presence comes from
`detectAvailableAgentsDetailed`, which the REST route, the VS Code bridge
and the agent picker already read; `openspec` and `npm` go through the
same probe, now exported as `detectExecutable`, rather than a second one
written beside it. The lease holder comes from `readWorkspaceLeaseHolder`
and the identity from `readGitAuthor`.

A held workspace exits 0. Being busy is not being broken, and `lease`
already answers that way; two commands disagreeing about it would be
worse than either answer.

The range comparator is deliberately small: it reads the clause forms
this repository pins, on the major version, and reports a range it cannot
read as exactly that rather than treating it as satisfied.

Live: exit 0 on this repository; exit 1 with PATH cut back, naming a
Node and npm outside the pinned ranges, no `openspec`, and no agent; exit
0 with the holder reported while a real run held a workspace; exit 1 for
a change whose autonomy level starts one stage at a time.

npm run verify: exit 0, 2015 tests across 159 files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@VeryComplexAndLongName
VeryComplexAndLongName force-pushed the a-doctor-says-what-would-stop-a-run branch from b7703d6 to ad408c1 Compare September 12, 2026 08:49
@VeryComplexAndLongName
VeryComplexAndLongName changed the base branch from proposals-simpler-for-the-user to main September 12, 2026 08:49
@VeryComplexAndLongName

Copy link
Copy Markdown
Owner Author

Reopening to trigger the workflow now the base is main.

@VeryComplexAndLongName
VeryComplexAndLongName merged commit f6b9389 into main Sep 12, 2026
9 checks passed
@VeryComplexAndLongName
VeryComplexAndLongName deleted the a-doctor-says-what-would-stop-a-run branch September 12, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant