fix(evals): strip evals sigil before root fallback to run handler#2109
Conversation
When user input like `evals act` hits the unknown-token root fallback, the full tokens array (including the leading "evals") was forwarded to the run handler. parseRunArgs would then misinterpret "evals" as a target or flag. Strip the leading "evals" token before delegating to the run handler so only the intended arguments are forwarded. Addresses cubic-dev-ai review comment on PR browserbase#2100.
|
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
2f5c929
into
browserbase:miguelgonzalez/stg-1880-evals-nail-tui-onboarding-experience-and-command-discovery
When user input like
evals acthits the unknown-token root fallback, the full tokens array (including the leading "evals") was forwarded to the run handler. parseRunArgs would then misinterpret "evals" as a target or flag.Strip the leading "evals" token before delegating to the run handler so only the intended arguments are forwarded.
Addresses cubic-dev-ai review comment on PR #2100.
why
what changed
test plan
Summary by cubic
Fixes a parsing bug where inputs like
evals actwere sent to therunhandler with theevalssigil included, causingparseRunArgsto misinterpret it. We now strip the leadingevalstoken before delegating so only the intended args are passed.evalstoken in the root fallback before invoking therunhandler.["evals", "act"]dispatch forwards["act"].Written for commit 9a6fab5. Summary will update on new commits.