Commit Graph

3255 Commits

Author SHA1 Message Date
Steve Yegge
0e70c813c7 chore: bd sync complete 2025-12-14 16:54:53 -08:00
Steve Yegge
59e9664284 chore: finalize beads sync state 2025-12-14 16:54:34 -08:00
Steve Yegge
cfb9b3f6b1 chore: final beads sync 2025-12-14 16:54:32 -08:00
Steve Yegge
b0b4e9fa44 bd sync: 2025-12-14 16:54:27 2025-12-14 16:54:27 -08:00
Steve Yegge
9d51f0579a bd sync: 2025-12-14 16:54:23 2025-12-14 16:54:23 -08:00
Steve Yegge
fc99ca0ca3 bd sync: merge divergent histories (6 local + 4 remote commits) 2025-12-14 16:54:12 -08:00
Steve Yegge
c678de0fea chore: clean beads state before sync 2025-12-14 16:54:05 -08:00
Steve Yegge
fbcc00ebac chore: sync beads flush 2025-12-14 16:54:00 -08:00
Steve Yegge
659fbd0b59 chore: remove legacy deletions files and clean up beads 2025-12-14 16:53:51 -08:00
Steve Yegge
33627567f1 chore: force clean wrong-prefix entries 2025-12-14 16:53:32 -08:00
Steve Yegge
ce80664005 chore: sync beads deletions 2025-12-14 16:53:10 -08:00
Steve Yegge
ec280abd5e chore: final cleanup - remove orphan issues from DB export 2025-12-14 16:53:06 -08:00
Steve Yegge
622b29d9a9 chore: sync beads changes 2025-12-14 16:52:32 -08:00
Steve Yegge
0aa05ab313 chore: final cleanup of wrong-prefixed deletions 2025-12-14 16:52:30 -08:00
Steve Yegge
ab20f6947a chore: update beads after sync cleanup 2025-12-14 16:52:18 -08:00
Steve Yegge
114ae4c269 chore: purge wrong-prefix entries from deletions.jsonl 2025-12-14 16:51:59 -08:00
Steve Yegge
880a4431c3 chore: fix db-jsonl count mismatch 2025-12-14 16:51:37 -08:00
Steve Yegge
0a4ba385e0 chore: sync beads - clean up prefix mismatch 2025-12-14 16:51:09 -08:00
Steve Yegge
29b3cde3c0 chore: remove wrong-prefixed entries from deletions.jsonl 2025-12-14 16:50:57 -08:00
Steve Yegge
509d96e58a chore: sync beads 2025-12-14 16:50:24 -08:00
Steve Yegge
48697663d8 chore: clean up beads sync state 2025-12-14 16:49:25 -08:00
Steve Yegge
80c9395ea3 chore: clean beads state 2025-12-14 16:48:49 -08:00
Steve Yegge
86bffcc9fe chore: sync beads after prefix cleanup 2025-12-14 16:47:47 -08:00
Steve Yegge
bdfbcb724a chore: flush beads changes 2025-12-14 16:46:49 -08:00
Steve Yegge
fb55272156 chore: clean beads - remove orphans and fix prefixes 2025-12-14 16:46:01 -08:00
Steve Yegge
ee8fe2bbb7 chore: sync sanitized issues.jsonl 2025-12-14 16:44:51 -08:00
Steve Yegge
2b0141ec79 chore: cleanup beads - migrate tombstones, delete orphans, fix prefix mismatch 2025-12-14 16:44:13 -08:00
Steve Yegge
768db19635 chore: clean up orphaned issues and sync beads state 2025-12-14 16:43:53 -08:00
Steve Yegge
8577f51996 chore: clean up orphan issues and resync beads 2025-12-14 16:43:30 -08:00
Steve Yegge
58a5b4a54f chore: sync beads state after preflight fix 2025-12-14 16:42:15 -08:00
Steve Yegge
eed8587208 chore: cleanup orphaned issues and sync beads 2025-12-14 16:42:09 -08:00
Steve Yegge
87625b99e4 chore: sync beads after import fix 2025-12-14 16:41:57 -08:00
Steve Yegge
f403d8db38 chore: sanitize beads - migrated tombstones, deleted orphans 2025-12-14 16:41:51 -08:00
Steve Yegge
aa1e8db78f chore: sync beads 2025-12-14 16:41:06 -08:00
Steve Yegge
e8d5acd77d chore: migrate tombstones to inline format 2025-12-14 16:40:23 -08:00
Steve Yegge
6c2c37ec52 chore: sync beads after sanitization 2025-12-14 16:39:53 -08:00
Steve Yegge
9f57db9103 chore: sync beads state after import fix 2025-12-14 16:39:33 -08:00
Steve Yegge
e6c6581b65 chore: sync beads after prefix fix 2025-12-14 16:39:04 -08:00
Steve Yegge
aa89c43573 chore: sync beads after preflight fix 2025-12-14 16:38:05 -08:00
Steve Yegge
e5f185875e chore: sanitize beads after sync 2025-12-14 15:24:08 -08:00
Steve Yegge
8a7b9afea3 chore: sync beads changes 2025-12-14 15:23:35 -08:00
Steve Yegge
43addba194 chore: sync issues after lockfile test coverage 2025-12-14 15:22:30 -08:00
Steve Yegge
6f3309b304 test(lockfile): improve coverage from 42% to 98%
- Add TestTryDaemonLock with 6 test cases for lock detection scenarios
- Add TestFlockFunctions for blocking/non-blocking lock operations
- Add TestIsProcessRunning for process detection edge cases
- Fix TestCheckPIDFile/current_process_is_running (was using invalid PID encoding)

Closes bd-9w3s
2025-12-14 15:21:29 -08:00
Steve Yegge
d7a813c045 chore: sync issues.jsonl after PR #555 merge 2025-12-14 15:13:34 -08:00
Steve Yegge
f1e5a6206f feat(mcp): Add compaction config and extended context engineering docs
- Extended CONTEXT_ENGINEERING.md with additional optimization strategies
- Added compaction configuration support to MCP server
- Added tests for compaction config and MCP compaction

Amp-Thread-ID: https://ampcode.com/threads/T-019b1f07-daa0-750c-878f-20bcc2d24f50
Co-authored-by: Amp <amp@ampcode.com>
2025-12-14 15:12:43 -08:00
Steve Yegge
a60972cd6a Merge remote-tracking branch 'origin/main' into performance-fix 2025-12-14 14:53:30 -08:00
mahawi1992
700dca22b0 feat(mcp): Add context engineering optimizations (#481)
Reduce context window usage by ~80-90% through:

1. Lazy Tool Schema Loading
   - discover_tools(): List tool names only (~500 bytes vs ~15KB)
   - get_tool_info(name): Get specific tool details on-demand

2. Minimal Issue Models
   - IssueMinimal: Lightweight model for list views (~80 bytes vs ~400 bytes)
   - Full Issue model preserved for show() command

3. Result Compaction
   - Auto-compact results with >20 issues
   - Returns preview (5 items) + total count + hint
   - Prevents unbounded context growth

4. Documentation
   - Updated CONTEXT_ENGINEERING.md with patterns and examples

Context savings:
- Tool schemas: 97% reduction (15KB → 500 bytes)
- List 50 issues: 80% reduction (20KB → 4KB)
- Ready work: 80% reduction (4KB → 800 bytes)

Inspired by MCP Bridge (github.com/mahawi1992/mwilliams_mcpbridge)
and Manus context engineering patterns.

Co-authored-by: Heal Smartly <marty@MacBook-Pro.local>
2025-12-14 14:21:22 -08:00
cbro
2651620a4c fix(storage): persist close_reason to issues table on close (#551)
CloseIssue was storing the reason only in the events table, not in the
issues.close_reason column. This caused `bd show --json` to return an
empty close_reason even when one was provided.

- Update CloseIssue in queries.go and transaction.go to set close_reason
- Clear close_reason when reopening issues (in manageClosedAt)
- Add tests for close_reason in storage and CLI JSON output
- Document the dual-storage of close_reason (issues + events tables)
2025-12-14 14:18:01 -08:00
Steve Yegge
3a4da4e08d fix(lint): address errcheck and De Morgan's law violations in doctor/fix
- Handle file.Close() errors in deletions.go and deletions_test.go
- Simplify boolean logic to apply De Morgan's law in common.go
- All golangci-lint checks now pass
2025-12-14 14:12:13 -08:00
matt wilkie
a22d949cbd Fix bd-in7q: prevent migrate-tombstones from corrupting deletions manifest (#554)
Root cause: bd doctor hydrate was re-adding migrated tombstones to the
deletions manifest because getCurrentJSONLIDs() included all issues,
including tombstones. When compared against git history, tombstones
appeared as 'deleted' and were incorrectly added to the manifest as new
deletions, corrupting the database on next sync.

Fix: Skip tombstone-status issues in getCurrentJSONLIDs() so they don't
participate in deletion detection. Tombstones represent already-recorded
deletions/migrations and shouldn't be treated as active issues.

Changes:
- cmd/bd/doctor/fix/deletions.go: Skip tombstones in getCurrentJSONLIDs()
- cmd/bd/doctor/fix/deletions_test.go: New tests for tombstone skipping
- cmd/bd/migrate_tombstones_test.go: Test that tombstones are valid

This fixes the bug where 'bd migrate-tombstones' followed by 'bd sync'
would add thousands of deletion records with author 'bd-doctor-hydrate'
2025-12-14 14:11:27 -08:00