← Back to Pull requests

Build the bounding job: the study-bounds kind and study write-bounds #638

Closed
unknown closed this pull request without merging on Nov 21, 2026 05:41 UTC
View on GitHub
unknown unknown commented on Nov 21, 2026 05:34 UTC
Author

Closes #620. Built from the decisions in #616 and #617.

Summary

seqforge pass start study-bounds          one unit per study, keyed by its starting Series
  load(key)
    linked_series: one hop over SuperSeries, BioProject, umbrella BioProject, shared paper
    > 50 Series                      -> refused "group too large"
    group_text: records + abstracts  -> the unit's inputs (a changed paper re-costs its own study)
  run
    code keeps the starting Series (or its sub-Series); every SuperSeries is left out
    Jev: one yes/no per other Series and paper, as written; then the same questions reversed
    p(yes) > 0.5 -> in; claims are `inferred`, naming both answers
    the two answers disagree on any record -> unsettled (its file is still written)
    the bounds fail the format check      -> refused
seqforge study write-bounds --out DIR [--name job-bounds.yaml]
    writes <DIR>/<ID>/<name> from the pass's answers; never overwrites

 src/seqforge/
   study/
+    bounding.py      the study-bounds kind and write_bounds
+    group.py         was standard_set/material.py
   standard_set/
-    draft.py         the standard-set-bounds kind (retired)
-    judge.py         (retired)
 cli: + study write-bounds; - standard-set draft, - standard-set judge
-scripts/convert_standard_set_bounds.py   one-off converter of the retired files

Docs: step 1 of docs/study-workflow.md is filled in. The old drawing commands are marked as history in the workflow page, evals/standard-set/README.md and docs/hand-work-files.md. No file of the 50 under evals/standard-set/ changes.

Evidence

  • New tests in tests/test_study_bounding.py, each with a fake Jev: a study is its starting Series plus every record one link away, each placed by Jev; a record whose two answers disagree makes the study unsettled and still writes the file; a group of more than 50 Series is refused and writes nothing. The three take 0.3 s.

  • Live smoke on 3 of the 50 (GSE241718, GSE240375, GSE131269) against the toy store: $0.00, because every Jev call was a gateway cache hit on the prototype's own calls, which shows the job sends Jev byte-identical text. All 3 files pass seqforge study check-bounds and match the standard set's bounds. GSE131269 ended unsettled.

  • pixi run check (local): lint, format, types and conformance pass. Corpus lane: 174 passed. Unit lane: 1573 passed, plus 6 harvest PDF and XLSX tests, which this branch does not touch, that timed out on their first library import in this worktree; pixi run test-failed then passed all 6. The external lane was not run locally (no STAR binaries in this worktree), so CI runs it.

  • vale, markdownlint and docs-build pass.
  • Merge Danger

    Door: two-way

    The retired commands can come back by revert. No file of the 50 is rewritten.

    Blast Radius: standard-set

    seqforge standard-set draft and judge and the standard-set-bounds kind are gone. Swapping a study into the set now runs study-bounds with --keys, then study write-bounds.

    🤖 Generated with Claude Code

    Diff: 388 lines (+291 / -97) across 4 files Reviewer: greptile-apps[bot] Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.43) × (1 − Review Confidence (0.50)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 388 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 71% · Reviewer familiarity: 35%
    49%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.357
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #638"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 49.6% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.1% (MEDIUM) · Higher = larger blast radius
    43.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 49.6% · Lower = rushed or shallow review
    49.6%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.7% · Safe to merge
    21.7%