Skip to content

eds wf job logs: always prints raw JSON, ignoring the table/--json FormatAuto convention #3

Description

@rawen554

Context

Every other subcommand in cmd/job.go (newJobShowCmd, newJobListCmd,
etc.) checks ctx.Printer.Format == output.FormatJSON and falls back to a
table/KeyValue rendering on a TTY, per the convention documented in
CLAUDE.md ("every subcommand that returns structured data should support
both table... and --json output via ctx.Printer").

newJobLogsCmd (added in PR #1) calls ctx.Printer.PrintJSON(resp)
unconditionally, so eds wf job logs <id> always dumps raw JSON even when
run interactively without --json.

Discussion

PR #1's author argues this command is agent-only and a human table view
isn't needed. That may be a reasonable call, but it should be a deliberate,
documented exception rather than an accidental one-off — right now it's
just inconsistent with every sibling command in the same file, with no
comment or doc explaining why.

Ask

Either:

  • make logs follow the same FormatAuto convention as its siblings
    (plain-text log lines on TTY, JSON via --json/pipe), or
  • if agent-only JSON output is intentional, document that explicitly in
    code (comment) and in skill/SKILL.md, and consider whether other
    Workflow Studio commands should follow the same rule for consistency.

Follow-up from PR #1 review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions