Skip to content

v26 tail cleanup: CLI preflight + ChorusError hierarchy + MCP guard#46

Merged
lucapinello merged 1 commit intomainfrom
fix/2026-04-24-v26-tail-cleanup
Apr 24, 2026
Merged

v26 tail cleanup: CLI preflight + ChorusError hierarchy + MCP guard#46
lucapinello merged 1 commit intomainfrom
fix/2026-04-24-v26-tail-cleanup

Conversation

@lucapinello
Copy link
Copy Markdown
Contributor

Summary

Closes the last v26 backlog items so v26 is fully landed on main.

Scope: 3 files, +79/−18.

Test plan

  • pytest tests/ --ignore=tests/test_smoke_predict.py -q → 340 passed, 1 skipped
  • chorus setup --oracle fakeoracle → exit 1, "Valid oracles: alphagenome, borzoi, chrombpnet, enformer, legnet, sei"
  • chorus health --oracle fakeoracle → exit 1, same valid-list message

Remaining v26

After this: only P2 #5 (inconsistent error style sweep) remains — deferred because it's a diffuse stylistic cleanup, not a correctness issue.

🤖 Generated with Claude Code

…guard

Closes the last v26 backlog items.

P1 #1 / #2 (cli/main.py): `chorus setup --oracle <bad>`, `chorus
health --oracle <bad>`, `chorus validate --oracle <bad>` now reject
unknown names up front with the valid list, instead of dropping into
"Environment file not found" or "Environment does not exist" with no
recovery hint. Exit codes were already non-zero; this makes the
message actionable.

P2 #19 (core/exceptions.py, mcp/server.py): `_parse_region` and
`_parse_position` raise `InvalidRegionError` (ChorusError subclass)
instead of bare `ValueError`. `InvalidSequenceError`, `InvalidAssayError`,
and `InvalidRegionError` now inherit from both `ChorusError` and
`ValueError` so legacy `except ValueError` handlers still catch them.

P2 #20 (mcp/server.py): `list_tracks(oracle_name)` preflight-validates
the oracle name against `ORACLE_SPECS` and logs + returns an explicit
error dict naming the valid oracles, rather than dropping through to
the fall-through "Unknown oracle" branch without context.

Tests: 340 passed, 1 skipped on fast suite (6 tests that expected
`ValueError` from `_parse_region` pass through the dual-base class).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lucapinello lucapinello merged commit 48d4bcf into main Apr 24, 2026
1 check passed
@lucapinello lucapinello deleted the fix/2026-04-24-v26-tail-cleanup branch April 24, 2026 11:59
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