Commit graph

5 commits

Author SHA1 Message Date
Jim Wordelman
bb821eed78
feat(verbosity): wire --quiet into create/close/update (bd-au0.10) (#4058)
* feat(verbosity): export debug.PrintNormal; wire --quiet into create/close/update (bd-au0.10)

Exports the previously-private printNormal/printlnNormal helpers as
debug.PrintNormal/PrintlnNormal and applies them to the three most
user-visible write commands so --quiet suppresses success output.
--verbose and error output are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(verbosity): add TestQuietFlagSuppressesSuccessOutput embedded tests

Adds TestQuietFlagSuppressesSuccessOutput with create, update, and close
subtests that assert --quiet produces empty stdout on success. Each test
initializes a fresh embedded-Dolt beads dir, runs the command with --quiet,
and asserts stdout is empty.

Absorbed maintainer-side per synthesis fix plan — contributor's
production wiring is untouched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Jim Wordelman <jim@wordelman.name>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 22:35:42 -07:00
beads/crew/lizzy
de567cda79 chore: unexport 14 dead symbols across 8 packages
Unexport package-internal symbols that have no external callers:
- validation: ValidatePrefix, ValidatePrefixWithAllowed, ForUpdate, ForClose, ForDelete, ForReopen
- debug: PrintNormal, PrintlnNormal
- linear: IssuesQuery
- timeparsing: IsCompactDuration, ParseNaturalLanguage
- utils: FindMoleculesJSONLInDir, ParseIssueID
- testutil/fixtures: XLargeFromJSONL
- storage/sqlite: Snapshot type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 09:24:22 -08:00
Charles P. Cross
ba8beb53b3
test(coverage): add tests to meet 45% CI threshold
Add comprehensive test coverage for previously untested functions:

internal/debug/debug_test.go:
- TestSetVerbose: tests SetVerbose() and its effect on Enabled()
- TestSetQuietAndIsQuiet: tests SetQuiet() and IsQuiet() functions
- TestPrintNormal: tests quiet mode suppression of normal output
- TestPrintlnNormal: tests quiet mode suppression of println output

internal/export/config_test.go (new file):
- TestLoadConfig: comprehensive tests for LoadConfig() including:
  - Default values when no config exists
  - Loading custom policies (both regular and auto-export)
  - Loading retry attempts, backoff, skip encoding errors, write manifest
  - Handling invalid/malformed config values gracefully

internal/export/policy_test.go:
- TestErrorPolicyString: tests String() method on ErrorPolicy
- TestNewManifest: tests manifest creation with proper defaults
- TestWriteManifest: tests manifest file writing and error handling

These tests bring coverage from 44.8% to 45.0%, meeting the CI threshold.
2025-12-18 17:45:49 -05:00
Steve Yegge
273a4d1cfc feat: Complete command set standardization (bd-au0)
Epic bd-au0: Command Set Standardization & Flag Consistency

Completed all 10 child issues:

P0 tasks:
- Standardize --dry-run flag across all commands (bd-au0.1)
- Add label operations to bd update (bd-au0.2)
- Fix --title vs --title-contains redundancy (bd-au0.3)
- Standardize priority flag parsing (bd-au0.4)

P1 tasks:
- Add date/priority filters to bd search (bd-au0.5)
- Add comprehensive filters to bd export (bd-au0.6)
- Audit and standardize JSON output (bd-au0.7)

P2 tasks:
- Improve clean vs cleanup documentation (bd-au0.8)
- Document rarely-used commands (bd-au0.9)

P3 tasks:
- Add global verbosity flags --verbose/-v and --quiet/-q (bd-au0.10)

Key changes:
- export.go: Added filters (assignee, type, labels, priority, dates)
- main.go: Added --verbose/-v and --quiet/-q global flags
- debug.go: Added SetVerbose/SetQuiet and PrintNormal helpers
- clean.go/cleanup.go: Improved documentation with cross-references
- detect_pollution.go: Added use cases and warnings
- migrate_hash_ids.go: Marked as legacy command
- rename_prefix.go: Added use cases documentation

All success criteria met: flags standardized, feature parity achieved,
naming clarified, JSON output consistent.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 20:33:31 -08:00
Steve Yegge
95cbcf4fbc Centralize BD_DEBUG logging into internal/debug package
- Created internal/debug package with Enabled(), Logf(), Printf()
- Added comprehensive unit tests for debug package
- Replaced 50+ scattered os.Getenv("BD_DEBUG") checks across 9 files
- Centralized debug logic for easier maintenance and testing
- All tests passing, behavior unchanged

Closes bd-fb95094c.5
2025-11-06 20:14:34 -08:00