How pramodbasavarajmenasi/siftwise works
siftwise is a self-hosted test-impact service for CI: it records JUnit results and changed files, builds test history, then selects tests affected by a proposed change and returns commands with reasons. CI uploads flow through parsing and ingestion into Postgres; rollups update derived history. A developer or GitHub Action supplies a diff, while local Go/Python analysis and server-side history selection produce the test plan. The README documents the main workflow and action behavior; some route and domain connections are based on the cited excerpts or SOURCE INDEX, so unsampled internals are not expanded.
Main entry points: cli/main.py CLI commands · runs.py Run ingestion API · api/main.py API application · select.py Selection API
Components 20
CLI and CI clients
- CLI commands
src/siftwise/cli/main.py - GitHub Actions glue
src/siftwise/cli/gha.py - Python import graph
src/siftwise/cli/pygraph.py - Go package graph
src/siftwise/cli/gograph.py - Repo configuration
src/siftwise/cli/repoconfig.py
HTTP API
- API application
src/siftwise/api/main.py - Run ingestion API
src/siftwise/api/routes/runs.py - Selection API
src/siftwise/api/routes/select.py - History API
src/siftwise/api/routes/history.py - Repository rollup API
src/siftwise/api/routes/repos.py
Test intelligence
- JUnit parser
src/siftwise/core/junit.py - Run ingestion
src/siftwise/core/ingest.py - Test selector
src/siftwise/core/selector.py - History and rollup
src/siftwise/core/history.py - API schemas
src/siftwise/core/schemas.py
Persistence
- Data models
src/siftwise/core/models.py - Postgres
src/siftwise/db.py
Other components
- Developer
- CI workflow
- Test runner
Connections 28
- Developer → CLI commands: requests selection
README.md - CI workflow → GitHub Actions glue: runs action
README.md - GitHub Actions glue → CLI commands: invokes commands
src/siftwise/cli/gha.py - CLI commands → Python import graph: builds import graph
src/siftwise/cli/main.py - CLI commands → Go package graph: analyzes Go packages
src/siftwise/cli/main.py - CLI commands → Repo configuration: loads repo config
src/siftwise/cli/main.py - CLI commands → Selection API: requests selection
README.md - Selection API → Test selector: selects tests
- Test selector → History and rollup: loads history
src/siftwise/core/selector.py - Test selector → Data models: uses test records
src/siftwise/core/selector.py - Selection API → API schemas: returns selection schema
- CLI commands → Test runner: prints test command
README.md - CI workflow → Run ingestion API: uploads JUnit
README.md - Run ingestion API → JUnit parser: parses XML
src/siftwise/api/routes/runs.py - Run ingestion API → Run ingestion: creates run
src/siftwise/api/routes/runs.py - Run ingestion API → API schemas: validates metadata
src/siftwise/api/routes/runs.py - Run ingestion → Data models: stores results
- CI workflow → Repository rollup API: requests rollup
README.md - Repository rollup API → History and rollup: recomputes stats
src/siftwise/api/routes/repos.py - History API → History and rollup: queries test history
- API application → Run ingestion API: registers route
src/siftwise/api/main.py - API application → Selection API: registers route
src/siftwise/api/main.py - API application → History API: registers route
src/siftwise/api/main.py - API application → Repository rollup API: registers route
src/siftwise/api/main.py - Postgres → Data models: persists entities
- History and rollup → Data models: rolls up results
src/siftwise/core/history.py - Run ingestion API → Postgres: uses sessions
src/siftwise/api/routes/runs.py - Repository rollup API → Postgres: uses sessions
src/siftwise/api/routes/repos.py