Skip to content

v17 full audit: MCP server spec drift + Borzoi/LegNet numbers + CEBP walkthrough#31

Merged
lucapinello merged 1 commit intochorus-applicationsfrom
audit/2026-04-21-v17-full-audit
Apr 21, 2026
Merged

v17 full audit: MCP server spec drift + Borzoi/LegNet numbers + CEBP walkthrough#31
lucapinello merged 1 commit intochorus-applicationsfrom
audit/2026-04-21-v17-full-audit

Conversation

@lucapinello
Copy link
Copy Markdown
Contributor

Summary

A comprehensive ship-ready audit: every live doc, every walkthrough README vs its committed example_output, all 17 shipped HTML reports screenshotted via headless Chrome, the Python API, the chorus-mcp tool registry, error messages, and macOS-arm64 device detection.

Five drifts fixed

  1. chorus/mcp/server.py:77 (ORACLE_SPECS) — AlphaGenome "5930 tracks" → 5,731 (matches list_oracles() output and the notebooks after v16).
  2. chorus/mcp/server.py:1482 (MCP system prompt) — same "5930" → "5,731". Also added 7,611 tracks explicitly for Borzoi so a Claude session using chorus-mcp gets consistent numbers.
  3. chorus/mcp/server.py:71 — LegNet input_size_bp: 230200 (actual create_oracle('legnet').sequence_length == 200).
  4. scripts/README.md:37, 94 — Borzoi "7,612" → 7,611 (real count summed across assay types via get_track_info()).
  5. examples/walkthroughs/validation/SORT1_rs12740374_with_CEBP/README.md:21 — "CEBPB binding gain: +0.22" → +0.27 (committed example_output.md line 31 shows +0.270; 0.05 gap is beyond CPU non-det).

What else was checked and is clean

  • Every other walkthrough number is either an exact match with the companion example_output.md or within ±0.006 (accept as CPU non-det).
  • Every formula label: chromatin/TF/histone/TSS → log2FC; gene expression → lnFC; MPRA → Δ (alt−ref). Zero rogue labels.
  • 17 HTML reports render with glossary, formula chips, consensus matrix, per-layer tables, IGV placeholder. IGV itself is client-side JS and doesn't render in headless file:// — expected.
  • Error paths: create_oracle('fakeOracle') → helpful ValueError with the valid list; predict() without load → clear ModelNotLoadedError.
  • MCP tool registry — 22 tools, all naming matches what the walkthroughs reference.
  • Platform detection on macOS arm64detect_platform() returns key=macos_arm64, has_cuda=False; each oracle env handles its own backend (MPS/TF Metal/JAX-CPU) by design.
  • Zero live references to the old examples/applications/ path (only audits/ snapshots still mention it, which is intentional).

Known latent issues, NOT fixed here

  • Off-by-one in predict_variant_effect ref-allele check (chorus/core/base.py:322-328) — tracked in audits/2026-04-21_v16_notebook_and_html_audit.md. Needs its own focused code PR with SNV + indel + reverse-strand coverage.

Test plan

  • pytest tests/ --ignore=tests/test_smoke_predict.py -q333 passed / 1 skipped (9m 9s)
  • Screenshotted all 17 HTMLs at 1400×2800 and reviewed each for label/formula/layout drift
  • python -c 'from chorus.mcp.server import mcp; import asyncio; print(len(asyncio.run(mcp._list_tools())))' → 22 tools
  • python -c 'import chorus; chorus.create_oracle(\"fakeOracle\", use_environment=False)' raises the expected ValueError with the valid list

🤖 Generated with Claude Code

Ran a comprehensive ship-ready pass — every live doc, every walkthrough
README vs its committed example_output, all 17 shipped HTML reports, the
Python API, the MCP tool registry, error messages, and macOS-arm64
device detection.

Five drifts fixed:

1. chorus/mcp/server.py:77 ORACLE_SPECS — AlphaGenome "5930 tracks" →
   5,731 (real count, matches list_oracles() output).
2. chorus/mcp/server.py:1482 MCP system prompt — same "5930" → "5,731",
   and made Borzoi's 7,611 explicit on the adjacent line so a Claude
   session via chorus-mcp doesn't see stale numbers.
3. chorus/mcp/server.py:71 — LegNet input_size_bp: 230 → 200 (actual
   create_oracle('legnet').sequence_length == 200).
4. scripts/README.md:37, 94 — Borzoi "7,612" → 7,611 (actual track
   count summed across assay types via get_track_info()).
5. examples/walkthroughs/validation/SORT1_rs12740374_with_CEBP/README.md:21
   — "CEBPB binding gain: +0.22" → +0.27 (committed example_output.md
   line 31 shows +0.270; 0.05 gap is beyond CPU non-det).

Also audited and clean: every other walkthrough number (within ±0.006),
all formula labels (log2FC / lnFC / Δ), error messages
(create_oracle('fakeOracle') and ModelNotLoadedError both clear), MCP
tool list (22 tools, all named consistently with walkthrough READMEs),
platform detection on macOS arm64. Full report in
audits/2026-04-21_v17_full_audit.md.

Tests: 333 passed / 1 skipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lucapinello lucapinello merged commit 3649064 into chorus-applications Apr 21, 2026
1 check passed
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