Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI

on:
push:
branches: [main]
pull_request:

permissions:
Expand Down Expand Up @@ -34,6 +35,8 @@ jobs:
fixbundle . --recommend --lang en
- name: Historical demo
run: python scripts/demo.py
- name: OTLP production evidence demo
run: python scripts/demo_otlp.py

live-github-evidence:
name: Live GitHub failure evidence
Expand Down
63 changes: 37 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 0.5.0 — 2026-09-02

### Added
- `fixbundle otlp --logs <file> [--traces <file>]` local production-evidence capture yolu.
- OpenTelemetry Protocol File Exporter JSON Lines için `resourceLogs/scopeLogs/logRecords` ve `resourceSpans/scopeSpans/spans` normalization.
- OTLP AnyValue + resource attribute normalization.
- Exact `traceId` / `spanId` evidence correlation.
- `service.name`, `service.version`, deployment environment/id ve telemetry SDK identity extraction.
- Stable exception evidence: `exception.type`, `exception.message`, `exception.stacktrace`.
- `--trace-id`, `--since`, `--until` bounded incident selection.
- `production/{incident,logs,traces,exceptions,services}.json` evidence shape.
- Selected/omitted input record provenance, `AI_HANDOFF.md` ve SHA-256 integrity.
- `scripts/demo_otlp.py` yeniden üretilebilir production incident demo.

### Safety / hardening
- OTLP core local/offline çalışır; network veya account istemez ve automatic upload yapmaz.
- Input absolute path'leri manifest'e serialize edilmez.
- Input başına byte guard ve total normalized record guard eklendi.
- Malformed JSONL, invalid time bounds, oversized input ve record overflow fail-closed davranır.
- Telemetry text serialization öncesi mevcut secret/path redaction katmanından geçer.
- Exact trace filter unrelated trace'leri sessizce evidence'e karıştırmaz.
- GitHub collector User-Agent ve `fixbundle_version` artık package `__version__` kaynağından gelir.
- Feature branch CI duplicate push + PR matrisleri kaldırıldı; branch PR bir kez, main push bir kez doğrulanır.

### Verification
- `tests/test_otlp.py`: exact trace selection, log/span correlation, exception normalization, service identity, unrelated-trace omission, secret redaction, checksums, malformed input, invalid time range ve record guard.
- `tests/test_otlp_cli.py`: gerçek `fixbundle otlp` CLI subprocess capture.
- `tests/test_otlp_limits.py`: oversized input fail-closed gate.
- `scripts/demo_otlp.py`: `PaymentGatewayError`, `payments-api`, secret redaction ve 7 checksum için yeniden üretilebilir PASS zinciri.
- v0.4 live GitHub failure evidence gate v0.5 CI içinde korunur.

## 0.4.0 — 2026-09-02

### Added
Expand All @@ -19,41 +50,21 @@
- `--repo` strict `owner/repo` formatıyla doğrulanır.
- Yalnız completed + failure run kabul edilir; belirsiz/in-progress run fail-closed davranır.
- Failed-job logları karakter guard ile sınırlandırılır ve secret redactor'dan geçirilir.
- Local bundle `system.json` paket sürümünü `__version__` üzerinden alır.

### Verified
- Kaynak incident: GitHub Actions run `33587184675` / run #41.
- Gerçek failure: üç Windows job, failed step `Historical demo`, log marker'ları `UnicodeEncodeError` + `cp1252`.
- Live proof: GitHub Actions run `33589138174` / run #63, commit `d15385a7f9ecd0a0dbd1c67b0caad6f7aa21bb95`.
- Live verifier: 3 failed job, 3 real log, failed-step identity, 9 checksum ve token-not-serialized gate'leri PASS.
- Aynı proof run'da Ubuntu/Windows/macOS × Python 3.10/3.12/3.13 platform matrisi 9/9 PASS ve ayrı live GitHub evidence job PASS.
- Live proof: GitHub Actions run `33589138174` / run #63.
- Post-merge main proof: run `33589630906` / run #66, 9/9 platform matrix + live evidence job PASS.

## 0.3.0 — 2026-09-02

### Added
- `--commit <ref>` ile eski bir Git commit'ini izole, detached worktree içinde capture etme.
- `incident.json`: requested ref, incident commit ve current HEAD kimliği.
- Current vs incident commit ayrımını `manifest.json` içine taşıyan `fixbundle/0.3` schema.
- `scripts/demo.py`: eski production commit'ini yeniden üreten gerçek, tek komutlu demo.
- README içine gerçek demo transcript'inden üretilen animasyonlu SVG kanıtı.
- Legacy Windows stdout encoding koşulunu yeniden üreten `tests/test_cli.py` regression testi.

### Safety
- Historical capture mevcut branch'i checkout etmez.
- Commitlenmemiş çalışma alanı capture öncesi/sonrası karşılaştırılır.
- Geçici worktree hata halinde de temizlenir.
- Output klasörü workspace dirty-state karşılaştırmasından ayrıştırılır.
- CLI stdout/stderr UTF-8 + replacement fallback ile yapılandırılarak legacy Windows code-page çökmesi giderildi.

### Verified
- Ubuntu, Windows ve macOS üzerinde Python 3.10 / 3.12 / 3.13 doğrulandı.
- Historical demo 5/5 invariant PASS.
- `--commit <ref>` ile isolated historical worktree capture.
- Current workspace preservation ve gerçek historical failure demo.
- Windows legacy stdout encoding regression fix.

## 0.2.0 — 2026-09-02
- Node.js, Python, Rust, .NET, Go ve Java stack algılama.
- `fixbundle --recommend` ile doğrulama komutu önerileri.
- Türkçe/İngilizce CLI.
- Git identity, stack evidence ve genişletilmiş redaction/path masking.
- `fixbundle --recommend`, Türkçe/İngilizce CLI, Git identity ve genişletilmiş redaction.

## 0.1.0 — 2026-09-02
- İlk local AI-ready diagnostic bundle prototipi.
202 changes: 114 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,67 +9,102 @@
<p align="center">
<a href="https://github.com/yaertu/fixbundle/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/yaertu/fixbundle/actions/workflows/ci.yml/badge.svg"></a>
<img alt="Python 3.10+" src="https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white">
<img alt="Version 0.4.0" src="https://img.shields.io/badge/main-0.4.0-8B5CF6">
<img alt="Platform matrix" src="https://img.shields.io/badge/platform_matrix-9%2F9_pass-22C55E">
<img alt="Live evidence" src="https://img.shields.io/badge/live_GitHub_evidence-pass-22C55E">
<img alt="Version 0.5.0" src="https://img.shields.io/badge/version-0.5.0-8B5CF6">
<img alt="Local first" src="https://img.shields.io/badge/privacy-local--first-0EA5E9">
<img alt="License MIT" src="https://img.shields.io/badge/license-MIT-22C55E">
</p>

<p align="center"><img src="assets/hero.svg" width="100%" alt="FixBundle: failure to portable debugging evidence"></p>

Bir hata localde, eski bir commit'te veya GitHub Actions'ta yaşanmış olabilir. FixBundle failure output, exact Git identity, job/step bilgisi, diff/config bağlamı ve ilgili kaynak parçalarını toplar; yaygın secret/path kalıplarını maskeler; checksum'lı tek ZIP üretir. Aynı paketi Codex'e, Claude Code'a, Cursor'a, ChatGPT'ye veya insan destek ekibine verebilirsin.
Bir hata dört farklı yerde ortaya çıkabilir: **local command**, **eski Git commit'i**, **GitHub Actions** veya **production telemetry**. FixBundle bunları aynı fikre indirger: bounded + redacted + checksum'lı bir evidence ZIP. Paketi Codex'e, Claude Code'a, Cursor'a, ChatGPT'ye veya insan destek ekibine verebilirsin.

## ⚡ Kurulum

PyPI yayını yapılana kadar:
## ⚡ 4 giriş, 1 evidence paketi

```bash
pipx install git+https://github.com/yaertu/fixbundle.git
# Local failure
fixbundle . --lang tr --run "pytest -q"

# Historical failure
fixbundle . --commit <incident-sha> --run "python app.py" --lang tr

# GitHub Actions failure
fixbundle github --repo owner/repo --run <failed-run-id> --lang tr

# Production OpenTelemetry evidence
fixbundle otlp \
--logs ./otel-logs.jsonl \
--traces ./otel-traces.jsonl \
--trace-id <trace-id> \
--lang tr
```

Local failure:
PyPI yayını yapılana kadar kurulum:

```bash
fixbundle . --lang tr --run "pytest -q" --run "python -m build"
pipx install git+https://github.com/yaertu/fixbundle.git
```

Eski commit'teki failure:
GitHub capture için mümkün olan en dar **Actions: Read + Contents: Read** token'ı kullan. OTLP capture tamamen localdir; account veya network istemez.

```bash
fixbundle . --commit <commit-sha> --run "python app.py" --lang tr
## 🔭 v0.5: production olayı artık dışarıda kalmıyor

`fixbundle otlp`, OpenTelemetry Protocol File Exporter JSON Lines girdisini doğrudan okur:

- `resourceLogs → scopeLogs → logRecords`
- `resourceSpans → scopeSpans → spans`
- exact `traceId` / `spanId` correlation
- `service.name`, service version ve deployment environment evidence
- `exception.type`, `exception.message`, `exception.stacktrace`
- `--trace-id`, `--since`, `--until` ile bounded selection
- input byte + record guards
- selected / omitted record provenance
- redaction + SHA-256 integrity

Üretilen production paketi:

```text
AI_HANDOFF.md
manifest.json
SHA256SUMS.txt
production/
incident.json
exceptions.json
services.json
traces.json
logs.json
```

GitHub Actions failure:
### Tek komutlu OTLP kanıt demosu

```bash
export GITHUB_TOKEN=<read-only-token>
fixbundle github --repo owner/repo --run <failed-run-id> --lang tr
python scripts/demo_otlp.py
```

Windows PowerShell:
CI'da doğrulanan demo çıktısı:

```powershell
$env:GITHUB_TOKEN = "<read-only-token>"
fixbundle github --repo owner/repo --run <failed-run-id> --lang tr
```text
PASS trace_id=4bf92f3577b34da6a3ce929d0e0e4736
PASS correlated_logs=1
PASS correlated_spans=1
PASS exception=PaymentGatewayError
PASS service=payments-api
PASS secret_redacted
PASS checksums=7
```

GitHub token için mümkün olan en dar **Actions: Read + Contents: Read** yetkisini kullan. Token output'a serialize edilmez ve FixBundle ZIP'i kendiliğinden hiçbir yere yüklemez.

## 🎬 Gerçek kanıtlar
Demo sentetik bir ürün hikâyesi değil, gerçek OTLP nested shape'ini kullanan yeniden üretilebilir bir capture senaryosudur.

### Historical commit
## 🎬 Historical Git kanıtı

<p align="center">
<img src="docs/demo/fixbundle-v0.3-demo.svg" width="100%" alt="FixBundle historical debugging demo">
</p>

`python scripts/demo.py` eski commit'teki gerçek `AssertionError`'ı yakalar; current HEAD ve dirty workspace'in değişmediğini doğrular.
`python scripts/demo.py`, eski commit'teki gerçek `AssertionError`'ı yakalar ve current HEAD + dirty workspace'in değişmediğini doğrular.

### GitHub Actions, canlı API
## 🧪 GitHub Actions canlı kanıtı

v0.4 yalnız fixture ile doğrulanmadı. FixBundle'ın kendi geliştirme geçmişindeki **gerçek failed CI run `33587184675`** tekrar okunarak portable bundle üretildi. O olayda üç Windows job'ı `Historical demo` step'inde `UnicodeEncodeError / cp1252` ile kırılmıştı.

GitHub Actions run **#63 / `33589138174`** üzerinde gerçek CLI çağrısı şu zinciri başarıyla tamamladı:
v0.4 fixture ile bırakılmadı. FixBundle'ın kendi geçmişindeki gerçek failed run `33587184675` tekrar capture edildi:

```text
PASS live_run=33587184675
Expand All @@ -81,100 +116,91 @@ PASS checksums=9
PASS token_not_serialized
```

Aynı run'da **Ubuntu + Windows + macOS × Python 3.10 / 3.12 / 3.13 = 9/9** platform job'ı ve ayrı **Live GitHub failure evidence** job'ı geçti. Ayrıntı: [`docs/evidence/V04_LIVE_GITHUB.md`](docs/evidence/V04_LIVE_GITHUB.md).
Ayrıntı: [`docs/evidence/V04_LIVE_GITHUB.md`](docs/evidence/V04_LIVE_GITHUB.md).

## 📦 GitHub failure ZIP'i

```text
AI_HANDOFF.md
github/
run.json # repo / workflow / run / commit identity
jobs.json # job + step sonuçları
jobs/<job-id>.log # yalnız failed job logları, bounded + redacted
commit.json # ilgili commit + bounded patch context
workflow.yml # olay anındaki workflow config, erişilebiliyorsa
manifest.json
SHA256SUMS.txt
```

Remote capture local checkout gerektirmez. Yalnız `completed + failure` run kabul edilir.
Bu live gate v0.5 CI içinde de korunur. GitHub capture bozulursa production özelliği yeşil görünemez.

## 🛡️ Privacy by default

- `.env`, `.npmrc`, `.pypirc` ve bilinen secret dosyaları local capture'da varsayılan olarak dışlanır.
- API key, bearer token, GitHub/OpenAI/Google/AWS token kalıpları, JWT, private key ve URL credential kalıpları maskelenir.
- `.env`, `.npmrc`, `.pypirc` ve bilinen secret dosyaları local source capture'da dışlanır.
- API key, bearer token, GitHub/OpenAI/Google/AWS token kalıpları, JWT, private key ve URL credentials maskelenir.
- Local project/home path'leri anonimleştirilir.
- Text, diff ve log capture'ları boyut sınırıyla tutulur.
- GitHub job-log redirect'lerinde bearer token imzalı blob URL'ye taşınmaz.
- Otomatik cloud upload yoktur.
- OTLP input absolute path'i manifest'e yazılmaz; yalnız dosya adı + byte/record provenance tutulur.
- Text, patch, log ve telemetry girdileri bound'larla sınırlandırılır.
- GitHub log redirect'lerinde bearer token signed blob URL'ye forward edilmez.
- Hiçbir mode bundle'ı otomatik upload etmez.

Redaction kusursuzluk garantisi değildir. Hassas veya proprietary bir bundle'ı public paylaşmadan önce ZIP'i kontrol et.
Redaction kusursuzluk garantisi değildir. Hassas/proprietary bir bundle'ı public paylaşmadan önce ZIP'i kontrol et.

## 🧩 FixBundle neyin yerine geçmiyor?
## 🧩 Ne değil?

| Araç / yaklaşım | Ana iş |
|---|---|
| **Repomix** | repository'yi LLM-friendly code context'e paketlamak |
| **temporal-debug-skill** | agent'a historical worktree akışı öğretmek |
| **GitHub Actions + Copilot** | GitHub içindeki failed check/log'u açıklamak |
| **Sentry / observability AI** | kendi telemetry backend'i içinde runtime teşhisi yapmak |
| **FixBundle** | **failure evidence'i agent/vendor bağımsız, redacted ve checksum'lı pakete çevirmek** |
| **Repomix** | repository → LLM context |
| **temporal-debug-skill** | historical worktree agent akışı |
| **GitHub Copilot** | GitHub içinde failed check açıklama |
| **Sentry / observability AI** | kendi telemetry backend'i içinde teşhis |
| **OTel MCP sunucuları** | canlı telemetry'yi agent'a sorgulatma |
| **FixBundle** | **failure evidence'i bounded, redacted, agent/vendor bağımsız artifact'e çevirme** |

Ürün sınırı: **portable failure evidence**. Ayrıntı: [`docs/product/LANDSCAPE.md`](docs/product/LANDSCAPE.md).
FixBundle observability dashboard veya AI chat değildir. Ürün sınırı **portable failure evidence**.

## 🧩 Stack algılama
## ✅ Doğrulama zinciri

| Yığın | Kanıt örneği | Öneri örneği |
|---|---|---|
| 🟨 Node.js | `package.json` | `npm test`, `npm run build` |
| 🐍 Python | `pyproject.toml`, `requirements.txt` | `pytest -q`, `python -m build` |
| 🦀 Rust | `Cargo.toml` | `cargo test`, `cargo build --release` |
| 🟪 .NET | `.sln`, `.csproj` | `dotnet test`, `dotnet build -c Release` |
| 🐹 Go | `go.mod` | `go test ./...`, `go build ./...` |
| ☕ Java | `pom.xml`, Gradle | `mvn test`, package/build |
Güncel gate:

```bash
fixbundle . --recommend --lang tr
```text
pytest -q
python scripts/demo.py
python scripts/demo_otlp.py
fixbundle --version
fixbundle . --recommend --lang en
Live GitHub failure evidence
Ubuntu / Windows / macOS × Python 3.10 / 3.12 / 3.13
```

CI sonucu görülmeden README'ye platform PASS iddiası eklenmez.

## 🌍 English quick summary

**Package local failures, historical Git bugs, and failed GitHub Actions runs into redacted, portable evidence bundles.** FixBundle captures exact incident identity, bounded logs/diffs/config context and produces checksummed evidence that can move between AI coding tools and human support.
**Turn local failures, historical Git bugs, failed GitHub Actions runs, and OpenTelemetry production incidents into redacted, checksummed evidence bundles.** FixBundle is local-first and keeps the evidence portable across AI coding tools and human support.

```bash
fixbundle . --run "npm test"
fixbundle . --commit <incident-sha> --run "npm test"
fixbundle github --repo owner/repo --run <failed-run-id>
fixbundle otlp --logs otel-logs.jsonl --traces otel-traces.jsonl --trace-id <trace-id>
```

## 🗺️ Yol haritası

- **v0.3 ✅ Temporal Evidence:** historical commit/worktree capture.
- **v0.4 ✅ GitHub Native:** gerçek failed Actions run → portable evidence ZIP.
- **v0.5 Production Evidence Import:** vendor-neutral OTLP JSONL önce; Sentry adapter yalnız ek değer sağladığı yerde.
- **v0.6 Regression Fingerprints:** bundle-vs-bundle failure/environment/dependency drift.
- **v1.0 Stable Evidence Protocol:** versioned schema + plugin SDK + signed manifest option.
- **v0.3 ✅ Temporal Evidence**
- **v0.4 ✅ GitHub Native**
- **v0.5 Production Evidence Import:** OTLP core + bounded production incident normalization
- **v0.6 Regression Fingerprints:** bundle-vs-bundle failure/environment/dependency drift
- **v0.7 Agent Handoff:** tool-specific export profiles without changing evidence truth
- **v1.0 Stable Evidence Protocol:** public schema + plugin SDK + signed manifest option

Sıradaki kararın araştırma temeli: [`docs/product/V05_PRODUCTION_EVIDENCE.md`](docs/product/V05_PRODUCTION_EVIDENCE.md).
Araştırma ve tasarım: [`docs/product/V05_PRODUCTION_EVIDENCE.md`](docs/product/V05_PRODUCTION_EVIDENCE.md).

## 🤝 Proje notları
## 🤝 Proje

- Katkı: [`CONTRIBUTING.md`](CONTRIBUTING.md)
- Güvenlik: [`SECURITY.md`](SECURITY.md)
- Canlı v0.4 kanıtı: [`docs/evidence/V04_LIVE_GITHUB.md`](docs/evidence/V04_LIVE_GITHUB.md)
- Rakip/komşu araçlar: [`docs/product/LANDSCAPE.md`](docs/product/LANDSCAPE.md)
- Launch planı: [`docs/product/LAUNCH_PLAYBOOK.md`](docs/product/LAUNCH_PLAYBOOK.md)
- Gelir yaklaşımı: [`docs/product/MONETIZATION.md`](docs/product/MONETIZATION.md)
- Adoption baseline: [`docs/product/METRICS.md`](docs/product/METRICS.md)
- Repo bakım protokolü: [`AGENTS.md`](AGENTS.md)
- [Contributing](CONTRIBUTING.md)
- [Security](SECURITY.md)
- [Roadmap](ROADMAP.md)
- [Live v0.4 evidence](docs/evidence/V04_LIVE_GITHUB.md)
- [Landscape](docs/product/LANDSCAPE.md)
- [Monetization](docs/product/MONETIZATION.md)
- [Adoption scoreboard](docs/product/METRICS.md)
- [Repository steward protocol](AGENTS.md)

## 🔎 GitHub About / Topics

v0.4 sonrası önerilen About açıklaması:
v0.5 hedef About:

> Package local failures, historical Git bugs, and failed GitHub Actions runs into redacted AI-ready evidence bundles.
> Package local, historical, CI, and OpenTelemetry production failures into redacted portable debugging evidence.

Önerilen topics mevcut 15 topic'e ek olarak `github-actions` içerir. Kaynak: [`docs/product/REPO_HOME.md`](docs/product/REPO_HOME.md).
Hedef topics mevcut discovery setine `github-actions`, `opentelemetry` ve `observability` ekler. Canlı metadata ile öneri [`docs/product/REPO_HOME.md`](docs/product/REPO_HOME.md) içinde ayrı tutulur; UI'da gerçekten değişmeden “güncellendi” denmez.

## 📜 Lisans

Expand Down
Loading
Loading