test(scenarios): add bai v2 CLI integration scenario suite#11307
Draft
seedspirit wants to merge 4 commits intomainfrom
Draft
test(scenarios): add bai v2 CLI integration scenario suite#11307seedspirit wants to merge 4 commits intomainfrom
seedspirit wants to merge 4 commits intomainfrom
Conversation
End-to-end shell scripts that exercise the v2 CLI against a live cluster: session/vfolder/deployment/model-card lifecycle, multi-user permission boundaries, mount-locked deletion, bulk ops, file I/O round-trip via TUS, BATCH session log retrieval, and keypair concurrency caps. Scenarios are strict — no soft-pass / soft-skip paths. Missing fixtures or manager bugs surface as real failures so regressions stay visible. Current pass rate against main: 13/17. Four scenarios fail on real issues (documented in README "Known failures"): - 03/14: model-store has no model cards on dev DB (fixture gap) - 04: deployment delete leaves lifecycle.status empty (manager bug) - 07: post-clone GET hits RBAC eventual-consistency (manager bug) Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…python helpers Extract inline `python3 -c` heredocs from scenario shell scripts into per-scenario `.py` helper files. Each scenario now lives in its own directory containing `run.sh` and any scenario-specific python helpers. Generic JSON parsers shared across scenarios live in `scenarios/lib/py/`, exposed via the `$SCN_PY` env var. Also fixes two bugs surfaced during the refactor: scripts were using `UID=` to pass an env var to python, but `UID` is a bash readonly variable — renamed to `TARGET_UID` in 00_setup and 15_session_concurrency_cap.
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
End-to-end shell scripts that exercise the
./baiv2 CLI against alive cluster. Sits alongside (does not replace) the unit / pytest suite —
its job is to catch regressions in the cross-component contract: API
handlers, CLI plumbing, RBAC boundaries, storage proxy round-trips, and
resource-policy enforcement.
scenarios/run_all.shscn-by default) so cleanup is by-prefix and never touches non-scenario dataCoverage
max_concurrent_sessionscapStrict failure policy
No soft-pass. Every scenario
exit 1s on failure. Missing fixtures(e.g. no model card on a fresh dev DB) or manager bugs surface as real
test failures rather than silent skips.
Current results (against
main@f55366d34)13 / 17 PASS. The 4 failures are real and documented in
scenarios/README.md:model-storehas 0 model cards (fixture gap on dev DB)deployment deleteleaveslifecycle.statusempty (no terminal-state transition)PermissionDeniedError(vfolder/adapter.py:626)Test plan
./dev start all+ halfstack healthyscenarios/run_all.shreports 13 PASS / 4 FAIL with listed failuresSKIP_TEARDOWN=1 ONLY="01" scenarios/run_all.shruns a single scenarioscn--prefixed resources after99_teardown🤖 Generated with Claude Code