Commit Graph

2267 Commits

Author SHA1 Message Date
Steve Yegge
0711cd2aab Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:46:22 -08:00
Steve Yegge
d1c4c857a1 bd sync: 2025-11-23 21:46:21 2025-11-23 21:46:21 -08:00
Steve Yegge
344a3542e3 Merge remote changes
Resolved .beads/beads.jsonl conflict

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:43:24 -08:00
Steve Yegge
3369997a11 bd sync: apply DB changes after import 2025-11-23 21:42:50 -08:00
Steve Yegge
f77dc46e76 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:42:49 -08:00
Steve Yegge
d4f9a05bb2 Fix bd-pq5k: merge conflicts now prefer closed>open and deletion>modification
CHANGES:
1. Merge logic (internal/merge/merge.go):
   - Added mergeStatus() enforcing closed ALWAYS wins over open
   - Fixed closed_at handling: only set when status='closed'
   - Changed deletion handling: deletion ALWAYS wins over modification

2. Deletion tracking (cmd/bd/snapshot_manager.go):
   - Updated ComputeAcceptedDeletions to accept all merge deletions
   - Removed "unchanged locally" check (deletion wins regardless)

3. FK constraint helper (internal/storage/sqlite/util.go):
   - Added IsForeignKeyConstraintError() for bd-koab
   - Detects FK violations for graceful import handling

TESTS UPDATED:
- TestMergeStatus: comprehensive status merge tests
- TestIsForeignKeyConstraintError: FK constraint detection
- bd-pq5k test: validates no invalid state (status=open with closed_at)
- Deletion tests: reflect new deletion-wins behavior
- All tests pass ✓

This ensures issues never get stuck in invalid states and prevents
the insane situation where issues never die!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:42:43 -08:00
Steve Yegge
60daea911d bd sync: 2025-11-23 21:42:36 2025-11-23 21:42:36 -08:00
Steve Yegge
64b54ce2bb Remove empty issues.jsonl file
Only beads.jsonl is used in this repo. The empty issues.jsonl was
causing doctor warnings.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:39:50 -08:00
Steve Yegge
d82cf0549a bd sync: apply DB changes after import 2025-11-23 21:38:39 -08:00
Steve Yegge
23f5c8f117 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:38:38 -08:00
Steve Yegge
39ce09172d bd sync: 2025-11-23 21:38:37 2025-11-23 21:38:37 -08:00
Steve Yegge
42430ea32e bd sync: 2025-11-23 21:37:58 2025-11-23 21:37:58 -08:00
Steve Yegge
0836575d9a Export clean JSONL after conflict resolution 2025-11-23 21:37:54 -08:00
Steve Yegge
9e9f9bc338 bd sync: 2025-11-23 21:37:19 2025-11-23 21:37:41 -08:00
Steve Yegge
f454b3dd1d Increase daemon log rotation limits for production use
- Max size: 10MB → 50MB per file
- Max backups: 3 → 7 files
- Max age: 7 → 30 days
- Updated tests and documentation

Resolves bd-t7ds

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:33:00 -08:00
Steve Yegge
278d90bc97 bd sync: apply DB changes after import 2025-11-23 21:31:18 -08:00
Steve Yegge
6924f417c3 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:31:18 -08:00
Steve Yegge
229918970a bd sync: 2025-11-23 21:31:17 2025-11-23 21:31:17 -08:00
Steve Yegge
b428254f89 Fix bd-1rh: remove invalid closed_at for open status 2025-11-23 21:30:40 -08:00
Steve Yegge
5fdbd7785a Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:29:25 -08:00
Steve Yegge
cb604da09c bd sync: 2025-11-23 21:28:33 2025-11-23 21:28:33 -08:00
Steve Yegge
aa2df73f6d Merge web-ui: UX improvements to monitor-webui example
- Interactive stats cards as filters
- Multi-select priority filtering with P0 support
- Find-as-you-type search
- Modern card-based UI design
- Better mobile responsiveness
- Dev mode flag for easier development

Co-authored-by: matt wilkie <maphew@gmail.com>
2025-11-23 21:27:21 -08:00
Steve Yegge
035a0c7e66 bd sync: 2025-11-23 21:26:05 2025-11-23 21:26:05 -08:00
Steve Yegge
c969252bf1 bd sync: 2025-11-23 21:24:48 2025-11-23 21:24:48 -08:00
Steve Yegge
21893ed148 bd sync: 2025-11-23 21:21:48 2025-11-23 21:21:48 -08:00
Steve Yegge
342073098d bd sync: 2025-11-23 21:15:55 2025-11-23 21:20:32 -08:00
Steve Yegge
6e97b08b7d Update bd JSONL after rebase 2025-11-23 21:19:24 -08:00
Steve Yegge
ae5a4ac6ea Add security tests for WriteFile permissions in doctor command
Resolves bd-ee1: Add security tests for WriteFile permissions in doctor command

Added comprehensive security tests for the FixGitignore function to verify:
- Files are created with 0600 permissions (secure, owner-only read/write)
- Existing files with insecure permissions are fixed
- Read-only files can be updated (permissions fixed first)
- File ownership is correct
- Permissions are enforced even on systems that respect umask

Also improved FixGitignore implementation to:
- Handle read-only files by fixing permissions before writing
- Explicitly set permissions after write to ensure 0600 regardless of umask
- Maintain secure permissions throughout the operation

Tests verify the gosec G306 security concern is properly addressed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:19:14 -08:00
Steve Yegge
4f15e66599 bd sync: apply DB changes after import 2025-11-23 21:16:33 -08:00
Steve Yegge
6f90fe4a2d Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:16:32 -08:00
Steve Yegge
732c23c608 bd sync: 2025-11-23 21:16:31 2025-11-23 21:16:31 -08:00
Steve Yegge
9e16469b2e Implement BD_GUIDE.md generation for version-stamped documentation (bd-woro)
This implements the ability to separate bd-specific instructions from
project-specific instructions by generating a canonical BD_GUIDE.md file.

## Changes

1. Added `--output` flag to `bd onboard` command
   - Generates version-stamped BD_GUIDE.md at specified path
   - Includes both agentsContent and copilotInstructionsContent
   - Auto-generated header warns against manual editing

2. Version tracking integration
   - checkAndSuggestBDGuideUpdate() detects outdated BD_GUIDE.md
   - Suggests regeneration when bd version changes
   - Integrated with maybeShowUpgradeNotification()

3. Comprehensive test coverage
   - Tests for BD_GUIDE.md generation
   - Tests for version stamp validation
   - Tests for content inclusion

4. Documentation updates
   - Updated AGENTS.md with BD_GUIDE.md workflow
   - Added regeneration instructions to upgrade workflow

## Benefits

- Clear separation of concerns (bd vs project instructions)
- Deterministic updates (no LLM involved)
- Git-trackable diffs show exactly what changed
- Progressive disclosure (agents read when needed)

## Usage

\`\`\`bash
# Generate BD_GUIDE.md
bd onboard --output .beads/BD_GUIDE.md

# After upgrading bd
bd onboard --output .beads/BD_GUIDE.md  # Regenerate
\`\`\`

Closes bd-woro
2025-11-23 21:16:09 -08:00
Steve Yegge
2637a7bde0 bd sync: apply DB changes after import 2025-11-23 21:12:08 -08:00
Steve Yegge
b9531d4cf3 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:12:08 -08:00
Steve Yegge
0e0dc3a753 bd sync: 2025-11-23 21:12:07 2025-11-23 21:12:07 -08:00
Steve Yegge
0ded604d5b Merge remote changes 2025-11-23 21:10:21 -08:00
Steve Yegge
a1a2082fff bd sync: 2025-11-23 21:10:06 2025-11-23 21:10:06 -08:00
Steve Yegge
83609d5098 Add bd doctor check and fix for missing sync.branch config (bd-rsua)
Problem: Existing beads repositories initialized before commit a4c38d5 don't have sync.branch configured. This causes 'bd sync --status' to fail with a confusing error.

Solution: Added new check in 'bd doctor' that detects when sync.branch is not configured and provides automatic fix via 'bd doctor --fix'. The fix automatically sets sync.branch to the current branch using 'git symbolic-ref --short HEAD'.

Changes:
- Added checkSyncBranchConfig() function in doctor.go
- Created fix/sync_branch.go with SyncBranchConfig() fix handler
- Added comprehensive test coverage in doctor_test.go
- Integrated check into applyFixes() switch statement

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:09:55 -08:00
Steve Yegge
bc551e1ac1 bd sync: apply DB changes after import 2025-11-23 21:09:00 -08:00
Steve Yegge
0bc5caee45 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:08:59 -08:00
Steve Yegge
4d1f4d6649 bd sync: 2025-11-23 21:08:58 2025-11-23 21:08:58 -08:00
Steve Yegge
a2769dd093 bd sync: 2025-11-23 21:07:30 2025-11-23 21:07:57 -08:00
Steve Yegge
71502b1b93 bd sync: 2025-11-23 21:06:28 2025-11-23 21:06:28 -08:00
Steve Yegge
c58740dda8 bd sync: apply DB changes after import 2025-11-23 21:03:41 -08:00
Steve Yegge
6079e3c04e Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:03:40 -08:00
Steve Yegge
a2c5a4d0f7 bd sync: 2025-11-23 21:03:40 2025-11-23 21:03:40 -08:00
Steve Yegge
18f81051f3 Fix race condition in client socket cleanup (bd-4owj)
- Re-check socket existence after lock check to avoid stale socket state
- If socket is initially missing but daemon lock is held, re-check socket to handle daemon startup race
- Add test TestTryConnectWithTimeout_SocketExistenceRecheck to verify fix

Fixes bd-4owj
2025-11-23 20:58:11 -08:00
Steve Yegge
e45ea617b7 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 20:57:56 -08:00
Steve Yegge
5ff65cae45 bd daemon export: 2025-11-23 20:57:39 2025-11-23 20:57:39 -08:00
Steve Yegge
0fa99ebc20 bd sync: apply DB changes after import 2025-11-23 20:55:27 -08:00