diff --git a/.beads/beads.jsonl b/.beads/beads.jsonl index 1dd39a5f..646943e5 100644 --- a/.beads/beads.jsonl +++ b/.beads/beads.jsonl @@ -334,7 +334,7 @@ {"id":"bd-d6aq","content_hash":"45a169a72749bb3bc93190bb3e5891950409f264baeac4394cd1a3ad5a75c0f2","title":"Test reservation expiration and renewal","description":"Verify TTL-based reservation expiration works correctly.\n\nAcceptance Criteria:\n- Reserve with short TTL (30s)\n- Verify other agents can't claim\n- Wait for expiration\n- Verify reservation auto-released\n- Other agent can now claim\n- Test renewal/heartbeat mechanism\n\nFile: tests/integration/test_reservation_ttl.py","notes":"Implemented comprehensive TTL/expiration test suite in tests/integration/test_reservation_ttl.py\n\nTest Coverage:\n✅ Short TTL reservations (30s) - verifies TTL is properly set\n✅ Reservation blocking - confirms agent2 cannot claim while agent1 holds reservation\n✅ Auto-release after expiration - validates expired reservations are auto-cleaned and become available\n✅ Renewal/heartbeat - tests that re-reserving extends expiration time\n\nAll 4 tests passing in 56.9s total (including 30s+ wait time for expiration tests).\n\nMock server implements full TTL management:\n- Reservation class with expiration tracking\n- Auto-cleanup of expired reservations on each request\n- Renewal support (same agent re-reserving)\n- 409 conflict for cross-agent reservation attempts","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-07T22:43:21.547821-08:00","updated_at":"2025-11-08T03:54:04.855132-08:00","closed_at":"2025-11-08T02:24:30.296982-08:00","source_repo":".","dependencies":[{"issue_id":"bd-d6aq","depends_on_id":"bd-m9th","type":"blocks","created_at":"2025-11-07T22:43:21.548731-08:00","created_by":"daemon"}]} {"id":"bd-d76d","content_hash":"b65da5fe9f89a98f1e6fad6ee32d463126ef72785fec4d6dfa5a4774c6a8a393","title":"Modify EnsureIDs to support parent resurrection","description":"Update internal/storage/sqlite/ids.go:189-202 to call TryResurrectParent before failing on missing parent. Add resurrection mode flag, log resurrected parents for transparency. Maintain backwards compatibility with strict validation mode.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-11-04T12:31:59.659507-08:00","updated_at":"2025-11-05T00:08:42.814463-08:00","closed_at":"2025-11-05T00:08:42.814466-08:00","source_repo":"."} {"id":"bd-d7e88238","content_hash":"ff14f04a04bf89f52bda3d584933df6b09b554cce8665f47f429f1ac52dafb94","title":"Rapid 3","description":"","status":"closed","priority":3,"issue_type":"task","created_at":"2025-10-29T19:11:57.459655-07:00","updated_at":"2025-11-08T01:49:23.462353-08:00","closed_at":"2025-11-07T23:18:52.333825-08:00","source_repo":"."} -{"id":"bd-d84j","content_hash":"d007e5a786a932117a1a4f7a875eb1449424eaaf44f7595d2d4ac01330068d57","title":"Fix PR #319: Performance Improvements - CI failures and lint errors","description":"PR #319 (Performance Improvements) has excellent performance optimizations but is blocked by CI failures.\n\n## The PR\n- URL: https://github.com/steveyegge/beads/pull/319\n- Author: @rsnodgrass (Ryan)\n- Claimed improvements: bd ready 20.5x faster (752ms → 36.6ms), startup 10.5x faster\n\n## CI Failures\n\n### Lint Errors (8 total)\n1. cmd/bd/deletion_tracking.go:57 - unchecked os.Remove\n2. cmd/bd/import.go:548 - unchecked os.RemoveAll\n3. cmd/bd/message.go:205 - unchecked resp.Body.Close\n4. cmd/bd/migrate_issues.go:633 - unchecked fmt.Scanln\n5. cmd/bd/migrate_issues.go:701 - unchecked MarkFlagRequired\n6. cmd/bd/migrate_issues.go:702 - unchecked MarkFlagRequired\n7. cmd/bd/show.go:610 - gosec G104 unhandled error\n8. cmd/bd/show.go:614 - gosec G104 unhandled error\n\n### Test Failures\nAll syncbranch_test.go tests failing with:\n\"migration external_ref_column failed: failed to create index on external_ref: sqlite3: SQL logic error: no such table: main.issues\"\n\nThis suggests the PR branch needs rebasing on current main.\n\n## Required Work\n\n### 1. Fix Lint Errors\nAdd proper error handling for all 8 flagged locations. Most can use _ = or log warnings.\n\n### 2. Rebase on Current Main\nThe migration test failures indicate the branch is out of sync. Need to:\n- git fetch upstream\n- git rebase upstream/main\n- Resolve any conflicts\n- Verify tests pass locally\n\n### 3. Verify CI Passes\n- All lint checks green\n- All tests pass (Linux, Windows, Nix)\n\n## Optional Improvements\n- Consider splitting into smaller PRs (core index, WASM cache, testing infra)\n- Add documentation for benchmark usage\n- Extract helper functions in doctor/perf.go for better testability\n\n## Value\nThis PR delivers real performance improvements. The index optimization alone is worth merging quickly once CI is fixed.","design":"Workflow:\n1. Checkout PR branch locally\n2. Rebase on current main\n3. Fix all 8 lint errors\n4. Run full test suite locally\n5. Push updated branch\n6. Verify CI passes\n7. Request re-review from maintainers","acceptance_criteria":"- All lint errors fixed\n- All tests passing on all platforms\n- PR rebased on current main\n- CI checks all green","status":"open","priority":1,"issue_type":"bug","created_at":"2025-11-15T12:24:34.50322-08:00","updated_at":"2025-11-15T12:24:34.50322-08:00","source_repo":"."} +{"id":"bd-d84j","content_hash":"d007e5a786a932117a1a4f7a875eb1449424eaaf44f7595d2d4ac01330068d57","title":"Fix PR #319: Performance Improvements - CI failures and lint errors","description":"PR #319 (Performance Improvements) has excellent performance optimizations but is blocked by CI failures.\n\n## The PR\n- URL: https://github.com/steveyegge/beads/pull/319\n- Author: @rsnodgrass (Ryan)\n- Claimed improvements: bd ready 20.5x faster (752ms → 36.6ms), startup 10.5x faster\n\n## CI Failures\n\n### Lint Errors (8 total)\n1. cmd/bd/deletion_tracking.go:57 - unchecked os.Remove\n2. cmd/bd/import.go:548 - unchecked os.RemoveAll\n3. cmd/bd/message.go:205 - unchecked resp.Body.Close\n4. cmd/bd/migrate_issues.go:633 - unchecked fmt.Scanln\n5. cmd/bd/migrate_issues.go:701 - unchecked MarkFlagRequired\n6. cmd/bd/migrate_issues.go:702 - unchecked MarkFlagRequired\n7. cmd/bd/show.go:610 - gosec G104 unhandled error\n8. cmd/bd/show.go:614 - gosec G104 unhandled error\n\n### Test Failures\nAll syncbranch_test.go tests failing with:\n\"migration external_ref_column failed: failed to create index on external_ref: sqlite3: SQL logic error: no such table: main.issues\"\n\nThis suggests the PR branch needs rebasing on current main.\n\n## Required Work\n\n### 1. Fix Lint Errors\nAdd proper error handling for all 8 flagged locations. Most can use _ = or log warnings.\n\n### 2. Rebase on Current Main\nThe migration test failures indicate the branch is out of sync. Need to:\n- git fetch upstream\n- git rebase upstream/main\n- Resolve any conflicts\n- Verify tests pass locally\n\n### 3. Verify CI Passes\n- All lint checks green\n- All tests pass (Linux, Windows, Nix)\n\n## Optional Improvements\n- Consider splitting into smaller PRs (core index, WASM cache, testing infra)\n- Add documentation for benchmark usage\n- Extract helper functions in doctor/perf.go for better testability\n\n## Value\nThis PR delivers real performance improvements. The index optimization alone is worth merging quickly once CI is fixed.","design":"Workflow:\n1. Checkout PR branch locally\n2. Rebase on current main\n3. Fix all 8 lint errors\n4. Run full test suite locally\n5. Push updated branch\n6. Verify CI passes\n7. Request re-review from maintainers","acceptance_criteria":"- All lint errors fixed\n- All tests passing on all platforms\n- PR rebased on current main\n- CI checks all green","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-15T12:24:34.50322-08:00","updated_at":"2025-11-15T12:43:11.49933-08:00","closed_at":"2025-11-15T12:43:11.49933-08:00","source_repo":"."} {"id":"bd-d9e0","content_hash":"de4e01414f8863b63cb693a709048b85c3f4417f03e7d7b2528560076be0e1f7","title":"Extract validation functions to validators.go","description":"Move validatePriority, validateStatus, validateIssueType, validateTitle, validateEstimatedMinutes, validateFieldUpdate to validators.go","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-01T19:28:54.915909-07:00","updated_at":"2025-11-02T12:32:00.159298-08:00","closed_at":"2025-11-02T12:32:00.1593-08:00","source_repo":"."} {"id":"bd-dcd6f14b","content_hash":"c07a4b8a39e6e81513278ee335fe14aa767cbcba72e3b511cfd95705053483b1","title":"Batch test 4","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-29T15:29:02.053523-07:00","updated_at":"2025-10-31T12:00:43.182861-07:00","closed_at":"2025-10-31T12:00:43.182861-07:00","source_repo":"."} {"id":"bd-de0h","content_hash":"8b8b43683607e73012cf8bd7cf8631c6ae34498d0c93ca5b77d3f68944c8088d","title":"bd message: Add HTTP client timeout to prevent hangs","description":"HTTP client in `sendAgentMailRequest` uses default http.Post with no timeout.\n\n**Location:** cmd/bd/message.go:181\n\n**Problem:**\n- Can hang indefinitely if server is unresponsive\n- No way to cancel stuck requests\n- Poor UX in flaky networks\n\n**Fix:**\n```go\nclient := \u0026http.Client{Timeout: 30 * time.Second}\nresp, err := client.Post(url, \"application/json\", bytes.NewReader(reqBody))\n```\n\n**Impact:** Production reliability and security issue","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-08T12:54:24.942645-08:00","updated_at":"2025-11-08T12:56:59.948929-08:00","closed_at":"2025-11-08T12:56:59.948929-08:00","source_repo":".","dependencies":[{"issue_id":"bd-de0h","depends_on_id":"bd-6uix","type":"parent-child","created_at":"2025-11-08T12:55:54.860847-08:00","created_by":"daemon"}]} @@ -491,7 +491,7 @@ {"id":"bd-xzrv","content_hash":"45b45aaa47b9fc254ce74750b92f5527862672d9826c7ad59e006bdb1bc9939f","title":"Write Agent Mail integration guide","description":"Comprehensive guide for setting up and using Agent Mail with Beads.\n\nAcceptance Criteria:\n- Installation instructions\n- Configuration (environment variables)\n- Architecture diagram\n- Benefits and tradeoffs\n- When to use vs not use\n- Troubleshooting section\n- Migration from git-only mode\n\nFile: docs/AGENT_MAIL.md\n\nSections:\n- Quick start\n- How it works\n- Integration points\n- Graceful degradation\n- Multi-machine deployment\n- FAQ","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-07T22:42:51.231066-08:00","updated_at":"2025-11-08T01:51:40.352442-08:00","closed_at":"2025-11-08T00:40:38.798162-08:00","source_repo":".","dependencies":[{"issue_id":"bd-xzrv","depends_on_id":"bd-fzbg","type":"blocks","created_at":"2025-11-07T22:42:51.232246-08:00","created_by":"daemon"}]} {"id":"bd-yek6","content_hash":"f155913af8c58c0a7ea3da6a7d9e232e8cb29c3825f2d6f272a5417a449692a9","title":"CLI tests (cli_fast_test.go) are slow and should be integration tests","description":"The TestCLI_* tests in cmd/bd/cli_fast_test.go are taking 4-5 seconds each (40+ seconds total), making them the slowest part of the fast test suite.\n\nCurrent timings:\n- TestCLI_Import: 4.73s\n- TestCLI_Blocked: 4.33s \n- TestCLI_DepTree: 4.15s\n- TestCLI_Close: 3.59s\n- TestCLI_DepAdd: 3.50s\n- etc.\n\nThese tests compile the bd binary once in init(), but then execute it multiple times per test with filesystem operations. Despite being named \"fast\", they're actually end-to-end CLI integration tests.\n\nOptions:\n1. Tag with //go:build integration (move to integration suite)\n2. Optimize: Use in-memory databases, reduce exec calls, better parallelization\n3. Keep as-is but understand they're the baseline for \"fast\" tests\n\nTotal test suite currently: 13.8s (cmd/bd alone is 12.8s, and most of that is these CLI tests)","notes":"Fixed by reusing existing bd binary from repo root instead of rebuilding.\n\nBefore: 15+ minutes (rebuilding binary for every test package)\nAfter: ~12 seconds (reuses pre-built binary)\n\nThe init() function now checks for ../../bd first before falling back to building. This means `go build \u0026\u0026 go test` is now fast.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-05T20:19:12.822543-08:00","updated_at":"2025-11-05T20:31:19.321787-08:00","closed_at":"2025-11-05T20:31:19.321787-08:00","source_repo":"."} {"id":"bd-yuf7","content_hash":"97e18d89914d698df5ec673d40ff980a87a29e1435a887ec2b5dd77d7d412a79","title":"bd config set succeeds but doesn't persist to config.toml","description":"Commands like `bd config set daemon.auto_push true` return \"Set daemon.auto_push = true\" but the config file is never created and `bd info --json | jq '.config'` returns null.\n\n**Steps to reproduce:**\n1. Run `bd config set daemon.auto_push true`\n2. See success message: \"Set daemon.auto_push = true\"\n3. Check `cat .beads/config.toml` → file doesn't exist\n4. Check `bd info --json | jq '.config'` → returns null\n\n**Expected:**\n- .beads/config.toml should be created with the setting\n- bd info should show the config value\n\n**Impact:**\nUsers can't enable auto-push/auto-commit via CLI as documented in AGENTS.md","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-08T01:14:58.726198-08:00","updated_at":"2025-11-08T01:17:41.377912-08:00","closed_at":"2025-11-08T01:17:41.377912-08:00","source_repo":"."} -{"id":"bd-yvlc","content_hash":"f121c6b2674a550c12f99331eb6a45a4817bd4161ea377104c212f56c0589af5","title":"URGENT: main branch has failing tests (syncbranch migration error)","description":"The main branch has failing tests that are blocking CI for all PRs.\n\n## Problem\nAll syncbranch_test.go tests failing with:\n\"migration external_ref_column failed: failed to create index on external_ref: sqlite3: SQL logic error: no such table: main.issues\"\n\n## Evidence\n- Last 5 CI runs on main: ALL FAILED\n- Tests fail locally on current main (bd6dca5)\n- Affects: TestGet, TestSet, TestUnset in internal/syncbranch\n\n## Impact\n- Blocking all PR merges\n- CI shows red for all branches\n- Can't trust test results\n\n## Root Cause\nMigration order issue - trying to create index on external_ref column before the issues table exists, or before the external_ref column is added to the issues table.\n\n## Quick Fix Needed\nNeed to investigate migration order in internal/storage/sqlite/migrations.go and ensure:\n1. issues table is created first\n2. external_ref column is added to issues table\n3. THEN index on external_ref is created\n\nThis is CRITICAL - main should never have breaking tests.","design":"Investigation steps:\n1. Check internal/storage/sqlite/migrations.go\n2. Verify migration order and dependencies\n3. Look at external_ref_column migration specifically\n4. Ensure proper table/column creation before index\n5. Test fix locally with fresh database\n6. Push fix to main\n7. Verify CI passes","acceptance_criteria":"- All tests pass on main branch\n- CI is green\n- syncbranch_test.go tests all passing","status":"open","priority":0,"issue_type":"bug","created_at":"2025-11-15T12:25:31.51688-08:00","updated_at":"2025-11-15T12:25:31.51688-08:00","source_repo":"."} +{"id":"bd-yvlc","content_hash":"f121c6b2674a550c12f99331eb6a45a4817bd4161ea377104c212f56c0589af5","title":"URGENT: main branch has failing tests (syncbranch migration error)","description":"The main branch has failing tests that are blocking CI for all PRs.\n\n## Problem\nAll syncbranch_test.go tests failing with:\n\"migration external_ref_column failed: failed to create index on external_ref: sqlite3: SQL logic error: no such table: main.issues\"\n\n## Evidence\n- Last 5 CI runs on main: ALL FAILED\n- Tests fail locally on current main (bd6dca5)\n- Affects: TestGet, TestSet, TestUnset in internal/syncbranch\n\n## Impact\n- Blocking all PR merges\n- CI shows red for all branches\n- Can't trust test results\n\n## Root Cause\nMigration order issue - trying to create index on external_ref column before the issues table exists, or before the external_ref column is added to the issues table.\n\n## Quick Fix Needed\nNeed to investigate migration order in internal/storage/sqlite/migrations.go and ensure:\n1. issues table is created first\n2. external_ref column is added to issues table\n3. THEN index on external_ref is created\n\nThis is CRITICAL - main should never have breaking tests.","design":"Investigation steps:\n1. Check internal/storage/sqlite/migrations.go\n2. Verify migration order and dependencies\n3. Look at external_ref_column migration specifically\n4. Ensure proper table/column creation before index\n5. Test fix locally with fresh database\n6. Push fix to main\n7. Verify CI passes","acceptance_criteria":"- All tests pass on main branch\n- CI is green\n- syncbranch_test.go tests all passing","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-15T12:25:31.51688-08:00","updated_at":"2025-11-15T12:43:11.489612-08:00","closed_at":"2025-11-15T12:43:11.489612-08:00","source_repo":"."} {"id":"bd-z0yn","content_hash":"1bb2f4940363e921d71f45e202cbadc1d90c4985ce5a048bb97d352f0a3ad9d0","title":"Channel isolation test - beads","description":"","status":"in_progress","priority":2,"issue_type":"task","created_at":"2025-11-08T04:21:17.327983-08:00","updated_at":"2025-11-08T04:21:17.365854-08:00","source_repo":"."} {"id":"bd-z3s3","content_hash":"24d99dc1a9a5f35af962137f5709d4b0f1b6a9ec91511c30a2517d790640cce8","title":"Create deployment scripts for GCP","description":"Automated provisioning scripts for GCP Compute Engine deployment.\n\nAcceptance Criteria:\n- Terraform/gcloud scripts\n- Static IP allocation\n- Firewall rules\n- NGINX reverse proxy config\n- TLS setup (Let's Encrypt)\n- Systemd service file\n\nFile: deployment/agent-mail/gcp/","status":"open","priority":3,"issue_type":"task","created_at":"2025-11-07T22:43:43.294839-08:00","updated_at":"2025-11-07T22:43:43.294839-08:00","source_repo":".","dependencies":[{"issue_id":"bd-z3s3","depends_on_id":"bd-9li4","type":"blocks","created_at":"2025-11-07T23:04:27.982336-08:00","created_by":"daemon"}]} {"id":"bd-z528","content_hash":"3f332e9997d2b7eb0af23885820df5f607fe08671a2615cadec941bbe7d36f68","title":"Prevent test pollution in production database","description":"The bd-vxdr cleanup revealed test issues were created during manual testing in the production workspace (Nov 2-4, template feature development).\n\n**Root cause:** Manual testing with `./bd create \"Test issue\"` pollutes the production .beads database.\n\n**Prevention strategies:**\n1. Use TEST_DB environment variable for manual testing\n2. Add warning when creating issues with \"Test\" prefix\n3. Improve developer docs about testing workflow\n4. Consider adding `bd test-mode` command for isolated testing","notes":"**Implementation completed:**\n\n1. ✅ Added warning when creating issues with \"Test\" prefix in production database\n - Shows yellow warning with ⚠ symbol\n - Suggests using BEADS_DB for isolated testing\n - Warning appears in create.go after title validation\n\n2. ✅ Documented BEADS_DB testing workflow in AGENTS.md\n - Added \"Testing Workflow\" section in Development Guidelines\n - Includes manual testing examples with BEADS_DB\n - Includes automated testing examples with t.TempDir()\n - Clear warning about not polluting production database\n\n3. ⚠️ Decided against bd test-mode command\n - BEADS_DB already provides simple, flexible isolation\n - Additional command would add complexity without much benefit\n - Current approach follows Unix philosophy (env vars for config)\n\n**Files modified:**\n- cmd/bd/create.go - Added Test prefix warning\n- AGENTS.md - Added Testing Workflow section\n\n**Testing:**\n- Verified warning appears when creating \"Test\" prefix issues\n- Verified BEADS_DB isolation works correctly\n- Built successfully with `go build`","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-07T16:07:28.255289-08:00","updated_at":"2025-11-08T01:49:23.463399-08:00","closed_at":"2025-11-07T22:43:28.669908-08:00","source_repo":"."} diff --git a/cmd/bd/deletion_tracking.go b/cmd/bd/deletion_tracking.go index b4d1f728..44f9b7d9 100644 --- a/cmd/bd/deletion_tracking.go +++ b/cmd/bd/deletion_tracking.go @@ -54,7 +54,7 @@ func merge3WayAndPruneDeletions(ctx context.Context, store storage.Storage, json // Ensure temp file cleanup on failure defer func() { if fileExists(tmpMerged) { - os.Remove(tmpMerged) + _ = os.Remove(tmpMerged) } }() diff --git a/cmd/bd/import.go b/cmd/bd/import.go index ab3b452a..1d832da9 100644 --- a/cmd/bd/import.go +++ b/cmd/bd/import.go @@ -545,7 +545,7 @@ func attemptAutoMerge(conflictedPath string) error { if err != nil { return fmt.Errorf("failed to create temp directory: %w", err) } - defer os.RemoveAll(tmpDir) + defer func() { _ = os.RemoveAll(tmpDir) }() basePath := filepath.Join(tmpDir, "base.jsonl") leftPath := filepath.Join(tmpDir, "left.jsonl") diff --git a/cmd/bd/message.go b/cmd/bd/message.go index 3ae46879..f3d3d4dc 100644 --- a/cmd/bd/message.go +++ b/cmd/bd/message.go @@ -202,7 +202,7 @@ func sendAgentMailRequest(config *AgentMailConfig, method string, params interfa if err != nil { return nil, fmt.Errorf("failed to connect to Agent Mail server: %w", err) } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() body, err := io.ReadAll(resp.Body) if err != nil { diff --git a/cmd/bd/migrate_issues.go b/cmd/bd/migrate_issues.go index b9630c7e..acbafe43 100644 --- a/cmd/bd/migrate_issues.go +++ b/cmd/bd/migrate_issues.go @@ -630,7 +630,7 @@ func displayMigrationPlan(plan migrationPlan, dryRun bool) error { func confirmMigration(plan migrationPlan) bool { fmt.Printf("\nMigrate %d issues from %s to %s? [y/N] ", len(plan.IssueIDs), plan.From, plan.To) var response string - fmt.Scanln(&response) + _, _ = fmt.Scanln(&response) return strings.ToLower(strings.TrimSpace(response)) == "y" } @@ -698,6 +698,6 @@ func init() { migrateIssuesCmd.Flags().Bool("strict", false, "Fail on orphaned dependencies or missing repos") migrateIssuesCmd.Flags().Bool("yes", false, "Skip confirmation prompt") - migrateIssuesCmd.MarkFlagRequired("from") - migrateIssuesCmd.MarkFlagRequired("to") + _ = migrateIssuesCmd.MarkFlagRequired("from") + _ = migrateIssuesCmd.MarkFlagRequired("to") } diff --git a/cmd/bd/show.go b/cmd/bd/show.go index 6e437edf..785cd8fc 100644 --- a/cmd/bd/show.go +++ b/cmd/bd/show.go @@ -607,11 +607,11 @@ Examples: // Write current value to temp file if _, err := tmpFile.WriteString(currentValue); err != nil { - tmpFile.Close() + _ = tmpFile.Close() fmt.Fprintf(os.Stderr, "Error writing to temp file: %v\n", err) os.Exit(1) } - tmpFile.Close() + _ = tmpFile.Close() // Open the editor editorCmd := exec.Command(editor, tmpPath)