Commit Graph

4442 Commits

Author SHA1 Message Date
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
3c8a09d92f chore: sync beads database and JSONL 2025-12-14 16:45:59 -08:00
Steve Yegge
ee8fe2bbb7 chore: sync sanitized issues.jsonl 2025-12-14 16:44:51 -08:00
Steve Yegge
8fa1361ef3 fix: remove wrong-prefix issues from sync branch 2025-12-14 16:44:43 -08:00
Steve Yegge
176ed6cd55 chore: clean beads state - remove foreign deletions manifest 2025-12-14 16:44:33 -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
c4a66ae2eb chore: migrate tombstones and sync beads 2025-12-14 16:44:03 -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
5283497e63 chore: clean beads state - remove orphaned issues and migrate deletions 2025-12-14 16:42:42 -08:00
Steve Yegge
a240fac4c8 fix: clean up deletions.jsonl and sync state after foreign prefix removal 2025-12-14 16:42: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
e855d05168 chore: sync beads state after preflight repair 2025-12-14 16:40:57 -08:00
Steve Yegge
e8d5acd77d chore: migrate tombstones to inline format 2025-12-14 16:40:23 -08:00
Steve Yegge
31185a68ee fix: remove foreign-prefixed entries from deletions manifest 2025-12-14 16:40:12 -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
b1d790d704 chore: sanitize beads after sync branch merge 2025-12-14 16:37:27 -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
Ryan Snodgrass
f88a0d015b feat(cli): add 'bd thanks' command to thank contributors
Adds a new command that displays a thank you page listing all human
contributors to the beads project. Features:

- Static list of contributors (compiled into binary)
- Top 20 featured contributors displayed in columns
- Additional contributors in wrapped list
- Styled output using lipgloss (colored box, sections)
- Dynamic width based on content
- JSON output support (--json flag)
- Excludes bots and AI agents by email pattern
2025-12-14 12:40:32 -08:00
Steve Yegge
3a9749279a fix(sync): protect locally exported issues from sanitization (bd-3ee1)
The sync sanitize process was incorrectly removing newly created issues
when they happened to have IDs matching entries in the deletions manifest.
This could occur with hash-based IDs when content is similar to previously
deleted issues.

The fix adds protection for issues that were in the left snapshot (local
export before pull). These represent local work and should not be removed
by sanitize, even if they match entries in the deletions manifest.

Changes:
- Load left snapshot in sanitizeJSONLWithDeletions() to build protection set
- Add protection check before removing issues from JSONL
- Add ProtectedCount/ProtectedIDs to SanitizeResult for tracking
- Log protected issues during sync for visibility
- Add comprehensive test coverage for the fix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 00:55:55 -08:00
Steve Yegge
c125dc617d chore: bd-3ee1 is P0 (sanitize data loss bug) 2025-12-14 00:47:47 -08:00
Steve Yegge
70d09be1bc chore: upgrade bd-3ee1 to P0 2025-12-14 00:46:41 -08:00
Steve Yegge
a61ca252ae fix(cleanup): resolve CHECK constraint failure and add tombstone pruning
- Fix bd-tnsq: executeDelete now sets closed_at=NULL when creating
  tombstones, satisfying the CHECK constraint that requires
  closed_at IS NULL when status != 'closed'

- Fix bd-08ea: cleanup command now also prunes expired tombstones
  (older than 30 days) after converting closed issues to tombstones

- Add regression test for batch deletion of closed issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 00:37:54 -08:00
Steve Yegge
bb2e4f6fbf Merge pull request #549 from steveyegge/fix/nodb-mode-547
fix(memory): implement GetReadyWork/GetBlockedIssues + child counters
2025-12-14 00:28:37 -08:00
Steve Yegge
21e276dfad Merge remote-tracking branch 'origin/main' into fix/nodb-mode-547 2025-12-14 00:28:25 -08:00
Steve Yegge
9db756f8b6 fix(memory): implement GetReadyWork/GetBlockedIssues + child counters
Fixes #543, #544, #545, #546 (no-db mode regressions)

Memory backend fixes:
- GetReadyWork now properly excludes issues with open blocks dependencies
- GetBlockedIssues now includes issues with status=blocked (even with 0 blockers)
- LoadFromIssues initializes hierarchical child counters from existing IDs
  so repeated --parent creates bd-xxx.1, bd-xxx.2, etc.

JSONL path discovery:
- findJSONLPath works in no-db mode when dbPath is empty
- Honors BEADS_JSONL environment variable override
- Falls back to locating .beads directory

Based on PR #547 by @joelklabo - cherry-picked core fixes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 23:22:10 -08:00
Steve Yegge
7f843a6105 chore: remove 12 orphaned child issues from JSONL
Orphaned issues (children of deleted epics):
- bd-cb64c226.1, .6, .8, .9, .10, .12, .13 (cache removal epic)
- bd-cbed9619.1, .2, .3, .4, .5 (N-way collision epic)

These were completed tasks from October 2025 that became orphans
when their parent epics were deleted.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 23:04:30 -08:00
Steve Yegge
dffb56299a chore: add 12 orphaned issues to deletions manifest
Added tombstones for orphaned child issues whose parent epics were deleted:
- bd-cb64c226.1, .6, .8, .9, .10, .12, .13 (cache removal epic)
- bd-cbed9619.1, .2, .3, .4, .5 (N-way collision epic)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 22:57:17 -08:00
Steve Yegge
4c985d7d3b chore: remove 12 orphaned issues (bd-cb64c226.* and bd-cbed9619.*) 2025-12-13 22:55:47 -08:00
Steve Yegge
89d97d4ccb chore: sync beads issues 2025-12-13 21:28:23 -08:00
Steve Yegge
ae7cd934a8 fix(ci): restore Windows smoke tests (reverted by #478)
PR #478 (worktree compatibility) accidentally reverted commit d1bd7ac
which changed Windows CI from full test suite to smoke tests only.

The full test suite times out on Windows due to slow filesystem I/O.
Linux runs comprehensive tests; Windows just verifies the binary works.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 21:28:23 -08:00