Commit Graph

975 Commits

Author SHA1 Message Date
Steve Yegge
34e2548c86 feat: bd list defaults to non-closed issues with 50 limit (GH#788)
Changes:
- Default to excluding closed issues (use --all to include)
- Default limit of 50 issues (use --limit 0 for unlimited)
- --all flag now overrides the closed filter

This addresses agent context blowout from seeing hundreds of closed issues.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 17:54:56 -08:00
Steve Yegge
a08dd63079 test: fix config test environment pollution
Tests were failing when BD_ACTOR or other BD_/BEADS_ environment
variables were set. Added envSnapshot helper to save, clear, and
restore environment variables for proper test isolation.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 16:08:43 -08:00
Jordan Hubbard
c9fa7af04c test: expand compact and ui coverage 2025-12-29 16:01:11 -08:00
Steve Yegge
d3b6855aa9 fix: resolve lint errors blocking CI
- Add explicit error checking for fmt.Fprintf/Fprintln in claude.go
- Add gosec nolint for safe exec.CommandContext calls in sync_git.go
- Remove unused error return from findTownRoutes in routes.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 15:58:24 -08:00
Steve Yegge
53a63f2779 fix: edge case in normalizeBeadsRelPath for similar prefixes
Code review caught that ".beads" would incorrectly match prefixes like
".beads-backup". Changed to match ".beads/" (with trailing slash) to
ensure we only match the actual .beads directory.

Added test cases for this edge case.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 15:51:17 -08:00
Steve Yegge
0fa97a4c30 fix: bd sync fails in bare repo worktrees (#785)
The bug: In a bare repo + worktrees setup, jsonlRelPath was calculated
relative to the project root (which contains all worktrees), resulting in
paths like "main/.beads/issues.jsonl". But the sync branch worktree uses
sparse checkout for .beads/*, so files are at ".beads/issues.jsonl".

This caused copyJSONLToMainRepo to look in the wrong location, silently
returning when the file was not found.

Fix: Add normalizeBeadsRelPath() to strip leading path components before
".beads", ensuring correct path resolution in both directions:
- copyJSONLToMainRepo (worktree -> local)
- SyncJSONLToWorktreeWithOptions (local -> worktree)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 15:39:23 -08:00
Steve Yegge
1256352d49 fix: bd delete --cascade now recursively deletes dependents (#787)
The --cascade flag was documented but not working for single-issue
deletes. The bug had two causes:

1. CLI direct mode: Single-issue deletes bypassed the batch path where
   cascade expansion actually happens. Fixed by routing cascade deletes
   through deleteBatch() regardless of issue count.

2. Daemon/RPC mode: handleDelete() iterated through IDs individually
   without expanding dependents. Fixed by using DeleteIssues() with
   cascade flag when SQLite storage is available.

Now `bd delete <id> --cascade --force` correctly deletes the target
issue plus all issues that depend on it (recursively).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 15:10:59 -08:00
Steve Yegge
c2c2ef5d07 feat: Update agent ID validation for canonical naming (gt-zvte2)
Updates ValidateAgentID to accept canonical format: prefix-rig-role-name
- Rig-level: gt-<rig>-witness (was gt-witness-<rig>)
- Named: gt-<rig>-crew-<name> (was gt-crew-<rig>-<name>)

Town-level agents unchanged: gt-mayor, gt-deacon

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 14:55:06 -08:00
Jordan Hubbard
12b797781d test: expand routing and compact coverage 2025-12-29 14:18:33 -08:00
Steve Yegge
96c7cceefc refactor: Extract IssueDetails to shared type (bd-6dnt)
Consolidated 5 duplicate IssueDetails struct definitions into a single
types.IssueDetails in internal/types/types.go:

- Removed 4 inline definitions from cmd/bd/show.go
- Removed 1 inline definition from internal/rpc/server_issues_epics.go

The shared type embeds types.Issue by value and includes:
Labels, Dependencies, Dependents, Comments, and Parent fields.

This improves maintainability and reduces risk of inconsistency.
2025-12-29 14:04:35 -08:00
Steve Yegge
64d5f20b90 fix: Add pre-migration orphan cleanup to avoid chicken-and-egg failure (bd-eko4)
When the database has orphaned foreign key references (dependencies or labels
pointing to non-existent issues), the migration invariant check would fail,
preventing the database from opening. This created a chicken-and-egg problem:

1. bd doctor --fix tries to open the database
2. Opening triggers migrations with invariant checks
3. Invariant check fails due to orphaned refs
4. Fix never runs because database won't open

The fix adds CleanOrphanedRefs() that runs BEFORE captureSnapshot() in
RunMigrations. This automatically cleans up orphaned dependencies and labels
(preserving external:* refs), allowing the database to open normally.

Added test coverage for the cleanup function.
2025-12-29 13:47:04 -08:00
Steve Yegge
819208b8c1 fix: hq- prefix routing by finding town root for routes.jsonl
The routing code now walks up from the current beads directory to find
the Gas Town root (identified by mayor/town.json), then loads routes
from <townRoot>/.beads/routes.jsonl. The '.' path is correctly resolved
to the town beads directory.

Previously, routes.jsonl was only searched in the current beads dir,
which failed when working from rig subdirectories like crew/emma.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 13:46:10 -08:00
Steve Yegge
5560a4243e refactor: Export FollowRedirect and consolidate duplicate implementations
- Rename followRedirect to FollowRedirect in internal/beads (export it)
- Update doctor/maintenance.go to use beads.FollowRedirect
- Update doctor/fix/common.go to use beads.FollowRedirect
- Remove 66 lines of duplicated code across 3 implementations

This ensures consistent redirect handling with path canonicalization,
chain prevention, and proper error warnings.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 13:23:05 -08:00
Steve Yegge
7d1ee6d3e9 feat: Add 'hooked' status for GUPP work assignment (bd-s00m)
Separates semantics of 'pinned' (identity records) from work-on-hook:
- 'pinned' = domain table / identity record (agents, roles) - non-blocking
- 'hooked' = work on agent's hook (GUPP-driven) - blocks dependents

Changes:
- Add StatusHooked constant to types.go
- Update all blocking queries to include 'hooked' status
- Add cyan styling for 'hooked' in UI output
- Create migration 032 to convert pinned work items to hooked

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 22:37:04 -08:00
Steve Yegge
7ff5481966 fix: resolve golangci-lint errors (errcheck, gosec, unparam)
- orphans.go: check fmt.Scanln return value
- edit.go: #nosec G204 for trusted $EDITOR execution
- sync_git.go: #nosec G204 for git commands with internal branch names
- worktree_cmd.go: #nosec G304/G306 for .gitignore file operations
- migrations: handle rows.Close() error
- doctor_pollution.go: mark unused path parameter

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:50:54 -08:00
Steve Yegge
f3dcafca66 feat: Add mol_type schema field for molecule type classification (bd-oxgi)
Add mol_type field to beads for swarm coordination:
- Values: 'swarm' (multi-polecat), 'patrol' (recurring ops), 'work' (default)
- Nullable, defaults to empty string (treated as 'work')

Changes:
- Add mol_type column to SQLite schema and migration 031
- Add MolType type with IsValid() validation in types.go
- Update insertIssue/GetIssue to handle mol_type
- Add --mol-type flag to create command
- Add mol_type filtering to list and ready commands
- Update RPC protocol for daemon mode support
- Update test schema in migrations_test.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:52:51 -08:00
Steve Yegge
ff264c29d2 refactor: Organize Issue struct with section comments (bd-5l59)
Group 50+ fields into 15 logical sections with clear separators:
- Core Identification (ID, ContentHash)
- Issue Content (Title, Description, Design, AcceptanceCriteria, Notes)
- Status & Workflow (Status, Priority, IssueType)
- Assignment (Assignee, EstimatedMinutes)
- Timestamps (CreatedAt, CreatedBy, UpdatedAt, ClosedAt, CloseReason)
- External Integration (ExternalRef)
- Compaction Metadata
- Internal Routing (not exported)
- Relational Data (Labels, Dependencies, Comments)
- Tombstone Fields (soft-delete)
- Messaging Fields (inter-agent communication)
- Context Markers (Pinned, IsTemplate)
- Bonding Fields (compound molecule lineage)
- HOP Fields (entity tracking)
- Gate Fields (async coordination)
- Source Tracing Fields
- Agent Identity Fields

All tests pass, JSON serialization unchanged.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:41 -08:00
Steve Yegge
2d92b452c9 refactor: Extract hashFieldWriter to reduce ComputeContentHash repetition (bd-1tkd)
- Created hashFieldWriter struct with typed helper methods
- Methods: str, int, strPtr, float32Ptr, duration, flag, entityRef
- Reduced ~100 lines of repetitive h.Write() patterns to ~55 lines
- All hash tests pass, output unchanged (backwards compatible)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:33 -08:00
Steve Yegge
e6ff1e89f0 refactor: Remove deprecated fetchAndRebaseInWorktree (bd-kkka)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:26 -08:00
Steve Yegge
27de61fbd0 chore: Convert scattered TODOs to tracked issues (bd-lrj8)
Created 7 new beads to track TODOs that were previously inline comments:

- bd-7l27: Integrate migration detection into bd doctor (5 files)
- bd-6x6g: Add multi-repo target repo switching in bd create
- bd-ag35: Add daemon RPC endpoints for config and stale check
- bd-2dwo: Remove deprecated daemon logger function
- bd-0qx5: Implement Jira issue timestamp comparison for sync
- bd-7zka: Implement formula features (repeat, for_each, branch, gate, split)
- bd-h048: Refactor sync_test to use direct import logic

Updated 16 TODO comments to include bead ID references for tracking.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:34:24 -08:00
Steve Yegge
6f00e48295 Release v0.40.0
New commands and features:
- bd worktree for parallel development
- bd slot commands for agent bead slot management
- bd agent state for ZFC-compliant state reporting
- bd doctor --deep for full graph integrity validation
- Agent bead support (type=agent, type=role, migration 030)
- Computed .parent field in JSON output
- Auto-bypass daemon for wisp operations
- Pour warning for vapor-phase formulas

Performance:
- O(2^n) → O(V+E) cycle detection (GH#775)

Fixes:
- Import hash mismatch warnings
- Test updates for version tracking thresholds
- Migration test updated for new agent schema fields

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:59:02 -08:00
Steve Yegge
f46cc2e798 chore: remove issue ID references from comments and changelogs
Strip (bd-xxx), (gt-xxx) suffixes from code comments and changelog
entries. The descriptions remain meaningful without the ephemeral
issue IDs.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:05:16 -08:00
Peter Chanthamynavong
3342dc2fe8 perf(sqlite): replace O(2^n) cycle detection with O(V+E) DFS
Replace the recursive SQL CTE in DetectCycles with Go-layer DFS using
shared visited set. The previous implementation enumerated all paths
through the dependency graph, causing exponential blowup with diamond
patterns (multiple issues depending on the same target).

Changes:
- Add loadDependencyGraph() to load deps as adjacency list in one query
- Implement DFS cycle detection with recStack for back-edge detection
- Add normalizeCycle() for consistent cycle deduplication
- Add DetectCycles-specific benchmarks (Linear, Dense, Tree graphs)
- Use direct SQL INSERT in benchmarks to bypass AddDependency overhead

Performance improvement on dense graph (500 nodes, 2500 edges):
- Before: >120s timeout
- After: 1.6ms

Benchmarks:
- DetectCycles_Linear_1000: 0.84ms (1000 nodes, 999 edges)
- DetectCycles_Dense_500: 1.59ms (500 nodes, ~2500 edges)
- DetectCycles_Tree_1000: 0.85ms (1000 nodes, 999 edges)
2025-12-28 06:04:05 -08:00
Steve Yegge
947b5ee1c6 feat: add bd agent state command for ZFC-compliant state reporting (bd-uxlb)
Add agent commands for self-reporting state:
- bd agent state <agent> <state>: Update agent state and last_activity
- bd agent heartbeat <agent>: Update last_activity timestamp only
- bd agent show <agent>: Display agent bead details

States: idle, spawning, running, working, stuck, done, stopped, dead

Also adds AgentState and LastActivity fields to UpdateArgs in RPC protocol.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 01:56:53 -08:00
Steve Yegge
dfc796589f feat: add pour warning for vapor-phase formulas, improve help text, add doctor check
- Add Phase field to Formula type to indicate recommended instantiation phase
- Add warning in 'bd mol pour' when formula has phase="vapor"
- Improve pour/wisp help text with clear comparison of when to use each
- Add CheckPersistentMolIssues doctor check to detect mol- issues in JSONL
- Update beads-release.formula.json with phase="vapor"

This helps prevent accidental persistence of ephemeral workflow issues.
2025-12-28 01:34:01 -08:00
Steve Yegge
ecff74e2af feat: add bd slot commands for agent bead slot management (gt-h5sza)
Add slot management commands:
- bd slot set <agent> <slot> <bead> - set slot (error if occupied)
- bd slot clear <agent> <slot> - clear slot
- bd slot show <agent> - show all slots

These enforce cardinality constraints for agent bead slots.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 00:11:22 -08:00
Steve Yegge
46cdf075d4 feat: add agent ID pattern validation for bd create --type=agent (gt-hlaaf)
- Update ParseIssueType to use canonical types.IsValid() (includes agent, role, gate, message)
- Add ValidateAgentID function to validate gt-<role>[-<rig>[-<name>]] pattern
- Wire up validation in create.go when --type=agent with explicit ID
- Update --type flag help text to include agent and role types
- Add comprehensive test coverage for agent ID validation
2025-12-28 00:07:04 -08:00
Steve Yegge
b5c695075a Add agent-specific fields to bead schema (gt-v2gkv)
Agent identity fields on Issue struct:
- HookBead: reference to current work (0..1 cardinality)
- RoleBead: reference to role definition bead
- AgentState: self-reported state (idle|spawning|running|working|stuck|done|stopped|dead)
- LastActivity: timestamp for heartbeat/timeout detection
- RoleType: agent type (polecat|crew|witness|refinery|mayor|deacon)
- Rig: rig name (empty for town-level agents)

Also adds:
- AgentState type with IsValid() method
- Validation for agent state in Issue.Validate()
- Agent fields included in content hash

This enables the agent-as-bead architecture where agents are tracked
as first-class beads with self-reported state.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:44:39 -08:00
Steve Yegge
927e8374ee Add type=agent and type=role to bead schema (gt-ikyo1, gt-gzp2y)
- Add TypeAgent and TypeRole to IssueType enum in types.go
- Update IsValid() to include new types
- Add UI styles with distinct colors (cyan for agent, green for role)
- Add RenderType cases for consistent display

This enables creating agent beads (identity) and role beads (behavior
definitions) as part of the agent-as-bead architecture.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 23:38:56 -08:00
Steve Yegge
35f8e197ee feat: add --parent flag to bd update for reparenting issues (bd-cj2e)
Allows reparenting issues to a different epic/parent:
  bd update bd-xyz --parent=bd-epic

Implementation:
- Add Parent field to UpdateArgs in protocol.go
- Handle reparenting in RPC handler (server_issues_epics.go)
- Add --parent flag to updateCmd with both daemon and direct mode support
- Remove old parent-child dependency before adding new one
- Pass empty string to remove parent entirely

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 22:17:24 -08:00
Steve Yegge
aa99235a59 refactor: consolidate git context into single cached struct (bd-qph3)
Replaced 3 separate caches (isWorktree, mainRepoRoot, repoRoot) with a
single gitContext struct populated by one git call. This reduces git
subprocess calls from up to 4 down to 1 and simplifies ResetCaches().

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:49:52 -08:00
Steve Yegge
ba1c9d6b17 feat: show redirect info in bd prime output (bd-kblo)
When beads is redirected (e.g., in Gas Town crew clones), bd prime now
shows a notice about the redirect. This helps agents understand why
they share issues with other clones.

CLI mode shows:
> ⚠️ **Redirected**: Local .beads → /path/to/target/.beads
> You share issues with other clones using this redirect.

MCP mode shows:
**Note**: Beads redirected to /path/to/target/.beads (shared with other clones)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 21:33:01 -08:00
matt wilkie
d3fe6b0f32 fix: lint errors and update Nix vendorHash
- Add nolint:unparam for readOnly param in sqlite_open.go
- Handle cmd.Help() error in wisp.go
- Handle rows.Close() error in migration 028
- Handle targetStore.Close() error in create.go
- Update Nix vendorHash for current dependencies

Cherry-picked from PR #769
2025-12-27 17:29:36 -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
Steve Yegge
2e7b993a88 feat: add --prefix flag for cross-rig issue creation
Adds --prefix as a forgiving alias to --rig flag. Accepts:
- Exact prefix: bd-, gt-
- Prefix without hyphen: bd, gt
- Rig name: beads, gastown

All resolve to the correct rig via routes.jsonl lookup.
This matches agents' mental model of prefix-based routing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 14:26:00 -08:00
Steve Yegge
21f307de89 feat: add --rig flag for cross-rig issue creation (bd-4nzq)
Adds --rig flag to bd create that allows creating issues in a different
rig without having to cd to that directory.

Example: bd create --rig beads --title='Bug report'

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 00:44:39 -08:00
Steve Yegge
05304e3ab1 Merge origin/main, fix test git init for modern git 2025-12-27 00:17:36 -08:00
Steve Yegge
4362758626 Fix comments display: move outside dependents block, merge main 2025-12-27 00:11:35 -08:00
Steve Yegge
a958c83422 feat: auto-resolve cross-rig IDs in bd dep add (bd-lfiu)
When `bd dep add` fails to resolve the dependency ID locally, it now
checks routes.jsonl for a matching prefix and auto-converts to an
external reference format (external:<project>:<id>).

This allows simpler syntax like:
  bd dep add gt-xyz bd-abc

Instead of the verbose:
  bd dep add gt-xyz external:beads:bd-abc

New functions in routing package:
- ExtractProjectFromPath: Gets project name from route path
- ResolveToExternalRef: Converts foreign ID to external ref using routes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 23:47:42 -08:00
Steve Yegge
0a14abcef5 fix: migration 028 handles missing created_by column
The migration was using SELECT * which fails when migrating databases
that predate the created_by column (34 columns vs 35). Now explicitly
lists columns and provides empty default for created_by if missing.

Also fixes missed Wisp→Ephemeral rename in multirepo_test.go.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 23:18:04 -08:00
Steve Yegge
ea8ae11002 feat: Rename 'wisp' to 'ephemeral' in beads API (bd-o18s)
BREAKING CHANGE: API field and CLI command renamed

- types.Issue.Wisp → types.Issue.Ephemeral
- JSON field: "wisp" → "ephemeral"
- CLI: bd wisp → bd ephemeral
- Flags: --wisp → --ephemeral
- ID prefix: wisp → eph

The SQLite column already uses 'ephemeral' so no schema migration needed.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 21:07:37 -08:00
Steve Yegge
89be2a9d7f fix: add idempotency check to migration 028 (tombstone_closed_at)
Migration 028 lacked an idempotency check, causing it to fail on databases
where the migration had already been applied. The migration would attempt
to copy data from issues to issues_new, but both tables had the same CHECK
constraint, causing the insert to fail.

Added check for "status = 'tombstone'" in the table schema to detect if
the migration has already been applied and skip if so.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 20:57:57 -08:00
Steve Yegge
05b84c3925 fix: bd ready excludes ephemeral (wisp) issues (hq-t15s)
Wisps are ephemeral issues used for patrol/operational cycles and should
not appear in `bd ready` output as trackable work items. Added ephemeral
exclusion filter to both the GetReadyWork() function and ready_issues VIEW.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 20:51:51 -08:00
Steve Yegge
d623488d6b fix: add missing created_by column to migration 028 (GH#757)
Migration 028 (tombstone_closed_at) recreates the issues table but was
missing the created_by column that exists in schema.go. This caused
`SELECT * FROM issues` to fail with column count mismatch on fresh DBs.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 20:34:50 -08:00
matt wilkie
dae8a7aca9 feat: add comments display to bd show command (#177) 2025-12-26 21:30:37 -07:00
Zachary Rosen
f6eeb170ef fix: add missing CreatedBy in RPC path
created_by was recently added in c3ef1c3f38 but was missing support for passing in the CreatedBy through the RPC path so a create that was using the daemon was never having the created_by field set.
2025-12-26 20:44:53 -05:00
Steve Yegge
2c7d34a4c3 Merge pull request #752 from jordanhubbard/main
E2E / chaos testing - first PoC with just 48% code coverage
2025-12-26 17:38:01 -08:00
Ryan Snodgrass
350a78f1ba fix: resolve all golangci-lint errors
Fixes 15 pre-existing lint issues:

errcheck (6 issues):
- mol_distill.go: Add _ = for f.Close() and os.Remove()
- routed.go: Add _ = for routedStorage.Close() (4 locations)

gosec (8 issues):
- maintenance.go, routes.go: Add nolint for G304 (file paths from known dirs)
- mol_distill.go: Add nolint for G304 (file creation in known search paths)
- formula.go: Change WriteFile permissions from 0644 to 0600 (G306)
- gate.go: Add nolint for G204 (exec.Command with trusted AwaitID fields)

misspell (1 issue):
- gate.go: Fix "cancelled" -> "canceled" in comment

unparam (2 issues):
- cook.go, controlflow.go: Add nolint for functions returning always-nil error

Also:
- Update pre-commit-hooks to v6.0.0
- Add lint step to "Landing the Plane" session-end protocol
2025-12-26 19:20:03 -05:00
Ryan Snodgrass
9c9f2f2ad8 fix(tests): use --initial-branch=main for modern git compatibility
Modern git (2.28+) uses 'main' as default branch, not 'master'.
Tests were failing because they assumed 'master' branch exists.

Changes:
- Use 'git init --initial-branch=main' instead of bare 'git init'
- Change 'git checkout master' to 'git checkout main'
- Add git.ResetCaches() after os.Chdir() to clear cached git state
- Ensures test isolation when changing directories
2025-12-26 19:09:41 -05:00