fix: CI test failures and lint errors

- Fixed test file naming: issues.jsonl -> beads.jsonl
  - beads_test.go: Update expected path in TestFindJSONLPath
  - internal/beads/beads_test.go: Update TestFindJSONLPathDefault
  - cmd/bd/main_test.go: Update TestAutoFlushJSONLContent

- Fixed lint errors (gosec):
  - G304: Added nosec comments for file operations with user-provided paths
  - G204: Added nosec comment for subprocess with controlled binary path

- Fixed lint errors (errcheck):
  - cmd/bd/test_wait_helper.go: Acknowledge error return values with _
  - cmd/bd/onboard.go: Handle fmt.Fprintf error return

All tests passing locally. All lint checks passing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-24 00:21:01 -08:00
parent ed3ddc0053
commit 76e3f27eb0
7 changed files with 28 additions and 25 deletions

View File

@@ -434,6 +434,7 @@ It is auto-generated and version-stamped to track bd upgrades.
// generateBDGuide creates a version-stamped BD_GUIDE.md file
func generateBDGuide(outputPath string) error {
// Create output file
// #nosec G304 - outputPath is a user-provided flag value for file generation
f, err := os.Create(outputPath)
if err != nil {
return fmt.Errorf("failed to create output file: %w", err)
@@ -496,7 +497,7 @@ with bd upgrades) from project-specific instructions in AGENTS.md.`,
if outputPath != "" {
// Generate BD_GUIDE.md instead of onboarding instructions
if err := generateBDGuide(outputPath); err != nil {
fmt.Fprintf(cmd.ErrOrStderr(), "Error generating BD_GUIDE.md: %v\n", err)
_, _ = fmt.Fprintf(cmd.ErrOrStderr(), "Error generating BD_GUIDE.md: %v\n", err)
os.Exit(1)
}
fmt.Printf("✓ Generated %s (bd v%s)\n", outputPath, Version)