Commit graph

11 commits

Author SHA1 Message Date
coffeegoddd☕️✨
a35edfd28e /{internal,cmd,.goreleaser,.github}: embedded mode by default 2026-03-28 13:47:20 -07:00
coffeegoddd☕️✨
58915b13e7 /{cmd,internal}: update global store to be interface 2026-03-17 13:26:17 -07:00
obsidian
1838b30924 refactor: remove 3-way merge engine remnants (bd-hhh)
Remove dead code from the defunct bd merge command:

- staleness.go/staleness_test.go: JSONL mtime freshness checks
  (checkDatabaseFreshness, refreshLastImportTime, --allow-stale flag)
- doctor/git.go: CheckMergeDriver, FixMergeDriver
- doctor/git_test.go: merge driver test cases
- doctor_fix.go: "Git Merge Driver" fix case
- reset.go: hasMergeDriverConfig, hasGitattributesEntry,
  removeGitattributesEntry, and merge driver/gitattributes reset items
- reset_test.go: removeGitattributesEntry tests
- context.go: AllowStale field and isAllowStale function
- cli_coverage_show_test.go: --allow-stale flag usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:44:35 -08:00
beads/crew/darcy
b69ae5b208 fix: remove JSONL references from core Go files (bd-9ni.2)
Surgical removal of ~1050 lines of JSONL-related code from core Go files:

- Remove FindJSONLPath/FindJSONLInDir/findMoleculesJSONLInDir functions
- Remove JSONLExport config field and JSONLPath method
- Remove JSONL bootstrap detection and auto-bootstrap logic from main.go
- Remove noDb mode flag and related context plumbing
- Remove JSONL import from post-merge git hook
- Remove CheckIssuesTracking doctor check
- Remove .jsonl.lock and sync_base.jsonl from gitignore template
- Remove findActualJSONLFile version tracking helper
- Remove JSONL config validation from doctor checks
- Update hook descriptions to remove JSONL references
- Update JSONL-specific comments in types.go
- Update tests to match code removals

Compiles clean. All non-pre-existing tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:46:49 -08:00
beads/crew/emma
896d5ed361 Dolt-native cleanup: remove legacy code, rename API, add server watchdog
Delete migrate_hash_ids.go (760 lines) and remove hash-ids subcommand,
doctor checks, and readonly test cases. Relocate copyFile to migrate.go
for migrate_dolt.go and repair.go. Rename public API beads.NewStorage()
to beads.Open() across code, tests, examples, and docs. Clean up
transitional SQLite-era comments in store.go and context.go. Add server
mode watchdog with TCP+SQL health probes, auto-restart with stale PID
cleanup, exponential backoff, and clean shutdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-15 23:43:20 -08:00
beads/crew/emma
a5da57e39b refactor: remove storage factory, memory backend, and provider abstraction (Phase 7)
Strip out the multi-backend storage layer: factory pattern, memory/in-memory
provider, connection string parsing, local provider, and associated tests.
Inline Dolt as the sole storage backend. Part of Dolt-Native Beads v2 epic.

WIP - SQLite removal in progress, more cleanup phases to follow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-15 11:27:39 -08:00
beads/crew/emma
8e10fd09d3 refactor: remove JSONL sync layer (Phase 5)
Remove autoflush, autoimport, dirty tracking, export hashes, and JSONL
sync machinery. Dolt handles persistence natively, eliminating the need
for SQLite-to-JSONL synchronization. -11,458 lines removed across 69 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-15 10:37:22 -08:00
lizzy
dbb93728b0 feat: delete JSONL sync layer and internal/importer (woho.3 Phase 2)
Delete the JSONL sync layer files (autoflush.go, autoimport.go, export.go,
import.go, jsonl_deprecated.go) and the internal/importer/ package as part
of the Dolt transition Phase 2.

Preserved actively-used functions in new focused files:
- config_local.go: YAML config parsing (isNoDbModeConfigured, etc.)
- jsonl_path.go: JSONL path resolution and utilities
- jsonl_bootstrap.go: Git-based auto-import on empty database
- import_engine.go: Core import engine inlined from internal/importer/

Removed all FlushManager references, markDirtyAndScheduleFlush calls,
autoImportIfNewer calls, and deleted tests for removed functionality.

38 files changed, -9,753 lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:14:34 -08:00
quartz
326976614d feat: remove daemon subsystem from bd CLI (dolt-test-jjsjn)
Remove the daemon subcommand, --no-daemon flag, and all daemon-related
code from bd. With Dolt native backend, there is no daemon. This
eliminates the deepest heresy vector where agents see daemon flags
and conclude beads has a daemon architecture.

Deleted 65+ daemon-specific files (~24.7k lines) including:
- daemon.go, daemon_autostart.go, daemon_sync.go, daemon_server.go, etc.
- internal/daemon/ package (registry, discovery, kill_*)
- doctor/daemon.go, doctor/fix/daemon.go
- activity.go (daemon-only activity command)
- All corresponding test files

Edited core files to remove daemon references:
- main.go: removed --no-daemon flag, daemon connection block, imports
- context.go: removed DaemonClient, DaemonStatus, NoDaemon fields
- direct_mode.go: simplified to remove daemon fallback logic
- doctor.go: removed daemon health checks
- init.go: removed daemon stop before reinit
- reset.go: removed daemon stop logic
- worktree.go: removed daemon worktree safety checks

Created compatibility stubs:
- daemon_deprecated.go: stub variables/functions for 66 files that
  still reference daemonClient (always nil), enabling gradual cleanup
- sync_helpers.go: extracted non-daemon sync functions (export/import)
- sync_state.go: extracted sync state management

Follow-up: Remove dead `if daemonClient != nil` branches from 66
command files, then delete daemon_deprecated.go and internal/rpc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/polecats/quartz
Rig: beads
Role: polecats
2026-02-09 21:47:31 -08:00
Gero Hillebrandt
a1f706d17a
fix: prevent nil context panic in multi-repo hydration (#840) 2026-01-01 10:46:56 -08:00
Steve Yegge
f91d4fa975 Refactor: Introduce CommandContext to consolidate global variables (bd-qobn)
This addresses the code smell of 20+ global variables in main.go by:

1. Creating CommandContext struct in context.go that groups all runtime state:
   - Configuration (DBPath, Actor, JSONOutput, etc.)
   - Runtime state (Store, DaemonClient, HookRunner, etc.)
   - Auto-flush/import state
   - Version tracking
   - Profiling handles

2. Adding accessor functions (getStore, getActor, getDaemonClient, etc.)
   that provide backward-compatible access to the state while allowing
   gradual migration to CommandContext.

3. Updating direct_mode.go to demonstrate the migration pattern using
   accessor functions instead of direct global access.

4. Adding test isolation helpers (ensureCleanGlobalState, enableTestModeGlobals)
   to prevent test interference when multiple tests manipulate global state.

Benefits:
- Reduces global count from 20+ to 1 (cmdCtx)
- Better testability (can inject mock contexts)
- Clearer state ownership (all state in one place)
- Thread safety (mutexes grouped with the data they protect)

Note: Two pre-existing test failures (TestTrackBdVersion_*) are unrelated to
this change and fail both with and without these modifications.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:29:28 -08:00