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>
This commit is contained in:
@@ -336,8 +336,8 @@ func TestRun_Async(t *testing.T) {
|
||||
outputFile := filepath.Join(tmpDir, "async_output.txt")
|
||||
|
||||
// Create a hook that writes to a file
|
||||
hookScript := `#!/bin/sh
|
||||
echo "async" > ` + outputFile
|
||||
hookScript := "#!/bin/sh\n" +
|
||||
"echo \"async\" > \"" + outputFile + "\"\n"
|
||||
if err := os.WriteFile(hookPath, []byte(hookScript), 0755); err != nil {
|
||||
t.Fatalf("Failed to create hook file: %v", err)
|
||||
}
|
||||
@@ -348,15 +348,17 @@ echo "async" > ` + outputFile
|
||||
// Run should return immediately
|
||||
runner.Run(EventClose, issue)
|
||||
|
||||
// Wait for the async hook to complete with retries
|
||||
// Wait for the async hook to complete with retries.
|
||||
// Under high test load the goroutine scheduling + exec can be delayed.
|
||||
var output []byte
|
||||
var err error
|
||||
for i := 0; i < 10; i++ {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
deadline := time.Now().Add(3 * time.Second)
|
||||
for time.Now().Before(deadline) {
|
||||
output, err = os.ReadFile(outputFile)
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user