[P0][Stability] job開始前にsource/target referenceとcontigを明示検証し raw KeyError/StopIteration を出さない - #53
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: acab6a5af5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if status == "ambiguous": | ||
| raise ValueError(f"{side} reference '{reference['name']}' has multiple {kind.upper()} files ({', '.join(candidates)}); keep exactly one {kind.upper()} file per reference folder.") |
There was a problem hiding this comment.
Detect ambiguous files before checking their status
When a folder contains multiple FASTA or GFF files, this branch is unreachable: detect_genomes() selects the first matching file with next(...), always reports its status as "ready", and never populates *_candidates. Consequently preflight accepts the reference and the job can silently analyze an arbitrary assembly or annotation instead of rejecting the ambiguity. Enumerate candidates and set the ambiguous status in genome discovery, or detect the duplicates here.
AGENTS.md reference: AGENTS.md:L11-L12
Useful? React with 👍 / 👎.
# Conflicts: # backend/qtlift/pipeline.py # tests/test_pipeline.py
acab6a5 to
aa5fe89
Compare
Fixes #48
実施内容
un_job()\ 冒頭に \preflight()\ を追加し、解析開始前に以下を一括検証(失敗時は \ValueError\ で具体的メッセージを返す)
ext(...)\ を preflight の返却値に置換
テスト
uff check\ パス