Skip to content

test(orchestra): pin how the parser reports commands it cannot use - #3562

Draft
amanjeetsingh150 wants to merge 1 commit into
feat/flow-command-schemafrom
feat/parser-errors-from-schema
Draft

test(orchestra): pin how the parser reports commands it cannot use#3562
amanjeetsingh150 wants to merge 1 commit into
feat/flow-command-schemafrom
feat/parser-errors-from-schema

Conversation

@amanjeetsingh150

@amanjeetsingh150 amanjeetsingh150 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #3560. Tests only — no production code changes.

The parser consults its own list of commands in two places: the "Missing Command Options" error for a command written bare that needs a value, and the "Did you mean" suggestion for one it does not recognise. Between them they had a single whole-workspace snapshot (e020, for tapOn), and the snapshot covering the suggestion path uses invalidCommand — which resembles nothing, so the prefix, substring and edit-distance matching was never exercised at all.

These six tests describe what the parser does today, so there is something to hold it still before anything moves.

The one worth reading is no declared command is ever reported as invalid: a command falling out of the parser's list makes it blame the user for a command Maestro does have, which is the worst error it can give. Removing tapOn from objectCommands fails it.

Verify:

  • ./gradlew :maestro-orchestra:test — 440 tests, 0 failures (6 new, all passing against unmodified production code)

🤖 Generated with Claude Code

https://claude.ai/code/session_015vHfmsiT7skZdV13zcbeof

The parser consults its own list of commands in two places -- the "Missing
Command Options" error for a command written bare that needs a value, and the
"Did you mean" suggestion for one it does not recognise. Between them they had a
single whole-workspace snapshot, `e020`, for `tapOn`; and the snapshot covering
the suggestion path uses `invalidCommand`, which resembles nothing, so the
prefix, substring and edit-distance matching was never exercised at all.

These describe what the parser does today. No production code changes.

The one worth reading is `no declared command is ever reported as invalid`: a
command falling out of the parser's list makes it blame the user for a command
Maestro does have, which is the worst error it can give. Removing `tapOn` from
`objectCommands` fails it.

Verify:
- ./gradlew :maestro-orchestra:test - 440 tests, 0 failures (6 new, all passing
  against unmodified production code)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015vHfmsiT7skZdV13zcbeof
@amanjeetsingh150
amanjeetsingh150 force-pushed the feat/parser-errors-from-schema branch from c9b9ffa to 1939789 Compare September 4, 2026 08:48
@amanjeetsingh150 amanjeetsingh150 changed the title feat(orchestra): tell the user which options a command is missing test(orchestra): pin how the parser reports commands it cannot use Sep 4, 2026
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