Commit Graph

2501 Commits

Author SHA1 Message Date
Steve Yegge
e7b89341b2 bd sync: 2025-11-25 17:12:46 2025-11-25 17:12:46 -08:00
Steve Yegge
d453c6e9ea bd prime: Auto-detect ephemeral branches and adjust workflow
When running on a branch with no upstream (e.g., gastown polecats), output
different SESSION CLOSE PROTOCOL instructions:
- Use 'bd sync --from-main' instead of 'bd sync'
- Skip git push step (branch is local-only)
- Update Sync & Collaboration section to show --from-main
- Update Completing work workflow accordingly

Detection: git rev-parse --abbrev-ref --symbolic-full-name @{u} returns
error if no upstream configured.

Closes bd-4l5
2025-11-25 17:12:42 -08:00
Steve Yegge
9b58241417 bd sync: 2025-11-25 16:56:23 2025-11-25 16:56:23 -08:00
Steve Yegge
47d39fb845 Update beads metadata to v0.25.0 2025-11-25 16:56:18 -08:00
Steve Yegge
c43cc41d31 bd sync: 2025-11-25 16:55:56 2025-11-25 16:56:18 -08:00
Steve Yegge
afacb5231e docs: add stealth mode and --from-main to v0.25.0 changelog 2025-11-25 16:49:52 -08:00
Steve Yegge
d5dd01c8ff chore: Bump version to 0.25.0
Updated all component versions:
- bd CLI: 0.24.4 → 0.25.0
- Plugin: 0.24.4 → 0.25.0
- MCP server: 0.24.4 → 0.25.0
- npm package: 0.24.4 → 0.25.0
- Documentation: 0.24.4 → 0.25.0

Generated by scripts/bump-version.sh
2025-11-25 16:39:09 -08:00
Steve Yegge
6bf0472573 docs: add deletion propagation to changelog
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 16:38:12 -08:00
Steve Yegge
4088e68da7 feat(deletions): complete deletions manifest epic with integration tests
Completes the deletion propagation epic (bd-imj) with all 9 subtasks:
- Cross-clone deletion propagation via deletions.jsonl
- bd deleted command for audit trail
- Auto-compact during sync (opt-in)
- Git history fallback with timeout and regex escaping
- JSON output for pruning results
- Integration tests for deletion scenarios
- Documentation in AGENTS.md, README.md, and docs/DELETIONS.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 16:36:46 -08:00
Steve Yegge
6bab015616 bd sync: 2025-11-25 16:36:33 2025-11-25 16:36:33 -08:00
Steve Yegge
4898c424aa feat(deletions): auto-compact during sync and git history fallback fixes
- Add Count function to deletions package for fast line counting
- Add maybeAutoCompactDeletions to sync (opt-in via deletions.auto_compact config)
- Fix regex escaping in batchCheckGitHistory (bd-bgs)
- Add 30s timeout to git history commands (bd-f0n)
- Use git rev-parse --show-toplevel for proper repo root detection (bd-bhd)
- Add tests for Count and auto-compact functionality

Closes: bd-qsm, bd-bgs, bd-f0n, bd-bhd
2025-11-25 15:08:12 -08:00
Steve Yegge
2f5ef33c08 bd sync: 2025-11-25 15:07:58 2025-11-25 15:07:58 -08:00
Steve Yegge
ecc5830a31 fix(deletions): track deletions.jsonl in git for cross-clone propagation
Fixes bd-44e: Remove deletions.jsonl from .gitignore.

The deletions manifest MUST be tracked in git for cross-clone deletion
propagation to work (bd-imj). Previously it was incorrectly gitignored
with a "local-only" comment that contradicted the design.

Changes:
- Remove .beads/deletions.jsonl from .gitignore
- Add comment explaining why it is tracked
- Track existing deletions.jsonl file

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 14:57:55 -08:00
Steve Yegge
941c65f1a7 bd sync: 2025-11-25 14:57:33 2025-11-25 14:57:33 -08:00
Dane Bertram
c33e984d66 feat(init): add --stealth flag for invisible beads usage (#381)
Adds `bd init --stealth` to enable beads usage without affecting repo collaborators:
- Global gitattributes: configures beads merge driver across all repos
- Global gitignore: prevents .beads/ and .claude/settings.local.json from being committed
- Claude Code integration: adds 'bd onboard' instruction automatically
- Respects existing global git config files, only creates when necessary

Perfect for personal experimentation or contributing to repos where not everyone uses beads.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-25 14:46:01 -08:00
Steve Yegge
25ccdf9892 bd sync: 2025-11-25 14:45:06 2025-11-25 14:45:06 -08:00
Steve Yegge
02b23f701c Ignore .beads/deletions.jsonl (cleanup tracking file)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 14:45:01 -08:00
Steve Yegge
2a39579189 bd sync: 2025-11-25 14:40:35 2025-11-25 14:40:35 -08:00
Steve Yegge
898bc2ac18 bd sync: apply DB changes after import 2025-11-25 14:29:25 -08:00
Steve Yegge
2ef0cfd40a Add --from-main flag for ephemeral branch sync (gt-ick9)
Enables bd sync to work with local-only branches that don't have
upstream tracking. Auto-detects this case and syncs beads from
origin/main instead of requiring an upstream branch.

Also fixes hasJSONLConflict() to recognize both issues.jsonl and
beads.jsonl filenames.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 14:29:25 -08:00
Steve Yegge
eb8b7f13f9 bd sync: 2025-11-25 12:55:13 2025-11-25 12:55:13 -08:00
Steve Yegge
907759ce3f bd sync: apply DB changes after import 2025-11-25 12:41:36 -08:00
Steve Yegge
a79f48d980 bd sync: 2025-11-25 12:41:35 2025-11-25 12:41:36 -08:00
Steve Yegge
3f84ec3774 feat(deletions): add pruning and git history fallback
Implements two P1 tasks for the deletions manifest epic:

bd-v2x: Add deletions pruning to bd compact
- PruneDeletions function removes records older than retention period
- Default retention: 7 days (configurable via metadata.json)
- CLI --retention flag for override
- Atomic file rewrite prevents corruption
- Called automatically during all compact operations

bd-pnm: Add git history fallback for pruned deletions
- Catches deletions where manifest entry was pruned
- Uses git log -S to search for ID in JSONL history
- Batches multiple IDs for efficiency (git -G regex)
- Self-healing: backfills manifest on hit
- Conservative: keeps issue if git check fails (shallow clone)

Tests added for both features with edge cases covered.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 12:41:36 -08:00
Steve Yegge
1804a91787 bd sync: apply DB changes after import 2025-11-25 12:33:39 -08:00
Steve Yegge
f7adb935df bd sync: 2025-11-25 12:03:21 2025-11-25 12:03:21 -08:00
Steve Yegge
be784a0b4b bd sync: 2025-11-25 11:46:06 2025-11-25 11:46:06 -08:00
Steve Yegge
c3e4172be7 bd sync: 2025-11-25 11:35:26 2025-11-25 11:35:26 -08:00
Steve Yegge
d1d7b0e34a refactor(deletions): improve API based on code review
- Return LoadResult struct instead of multiple values, with Warnings slice
  for testability (no more hardcoded stderr output)
- Add ID validation in AppendDeletion to prevent invalid records
- Add Sync() call in AppendDeletion for durability
- Document that timestamps may lose sub-second precision
- Document that empty slice in WriteDeletions clears all deletions
- Add test for empty ID validation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 11:30:41 -08:00
Steve Yegge
a7f63c6925 bd sync: 2025-11-25 10:59:11 2025-11-25 10:59:11 -08:00
Steve Yegge
368e5b9955 bd sync: 2025-11-25 10:52:39 2025-11-25 10:52:39 -08:00
Steve Yegge
a3103d3e59 fix: update last_import_time when hash matches but mtime is newer
When JSONL mtime changes without content change (e.g., git pull, touch),
the staleness check would repeatedly trigger but auto-import would skip
due to hash match, creating an infinite loop of "Database out of sync"
errors.

Now we update last_import_time even when skipping import due to hash
match, breaking the staleness loop.

Fixes #378

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 10:47:24 -08:00
Steve Yegge
11378c72c6 bd sync: apply DB changes after import 2025-11-25 09:58:11 -08:00
Steve Yegge
25359f4606 bd sync: apply DB changes after import 2025-11-25 09:58:03 -08:00
Steve Yegge
72ddacbcb7 bd sync: 2025-11-25 09:58:02 2025-11-25 09:58:03 -08:00
Steve Yegge
a8008f5a0b bd sync: 2025-11-25 09:26:29 2025-11-25 09:26:29 -08:00
Steve Yegge
bf0a196aed bd sync: 2025-11-25 09:22:26 2025-11-25 09:22:26 -08:00
Steve Yegge
9c68d59550 bd sync: apply DB changes after import 2025-11-25 09:10:06 -08:00
Steve Yegge
c808ff2cf8 bd sync: 2025-11-25 09:09:05 2025-11-25 09:09:05 -08:00
Steve Yegge
b6a1b98ff3 fix: repair corrupted beads JSONL
- Fixed nested [deleted:[deleted:...]] patterns in bd-1rh, bd-1w6i, bd-c362
- Fixed bd-13gm which had shell command injection as description

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 01:10:40 -08:00
Steve Yegge
5134096189 bd sync: 2025-11-25 00:45:08 2025-11-25 00:45:08 -08:00
Steve Yegge
d854eccc3f chore: remove ZFC bug investigation doc (bug fixed) 2025-11-25 00:42:31 -08:00
Steve Yegge
8755c05508 fix: cleanup orphan issue and nested deleted references
- Deleted orphan issue bd-98c4e1fa.1 (parent was deleted)
- Fixed nested [deleted:[deleted:...]] patterns in 4 issues
- Removed DEBUG statement from sync.go

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 00:35:04 -08:00
Steve Yegge
11fe204221 bd sync: 2025-11-25 00:25:13 2025-11-25 00:25:13 -08:00
Steve Yegge
4f4b59aba5 fix: prevent internal fields from being exported to JSONL
ContentHash and SourceRepo were being exported to beads.jsonl even though
they are internal database fields. This caused JSONL pollution where every
issue got these extra fields, and re-exports would produce different output
than the original clean JSONL.

Changed JSON tags from `json:"...,omitempty"` to `json:"-"` for:
- ContentHash: Internal optimization field for content-based diffing
- SourceRepo: Internal metadata for multi-repo support

This fixes the ZFC resurrection bug where re-exports after import would
pollute the JSONL with internal fields.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 00:21:28 -08:00
Steve Yegge
3d6dd278bf docs: add ZFC resurrection bug investigation notes
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 00:04:58 -08:00
Steve Yegge
8370a43a59 bd sync: apply DB changes after import 2025-11-24 23:57:50 -08:00
Steve Yegge
c6f9f7ee05 fix: prevent ZFC resurrection by propagating skipExport flag (with debug)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 23:57:42 -08:00
Steve Yegge
fd4af85981 fix: restore beads.jsonl to clean state (74 lines from dcd7877)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 23:43:37 -08:00
Steve Yegge
d0229a9078 bd sync: 2025-11-24 23:41:10 2025-11-24 23:41:10 -08:00