Skip to content

fix: let crawlctl show logs for flag-like job names - #256

Merged
vincentkoc merged 1 commit into
mainfrom
fix/log-job-separator
Nov 18, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/log-job-separator

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

An operator can run a job named --version, but cannot inspect its logs: crawlctl logs -- --version rejects the separator as an unknown option.

User Impact

crawlctl logs -- JOB can select jobs whose names look like flags. Earlier options such as --tail still work, and the command still rejects more than one job name.

Why This Change Was Made

Treat everything after the separator as a literal job selection, matching the existing run command. A separator without a job keeps the latest-log behavior.

Evidence

  • Six end-to-end selection cases failed before the fix and now print only the selected job's requested final line, despite a newer log for another job.
  • Tests also cover a trailing separator without a job, multiple-job rejection, and existing tail validation.
  • Full tests, static checks, module checks, and independent review passed. Tests use temporary config, history, and log files.
Validation and review pins

Passed GOWORK=off go mod tidy with unchanged module files, GOWORK=off go vet ./..., GOWORK=off go test -count=1 ./..., formatting and diff checks.

Independent native P0–P3 review: no findings. Base: 9a398997ca32739e78c2176c85b83b1fc0b9a0da. Complete candidate: 8e3f98f27e343f6db977608c9d31080f488e3037. Scope: full diff, flag hoisting, dispatch, logs parsing, tail validation, and history selection; isolated read-only review.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 18, 2026 03:00
@vincentkoc
vincentkoc merged commit 798b680 into main Nov 18, 2026
8 checks passed
@vincentkoc
vincentkoc deleted the fix/log-job-separator branch November 18, 2026 03:03
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