Previously the gitlab output wrapped each command individually, causing
two visible bugs in real GitLab pipelines:
- every section displayed a duration of 00:00, because start and end
markers were emitted microseconds apart for instant commands
- the `task: [NAME] CMD` announcement lines were rendered outside the
sections, because Logger.Errf bypassed the cmd-level wrapper
Fix by wrapping output at the task level via a new optional
[output.TaskWrapper] interface that GitLab implements. Task-scoped
writers are threaded via ctx so nested `task:` invocations produce
properly nested sections (GitLab supports this natively), and deps
running in parallel each get their own buffer with mutex-protected
flushes into the parent's buffer.
- `internal/output/output.go`: add TaskWrapper interface
- `internal/output/gitlab.go`: logic moved from WrapWriter to WrapTask;
WrapWriter becomes passthrough; sync.Mutex around the buffer for
concurrent flushes from parallel sub-task sections
- `task_output.go` (new): ctx plumbing + helpers kept out of task.go
- `task.go`: 7 lines of surgical edits — name the lambda's error
return, wrap before the cmd loop, defer the closer with the final
error, and swap the cmd announcement to `printCmdAnnouncement` which
writes into the task-scoped stderr
Adds a new `gitlab` output style that wraps each task's output in GitLab
CI collapsible section markers. Section IDs are generated automatically
so that start and end markers always match and stay unique per
invocation — even when the same task runs multiple times in one job.
Options: `collapsed` (maps to GitLab's native `[collapsed=true]`) and
`error_only` (Task-level behavior, identical to `group.error_only`).
Also introduces `output-ci-auto` (taskrc + TASK_OUTPUT_CI_AUTO env var)
that auto-selects a CI-aware output style when a supported CI runner is
detected (currently `GITLAB_CI=true` → gitlab) and no output style is
explicitly configured. Keeps the Taskfile neutral so local devs are not
forced into CI-shaped output.
Refs #2806.
This is part of the LLM plugin. It's distracting and not really useful.
We're keeping the markdown version of the pages, tho. Just append `.md`
to any page to see the markdown version.
Add //nolint:gosec annotations for intentional code patterns
that are safe in context (path traversal in release tool,
uintptr conversion for terminals, weak rand in tests,
TLS skip verify for user-configured insecure mode).
Assisted-by: Kimi-K2.5 via Crush <crush@charm.land>