Skip to content

feat(roadmap): a run console: follow a run and read its history #3076

Closed

Description

@dan-petty

What happened

A person learns what a Job did from kubectl logs and from one comment at the end. devops roadmap explain says why an item is or is not taken, not what a running Job does.

What should happen

  • devops roadmap follow <issue> shows the live trace of the current run (steps, tool calls, check results, attempts) and the history of past runs, from the job record, the Job pod and the trace (A3). The inbox and explain commands link to it.

Acceptance criteria

  • follow works for a running Job and for a finished one.
  • It reads at most a stated number of GitHub requests and none for the live part (it reads the pod).
  • The output is in the same shape as the PR comment table.
  • It masks secrets like the log lines do.

Related: tracker for this set (filed with it), #2908 (issue workflow), #2867 (draft PR evaluator), #3005 (task kind), #3010 to #3015 (plan gates), #2919 (stuck-item metrics), #2953 (Ollama parser).

Alternatives check of 2026-11-04: partly.
Tool: kubernetes-client/python (https://github.com/kubernetes-client/python), Apache-2.0, last activity 2026-11-04, maintained.

Proposed design

Problem statement

A person cannot see what a running roadmap Job does. The person reads kubectl logs and one final comment on the issue. This change adds devops roadmap follow <issue>. The command shows the live trace of the current run and the recorded history of past runs in one table. The command waits on #3032 and #3199.

Acceptance criteria

Requirement: Live trace and recorded history

devops roadmap follow <issue> SHALL print the live trace of a running runner Job and the recorded history of past runs.

Scenario: A running Job and a finished run

  • WHEN A test runs follow for an item whose runner Job is running, then for an item whose run has finished, with a fake Kubernetes client and a fake roadmap store.
  • THEN The first output holds the live steps, tool calls, check results and attempts, and the second output holds one row for each recorded run.

Requirement: GitHub request budget

The command MUST send one GitHub request, which reads the issue body, and MUST send no other GitHub request.

Scenario: The live trace reads the pod log

  • WHEN A test runs follow while the runner Job runs, with a counting fake GitHub client.
  • THEN The run sends one request, which reads the issue body, and reads the live trace through the Kubernetes client.

Requirement: Pod of the current run

The command SHALL find the pod of the current run from implement.job in the job record.

Scenario: A record names a runner Job

  • WHEN A test gives a job record whose implement.job names a Job that has one pod.
  • THEN The command reads the log of that pod and of no other pod.

Requirement: An item with no run

The command SHALL state that an item with no recorded run has never run, and MUST send no Kubernetes request for it.

Scenario: An item with no job record facts

  • WHEN A test runs follow for an item whose job record holds no implement.job and no run facts.
  • THEN The command prints one line that names the item as never run and makes no Kubernetes request.

Requirement: Pull request comment table shape

The command SHALL print the trace and the history in the table shape of the pull request comment.

Scenario: Header and column order

Requirement: Secret masking

The command MUST mask each value that the log masking rules mark as a secret.

Scenario: A secret in the pod log

  • WHEN A test feeds a pod log line that holds a value of the masking rules.
  • THEN The output holds the masked value and not the secret.

Requirement: Links from inbox and explain

devops roadmap inbox and devops roadmap explain SHALL print devops roadmap follow <number> for each item.

Scenario: Inbox and explain output

  • WHEN A test runs inbox and explain on a fixture item.
  • THEN Each item line holds the follow command with that item's number.

Requirement: The documentation states the request limit

The CLI reference SHALL state the number of GitHub requests that follow sends.

Scenario: The docs check

  • WHEN A test runs devops docs check.
  • THEN The check passes and the follow entry states one GitHub request.

Requirement: The caller's access to the pod log

The CLI reference SHALL state that follow uses the caller's kubeconfig and needs get and list on pods and get on pods/log.

Scenario: The RBAC entry

  • WHEN A test reads the follow entry of the CLI reference.
  • THEN The entry names the kubeconfig and the three permissions.

Existing Tool Considered

kubernetes-client/python (https://github.com/kubernetes-client/python), Apache-2.0, last activity 2026-11-04, maintained. It covers the live read of the Job pod log and the list of the pods of implement.job, and it sends no GitHub request for the live part. It lacks the read of the job record from the issue body and the history rows of past runs, the pull request comment table shape and column order, the masking of secrets with the runner's rules, the follow command, the links from inbox and explain, the no-run case and the request budget. The project builds those parts at about 6,000 tokens to build, 1,500 tokens for each later fix, and about 1 day.

Key questions

  • What must land before follow can show the live trace and the history of past runs?: Wait for feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032, which records the runs, and feat(pr): post the check results of a pull request as a comment #3199, which defines the pull request comment table. The job record holds the trace of the last run only, and a finished pod lives 24 hours. A parser of the free pod log is no substitute. (best practice) [sources: src/devops_cli/roadmap/implement_trace.py, src/devops_cli/roadmap/implement_run.py, src/devops_cli/roadmap/store.py, docs/ROADMAP_WORKFLOW.md]
  • How does follow read the live log of the current runner Job?: Use kubernetes-client/python through the existing cluster Job API. List the pod of implement.job and read its log. Read no GitHub data for the live part. (best practice) [sources: src/devops_cli/k8s/cluster_job_api.py, docs/ROADMAP_WORKFLOW.md]
    • Chosen: kubernetes-client/python. It is open, maintained, and the repository already reads pod logs with it.
    • Rejected: kubectl or stern. It adds a second process and a second log format.
    • Rejected: A local trace file. The runner pod shares no local file with the workstation.
  • Which access does follow use to read pods/log?: Use the caller's kubeconfig. Document that the caller needs get and list on pods and get on pods/log. The role of roadmap-service grants no person's account. (best practice) [sources: k8s/devops/roadmap-service/role.yaml, docs/ROADMAP_WORKFLOW.md]
    • Chosen: The caller's kubeconfig. The command runs on a workstation and must not need the Service account.
    • Rejected: The roadmap-service token. A workstation command cannot use the Service account token.
    • Rejected: No live log. The issue needs the live trace.
  • How does follow mask secrets?: Reuse mask_secrets from security/sanitizer.py on every line of the pod log and on every text of the job record. Add no second masker. (best practice) [sources: src/devops_cli/security/sanitizer.py, openspec/specs/roadmap-implement-step/spec.md]
    • Chosen: Reuse mask_secrets. The runner already masks its log lines with this function.
    • Rejected: A new masker. A second masker can miss a value that the runner masker catches.
    • Rejected: No masking. The output would show a secret.
  • What is the GitHub request budget of follow?: One request reads the issue body. The live part reads the pod log and sends no GitHub request. (best practice) [sources: docs/adr/0001-github-is-the-roadmap-source.md, docs/ROADMAP_WORKFLOW.md]
    • Chosen: One request for the issue body. The body holds the job record, the history and implement.job.
    • Rejected: Two requests for the issue and its comments. The comments are not the history.
    • Rejected: No request. The command cannot read the job record without a request.
  • How does follow render the trace and the history?: Reuse the pull request comment renderer and its column order after feat(pr): post the check results of a pull request as a comment #3199 adds that table. Add no second table renderer. (best practice) [sources: src/devops_cli/roadmap/implement_trace.py, src/devops_cli/lang/en/messages.py]
  • Where do inbox and explain get the follow command text?: Add one helper in src/devops_cli/roadmap/ that formats devops roadmap follow <number>. inbox and explain call it, so each command prints the same text. (best practice) [sources: src/devops_cli/roadmap/inbox.py, src/devops_cli/roadmap/explain.py, src/devops_cli/commands/roadmap.py]
    • Chosen: One helper. Each command prints the same text, and a change touches one place.
    • Rejected: Inline text in each command. Two copies can drift.
  • How does follow treat an item with no recorded run?: Read the job record first. Print one line that names the item as never run, and make no Kubernetes request. (best practice) [sources: src/devops_cli/roadmap/store.py, docs/ROADMAP_WORKFLOW.md]
    • Chosen: State never run and stop. No Job means no pod to read.
    • Rejected: List every pod in namespace devops. It can name the pod of another item.
    • Rejected: Fail with an error. The issue asks for a clear state.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#3032, #3199

Activity

  1. added
    source/agent
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    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/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It improves debugging of a running Job but does not block delivery or fix a defect.
    • Value: Medium. It gives a person a single live view of a run, reducing reliance on 'kubectl logs' and scattered comments.
    • Effort: Medium. It reads the pod, the job record, and the trace, masks secrets, and links from 'inbox' and 'explain', but the trace data from #3032 is reused.
    • Related: feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032, which asks for a different change. Both serve run observability; #3032 records the trace and shows it in the PR comment and 'explain', while this item adds a new 'follow' command that reads the live pod and past runs.
  3. added
    priority/p2-medium
    on Nov 1, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 2, 2026
  5. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 11dc347 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    Staged: branch feat/3076-a-run-console-follow-a-run, draft pull request #3205. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:

    1. Build the follow rows from the pod log and the job record: 16561 tokens
    2. Add the follow command and its table: 18671 tokens
    3. Link follow from the inbox and explain output: 19647 tokens
    4. Document the follow command: 12475 tokens

    The plan run made 2 model request(s), and used 140412 input tokens and 8102 output tokens. The model made no tool call.

    A model review of the plan found these points. They stop no draft, and a person judges them:

    • spec_delta_wrong at specs, requirement "The inbox and explain output names the follow command": The delta adds the inbox line change to the new capability roadmap-follow. The existing spec roadmap-inbox already holds the line format of the inbox. The delta must modify that spec, or the two specs will conflict. Evidence: "roadmap-inbox holds the order of the lines, the line format, the age of a claim, the second list, and the bound on the reads."
    • other at group 2: The group 2 test asserts that --dry-run lists the reads and sends none. The implementation text does not add any dry-run handling to the command, and the spec delta has no dry-run requirement. The test can fail or pass without matching any planned work. Evidence: "the command prints the header of the PR comment table in its column order, and a --dry-run lists its reads and sends none"
  7. dan-petty commented on Nov 2, 2026

    @dan-petty
    OwnerAuthor

    returned per agent request

  8. removed
    status/ready
    on Nov 2, 2026
  9. 56 remaining items

  10. removed
    owner/service
    on Nov 15, 2026
  11. added
    status/in-review
    and removed
    status/blocked
    on Nov 15, 2026
  12. removed
    status/in-review
    on Nov 15, 2026
  13. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor
  14. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 06:04 UTC

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/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions