Fix misleading 'bd ready' message when all issues closed

Now distinguishes between:
- 'No open work found (all issues are closed)' - when everything is done
- 'No ready work found (all issues have blocking dependencies)' - when work exists but is blocked
This commit is contained in:
Steve Yegge
2025-10-21 19:54:01 -07:00
parent 7ae148cf2b
commit 2de58621a7
3 changed files with 0 additions and 173 deletions

View File

@@ -1,89 +0,0 @@
# golangci-lint configuration for beads
# See https://golangci-lint.run/usage/configuration/
run:
timeout: 5m
tests: true
linters:
enable:
# Core linters (always available)
- errcheck # Check for unchecked errors
- govet # Go vet
- ineffassign # Detect ineffectual assignments
- staticcheck # Static analysis
- unused # Find unused code
# Additional linters
- revive # Fast, configurable, extensible linter
- misspell # Fix commonly misspelled English words
- unconvert # Remove unnecessary type conversions
- unparam # Find unused function parameters
- goconst # Find repeated strings that could be constants
- gocyclo # Check cyclomatic complexity
- dupl # Find duplicated code
- gosec # Security-focused linter
linters-settings:
errcheck:
check-type-assertions: true
check-blank: false
exclude-functions:
- (*database/sql.DB).Close
- (*database/sql.Rows).Close
- (*database/sql.Tx).Rollback
gocyclo:
min-complexity: 15
goconst:
min-len: 3
min-occurrences: 3
dupl:
threshold: 100
misspell:
locale: US
revive:
rules:
- name: var-naming
- name: exported
issues:
max-issues-per-linter: 0
max-same-issues: 0
# Exclude known false positives and idiomatic patterns
exclude:
# Idiomatic Go: ignoring errors from defer cleanup
- "Error return value.*\\.Close.*is not checked"
- "Error return value.*\\.Rollback.*is not checked"
- "Error return value.*\\.RemoveAll.*is not checked"
# Cobra handlers: unused params required by interface
- "unused-parameter: parameter 'cmd' seems to be unused"
- "unused-parameter: parameter 'args' seems to be unused"
# Style preferences: naming decisions
- "var-naming: avoid meaningless package names"
- "exported.*SQLiteStorage.*stutters"
# False positives: validated SQL construction
- "G201: SQL string formatting"
# False positives: user-specified file paths (intended feature)
- "G304.*file inclusion via variable"
# False positive: directory is for user data
- "G301: Expect directory permissions"
# Exclude some linters from running on tests
exclude-rules:
- path: _test\.go
linters:
- dupl # Test duplication is acceptable
- goconst # Test constants are acceptable
- errcheck # Test cleanup errors are acceptable
- gocyclo # Test complexity is acceptable

View File

@@ -1,29 +0,0 @@
class Bd < Formula
desc "AI-supervised issue tracker for coding workflows"
homepage "https://github.com/steveyegge/beads"
url "https://github.com/steveyegge/beads/archive/refs/tags/v0.10.1.tar.gz"
sha256 "efe26286a1747c10c8e6fee62226d6a4bb1b52520a721e89d9b469026f81d4dd"
license "MIT"
head "https://github.com/steveyegge/beads.git", branch: "main"
depends_on "go" => :build
def install
# Build the CLI
system "go", "build", *std_go_args(ldflags: "-s -w -X main.Version=#{version}"), "./cmd/bd"
end
test do
# Test that the binary runs and outputs version
output = shell_output("#{bin}/bd version")
assert_match "bd version #{version}", output
# Test init command
system bin/"bd", "init", "--prefix=test"
assert_predicate testpath/".beads/test.db", :exist?
# Test list command (should show no issues)
list_output = shell_output("#{bin}/bd list --db=#{testpath}/.beads/test.db")
assert_match "Found 0 issues", list_output
end
end

View File

@@ -1,55 +0,0 @@
# Smoke Test Results
_Date:_ October 21, 2025
_Tester:_ Codex (GPT-5)
_Environment:_
- Linux run: WSL (Ubuntu), Go 1.24.0, locally built `bd` binary
- Windows run: Windows 11 (via WSL interop), cross-compiled `bd.exe`
## Scope
- Full CLI lifecycle using local SQLite database: init, create, list, ready/blocked, label ops, deps, rename, comments, markdown import/export, delete (single & batch), renumber, auto-flush/import behavior, daemon interactions (local mode fallback).
- JSONL sync verification.
- Error handling and edge cases (duplicate IDs, validation failures, cascade deletes, daemon fallback scenarios).
## Test Matrix Linux CLI (`bd`)
| Test Case | Description | Status | Notes |
|-----------|-------------|--------|-------|
| Init-001 | Initialize new workspace with custom prefix | ✅ Pass | `/tmp/bd-smoke`, `./bd init --prefix smoke` |
| CRUD-001 | Create issues with JSON output (task/feature/bug) | ✅ Pass | Created smoke-1..3 via `bd create` with flags |
| Read-001 | Verify list/ready/blocked views (human & JSON) | ✅ Pass | `bd list/ready/blocked` with `--json` |
| Label-001 | Add/remove/list labels | ✅ Pass | Added backend label to smoke-2 and removed |
| Dep-001 | Add/remove dependency, view tree, cycle prevention | ✅ Pass | Added blocks, viewed tree, removal succeeded, cycle rejected |
| Comment-001 | Add/list comments (direct mode) | ✅ Pass | Added inline + file-based comments to smoke-3; verified JSON & human output |
| ImportExport-001 | Manual export + import new issue | ✅ Pass | `bd export -o export.jsonl`; imported smoke-4 from JSONL |
| Delete-001 | Single delete preview/force flush check | ✅ Pass | smoke-4 removed; `.beads/issues.jsonl` updated |
| Delete-002 | Batch delete multi issues | ✅ Pass | Deleted smoke-5 & smoke-6 with `--dry-run`, `--force` |
| ImportExport-002 | Auto-import detection from manual JSONL edit | ✅ Pass | Append smoke-8 to `.beads/issues.jsonl`; `bd list` auto-imported |
| Renumber-001 | Force renumber to close gaps | ✅ Pass | `bd renumber --force --json`; IDs compacted |
| Rename-001 | Prefix rename dry-run | ✅ Pass | `bd rename-prefix new- --dry-run` |
## Test Matrix Windows CLI (`bd.exe`)
| Test Case | Description | Status | Notes |
|-----------|-------------|--------|-------|
| Win-Init-001 | Initialize workspace on `D:\tmp\bd-smoke-win` | ✅ Pass | `/mnt/d/.../bd.exe init --prefix win` |
| Win-CRUD-001 | Create task/feature/bug issues | ✅ Pass | win-1..3 via `bd.exe create` |
| Win-Read-001 | list/ready/blocked output | ✅ Pass | `bd.exe list/ready/blocked` |
| Win-Label-001 | Label add/list/remove | ✅ Pass | `platform` label on win-2 |
| Win-Dep-001 | Add dep, cycle prevention, removal | ✅ Pass | win-2 blocks win-1; cycle rejected |
| Win-Comment-001 | Add/list comments | ✅ Pass | Added comment to win-3 |
| Win-Export-001 | Export + JSONL inspection | ✅ Pass | `bd.exe export -o export.jsonl` |
| Win-Import-001 | Manual JSONL edit triggers auto-import | ✅ Pass | Appended `win-4` directly to `.beads\issues.jsonl` |
| Win-Delete-001 | Delete issue with JSONL rewrite | ✅ Pass | `bd.exe delete win-5 --force` (initial failure -> B-001; retest after fix succeeded) |
## Bugs / Issues
| ID | Description | Status | Notes |
|----|-------------|--------|-------|
| B-001 | `bd delete --force` on Windows warned `Access is denied` while renaming issues.jsonl temp file | ✅ Fixed | Closed by ensuring `.beads/issues.jsonl` reader closes before rename (`cmd/bd/delete.go`) |
## Follow-up Actions
| Action | Owner | Status |
|--------|-------|--------|