Add brief scan integration for research tooling detection - #233
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for ingesting brief scanner output into Project records and uses it to surface a (currently zero-weight) “research tooling” signal in ScienceScoreCalculator, with a rake task for controlled backfilling and container support for installing the brief binary.
Changes:
- Add
projects.brief(jsonb) plus aProject::Sync#fetch_briefmethod to populate a trimmed subset ofbriefoutput. - Add
ScienceScoreCalculator#check_research_toolingwith taxonomy-domain detection and tiered name-based fallback. - Add tests for
fetch_briefandcheck_research_tooling, plus aprojects:fetch_briefrake task and Docker installation forbrief.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/services/science_score_calculator_test.rb | Adds coverage for research-tooling detection via taxonomy domain and name-tier fallback. |
| test/models/project_sync_test.rb | Adds coverage for fetch_brief success/trim behavior and error/early-return cases. |
| lib/tasks/projects.rake | Adds projects:fetch_brief backfill task with LIMIT control. |
| Dockerfile | Installs the brief binary from GitHub releases during image build. |
| db/schema.rb | Reflects new projects.brief jsonb column. |
| db/migrate/20260824152455_add_brief_to_projects.rb | Migration adding brief jsonb column to projects. |
| app/services/science_score_calculator.rb | Adds check_research_tooling and includes it in the breakdown (weight currently 0.0). |
| app/models/concerns/project/sync.rb | Adds fetch_brief implementation using Open3.capture3 and trimmed JSON persistence. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
andrew
force-pushed
the
brief-integration
branch
from
August 24, 2026 16:05
20d6d13 to
9f0eaa1
Compare
andrew
marked this pull request as ready for review
August 24, 2026 16:08
Adds a brief jsonb column, Project::Sync#fetch_brief which shells out to 'brief -json -depth 1 <clone_url>' and stores languages/ package_managers/tools/resources/manifests/lines (dropping the heavy dependencies/git/stats blocks), and ScienceScoreCalculator#check_research_tooling which reads brief.tools[*].taxonomy.domain against research/bioinformatics/ scientific-computing/high-performance-computing, falling back to name matching against known research tools in three tiers. fetch_brief is not called from sync (shallow clone per sync is too heavy); a projects:fetch_brief rake task runs it against LIMIT projects with brief IS NULL AND science_score > 0. has_research_tooling weight is 0 until brief data is populated. Dockerfile installs the brief linux binary from GitHub releases (BRIEF_VERSION=0.11.0).
Wrap the brief invocation in 'timeout -k 10 120' so a stalled
clone cannot hang the sequential rake task. On non-zero exit,
timeout, or parse failure, store {error, attempted_at} in the
brief column so where(brief: nil) skips the row on the next
backfill run instead of retrying the same failures forever.
check_research_tooling reports the scan error in details but
scores absent.
Includes the research tool detectors (Snakemake, Nextflow, nf-core, MultiQC, Dockstore, DVC, Quarto, Jupyter, targets, ASV, Fortitude, R/Julia tooling) and taxonomy.domain tags on Snakemake, Nextflow, nf-core, MultiQC and targets.
andrew
force-pushed
the
brief-integration
branch
from
August 24, 2026 16:15
9f0eaa1 to
fd574c8
Compare
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.
Adds a
briefjsonb column on projects, afetch_briefsync method that shells out tobrief -json -depth 1 <clone_url>(bounded by a 120s timeout) and stores the trimmed output, and acheck_research_toolingsignal inScienceScoreCalculator.The check reads
brief.tools[*].taxonomy.domainforresearch/bioinformatics/scientific-computing/high-performance-computingand falls back to name-matching against known research tools (Snakemake, Nextflow, nf-core, MultiQC, Dockstore, Quarto, DVC, targets, ASV, Fortitude, Jupyter, and the R/Julia package tooling clusters) for detectors that don't yet carry a domain tag.fetch_briefis not called from the main sync loop since a shallow clone per project is too heavy for the shared worker.rake projects:fetch_briefpopulates it at a controllable rate (LIMITenv var, default 100). Failed scans store{error, attempted_at}so they don't block the backfill queue. Thehas_research_toolingscoring weight is 0 until that starts running.Dockerfile installs brief 0.12.0 from GitHub releases.