|
| 1 | +# Existing Python project real-case validation — 2026-07-31 |
| 2 | + |
| 3 | +## Scope |
| 4 | + |
| 5 | +This acceptance validates a narrow Research Forge capability: an owner can |
| 6 | +allow-list a slice of an existing Python project, freeze the files and the |
| 7 | +expected metric boundary, and replay that sealed package in fresh offline |
| 8 | +Docker workspaces. It does **not** claim that arbitrary Python repositories |
| 9 | +can already be converted into a complete two-arm scientific experiment. |
| 10 | + |
| 11 | +Runtime entrypoint: |
| 12 | + |
| 13 | +```text |
| 14 | +research_forge.existing_project_replay |
| 15 | +scripts/run_existing_project_replay.py |
| 16 | +``` |
| 17 | + |
| 18 | +Deterministic controls: |
| 19 | + |
| 20 | +- only explicitly listed files enter the package; |
| 21 | +- secret-bearing names, parent traversal and symlinks are rejected; |
| 22 | +- the host source path is not written to the package or report; |
| 23 | +- package identity is computed from the spec and file hashes, not time; |
| 24 | +- the input mount and container root are read-only; |
| 25 | +- the output mount is separate and writable; |
| 26 | +- networking, added devices and Docker socket mounts are disabled; |
| 27 | +- metrics come from a frozen parser, not from an agent interpretation; |
| 28 | +- every case runs twice in separate workspaces; |
| 29 | +- both replays must match the frozen historical expectation and each other. |
| 30 | + |
| 31 | +## Real case 1 — stock disclosure extractor |
| 32 | + |
| 33 | +Source class: pre-existing user stock-research repository. |
| 34 | + |
| 35 | +Frozen slice: |
| 36 | + |
| 37 | +- deterministic annual-report extraction implementation; |
| 38 | +- its package initializer; |
| 39 | +- its existing disclosure-extractor test module. |
| 40 | + |
| 41 | +Observed result: |
| 42 | + |
| 43 | +```json |
| 44 | +{ |
| 45 | + "case_id": "stock-disclosure-extractor-real-project-v1", |
| 46 | + "status": "verified", |
| 47 | + "tests_run": 5, |
| 48 | + "pass_rate": 1.0, |
| 49 | + "historical_match": true, |
| 50 | + "cross_replay_equal": true, |
| 51 | + "clean_workspace_count": 2, |
| 52 | + "package_sha256": "4ed6d143856ed736294d4048ab5b0f5230c4a232a3b7919db0150c6864e65964" |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +## Real case 2 — adviser adapter inventory |
| 57 | + |
| 58 | +Source class: pre-existing user investment-adviser repository. |
| 59 | + |
| 60 | +Frozen slice: |
| 61 | + |
| 62 | +- the existing adapter inventory implementation; |
| 63 | +- its package initializer; |
| 64 | +- its existing adapter-inventory test module. |
| 65 | + |
| 66 | +Observed result: |
| 67 | + |
| 68 | +```json |
| 69 | +{ |
| 70 | + "case_id": "advisor-adapter-inventory-real-project-v1", |
| 71 | + "status": "verified", |
| 72 | + "tests_run": 1, |
| 73 | + "pass_rate": 1.0, |
| 74 | + "historical_match": true, |
| 75 | + "cross_replay_equal": true, |
| 76 | + "clean_workspace_count": 2, |
| 77 | + "package_sha256": "373717c5c465b19e28aa62e81e6b20167f663e864f1e05b8bb0e81be3fbb3bc9" |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | +Both cases used image ID: |
| 82 | + |
| 83 | +```text |
| 84 | +sha256:57cd7c3a7a273101a6485ba99423ee568157882804b1124b4dd04266317710de |
| 85 | +``` |
| 86 | + |
| 87 | +## Claim boundary |
| 88 | + |
| 89 | +These are **real-case, same-host isolated replays**. They establish C4 for |
| 90 | +the narrow sealed-project replay utility. They are not C5 independent |
| 91 | +validation because the same Research Forge installation orchestrated both |
| 92 | +containers. They also do not yet prove that the full |
| 93 | +`existing_python_project_v1` Stage 2 → Stage 3 contract/build/verdict path is |
| 94 | +C4. Independent workers, external receipt verification and scientific |
| 95 | +baseline/treatment replay remain separate acceptance items. |
0 commit comments