When git push or other git operations hang waiting for credential/browser
auth, show a helpful message to the user after 5 seconds of inactivity
instead of appearing frozen.
Added:
- runCmdWithTimeoutMessage() in internal/syncbranch/worktree.go
- runGitCmdWithTimeoutMsg() in cmd/bd/sync.go
- Both functions print a message after timeout delay with advice
to check for browser auth prompts
Fixes issue #647 (bd sync frozen waiting for browser auth)
- Modified fix.DBJSONLSync() to detect which direction to sync:
- If DB > JSONL: run 'bd export' to sync JSONL (DB has newer data)
- If JSONL > DB: run 'bd sync --import-only' to import (JSONL is source of truth)
- If equal but different timestamps: use file mtime to decide direction
- Updated CheckDatabaseJSONLSync() error messages to recommend correct fix direction:
- Shows different guidance based on whether DB or JSONL has more issues
- Added helper functions:
- countDatabaseIssues() to count issues in SQLite
- countJSONLIssues() to count issues in JSONL (local, avoids circular import)
- Added tests for countJSONLIssues() with edge cases
Fixes issue where 'bd doctor --fix' would recommend 'bd sync --import-only'
when DB > JSONL, which would be a no-op since JSONL hasn't changed.
bd mol run = bond + assign + pin:
- Bonds the molecule (creates issues from template)
- Assigns root to the caller
- Sets root status to in_progress
- Pins root issue for session recovery
After a crash or session reset, the pinned root ensures the agent
can resume from where it left off by checking 'bd ready'.
This is the Gas Town integration point that makes molecules immortal.
Closes: bd-icnf
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The simple single-issue instantiation in molecule.go is superseded by
the full DAG-based mol commands. Use 'bd mol bond' for all molecule
instantiation - it handles both single-issue and multi-issue molecules.
Closes: bd-8b0x
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds the mol command group for molecule workflows:
- bd mol catalog - list available molecules
- bd mol show <id> - show molecule structure and variables
- bd mol bond <id> --var k=v - instantiate a molecule
Molecules are templates with workflow semantics - they are the
orchestration primitive for Gas Town. This unifies the template
system under the mol command.
The template commands are deprecated but still work:
- bd template list -> use bd mol catalog
- bd template show -> use bd mol show
- bd template instantiate -> use bd mol bond
Closes: bd-ffjt
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>