feat: pytest-authoritative collection (closes #98)#99
Conversation
…tead of always-toxic
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR implements the pytest-authoritative collection workflow by introducing a CollectedTest data structure and IPC communication pathway. The Zygote now fetches test metadata from Python's pytest collection and sends it to the Supervisor, which merges this authoritative list with Rust-discovered toxicity and fixture data to form the final RunnableTest schedule. Changes
Sequence Diagram(s)sequenceDiagram
participant Supervisor as Supervisor<br/>(main.rs)
participant Zygote as Zygote<br/>(zygote.rs)
participant PythonHarness as Python Harness<br/>(tach_harness.py)
participant IPC as IPC Channel
participant ToxGraph as Toxicity Graph<br/>(Rust Scan)
Supervisor->>Zygote: Spawn + config
Zygote->>PythonHarness: Load module & init_session(TACH_TARGET_PATH)
PythonHarness->>PythonHarness: pytest perform_collect()
PythonHarness->>PythonHarness: Populate _ITEMS_MAP
activate PythonHarness
PythonHarness->>PythonHarness: get_collected_tests() → serialize metadata
deactivate PythonHarness
Zygote->>IPC: Send session_effects (existing)
Zygote->>IPC: Send collected_tests vector (new)
Supervisor->>IPC: Recv session_effects
Supervisor->>IPC: Recv collected_tests
Supervisor->>ToxGraph: Lookup toxicity for Python-only tests
Supervisor->>Supervisor: Merge: collected_tests + Rust RunnableTests by node_id
Supervisor->>Supervisor: Create RunnableTest for Python-only entries
Supervisor->>Supervisor: Build final RunnableTest list (Rust+Python merged)
Supervisor->>Supervisor: Schedule tests (pytest-authoritative source)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Move 138 zero-failure modules to Cleared (pending tach re-test) and 4 modules with pytest failures to Failures. Remove Blocked section.
Summary
Make pytest's
perform_collect()the single source of truth for test discovery, eliminating the 142-moduletests.pycollection gap.CollectedTestIPC wire format andget_collected_tests()Python serializertests.pytois_test_file()for accurate toxicity scanningArchitecture
Testing
cargo fmt --checkcleancargo clippy -- -D warningscleanCloses #98
Summary by CodeRabbit
Release Notes
tests.pyfiles in test discovery workflows.