Skip to content

fix(roadmap): the Job report prints the log excerpt as a Python bytes literal #3091

Description

@dan-petty

What happened

The comment of the Service that reports an ended runner Job shows the log excerpt as b'Tool call: read_file, ok.\nTool call: ...': a bytes literal, with \n in place of line breaks and \xe2\x9c\x93 in place of a check mark. Example: the comment on #2175 of 2026-11-01T15:53Z. The comment is unreadable, and the reader cannot copy a command from it.

Cause

ClusterJobs.log_tail in src/devops_cli/k8s/cluster_job_api.py returns str(log). The Kubernetes client returns bytes for read_namespaced_pod_log here, and str(bytes) gives the b'...' repr. The test fake returns a str, so no test sees it.

What should happen

  • log_tail decodes bytes as UTF-8 with replacement, and returns text with real line breaks.
  • The report comment shows the excerpt in a fenced block.
  • The test fake can return bytes, and a test covers both types.

Acceptance criteria

  • A test with a fake that returns bytes fails before the fix and passes after it.
  • The excerpt in the comment has real line breaks and no b' prefix.
  • The mask of secrets still runs on the decoded text.

Related: #3027, #3032 (run trace).

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The Job report comment is unreadable, which blocks diagnosis of failed runs, but it does not crash the tool.
    • Value: Medium. Readers cannot copy commands or read the excerpt, which slows debugging of every ended runner Job.
    • Effort: Low. The fix is a decode call in one function, a fenced-block wrapper, and one test with a bytes fake.
    • Related: fix(k8s): pod logs reach callers as whole lines, with and without --follow #864, which asks for a different change. Both handle k8s pod log bytes returned by the client, but #864 fixes line-level streaming in KubernetesService.read_pod_logs while this fixes the bytes-to-str decode in ClusterJobs.log_tail.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 1, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 1, 2026
  5. added a commit that references this issue on Nov 1, 2026
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

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions