Steve Yegge
e910d96bc6
Adjust sync timings for better batching behavior
...
- Increase flush debounce from 1s to 30s (provides transaction window for batch operations)
- Increase daemon poll from 2s to 5s (reduces commit spam)
- Agents should run 'bd sync' at end of session to force immediate commit
- Prevents creating dozens of commits when making multiple issue changes
2025-10-26 17:15:39 -07:00
Steve Yegge
fcff20a735
Reduce auto-sync delays for better UX
...
- Reduce flush debounce from 5s to 1s (BEADS_FLUSH_DEBOUNCE)
- Reduce daemon poll interval from 10s to 2s
- Makes issue changes sync much faster to JSONL and git
2025-10-26 17:14:25 -07:00
Steve Yegge
9a370b5b3c
Fix gosec security warnings (bd-57)
...
- Changed file permissions from 0644 → 0600 for JSONL exports and config files
- Changed directory permissions from 0755 → 0750 in all test code
- Updated .golangci.yml with proper exclusions for false positives
- Reduced gosec warnings from 102 to 22 (all remaining are acceptable)
Closes bd-57
Amp-Thread-ID: https://ampcode.com/threads/T-f754d957-9e42-4e74-861e-57235c7e6436
Co-authored-by: Amp <amp@ampcode.com >
2025-10-25 13:50:32 -07:00
Steve Yegge
c2c7eda14f
Fix 15 lint errors: dupl, gosec, revive, staticcheck, unparam
...
Reduced golangci-lint issues from 56 to 41:
Fixed:
- dupl (2→0): Extracted parseLabelArgs helper, added nolint for cobra commands
- gosec G104 (4→0): Handle unhandled errors with _ = assignments
- gosec G302/G306 (4→0): Fixed file permissions from 0644 to 0600
- revive exported (4→0): Added proper godoc comments for all exported types
- staticcheck SA1019 (1→0): Removed deprecated netErr.Temporary() call
- staticcheck SA4003 (1→0): Removed impossible uint64 < 0 check
- unparam (8→0): Removed unused params/returns, added nolint where needed
Renamed types in compact package to avoid stuttering:
- CompactConfig → Config
- CompactResult → Result
Remaining 41 issues are documented baseline:
- gocyclo (24): High complexity in large functions
- gosec G204/G115 (17): False positives for subprocess/conversions
Closes bd-92
Amp-Thread-ID: https://ampcode.com/threads/T-1c136506-d703-4781-bcfa-eb605999545a
Co-authored-by: Amp <amp@ampcode.com >
2025-10-24 12:40:56 -07:00
Steve Yegge
9dcb86ebfb
Fix lint errors: handle errors, use fmt.Fprintf, apply De Morgan's law, use switch statements
...
Amp-Thread-ID: https://ampcode.com/threads/T-afcf56b0-a8bc-4310-bb59-1b63e1d70c89
Co-authored-by: Amp <amp@ampcode.com >
2025-10-24 12:27:07 -07:00
Steve Yegge
e293974c71
Fix CI failures: errcheck lint errors and flaky memory pressure test
2025-10-24 00:27:07 -07:00
Steve Yegge
4da8caef24
Migrate to Viper for unified configuration management (bd-78)
...
- Add Viper dependency and create internal/config package
- Initialize Viper singleton with config file search paths
- Bind all global flags to Viper with proper precedence (flags > env > config > defaults)
- Replace manual os.Getenv() calls with config.GetString/GetBool/GetDuration
- Update CONFIG.md with comprehensive Viper documentation
- Add comprehensive tests for config precedence and env binding
- Walk up parent directories to discover .beads/config.yaml from subdirectories
- Add env key replacer for hyphenated keys (BD_NO_DAEMON -> no-daemon)
- Remove deprecated prefer-global-daemon setting
- Move Viper config apply before early-return to support version/init/help commands
Hybrid architecture maintains separation:
- Viper: User-specific tool preferences (--json, --no-daemon, etc.)
- bd config: Team-shared project data (Jira URLs, Linear tokens, etc.)
All tests passing. Closes bd-78, bd-79, bd-80, bd-81, bd-82, bd-83.
Amp-Thread-ID: https://ampcode.com/threads/T-0d0f8c1d-b877-4fa9-8477-b6fea63fb664
Co-authored-by: Amp <amp@ampcode.com >
2025-10-23 17:30:05 -07:00