Commit graph

15 commits

Author SHA1 Message Date
beads/crew/emma
84494b7e1a cleanup: remove daemon infrastructure remnants (GH#2431)
Remove all BEADS_NO_DAEMON env var handling from test files (dead code
since daemon removal in v0.50.0), delete stopRepoDaemon() and daemon
file guards from test setup, remove no-daemon config key from tests,
and update daemon→server wording in docs and comments.

37 files changed, -193 lines net.

Co-Authored-By: davetashner <davetashner@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 15:24:27 -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/emma
51bb65644b fix(test): comprehensive Dolt skip guards across all test files
Bulk convert t.Fatalf to t.Skipf for dolt.New() connection errors in
16 test files (44 call sites). Tests now gracefully skip when Dolt
server is not available instead of failing CI.

Also improve skipIfNoDolt to check testDoltServerPort (handles macOS
CI where dolt binary exists but no server is running).

Files fixed: cli_coverage_show_test, contributor_routing_e2e_test,
doctor/{database,fix/metadata_dolt,maintenance_cgo,migration_validation,
validation}_test, gitlab_integration_test, init_test, migrate_test,
move_test, rename_prefix{,_repair}_test, sql_test, status_test,
update_metadata_test.

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

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-22 21:53:11 -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
beads/crew/emma
5b6e015bb1 refactor: remove daemon compat stub and --no-daemon flag (Phase 2)
Delete daemon_compat.go which contained the deprecated --no-daemon flag,
boolToFlag, truncateString, and formatUptime utility functions. Remove
dead isDaemonAutoSyncing code path from prime.go. Clean up --no-daemon
args from hook sync invocations and daemon config references.

Part of dolt-1s40: Dolt-Native Beads v2

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

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-14 19:47:03 -08:00
Steve Yegge
7d5ee8b97a
Merge pull request #1672 from steveyegge/polecat/quartz/bd-ktng@mlg78t9v
feat: optimize CLI test suite with template DB pattern
2026-02-11 17:13:32 -08:00
quartz
b26369e60b feat: optimize CLI test suite with template DB pattern (bd-ktng)
Eliminate redundant bd init calls by creating a single template database
via sync.Once and copying it per test. Also removes stale --no-daemon
flag references (daemon subsystem was removed in 32697661) and adds
missing test helper stubs for integration build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:38:01 -08:00
collins
237f47ba7e feat: delete SQLite storage backend (Phase 2 of Dolt transition)
Remove the entire internal/storage/sqlite/ package (~43K lines) and update
all 80+ files that imported it to use either the Dolt backend directly
(test files) or the storage factory (production files).

Key changes:
- Delete internal/storage/sqlite/ directory (150+ files)
- Update factory to make Dolt the sole backend, treating "sqlite" as alias for "dolt"
- Replace sqlite.New() calls with dolt.New() in tests, factory.New() in production
- Replace *sqlite.SQLiteStorage with storage.Storage interface throughout
- Replace :memory: SQLite URIs with t.TempDir() for Dolt compatibility
- Inline sqlite.GenerateIssueID() as SHA-256 content hashing where needed
- Fix import cycle in routing/routes.go (routing→factory→dolt→routing)
- Preserve backward-compatible beads.NewSQLiteStorage() wrapper in public API

228 files changed, 605 insertions, 43,821 deletions.
go vet ./... passes clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:23:15 -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
elinor
b136996b90 refactor: delete daemon/RPC layer and internal/rpc/ package (-19,663 lines)
Phase 2 of Dolt transition (woho.2): Remove the entire daemon/RPC layer
now that all commands use direct storage access.

- Delete internal/rpc/ directory (40 files, ~11K lines)
- Delete daemon_deprecated.go stub layer
- Delete compact_rpc.go (daemon-only compact via RPC)
- Delete daemon-specific test files (delete_rpc_test.go, direct_mode_test.go,
  dual_mode_test.go, list_watch_test.go)
- Clean up remaining daemon references in ~25 source files:
  - Remove daemon RPC branches from update, create, template, markdown,
    gate_discover, mol_stale, mol_current, import, query, version, prime
  - Remove rpc.Client parameter from show_thread functions
  - Simplify info.go to always show "direct" mode
  - Simplify sync_import.go to always use inline import
  - Remove daemon status checks from staleness, migrate_dolt, rename_prefix
  - Remove unused fallbackToDirectMode function
  - Remove stale daemon comments from sync.go
- Add daemon_compat.go with --no-daemon flag (backward compat for hooks)
  and utility functions (boolToFlag, truncateString, formatUptime, progressBar)
- Fix test files: remove daemonClient cleanup blocks, update findRepliesTo/
  findReplies call signatures, remove RPC test functions
- go vet ./... passes clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:10:24 -08:00
collins
7cf67153de refactor(types): remove Gas Town type constants from beads core (bd-w2zz4)
Remove Gas Town-specific type constants (TypeMolecule, TypeGate, TypeConvoy,
TypeMergeRequest, TypeSlot, TypeAgent, TypeRole, TypeRig, TypeEvent, TypeMessage)
from internal/types/types.go.

Beads now only has core work types built-in:
- bug, feature, task, epic, chore

All Gas Town types are now purely custom types with no special handling in beads.
Use string literals like "gate" or "molecule" when needed, and configure
types.custom in config.yaml for validation.

Changes:
- Remove Gas Town type constants from types.go
- Remove mr/mol aliases from Normalize()
- Update bd types command to only show core types
- Replace all constant usages with string literals throughout codebase
- Update tests to use string literals

This decouples beads from Gas Town, making it a generic issue tracker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 10:36:59 -08:00
Steve Yegge
1611f16751 refactor: remove unused bd pin/unpin/hook commands (bd-x0zl)
Analysis found these commands are dead code:
- gt never calls `bd pin` - uses `bd update --status=pinned` instead
- Beads.Pin() wrapper exists but is never called
- bd hook functionality duplicated by gt mol status
- Code comment says "pinned field is cosmetic for bd hook visibility"

Removed:
- cmd/bd/pin.go
- cmd/bd/unpin.go
- cmd/bd/hook.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 16:02:15 -08:00
Steve Yegge
c8b912cbe6 bd sync: 2025-12-27 15:56:42 2025-12-27 15:56:42 -08:00
Jordan Hubbard
f5ef444d15 cmd/bd: add unit coverage for show/update/close
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-26 12:33:59 -04:00
Jordan Hubbard
91285f87b9 test: cover show paths and stabilize debouncer
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-26 12:04:45 -04:00