Commit Graph

4141 Commits

Author SHA1 Message Date
Steve Yegge 6a65468fae bd sync: 2025-12-23 23:41:10 2025-12-24 00:06:41 -08:00
Steve Yegge c151c28b7d bd sync: 2025-12-23 23:40:48 2025-12-24 00:06:41 -08:00
Steve Yegge 4cc84670c0 bd sync: 2025-12-23 23:40:27 2025-12-24 00:06:41 -08:00
Steve Yegge 512aed890f bd sync: 2025-12-23 23:39:58 2025-12-24 00:06:41 -08:00
Steve Yegge 8cb03d0ff6 bd sync: 2025-12-23 23:39:37 2025-12-24 00:06:41 -08:00
Steve Yegge 72a83193a9 bd sync: 2025-12-23 23:39:17 2025-12-24 00:06:41 -08:00
Steve Yegge e67f27c092 bd sync: 2025-12-23 23:38:57 2025-12-24 00:06:41 -08:00
Steve Yegge 05e10b6759 Add comprehensive RPC test coverage (44.7% → 61.7%)
Removed Gate RPC tests that referenced undefined API methods.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:08:04 -08:00
Steve Yegge 2069f0a3d7 Add tests for cmd/bd CLI to improve coverage (bd-llfl)
Added tests for:
- daemon_config.go: ensureBeadsDir, getPIDFilePath, getLogFilePath,
  getSocketPathForPID
- daemon_autostart.go: determineSocketPath, isDaemonRunningQuiet
- activity.go: printEvent
- cleanup.go: showCleanupDeprecationHint
- upgrade.go: pluralize
- wisp.go: formatTimeAgo
- list.go: pinIndicator, sortIssues
- hooks.go: FormatHookWarnings, isRebaseInProgress, hasBeadsJSONL
- template.go: extractIDSuffix
- thanks.go: getContributorsSorted

Coverage improved from 22.5% to 23.1% for cmd/bd package.
Most remaining untested code requires daemon/RPC operations.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:47:25 -08:00
Steve Yegge bbb08d6d8d Fix template commands failing with daemon mode (bd-indn)
Added daemon-compatible functions for template operations:
- loadTemplateSubgraphViaDaemon: loads template subgraph via RPC calls
- cloneSubgraphViaDaemon: creates new issues from template via RPC
- Updated templateShowCmd and templateInstantiateCmd to use daemon path

The template commands were using storage.Storage directly even when
daemon was connected, causing "no database connection" errors.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:43:04 -08:00
Steve Yegge 9354dbd9f2 Refactor duplicate JSONL-from-git parsing code (bd-y2v)
Extract readFromGitRef helper function to eliminate duplicate code for
running git show <ref>:<path> commands. The helper is now used by:
- checkGitForIssues() in autoimport.go
- importFromGit() in autoimport.go
- readFirstIssueFromGit() in init.go

The scanning/parsing logic is intentionally kept separate since each
function has different requirements (error handling, SetDefaults, etc).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:41:05 -08:00
Steve Yegge 091b4b8f35 Add tests for setup package (28.4% → 53.8% coverage)
Adds comprehensive tests for:
- factory.go: updateBeadsSection, removeBeadsSection, createNewAgentsFile,
  InstallFactory, RemoveFactory
- cursor.go: InstallCursor, RemoveCursor, CheckCursor
- aider.go: InstallAider, RemoveAider, CheckAider, templates

Coverage improved from 21.6% (measured) to 53.8%, exceeding 50% target.

(bd-sh4c)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:40:16 -08:00
Steve Yegge f437ce2628 Improve internal/daemon test coverage from 27.3% to 72.0% (bd-n386)
Add discovery_unit_test.go with comprehensive unit tests that run without
the integration build tag. Tests cover:
- walkWithDepth: depth limiting, hidden dir skipping, callback errors
- checkDaemonErrorFile: file presence/absence, content reading
- CleanupStaleSockets: stale removal, alive daemon preservation
- findBeadsDirForWorkspace: regular repos, nonexistent paths
- discoverDaemon: socket missing, not listening, with error file
- discoverDaemonsLegacy: multiple roots, deduplication, filtering
- StopDaemon: not alive error, connection failures
- KillAllDaemons: empty list, not alive daemons, mixed states, force mode

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:39:22 -08:00
Steve Yegge 20ea9b53c5 bd sync: 2025-12-23 22:33:37 2025-12-23 22:33:37 -08:00
Steve Yegge 2de1695615 bd sync: 2025-12-23 22:33:32 2025-12-23 22:33:33 -08:00
Steve Yegge a10f580bbe bd sync: 2025-12-23 22:29:35 2025-12-23 22:29:35 -08:00
Steve Yegge a8b0163bca bd sync: 2025-12-23 21:51:36 2025-12-23 21:51:36 -08:00
Steve Yegge 93bbad4197 bd sync: 2025-12-23 21:44:33 2025-12-23 21:46:54 -08:00
Steve Yegge 2d592a8983 Merge polecat/testcat - tests for delete wrappers (bd-d28c) 2025-12-23 21:43:08 -08:00
Steve Yegge 9ac2b64038 bd sync: 2025-12-23 21:36:59 2025-12-23 21:36:59 -08:00
Steve Yegge 2e25dbed27 bd sync: 2025-12-23 21:34:40 2025-12-23 21:34:40 -08:00
Steve Yegge cd87e54176 bd sync: Close bd-d28c (tests added with 100% coverage)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:32:46 -08:00
Steve Yegge 7d3447b971 Add tests for createTombstone and deleteIssue wrappers (bd-d28c)
Test scenarios cover:
- Successful tombstone creation with actor/reason tracking
- Original type preservation in tombstone
- Audit trail recording
- Issue deletion with dependency cleanup
- Error handling for non-existent issues
- Unsupported storage backend fallback

Both functions achieve 100% test coverage.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:32:08 -08:00
Steve Yegge 8f366788b7 bd sync: 2025-12-23 21:22:55 2025-12-23 21:22:55 -08:00
Steve Yegge f11663cea9 bd sync: 2025-12-23 21:19:01 2025-12-23 21:19:01 -08:00
Steve Yegge cf9e5a597b bd sync: 2025-12-23 20:50:50 2025-12-23 20:50:50 -08:00
Steve Yegge 9c8761abc9 bd sync: 2025-12-23 20:45:19 2025-12-23 20:45:19 -08:00
Steve Yegge 25fa0e5c25 bd sync: 2025-12-23 20:34:32 2025-12-23 20:34:32 -08:00
Steve Yegge 39ce73e3cf bd sync: 2025-12-23 20:34:11 2025-12-23 20:34:11 -08:00
Steve Yegge cf41d8a040 bd sync: 2025-12-23 20:33:50 2025-12-23 20:33:50 -08:00
Steve Yegge 302b4e4d52 bd sync: 2025-12-23 20:33:29 2025-12-23 20:33:29 -08:00
Steve Yegge 119df253c4 bd sync: 2025-12-23 20:33:08 2025-12-23 20:33:08 -08:00
Steve Yegge 33064e02bd bd sync: 2025-12-23 20:32:47 2025-12-23 20:32:47 -08:00
Steve Yegge 75da35a31a bd sync: 2025-12-23 20:32:16 2025-12-23 20:32:16 -08:00
Steve Yegge c500e00c9e bd sync: 2025-12-23 20:31:54 2025-12-23 20:31:54 -08:00
Steve Yegge 2bb7128fdb bd sync: 2025-12-23 20:31:33 2025-12-23 20:31:33 -08:00
Steve Yegge 8969574b32 bd sync: 2025-12-23 20:31:12 2025-12-23 20:31:12 -08:00
Steve Yegge 742ba75d18 bd sync: 2025-12-23 20:30:51 2025-12-23 20:30:51 -08:00
Steve Yegge 1db506fc51 bd sync: 2025-12-23 20:30:29 2025-12-23 20:30:29 -08:00
Steve Yegge c4473ea757 bd sync: 2025-12-23 19:12:19 2025-12-23 19:12:29 -08:00
Steve Yegge f777093386 feat(rpc): add GetMoleculeProgress endpoint (bd-0oqz)
New RPC endpoint to get detailed progress for a molecule (parent issue
with child steps). Returns moleculeID, title, assignee, and list of
steps with their status (done/current/ready/blocked) and timestamps.

Used when user expands a worker in the activity feed TUI.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 18:27:35 -08:00
Steve Yegge b889aa6edb bd sync: 2025-12-23 18:16:31 2025-12-23 18:16:31 -08:00
Steve Yegge 3a82ce2929 feat(rpc): add GetWorkerStatus RPC endpoint (bd-l13p)
New RPC endpoint to get all workers and their current molecule/step in one call.
Returns: assignee, moleculeID, moleculeTitle, currentStep, totalSteps, stepTitle,
lastActivity, status. Enables activity feed TUI to show worker state without
multiple round trips.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 17:12:58 -08:00
Steve Yegge 0d66aed954 feat(types): add omitempty to JSONL fields for smaller output
Add omitempty json tag to:
- Issue.Description: often empty for quick tasks
- Dependency.CreatedBy: often empty

This reduces JSONL file size when these fields are empty, leading to
faster syncs and smaller repository size.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 17:11:06 -08:00
Steve Yegge 3405f0c684 feat(rpc): enrich MutationEvent with Title and Assignee fields
Add Title and Assignee fields to MutationEvent struct so activity feeds
can display meaningful context without extra lookups. Updated emitMutation
signature to accept these values and modified all callers:

- Create: passes issue.Title and issue.Assignee directly
- Update/Close: moved emitMutation after GetIssue to access enriched data
- Delete: uses existing issue lookup before deletion
- Dep/Label/Comment ops: passes empty strings (would require extra lookup)

Fixes bd-gqxd

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 17:09:56 -08:00
Steve Yegge e0f1d43c2c fix: write startup config keys to config.yaml instead of SQLite (GH#536)
`bd config set no-db true` now correctly writes to config.yaml instead of
SQLite. Previously, startup flags like no-db, no-daemon, no-auto-flush were
stored in SQLite but read from config.yaml at startup - making the command
appear to work while having no effect.

This adds:
- yaml_config.go: Defines yaml-only keys and provides SetYamlConfig/GetYamlConfig
- Updated config set/get commands to route yaml-only keys appropriately
- Comprehensive tests for yaml config handling

Startup flags affected: no-db, no-daemon, no-auto-flush, no-auto-import,
json, auto-start-daemon, flush-debounce, lock-timeout, git.*, sync.*, routing.*

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 17:03:39 -08:00
Steve Yegge d33bd822ca bd sync: 2025-12-23 17:03:27 2025-12-23 17:03:27 -08:00
Steve Yegge 2ac190f26d bd mol run: add cross-database spawning support (gt-jsup)
Add --template-db flag and auto-discovery for wisp molecule spawning.
When --db contains .beads-wisp, auto-discover the main database to read
templates from while writing spawned instances to wisp storage.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 16:39:18 -08:00
Steve Yegge c2d6b130d9 bd sync: 2025-12-23 16:32:42 2025-12-23 16:32:42 -08:00
Steve Yegge 37042a82ce bd sync: 2025-12-23 16:32:21 2025-12-23 16:32:21 -08:00