Skip to content

feat(M89): PD Topology-Aware Testing#191

Merged
hlin99 merged 1 commit into
mainfrom
feat/m89-topology-scan
Apr 6, 2026
Merged

feat(M89): PD Topology-Aware Testing#191
hlin99 merged 1 commit into
mainfrom
feat/m89-topology-scan

Conversation

@hlin99
Copy link
Copy Markdown
Member

@hlin99 hlin99 commented Apr 6, 2026

Summary

Implement PD topology-aware testing for discovering and testing all prefill/decode node pairs in a xPyD-proxy cluster.

Changes

  • src/xpyd_acc/topology.py: Core module with TopologyNode, NodePairResult, TopologyReport dataclasses, parse_topology(), build_pair_matrix(), scan_topology(), format_topology()
  • CLI: topology-scan subcommand with --proxy, --prompt, --samples, --json, --mock flags
  • CLI: Added --prefill-node and --decode-node flags to compare-logprobs for direct node-pair testing
  • tests/test_topology.py: 23 tests covering all functionality
  • ROADMAP.md: M88 marked ✅

Key Design

  • Pluggable test_fn in scan_topology() enables both mock and live testing
  • Cartesian product of prefill × decode nodes ensures full coverage
  • Per-pair verdict (clean/low/moderate/high) based on divergence rate thresholds
  • Rich terminal output with node pair matrix

Closes #190

- TopologyNode, NodePairResult, TopologyReport dataclasses
- parse_topology() for proxy discovery response parsing
- build_pair_matrix() generates all prefill×decode pairs
- scan_topology() tests all pairs via pluggable test function
- format_topology() rich terminal output with verdict matrix
- topology-scan CLI subcommand with --proxy, --prompt, --samples, --json, --mock
- --prefill-node and --decode-node flags on compare-logprobs
- 23 tests covering dataclasses, parsing, scanning, formatting, JSON export, CLI
- Updated ROADMAP.md (M88 ✅) and docs/iterations/current.md

Closes #190
Copy link
Copy Markdown

@hlin99-Review-Bot hlin99-Review-Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean design — pluggable test_fn, proper Cartesian coverage, well-structured dataclasses with verdict thresholds. 23 tests cover all paths. CI green. Docs updated. ✅

Copy link
Copy Markdown

@hlin99-Review-BotX hlin99-Review-BotX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean implementation. Pluggable test_fn design is solid, Cartesian pair matrix covers all combinations, verdict thresholds are sensible. 23 tests with good coverage. CLI integration (topology-scan + node flags on compare-logprobs) is well-structured. CI green. ROADMAP/docs updated. ✅

@hlin99 hlin99 merged commit 531d1ad into main Apr 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(M89): PD Topology-Aware Testing

3 participants