2.7 KiB
Executable File
2.7 KiB
Executable File
E2E Task 1 — Wire id_map_file through CLI and backend
Source: docs/superpowers/plans/2026-07-10-ppi-id-map-e2e-wiring.md, Task 1.
Binding constraints
- Karpathy/YAGNI: no new helper framework for this deterministic path.
- Modify only
skills/ppi/run.py,apps/web/pipeline_backend.py,tests/unit/test_ppi_id_resolution.py, andtests/unit/test_pipeline_backend_execution_env.py. - Freeze resolver, STRING client, rate gate, Reset, frontend, contracts, and manifest schema.
- Backend may resolve only
<job.input_dir>/<ppi_species>/<ppi_species>.pep_cds_idmap.tsv. - Never scan another species/job/final/stale path.
- Projected mode (
mapping_filepresent) requires the same-species ID map and fails before launching skill when absent. - Direct-target mode may run without ID map; if exact current-species map exists it may be passed.
- Preserve 72 existing convergence tests. Use test4py311. Git is unavailable.
Required TDD work
- Add a failing CLI test that replaces
PpiSkillwith a fake, invokesmain()with--id-map /tmp/soe.pep_cds_idmap.tsv, and asserts capturedid_map_file == Path(...). No network. - Run the test and record RED.
- Add exactly:
parser.add_argument("--id-map", help="Species-matched local PEP/CDS ID evidence TSV")
and pass:
id_map_file=Path(args.id_map) if args.id_map else None,
to existing PpiSkill.run.
4. Add failing backend tests for:
- projected soe with exact soe map: command includes exact
--mappingand--id-map; - projected soe with only ath map: no subprocess, explicit soe missing-map failure, ath never selected;
- projected soe with no map: no subprocess, explicit failure;
- direct supported target without map: command omits both
--mappingand--id-map.
- Add minimal inline backend lookup immediately before command construction:
id_map_file = Path(job.input_dir) / ppi_species / f"{ppi_species}.pep_cds_idmap.tsv"
if mapping_file and not id_map_file.is_file():
return (
f"❌ PPI projected analysis requires species-matched ID map: {id_map_file}",
manifest,
)
and after mapping argument:
if id_map_file.is_file():
cmd.extend(["--id-map", str(id_map_file)])
- Run focused tests:
/home/xia-lab/miniconda3/envs/test4py311/bin/python -m pytest \
tests/unit/test_ppi_id_resolution.py \
tests/unit/test_pipeline_backend_execution_env.py \
-k 'id_map or ppi' -q
- Run full convergence regression and py_compile. Expected: previous 72 plus new cases pass; compile exits 0.
- Self-review exact diff and scope.
Report
Write .superpowers/sdd/e2e-task-1-report.md with RED/GREEN evidence, exact active files/diff summary, test counts, compile result, concerns, and status contract.