A doctor says what would stop a run - #421
Merged
Merged
Conversation
`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
force-pushed
the
a-doctor-says-what-would-stop-a-run
branch
from
September 12, 2026 08:49
b7703d6 to
ad408c1
Compare
VeryComplexAndLongName
changed the base branch from
proposals-simpler-for-the-user
to
main
September 12, 2026 08:49
Owner
Author
|
Reopening to trigger the workflow now the base is main. |
VeryComplexAndLongName
deleted the
a-doctor-says-what-would-stop-a-run
branch
September 12, 2026 09:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of the six. Based on
proposals-simpler-for-the-user(#417),not on
main— the change it implements is proposed there, and thequality workflow only runs on pull requests targeting
main, so thisgets its checks when #417 merges and this retargets itself. Run locally
in the meantime:
npm run verifyexit 0, 2015 tests across 159 files.resolveChainStartalready resolves every precondition of a run beforeanything 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-whorejectedfor the workspace lease.
openspec-ui-cli doctorasks directly: the runtime against the pinnedengines, theopenspecCLI, which agents are installed, whether theharness 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 VSCode bridge and the agent picker already read — and
openspec/npmgothrough that same probe, exported as
detectExecutable, rather than asecond 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
leasealready answers that way.
Live evidence, quoted in full in the tasks:
Nothing here would stop a run., exit 0.PATHcut back to Node and the system directories: four findings —Node v24.18.0 against
>=22 <23, npm 12.0.1 against>=10 <11, noopenspec, no agent — exit 1.openspec-ui-cli runheld a scratch workspace: theholder reported with its pid and git author under "Worth knowing",
exit 0.
doctor --change two-steps-to-a-run: the preflight's own refusal andthe 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