Add EventCompacted to event system (bd-262)

- Add EventCompacted event type constant
- Add compaction fields to Issue struct (CompactionLevel, CompactedAt, OriginalSize)
- Update ApplyCompaction to record compaction events with JSON metadata
- Update bd show to display compaction status with emoji indicators
- Update GetIssue query to load compaction fields
- All tests passing

Amp-Thread-ID: https://ampcode.com/threads/T-3f7946c6-8f5e-4a81-9527-1217041c7b39
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-16 01:00:27 -07:00
parent 5e420e8ee0
commit e99de1b5e3
7 changed files with 74 additions and 7 deletions

View File

@@ -333,7 +333,7 @@ func TestApplyCompaction(t *testing.T) {
}
originalSize := len(issue.Description)
err := store.ApplyCompaction(ctx, issue.ID, 1, originalSize)
err := store.ApplyCompaction(ctx, issue.ID, 1, originalSize, 500)
if err != nil {
t.Fatalf("ApplyCompaction failed: %v", err)
}