Repository navigation
feat(showcase): support --isolate=<N> CLI form as sugar over SHOWCASE_ISO_SLOT - #5547
Merged
Merged
Conversation
…_ISO_SLOT
Adds a sugar form of the --isolate flag that pins the isolation slot
directly from the command line:
bin/showcase test agno --d5 --isolate=9
# equivalent to:
SHOWCASE_ISO_SLOT=9 bin/showcase test agno --d5 --isolate
The arg parser splits --isolate=<N> into setting use_isolate=true plus
exporting SHOWCASE_ISO_SLOT=<N>; the existing picker
(_claim_isolate_slot in _common.sh) handles all validation — positive
integer, slot 0 reserved, 1<=N<=ISOLATE_MAX_SLOT, port probe, liveness.
No validation logic is duplicated.
Tests:
- replays the parser branch and verifies SHOWCASE_ISO_SLOT export +
picker pinning
- drives the picker's reserved-slot (N=0) and out-of-range (N=99)
rejections through the arg form to pin the parser->env->picker wiring
- drift guard: sources the REAL cmd-test.sh, stubs apply_isolation, and
snapshots SHOWCASE_ISO_SLOT to catch any future regression of the
parser branch
Help text and TESTING.md updated in a follow-up commit.
Items 8 and 9 now show both the SHOWCASE_ISO_SLOT=<N> env-var form and the --isolate=<N> CLI sugar as equivalent ways to pin the isolation slot. The env-var form remains valid — the CLI form is a convenience, not a replacement. A repo-wide grep confirmed showcase/TESTING.md is the only doc that references SHOWCASE_ISO_SLOT, so no other docs need updating.
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
June 18, 2026 17:39
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
Contributor
Production Digest-Pinning Audit12 of 41 service(s) not digest-pinned.
Run 2026-06-18 10:40:12 PDT — 12 finding(s). |
This branch was successfully deployed
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
Follow-up to #5543. Adds
--isolate=<N>CLI form so users don't need to setSHOWCASE_ISO_SLOT=<N>as an env var prefix.Before
After (both forms work)
Implementation
~10 lines in
showcase/scripts/cli/cmd-test.sharg parser: a new--isolate=*case setsuse_isolate=trueand exportsSHOWCASE_ISO_SLOT=<N>. The existing picker (_claim_isolate_slotin_common.sh) handles all validation, slot-0 rejection, port-probe, liveness, etc. — no logic duplication.Help text in
cmd-test.shand the existingSHOWCASE_ISO_SLOTreferences inshowcase/TESTING.mdnow show both forms as equivalent.Tests
Four new bats tests in
showcase/scripts/__tests__/isolate.bats:--isolate=<N> arg form exports SHOWCASE_ISO_SLOT and pins the slot through the picker— replays the parser branch, verifies env export + picker pinning.--isolate=0 arg form drives the picker's reserved-slot rejection— proves--isolate=0flows through the sameslot 0 is reserveddie as the env-var form.--isolate=99 arg form drives the picker's out-of-range rejection— proves--isolate=99flows through the sameexceeds ISOLATE_MAX_SLOT=45die as the env-var form.cmd-test.sh --isolate=<N> actually wires the arg through to SHOWCASE_ISO_SLOT— drift guard that sources the REALcmd-test.sh, stubsapply_isolation, and snapshotsSHOWCASE_ISO_SLOTto catch any future regression of the parser branch.All 58 bats tests in
isolate.batspass locally (54 pre-existing + 4 new).Docs
showcase/TESTING.mditems 8 and 9 updated to show both forms. Repo-wide grep confirmed TESTING.md is the only doc that referencesSHOWCASE_ISO_SLOT.Test plan
bats showcase/scripts/__tests__/isolate.bats→ 58/58 green--isolate=9→SHOWCASE_ISO_SLOTexported, slot 9 claimed--isolate=0→ picker dies "slot 0 is reserved"--isolate=99→ picker dies "exceeds ISOLATE_MAX_SLOT=45"shellcheck showcase/scripts/cli/cmd-test.sh→ no new warnings (only the pre-existing SC2034 onCMD_TEST_DESC, consumed by dispatcher parallel arrays)oxfmt --check showcase/→ clean