Skip to content

fix: respect global flags consistently, surface swallowed errors#17

Merged
josephgoksu merged 1 commit intomainfrom
fix/quick-wins-consistency
Feb 25, 2026
Merged

fix: respect global flags consistently, surface swallowed errors#17
josephgoksu merged 1 commit intomainfrom
fix/quick-wins-consistency

Conversation

@josephgoksu
Copy link
Owner

Summary

  • --quiet/--json consistency: ask, start, version, and task start now respect global output flags. Previously they printed unconditionally.
  • Silent error surfacing: Git commit/push failures during task completion and DB errors during knowledge ingestion were silently swallowed. Now logged to stderr so users actually know when something fails.
  • Dead code: Remove unused FilterByMinConfidence export.

Files

File Fix
cmd/ask.go Guard RenderAskResult with !isQuiet()
cmd/start.go Wrap banner + dashboard messages with !isQuiet()
cmd/version.go Add --json support, --quiet prints bare version
cmd/task.go Guard task start success output with !isQuiet()
internal/app/task.go Log git commit/push errors instead of swallowing
internal/knowledge/ingest.go Log node upsert + link errors instead of swallowing
internal/agents/verification/agent.go Remove unused FilterByMinConfidence

Test plan

  • go build ./... passes
  • make test-quick passes
  • taskwing version --json outputs {"version": "..."}
  • taskwing version --quiet outputs bare version string
  • taskwing ask "test" --quiet produces no output

- ask: respect --quiet flag (was printing results unconditionally)
- start: respect --quiet for banner, dashboard, and status messages
- version: support --json output, --quiet prints bare version string
- task start: respect --quiet on success message
- task complete: log git commit/push failures to stderr instead of
  silently swallowing them (users had no idea their work wasn't pushed)
- knowledge ingest: log DB errors on node upsert and link operations
  instead of silently dropping knowledge
- Remove unused FilterByMinConfidence export
@josephgoksu
Copy link
Owner Author

josephgoksu commented Feb 25, 2026

@greptileai

@greptile-apps
Copy link

greptile-apps bot commented Feb 25, 2026

Greptile Summary

Fixed critical error handling bugs and improved CLI output consistency. The PR corrects inverted error logic in internal/app/task.go and internal/knowledge/ingest.go that was silently swallowing failures - these were checking err == nil and only executing on success instead of failure. Now git commit/push failures and database errors are properly logged to stderr. Additionally, adds --quiet and --json flag support across ask, start, version, and task start commands for consistent output control. Removes unused FilterByMinConfidence function as cleanup.

Key fixes:

  • Git commit/push errors during task completion now surface to users
  • Database node upsert and linking errors during knowledge ingestion now surface to users
  • Commands respect global --quiet flag (no output) and --json flag (structured output)
  • Dead code removal improves maintainability

Confidence Score: 5/5

  • Safe to merge - fixes critical bugs and adds polish without introducing risks
  • All changes are straightforward improvements with clear benefits. Error handling fixes prevent silent failures, flag support improves UX consistency, and dead code removal has no functional impact. No complex logic changes or edge cases introduced.
  • No files require special attention

Important Files Changed

Filename Overview
cmd/ask.go Added --quiet flag support by guarding RenderAskResult output
cmd/start.go Wrapped banner and dashboard messages with !isQuiet() checks
cmd/task.go Guarded task start success output with !isQuiet() check
cmd/version.go Added --json and --quiet support, changed to RunE for error handling
internal/agents/verification/agent.go Removed unused FilterByMinConfidence function
internal/app/task.go Fixed inverted error logic - now logs git commit/push failures to stderr
internal/knowledge/ingest.go Fixed inverted error logic - now logs node upsert and link failures to stderr

Last reviewed commit: 7c02306

@josephgoksu josephgoksu merged commit f995a99 into main Feb 25, 2026
9 checks passed
@josephgoksu josephgoksu deleted the fix/quick-wins-consistency branch February 25, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant