summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)Author
2026-03-23fix: prevent ask add from swallowing tags into descriptions, add ↵v0.25.11Paul Buetow
rc.confirmation=off parseAddArgs now rejects args that start with '+'/'-' but contain spaces as modifiers — those are description text, not tags (tags cannot have spaces). This prevents agents from quoting tag+description together and having the tag silently land in the task description with no tag applied. Also removed the fallthrough that duplicated all-modifier args as description. Added rc.confirmation=off to every taskwarrior invocation so that write operations (done, delete, start, etc.) succeed non-interactively when stdin is unavailable (as is always the case when called from an agent). Bump version to v0.25.11. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23chore: bump version to v0.25.10v0.25.10Paul Buetow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23fix: accept uuid: prefix on all ask subcommands via NormalizeUUIDPaul Buetow
All ask commands now strip a leading "uuid:" prefix from user-supplied UUID arguments before building the taskwarrior filter, so both bare UUIDs and the "uuid:<value>" format work uniformly across annotate, start, stop, done, modify, denotate, priority, tag, info, delete, and dep. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23chore: bump version to v0.25.9v0.25.9Paul Buetow
Code quality fixes from audit: - Log silently discarded errors in status sinks and stats.Update call sites - Fix json.Marshal errors silently ignored in LSP handlers - Replace time.Sleep in tests with channel signaling (mcp) and fake clock (stats) - Make context cancellation work in production time.Sleep sites (handlers_document, cmdentry) - Remove init()-based provider registration from llm package; use explicit RegisterAllProviders() - Add WaitGroup goroutine tracking to MCP server Run() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23chore: bump version to v0.25.8v0.25.8Paul Buetow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23refactor: split oversized functions, fix double logging, add %w wrappingPaul Buetow
- lsp/handlers_completion.go: extract buildNativeCompletionCacheKey and postProcessNativeCompletion; track collectFirstCompletion in inflight; remove redundant logLLMStats("") on error path - lsp/handlers.go: extract checkTriggerFromContext and checkTriggerFromCursorChar; isTriggerEvent reduced from 63→10 lines - lsp/transport.go: use %w for error wrapping in Content-Length parse - llm/ollama.go: extract parseOllamaStream; ChatStream reduced to ~35 lines - appconfig/config_load.go: extract decodeModelEntryFromMap; rename 'any' to 'found'; decodeModelEntry reduced to ~18 lines - llm/provider.go: document why providerRegistry is package-level - integrationtests/ask_test.go: add //go:build integration; move repoRoot init from init() to TestMain with diagnostic message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23fix: code quality improvements across lsp, askcli, appconfig, integrationtestsPaul Buetow
- lsp/handlers_completion.go: track collectFirstCompletion goroutine in inflight WaitGroup (goroutine leak fix) - lsp/transport.go: use %w instead of %v for error wrapping - askcli/command_list.go: extract handleListWithFilters shared helper; handleList/handleAll/handleReady are now single-liners - askcli/command_list.go, urgency.go, dep.go: log ParseTaskExport errors to stderr instead of returning 1 silently - appconfig/config_load.go: rename 'any' variable to 'found' to avoid shadowing the built-in identifier - llm/provider.go: add explanatory comment for package-level registry - integrationtests/ask_test.go: add //go:build integration tag; move repoRoot init from init() to TestMain with diagnostic error message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23chore: bump version to v0.25.7v0.25.7Paul Buetow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23fix: correct taskwarrior filter ordering in dep and info commandsPaul Buetow
- command_dep.go handleDepAddRm: was passing uuid as a modification argument (task modify <uuid> depends:...) which could modify ALL agent tasks; now uses uuid:<uuid> as filter - command_dep.go handleDepList: updated deprecated 'uuid <value>' space syntax to canonical 'uuid:<uuid>' colon syntax - command_info_add.go handleInfo: same space→colon fix for consistency All mutation commands now uniformly use uuid:<uuid> as the filter before the action verb. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23fix: address all HIGH-severity code quality audit findingsPaul Buetow
- lsp/server.go: track request goroutines in inflight WaitGroup to prevent use-after-close writes on shutdown - lsp/llm_client_registry.go: acquire write lock before calling build() to eliminate TOCTOU race on cache population - lsp/handlers_codeaction.go: resolveSimplifyCodeAction now uses PromptCodeActionSimplify{System,User} (was wrongly using rewrite prompts) - askcli/taskexport.go: remove exported MustParseTaskExport to prevent panic on malformed external input; move to unexported test helper - cmd/ask/main.go: print error to stderr before os.Exit - llm/{openai,ollama,openrouter}.go: add interface satisfaction assertions - integrationtests/ask_test.go: replace type assertions with errors.As for robust exec.ExitError unwrapping Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23fix: use uuid:<uuid> filter for start/stop/done/annotate/modify commandsPaul Buetow
Taskwarrior expects the filter before the action verb. Commands like 'task start <uuid>' are invalid — the UUID must be part of the filter: 'task uuid:<uuid> start'. All mutation commands now use this pattern consistently, matching how priority/tag/denotate already worked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23chore: bump version to v0.25.6v0.25.6Paul Buetow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23ask add: always emit UUID, never the numeric task IDPaul Buetow
Use rc.verbose=new-uuid so taskwarrior prints "Created task <uuid>." directly on stdout. Parse the UUID from that line instead of doing a two-step numeric-ID lookup or falling back to an export call. Removes ExtractUUIDFromOutput (which could leak numeric IDs) and fetchUUIDByNumericID (the export fallback). Integration tests now get the UUID straight from ask add output without any extra calls. Also fixes TestMain_WiresDispatcher which expected "export" first in args, but list now prepends status:pending filter. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22chore: bump version to v0.25.5v0.25.5Paul Buetow
2026-03-22ask: fix filter argument ordering for list/all/ready commandsv0.25.4Paul Buetow
Filters like +tag must come before the 'export' action in task commands. Previously filters were appended after 'export' causing 'ask list +integrationtest' to fail.
2026-03-22ask list: only show pending tasks by defaultv0.25.3Paul Buetow
Add status:pending filter to list command so it only shows pending tasks, not completed or deleted ones. Use 'ask all' to see all tasks.
2026-03-22ask: fix CLI commands to use correct Taskwarrior argument formatsv0.25.2Paul Buetow
- handlePriority: use 'uuid:<uuid> modify priority:<level>' instead of 'priority <uuid> <level>' - handleTag: use 'uuid:<uuid> modify +/-tag' instead of 'tag <uuid> +/-tag' - handleDelete: use 'uuid:<uuid> delete' and pass stdin for confirmation - handleDenotate: use 'uuid:<uuid> denotate <pattern>' instead of 'denotate <uuid> <pattern>' - Add integration tests for all ask CLI subcommands - Update unit tests to match new command argument formats - createTask now uses task info to get UUID instead of export parsing - parseTaskInfoText fixed to split tags by ', ' instead of whitespace
2026-03-22ask: add ready command to list READY tasks (not blocked)Paul Buetow
handleReady passes +READY filter to show actionable tasks only. help text updated. tests updated.
2026-03-22ask: default to list, add ask all for complete task visibilityPaul Buetow
- ask (no args) now behaves like ask list (active tasks sorted by priority/urgency) - ask help: explicit help subcommand - ask all: shows ALL tasks including completed/deleted (uses status:any) - handleAll added in command_list.go, mirrors handleList with status:any - Updated tests: help tests use explicit 'ask help', all subcommand added to reachability test - Updated help text to document ask all
2026-03-22internal/askcli: support priority:X and +tag args in ask addPaul Buetow
2026-03-22Implement 'ask info' and 'ask add' subcommandsPaul Buetow
2026-03-22Implement 'ask list' subcommand: parse export JSON, sort by ↵Paul Buetow
priority/urgency, format UUID table
2026-03-22Implement 'ask dep add/rm/list' subcommandsPaul Buetow
2026-03-22Implement 'ask urgency' subcommand: export tasks, sort by urgency ↵Paul Buetow
descending, format as UUID table
2026-03-22Implement write subcommands: annotate, start, stop, done, priority, tag, ↵Paul Buetow
modify, denotate
2026-03-22Implement 'ask delete' subcommand: forward to Taskwarrior, suppress output, ↵Paul Buetow
print UUID+success
2026-03-22Scaffold internal/askcli package: dispatch, taskexec, taskexport, formatterPaul Buetow
2026-03-20Bump version to 0.25.1v0.25.1Paul Buetow
2026-03-19Bump version to 0.25.0v0.25.0Paul Buetow
2026-03-19Add ask Taskwarrior wrapperPaul Buetow
2026-03-19Improve actionable error guidancePaul Buetow
2026-03-19Inject runner dependencies across CLI, action, and LSPPaul Buetow
2026-03-17Release v0.24.2v0.24.2Paul Buetow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17Fix bugs, remove duplication, and clean up code quality issuesPaul Buetow
- Log swallowed JSON unmarshal errors in stats and LSP handlers - Fix debug log file handle leak in tmuxedit (return closer from initDebugLog) - Check f.Close() errors on write paths in promptstore and tmuxedit - Fix cacheGet TOCTOU race by using single write lock - Fix readInput to use passed stdin reader instead of os.Stdin.Stat() - Remove 45 'moved to' comment tombstones from lsp/handlers.go - Deduplicate canonicalProvider wrappers (use llmutils.CanonicalProvider directly) - Remove SetWindow side effect from stats.TakeSnapshot (pure read now) - Move duplicated splitLines to textutil.SplitLinesBytes - Collapse StatusSink.SetGlobal 10 params into GlobalStatus struct - Simplify LRU touchLocked to in-place delete-and-append Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16Release v0.24.1v0.24.1Paul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Strengthen LLM stats counter tests with value assertionsPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Fix byte vs UTF-16 indexing in LSP position handlingPaul Buetow
Adds utf16OffsetToByteOffset helper to correctly convert LSP character positions (UTF-16 code units) to Go string byte offsets. Fixes trigger detection, prefix heuristic, and completion text slicing for files containing multi-byte characters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Extract LLM stats counters into llmStatsSubsystemPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Document lock ordering, fix test data races, correct stateMu guardPaul Buetow
- Add doc comments clarifying Server.mu and completionState.stateMu are independent (no ordering constraint). - Fix test using wrong lock (s.mu instead of stateMu) for lastLLMCall. - Replace time.Sleep polling in 7 tests with s.inflight.Wait() to eliminate data races under -race. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Add Snapshot.ScopeReqs/ScopeRPM and simplify 3 callersPaul Buetow
Centralizes the provider+model map traversal and window-minutes guard that was duplicated in hexaiaction, hexaicli, and lsp. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Track fire-and-forget goroutines with sync.WaitGroup for clean shutdownPaul Buetow
Adds inflight WaitGroup to Server and wraps inline-prompt, chat-response, and deferShowDocument goroutines. Run() waits for all in-flight work before returning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Replace Summary: prefixes with standard Go package doc commentsPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Make deferShowDocument respect serverCtx for graceful shutdownPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Use atomic.Int64 for LLM stats counters instead of server-wide mutexPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Address review: add zero-temp test, remove unused surface parameterPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Centralize GPT-5 temperature override into llmutils.ResolveTemperaturePaul Buetow
Eliminates identical temperature resolution logic duplicated in hexaiaction, hexaicli, and lsp packages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Add bounds checks to extractRangeText and split into helper functionsPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Use read lock for cache misses in completionState.cacheGetPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Rename timeout helpers to match actual durations (timeout20s, timeout18s)Paul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16Replace interface{} with any in LSP typesPaul Buetow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>