Repository navigation
blast-jobs: BLAST job service for the MCP's BLAST tools - #6
Merged
Merged
Conversation
…nced table, validation
…e IO on the blocking pool
…dered, runner cleanups
Dockerfile: rust:1.90-bookworm --locked build; NCBI BLAST+ 2.17.0 x64 tarball from the versioned HTTPS path pinned by SHA-256 3888112d...a411b; bookworm-slim runtime with curl and libgomp1, the seven binaries in /opt/ncbi-blast/bin, -version checks at build time, uid 10002, HEALTHCHECK on /internal/health?liveness=1. tests/real_blast.rs (skips unless BLAST_JOBS_REAL_BLAST names a BLAST+ bin dir): builds the Notch fixture with the archive's makeblastdb flags (-parse_seqids) and checks a known hit for blastn, blastp, blastx, tblastn and tblastx, -task blastn-short via advanced, and the dust/seg defaults. tests/image-smoke.sh: blast-jobs check plus one real search and the health check inside the image. CI: blast-jobs-integration and blast-jobs-image, on master pushes and blast-jobs/ changes only. Docs: docs/blast-jobs.md, deploy samples, handoff section 7 points at blast-jobs.
…AST test pins 2.17.0 Move blast-jobs-integration and blast-jobs-image to .github/workflows/blast-jobs.yml with on.paths triggers and contents: read, dropping dorny/paths-filter. Pass the tarball pin through env. The real-BLAST test no longer falls back to PATH: every binary comes from BLAST_JOBS_REAL_BLAST and must report 2.17.0+, or the test fails.
- bench/run.sh: cleanup kills the run_job workers (and the curl or sleep each is waiting on) before removing $tmp, so an interrupted run leaves no pollers behind; pids are cleared once reaped. - Rejections of evalue, max_hits, matrix, megablast and genetic_code use invalid_<field> codes, and the MCP maps each to the tool argument of that name; max_hits and genetic_code are read signed so a negative value is coded rather than a serde failure; genetic_code is ignored unchecked for blastn and blastp. - Integer advanced flags are bounded to a C int (max_hsps stays clamped), so an oversized value is a 400 rather than a failed job. - scrub replaces backtick-quoted and key=/path tokens. - Catalogue::load refuses a database_root with whitespace or quotes. - ci.yml: top-level permissions: contents: read. - Remove validate::validate and State::as_str (unused); one SERVICE_OWNED (advanced) and one QUERY_FILE (command). - The wall-limit test's /proc scan runs on Linux only. - Docs: field codes, truncation header, lcase_masking has no effect, no slow-client timeout, BLAST_BASE_URL example, handoff downloads wording.
results_tsv reads X-Blast-Jobs-Truncated and returns it with the body. blast_results adds results_truncated (the envelope already owns `truncated` for its own size cut) and, when true, a summary sentence saying total_hits is a lower bound and how to narrow the search.
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.
blast-jobs: BLAST job service for the MCP's BLAST tools
A sibling crate
blast-jobs/that implements the internal job API the MCP'sblast_submit/blast_status/blast_resultstools call, by running pinned NCBI BLAST+ 2.17.0 (official tarball, SHA-256 verified) against a catalogue-described database directory, isolated in its own container.What ships
advancedflag table with an explicit deny list; per-program residue caps and wall limits; masking defaults matching the website.POST /internal/jobs,GET /internal/jobs/{id},GET /internal/jobs/{id}/results.tsv(6 std stitle, ≤ 16 MiB incl. header,X-Blast-Jobs-Truncated),GET /internal/health; bearer auth (constant-time), 429 + Retry-After on a full queue, 413 body limit.BLAST_JOBS_REAL_BLAST), dedicated path-filtered workflow withcontents: read.blast-jobs/bench/) with public RefSeq query sequences.blast_resultsnow reportsresults_truncated; five per-field 400 codes mapped to their arguments (handoff §7 updated).Verification
advancedstrings verified rejected or contained.Not in this PR