repl: support group-qualified .scenario in multi-API sessions#1921
Merged
pmcelhaney merged 5 commits intomainfrom Apr 16, 2026
Merged
repl: support group-qualified .scenario in multi-API sessions#1921pmcelhaney merged 5 commits intomainfrom
.scenario in multi-API sessions#1921pmcelhaney merged 5 commits intomainfrom
Conversation
5 tasks
Copilot
AI
changed the title
[WIP] Add group-qualified .scenario command for multi-API support
repl: support group-qualified Apr 16, 2026
.scenario in multi-API sessions
pmcelhaney
approved these changes
Apr 16, 2026
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.
Summary
Extended REPL
.scenarioto be mode-aware: single-runner keeps.scenario <path>, while multi-API now requires.scenario <group> <path>and executes against the selected runner’s scenario registry/context helpers.<path>vs<group> <path>).context,loadContext,route, androutes..scenario <group> <path>usage.Original Prompt
Issue:
repl: add group-qualified .scenario command for multi-APIExtend
.scenarioso multi-API sessions can choose which API runner's scenario registry and context are used.Context
Scenario scripts are loaded per runner (
<base>/<group>/scenarios). In multi-runner mode,.scenarioneeds an API qualifier to avoid ambiguity and to execute against the intended context/route helpers.Proposed change
Add dual command syntax:
.scenario <path>(existing behavior).scenario <group> <path>The command should resolve the selected group, load that group's scenario module, and pass the group's
context,loadContext,route, androutesinto the scenario function.Acceptance criteria
.scenario <group> <path>executes scenarios for the selected group in multi-runner mode.scenario <path>behavior remains unchangedManual acceptance tests
.scenario soldPetsstill applies the same scenario function as before..scenario billing soldPetsapplies only billing context/routes and does not mutate other groups..scenario payments soldPetsshows an unknown-group error listing available groups..scenario,.scenario billing) showusage: .scenario <group> <path>..scenario billing ../seed) is rejected with the existing path-segment error.Tasks
.scenariocommand handling insrc/repl/repl.tsto support mode-aware argument parsing and group-qualified execution.context,loadContext,route,routes)..scenarioREPL tests intest/repl/repl.test.tsfor multi/single parsing, error handling, and group isolation.docs/features/repl.mdwith multi-API.scenario <group> <path>usage.