Historical deployment analysis โ walk git history, deploy per day, test all endpoints, capture screenshots, restore working fragments
Project description
resplit
AI Cost Tracking
- ๐ค LLM usage: $0.9000 (6 commits)
- ๐ค Human dev: ~$215 (2.2h @ $100/h, 30min dedup)
Generated on 2026-05-01 using openrouter/qwen/qwen3-coder-next
Historical deployment analysis โ walk git history day by day, deploy per commit, test all endpoints, capture screenshots, restore working fragments.
What it does
- Walk โ iterates through git history day by day (configurable range)
- Deploy โ starts the service per commit (docker-compose / uvicorn / none)
- Scan โ detects endpoints via
deta scanโ OpenAPI โ Traefik labels fallback - Test โ runs
testqlscenarios or falls back to HTTP probe per endpoint - Screenshot โ Playwright screenshots per endpoint with retry/timeout
- Report โ generates
report.html+results.jsonper day + timelineindex.html - Restore โ extracts the last working day of an endpoint as an isolated project
- Dashboard โ overlays health% timeline with avg cyclomatic complexity (via
toon)
Install
pip install resplit
# with Playwright screenshots
pip install "resplit[screenshots]"
playwright install chromium
# development
pip install -e ".[dev]"
Quick start
# Dry-run: scan last 30 days without deploy
resplit walk . --days 30 --dry-run
# Full walk with docker-compose
resplit walk . --days 30 --deploy docker-compose
# Walk a specific date range
resplit walk /path/to/repo --from 2024-01-01 --to 2024-04-01
# Restore last working version of an endpoint
resplit restore /api/health .
# Generate timeline report from existing results
resplit report
# Generate CC vs health% dashboard
resplit dashboard --repo .
# Show version
resplit version
CLI reference
resplit walk
resplit walk [REPO] [OPTIONS]
REPO Path to git repository (default: .)
Options:
--days INT How many days back (default: 30)
--from TEXT Start date YYYY-MM-DD
--to TEXT End date YYYY-MM-DD
--output PATH Output directory (default: .resplit)
--deploy TEXT Deploy method: auto|docker-compose|uvicorn|none
--health-url TEXT Health check URL (default: http://localhost:8003/api/health)
--base-url TEXT Base service URL (default: http://localhost:8003)
--screenshots / --no-screenshots
Take Playwright screenshots (default: true)
--dry-run Scan only, no deploy
resplit restore
resplit restore ENDPOINT [REPO] [OPTIONS]
ENDPOINT Endpoint path e.g. /api/health
Options:
--output PATH Target project directory (default: restored/)
--results-dir PATH Walk results directory (default: .resplit)
resplit report
resplit report [OPTIONS]
Options:
--results-dir PATH Walk results directory (default: .resplit)
resplit dashboard
resplit dashboard [OPTIONS]
Options:
--results-dir PATH Walk results directory (default: .resplit)
--repo PATH Repository path for CC extraction via toon (optional)
Output structure
.resplit/
2024-03-15/
commit.txt # sha ยท message ยท author ยท timestamp
endpoints.json # detected endpoints
results.json # HTTP / testql results per endpoint
testql-results.json # raw testql output (if testql available)
report.html # per-day HTML report with screenshots
screenshots/
GET_api_health.png
GET_api_items.png
index.html # timeline of all days
dashboard.html # CC vs health% chart (after resplit dashboard)
Configuration โ resplit.yaml
project:
name: "my-api"
repo: "."
deploy:
method: docker-compose # docker-compose | uvicorn | custom | none
compose_file: docker-compose.yml
health_url: http://localhost:8003/api/health
health_timeout: 60
health_interval: 2
scan:
days: 30
earliest_commit_per_day: true
testql:
scenarios_dir: testql-scenarios/
base_url: http://localhost:8003
timeout: 10
output:
dir: .resplit
screenshots: true
html_report: true
Architecture
resplit/
โโโ resplit/
โ โโโ __init__.py
โ โโโ cli.py # Typer CLI: walk, restore, report, version, dashboard
โ โโโ models.py # Dataclasses: WalkConfig, DayResult, Endpoint, CommitInfo
โ โโโ git_walker.py # Day-by-day git history iteration
โ โโโ deployer.py # Deploy method detection + docker-compose/uvicorn lifecycle
โ โโโ endpoint_scanner.py # deta scan โ OpenAPI โ Traefik labels fallback
โ โโโ tester.py # testql runner with HTTP probe fallback
โ โโโ screenshotter.py # Playwright screenshots with retry/timeout
โ โโโ reporter.py # HTML + JSON report per day + timeline index
โ โโโ restorer.py # Extract last working endpoint as isolated project
โ โโโ dashboard.py # CC (toon) vs health% comparative timeline
โโโ tests/ # 44 tests (pytest)
โโโ examples/
โ โโโ 01-dry-run-walk/
โ โโโ 02-docker-compose-project/
โ โโโ 03-restore-endpoint/
โโโ testql-scenarios/
โโโ pyproject.toml
โโโ resplit.yaml.example
Endpoint scanner โ 3-level fallback
| Level | Source | What it returns |
|---|---|---|
| 1 | deta scan |
services โ ports โ health paths |
| 2 | /openapi.json |
full endpoint list from OpenAPI spec |
| 3 | docker-compose Traefik labels | PathPrefix rules |
| 4 | hardcoded fallback | GET /api/health |
Tester โ 2-level fallback
| Level | Condition | Behaviour |
|---|---|---|
| 1 | testql installed + testql_dir set |
runs .testql.yaml scenarios |
| 2 | fallback | HTTP GET probe per endpoint |
Module summary
| Module | CCฬ | Functions | Purpose |
|---|---|---|---|
cli |
6.3 | 8 | CLI entry points |
models |
โ | โ | Dataclasses only |
git_walker |
3.3 | 6 | Git history iteration |
deployer |
3.5 | 9 | Deploy lifecycle |
endpoint_scanner |
5.5 | 6 | Endpoint detection |
tester |
4.3 | 6 | Endpoint testing |
screenshotter |
3.6 | 5 | Screenshots |
reporter |
6.0 | 6 | HTML/JSON reports |
restorer |
5.5 | 5 | Endpoint extraction |
dashboard |
4.5 | 4 | CC vs health chart |
Hotspots (CC โฅ 9):
walk(CC=15),report(CC=13),extract_endpoint(CC=9),save_html(CC=9),_scan_via_compose_labels(CC=9)
Dependencies
Runtime: typer>=0.12, rich>=13, gitpython>=3.1, httpx>=0.27, pyyaml>=6, pydantic>=2, deta>=0.1
Optional: playwright>=1.44 (screenshots)
Dev: pytest>=8, pytest-cov, pytest-asyncio, ruff, mypy
Examples
See examples/ for ready-to-run scenarios:
01-dry-run-walk/โ scan history without deploy02-docker-compose-project/โ full walk with docker + screenshots + dashboard03-restore-endpoint/โ restore last working endpoint as isolated project
License
Licensed under Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rebuild-0.1.6.tar.gz.
File metadata
- Download URL: rebuild-0.1.6.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5a61b4a1e2d72e1af2df324fe215a58e42ec51fdbd4e49adb198519b1c25528
|
|
| MD5 |
97177a1c0dce0e0e12911de29f163421
|
|
| BLAKE2b-256 |
94faca2ce241f24571093c33b7c93f7e9474f3c15d0e710647337708c0c95825
|
File details
Details for the file rebuild-0.1.6-py3-none-any.whl.
File metadata
- Download URL: rebuild-0.1.6-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3b279467bc5e4feb40bfac37423f702372e5847eb7781c40a2c19a04ee5c3d4
|
|
| MD5 |
ca194f9559b2e08357f66c1540e79e5b
|
|
| BLAKE2b-256 |
371e01a8fe609710cff1ffd9470429fc74811b43a9956ee22201bf261cac1ce1
|