Commit Graph

3937 Commits

Author SHA1 Message Date
Steve Yegge
2ffe4abb35 bd sync: 2025-12-24 12:41:03 2025-12-24 12:53:25 -08:00
Steve Yegge
9ad70cce64 refactor(mol): remove bd mol spawn - use pour/wisp only (bd-8y9t)
Remove the spawn command from bd mol. Proto instantiation now uses:
- bd pour <proto> - Instantiate as persistent mol (liquid phase)
- bd wisp create <proto> - Instantiate as ephemeral wisp (vapor phase)

Rationale:
- 'spawn' doesn't fit the chemistry metaphor
- Two phase transitions (pour/wisp) are clearer than one command with flags
- Avoids confusion about defaults

Changes:
- Delete mol_spawn.go
- Update mol.go, mol_catalog.go, mol_distill.go to reference pour/wisp
- Update pour.go and wisp.go to remove 'Equivalent to spawn' comments
- Update info.go changelog entries
- Update CHANGELOG.md, ARCHITECTURE.md, DELETIONS.md

Closes bd-8y9t
2025-12-24 12:52:47 -08:00
Steve Yegge
9743b45c6d fix(import): preserve comment created_at timestamps during import (#735)
Comment timestamps were being overwritten with CURRENT_TIMESTAMP during
import, causing infinite sync loops between hosts as each import would
update timestamps.

Added ImportIssueComment() method that accepts and preserves the original
timestamp from JSONL, and updated importComments() to use it.

Closes #735
2025-12-24 12:45:20 -08:00
Steve Yegge
7f8f8f69d1 fix(sync): respect sync.remote config in daemon sync operations (#736)
The daemon sync functions (gitPushFromWorktree, syncBranchPull) were
checking git's branch tracking config and falling back to 'origin',
but ignoring bd's sync.remote config setting.

Now these functions check sync.remote config first, matching the
behavior of sync_check.go and sync_import.go.

Closes #736
2025-12-24 12:43:18 -08:00
Steve Yegge
9d0fc55e0b refactor(daemon): simplify JSONL path comment (#734)
Removes unnecessary parenthetical explanation about possible JSONL file names since findJSONLPath() already encapsulates that logic.

Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
2025-12-24 12:38:13 -08:00
Charles P. Cross
cd2e9ac5c8 refactor(daemon): simplify JSONL path comment
Remove verbose parenthetical explanation from comment on line 73.
The comment now reads '// Get the actual JSONL path' instead of
'// Get the actual JSONL path (could be issues.jsonl, beads.base.jsonl, etc.)'

This is a documentation cleanup with no functional changes.
2025-12-24 12:38:04 -08:00
Steve Yegge
72db7e27ab fix(bd-68e4): export must specify -o to write to file, not stdout (#733)
When 'bd doctor --fix' detects DB has more issues than JSONL, it runs 'bd export' to sync them. However, 'bd export' without -o flag outputs to stdout instead of writing to .beads/issues.jsonl, making the fix a no-op.

Add -o .beads/issues.jsonl --force to the export command to ensure the JSONL file is actually updated.

Co-authored-by: matt wilkie <maphew@gmail.com>
2025-12-24 12:37:53 -08:00
matt wilkie
0f93bef240 fix(bd-68e4): export must specify -o to write to file, not stdout
When 'bd doctor --fix' detects DB has more issues than JSONL, it runs
'bd export' to sync them. However, 'bd export' without -o flag outputs
to stdout instead of writing to .beads/issues.jsonl, making the fix a
no-op.

Add -o .beads/issues.jsonl --force to the export command to ensure the
JSONL file is actually updated.
2025-12-24 12:37:24 -08:00
Charles P. Cross
61daa59fd0 feat(list): add --pretty and --watch flags for built-in viewer (#729)
feat(list): add --pretty and --watch flags for built-in viewer

Closes #654
2025-12-24 12:35:57 -08:00
Charles P. Cross
cdbca65ed4 feat(config): add override notification for config parameters (#731)
feat(config): add override notification for config parameters

Adds verbose logging when config values are overridden by flags/env vars.
2025-12-24 12:35:54 -08:00
Charles P. Cross
48b96c9411 fix(config): normalize yaml config keys to canonical format (#732)
fix(config): normalize yaml config keys to canonical format

Fixes sync.branch vs sync-branch config key mismatch.
2025-12-24 12:35:50 -08:00
Charles P. Cross
8676c41c18 fix: address CI lint errors (gosec, errcheck, unparam, duplicate tests) (#730)
* fix: address CI lint errors (gosec, errcheck, unparam, duplicate tests)

- Remove duplicate TestHandleDelete_DryRun and TestHandleDelete_PartialSuccess
  from server_mutations_test.go (already defined in server_delete_test.go)
- Add nolint:gosec comments for exec.CommandContext calls in sync_branch.go
  (variables come from trusted config/git sources)
- Fix gosec G304/G306 in yaml_config.go (file read/write permissions)
- Fix errcheck in mol_run.go (templateStore.Close)
- Add nolint:unparam for updateYamlKey error return

* fix: add remaining nolint:gosec comments for exec.CommandContext calls

- sync_branch.go: diffCmd, logCmd (dry-run), commitCmd, pushCmd, remoteCmd
- sync_check.go: checkLocalCmd

* fix: add more nolint:gosec comments for exec.CommandContext calls

- sync_branch.go: pullCmd
- sync_check.go: localRefCmd, remoteRefCmd, aheadCmd
- sync_import.go: checkoutCmd

* fix: add final nolint:gosec comments for exec.CommandContext calls

- sync_check.go: behindCmd
- sync_import.go: fetchCmd

---------

Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
2025-12-24 12:35:32 -08:00
Steve Yegge
177ee3265e bd sync: 2025-12-24 00:25:18 2025-12-24 00:25:18 -08:00
Steve Yegge
4446c4f959 bd sync: 2025-12-24 00:12:16 2025-12-24 00:12:28 -08:00
Steve Yegge
7be0dcc4c0 bd sync: 2025-12-23 23:52:28 2025-12-24 00:12:28 -08:00
Steve Yegge
557b33082c bd sync: 2025-12-23 23:43:12 2025-12-24 00:12:28 -08:00
Steve Yegge
be895dc280 bd sync: 2025-12-23 23:42:47 2025-12-24 00:12:28 -08:00
Steve Yegge
5cabb0f3d7 test(storage): add interface conformance tests for storage package (bd-a15d)
Add storage_test.go with:
- Compile-time interface conformance checks for Storage and Transaction
- Mock implementations for interface testing
- Config struct tests for sqlite and postgres configurations
- Interface documentation tests that verify all method groups exist

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:42 -08:00
Steve Yegge
6660829ff6 chore: sync beads (bd-05a8) 2025-12-24 00:10:42 -08:00
Steve Yegge
c1dcb01070 chore: sync beads 2025-12-24 00:10:37 -08:00
Steve Yegge
a768024ccb Close bd-9usz: Test suite no longer hangs
Verified test suite completes successfully (~30s) across multiple runs
on both polecat/cheedo and main branches. Issue resolved by recent
test infrastructure improvements.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:23 -08:00
Steve Yegge
2c7114b1b0 chore(beads): sync after closing bd-dxtc
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:23 -08:00
Steve Yegge
d75eb2c409 test(rpc): Add comprehensive tests for daemon RPC delete handler
Adds tests for the daemon-side RPC delete handler (bd-dxtc):
- Dry-run mode returns preview without actual deletion
- Invalid issue IDs return appropriate errors
- Partial success when some IDs valid, some invalid
- No IDs provided error case
- Invalid JSON args handling
- Response structure validation (deleted_count, total_count)
- Storage not available error
- Tombstone creation with SQLite storage
- All failures error handling
- Dry-run preserves data across multiple runs

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:23 -08:00
Steve Yegge
918292993f chore(beads): sync after closing bd-uqfn 2025-12-24 00:10:23 -08:00
Steve Yegge
40ea4c20c6 chore(beads): sync beads changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:14 -08:00
Steve Yegge
f2506088b6 fix(json): audit and standardize JSON output across commands (bd-au0.7)
Audit findings:
- All commands properly respect --json flag for success output
- Added outputJSONError() helper for consistent JSON error output
- Removed redundant local --json flag from stale.go (inherited from rootCmd)
- Fixed stale_test.go to check InheritedFlags() instead of local Flags()

JSON output patterns verified across:
- Query commands: ready, blocked, stale, count, stats, status
- Dep commands: dep add/remove/tree/cycles
- Label commands: label add/remove/list/list-all
- Comment commands: comments add/list
- Epic commands: epic status/close-eligible

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:10:14 -08:00
Steve Yegge
70cfec1ecf bd sync: Close bd-7z4 (add tests for delete operations)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:09:45 -08:00
Steve Yegge
00f043daef bd sync: Verified test suite stability (bd-9usz)
Investigated test hanging issue - confirmed tests now run reliably
(4+ runs including with -race flag). Issue resolved by recent commits
including d677554e race condition fix.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:09:35 -08:00
Steve Yegge
b1223b48c3 chore: sync beads and update uv.lock 2025-12-24 00:09:23 -08:00
Steve Yegge
dcee07f4b5 fix: add output_schema=None to MCP tools for Claude Code compatibility (bd-49kw)
Claude Code enforces outputSchema must have type: object at root, but FastMCP
generates schemas with $ref for self-referential Pydantic models like Issue.

Adds output_schema=None to 8 tools returning complex models:
ready, list, show, create, update, close, reopen, blocked

This disables structured output schema generation, allowing Claude Code to
call these tools without validation errors.

Related: https://github.com/modelcontextprotocol/inspector/issues/552

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:09:23 -08:00
Steve Yegge
36feb15d83 feat(compact): Add --prune mode for standalone tombstone pruning (bd-c7y5)
Add a new --prune mode to `bd compact` that removes expired tombstones from
issues.jsonl without requiring AI compaction or deleting closed issues.

Features:
- `bd compact --prune` removes tombstones older than 30 days (default TTL)
- `bd compact --prune --older-than N` uses custom N-day TTL
- `bd compact --prune --dry-run` previews what would be pruned
- Supports --json output for programmatic use

This reduces sync overhead by eliminating accumulated tombstones that were
previously only pruned as a side effect of compaction or cleanup operations.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:08:10 -08:00
Steve Yegge
cdcb716cfc test(delete): Add comprehensive tests for deleteViaDaemon RPC client (bd-dtl8)
Add integration tests for the deleteViaDaemon function that handles
client-side RPC deletion calls:

- TestDeleteViaDaemon_SuccessfulDeletion: Single issue deletion
- TestDeleteViaDaemon_CascadeDeletion: Cascade deletion through daemon
- TestDeleteViaDaemon_ForceDeletion: Force delete bypassing deps
- TestDeleteViaDaemon_DryRunMode: Preview without actual deletion
- TestDeleteViaDaemon_InvalidIssueID: Error handling for invalid IDs
- TestDeleteViaDaemon_BatchDeletion: Multiple issues at once
- TestDeleteViaDaemon_JSONOutput: JSON output validation
- TestDeleteViaDaemon_HumanReadableOutput: Human-readable formatting
- TestDeleteViaDaemon_DependencyConflict: Dependency conflict handling
- TestDeleteViaDaemon_EmptyIDs: Empty ID list handling
- TestDeleteViaDaemon_MultipleErrors: Mixed valid/invalid batch
- TestDeleteViaDaemon_DirectCall: Direct call with global client
- TestDeleteViaDaemon_DirectDryRun: Direct dry-run test
- TestDeleteViaDaemon_DirectHumanOutput: Direct human output test
- TestDeleteViaDaemon_DirectBatch: Direct batch deletion test

Coverage: 59.4% for deleteViaDaemon (remaining 40% is os.Exit paths)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:07:55 -08:00
Steve Yegge
422ec718e7 fix(json): standardize JSON output for errors and empty arrays (bd-au0.7)
- Add FatalErrorRespectJSON helper for JSON-aware error output
- Fix bd comments list returning null instead of [] for empty arrays
- Remove redundant local --json flags from show/update/close commands
  that were shadowing the global persistent --json flag
- Update show command error handlers to use FatalErrorRespectJSON

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:07:52 -08:00
Steve Yegge
12010b25e5 chore: sync beads after closing bd-indn 2025-12-24 00:07:52 -08:00
Steve Yegge
ce6a733015 beads: close bd-401h (fix Windows file locking) 2025-12-24 00:07:52 -08:00
Steve Yegge
3c786f2333 feat: add Windows code signing infrastructure (bd-14v0)
Implements Authenticode signing for Windows binaries to reduce AV false positives.

Changes:
- Add scripts/sign-windows.sh for osslsigncode-based signing
- Update .goreleaser.yml with post-build signing hook
- Update release.yml to install osslsigncode and pass secrets
- Update docs/ANTIVIRUS.md with signing verification instructions
- Update scripts/README.md with signing script documentation

The signing is gracefully degraded - releases continue without signing
if the certificate secrets are not configured.

Required secrets for signing:
- WINDOWS_SIGNING_CERT_PFX_BASE64: base64-encoded PFX certificate
- WINDOWS_SIGNING_CERT_PASSWORD: certificate password

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:07:16 -08:00
Steve Yegge
edc6eae82c bd sync: 2025-12-23 23:47
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:07:16 -08:00
Steve Yegge
51575fc595 docs: add TROUBLESHOOTING.md link to README (bd-t4u1)
Makes antivirus false positive documentation more discoverable.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:07:15 -08:00
Steve Yegge
a94f956bb3 bd sync: 2025-12-23 00:25:43 2025-12-24 00:07:06 -08:00
Steve Yegge
1a818cbced test(rpc): add comprehensive daemon delete RPC handler tests (bd-dxtc)
Add tests for the daemon Delete RPC handler to verify:

- Dry-run mode returns preview without actual deletion
- Error handling for empty issue IDs
- Error handling for non-existent issues
- Partial success when some issues exist and others do not
- Templates cannot be deleted (read-only protection)
- Invalid JSON args are properly rejected
- Reason field is passed through correctly
- Cascade and Force flags are accepted (documents current behavior)

All test scenarios from bd-dxtc issue are covered.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:06:51 -08:00
Steve Yegge
bed89fdfde feat(export): add --priority exact match filter (bd-au0.6)
Add the --priority (-p) flag to bd export for filtering by exact priority,
matching the behavior of bd list. This completes the comprehensive filtering
support for bd export.

The flag uses cmd.Flags().Changed() to properly handle P0 (priority 0), which
would otherwise be interpreted as "not set" due to Go zero-value semantics.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:06:51 -08:00
Steve Yegge
b68c1c20c9 bd sync: close bd-g9eu 2025-12-24 00:06:41 -08:00
Steve Yegge
143f5c80bf Fix TestMain to find module root before building bd binary
The TestMain in beads_hash_multiclone_test.go was running `go build ./cmd/bd`
from the package directory (internal/beads) instead of the module root, causing
the build to fail with "directory not found".

Now uses `go list -m -f '{{.Dir}}'` to locate the module root and sets cmd.Dir
appropriately before building.

This fixes the integration test setup that was preventing TestRoutingIntegration
from running. (bd-g9eu)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 00:06:41 -08:00
Steve Yegge
2555881e7c bd sync: 2025-12-23 23:42:24 2025-12-24 00:06:41 -08:00
Steve Yegge
e4d8d10043 bd sync: 2025-12-23 23:42:01 2025-12-24 00:06:41 -08:00
Steve Yegge
fc026d3635 bd sync: 2025-12-23 23:41:32 2025-12-24 00:06:41 -08:00
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