4.1 KiB
Executable File
Task 2 — PPI ID behavioral-core convergence report
Status
PASS. The full green PPI ID test module was archived exactly, and the active module now collects only the 19 behaviors required by the Task 2 brief. Production code and Tasks 3–5 were not edited by this task.
Archive
- Source at archive time:
tests/unit/test_ppi_id_resolution.py - Exact archive:
项目记录/代码归档/2026-07-10_PPI_ID修订收敛前快照/test_ppi_id_resolution.full.py.txt - Source/archive SHA-256 immediately after
cp:35d4b3c6da7329ea04d07f03473ea5be10698e1b686a09bb7811d7e8d4b729f5 - The archive was made with
cpafter the pre-rewrite four-file checkpoint passed all 177 collected tests.
Exact active diff scope
- Modified only
tests/unit/test_ppi_id_resolution.py. - Retained the 19 explicitly listed test functions and the imports/helpers they require.
- Removed all other test functions and support definitions used only by them.
- Removed unused image-era members from
FakeResponseandFakeHttpClient; these helper-only deletions do not alter a retained test body. - Retained test bodies and assertions are exact source matches to the archived module.
- Archive-to-active
difflib.unified_diffaccounting:added_lines=3 deleted_lines=867(the three additions are compact replacement signatures/conditions in the pruned helpers; net reduction 864 lines). - No production source was changed.
Line counts
Command:
wc -l tests/unit/test_ppi_id_resolution.py \
项目记录/代码归档/2026-07-10_PPI_ID修订收敛前快照/test_ppi_id_resolution.full.py.txt
Result:
581 tests/unit/test_ppi_id_resolution.py
1445 项目记录/代码归档/2026-07-10_PPI_ID修订收敛前快照/test_ppi_id_resolution.full.py.txt
Reduction: 864 lines (59.8%).
Test evidence
Pre-rewrite four-file checkpoint:
/home/xia-lab/miniconda3/envs/test4py311/bin/python -m pytest \
tests/unit/test_id_resolution.py \
tests/unit/test_ppi_id_resolution.py \
tests/unit/test_ppi_string_policy.py \
tests/unit/test_pipeline_backend_execution_env.py -q
Result: 177 passed in 7.01s (exit 0).
Required focused checkpoint after rewrite:
/home/xia-lab/miniconda3/envs/test4py311/bin/python -m pytest \
tests/unit/test_ppi_id_resolution.py \
tests/unit/test_id_resolution.py \
tests/unit/test_ppi_string_policy.py -q
Result: 44 passed in 0.45s (exit 0): 19 active PPI ID tests, 12 ID-resolution tests, and 13 STRING-policy tests.
Required Task 1 four-file checkpoint after rewrite:
/home/xia-lab/miniconda3/envs/test4py311/bin/python -m pytest \
tests/unit/test_id_resolution.py \
tests/unit/test_ppi_id_resolution.py \
tests/unit/test_ppi_string_policy.py \
tests/unit/test_pipeline_backend_execution_env.py -q
Result: 76 passed in 6.76s (exit 0). The collection fell from 177 to 76 solely because the active PPI ID module fell from 120 collected cases to the required 19, a reduction of 101 archived cases.
Syntax verification:
/home/xia-lab/miniconda3/envs/test4py311/bin/python -m py_compile \
tests/unit/test_ppi_id_resolution.py
Result: exit 0.
Self-review
- Parsed both active and archived modules and confirmed exactly 19 active
test_*definitions. - Compared every retained test definition with its archived source segment; every retained test body and assertion matched exactly.
- Reviewed helper usage and removed the unused image-response headers/content, image streaming/status helpers, optional response-URL mode, and unused GET path.
- Confirmed the archive checksum after the rewrite remained
35d4b3c6da7329ea04d07f03473ea5be10698e1b686a09bb7811d7e8d4b729f5. - Confirmed no assertion was weakened or rewritten; non-test edits are limited to pruning the retained fake HTTP helpers.
- Both required offline pytest checkpoints passed.
Concerns
- Both pytest runs emit the pre-existing
RequestsDependencyWarning: installedurllib3 2.6.3orchardet 7.1.0/charset_normalizer 3.4.7does not match the supportedrequestsdependency range. It did not affect collection or outcomes. - No live STRING request was made; all verification remained offline as required.