Skip to content

docs(openspec): plan #3076 plan the roadmap follow console - #3205

Closed
devops-cli-service[bot] wants to merge 1 commit into
mainfrom
feat/3076-a-run-console-follow-a-run
Closed

devops-cli-service[bot] wants to merge 1 commit into
mainfrom
feat/3076-a-run-console-follow-a-run

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #3076

Plan #3076: add devops roadmap follow . A person sees what a running roadmap Job does only through kubectl logs and one comment at the end. explain says why an item is taken, not what the Job does. The plan adds a read-only console. It prints the live trace of the current run from the Job pod log, and the recorded history of past runs from the job record in the issue body. It sends one GitHub request for the issue body and none for the live part. It masks secrets with the masker of the log lines, and renders the rows with the PR comment table renderer, so the shape cannot drift. inbox and explain print the follow command for each item. No open tool covers the need: the Kubernetes client reads pod logs; the parser, the rows and the masking are project code.

Change: openspec/changes/3076-a-run-console-follow-a-run/

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 2, 2026 15:02

Copy link
Copy Markdown
Owner

Review of the plan for #3076.

Status: all 18 check runs pass, including the required Semantic PR title; the PR is mergeable. The premise does not hold on origin/main (967f468): two of the three data sources of follow do not exist yet (finding 1).

  1. The data that follow shows does not exist on main. Hold, per AGENTS.md rule 2.

    • The PR comment table. AC 3, requirement 3, the proposal and group 2 reuse a "PR comment table renderer" with a "header and column order". On main the comment of the implement job is a bullet list: implement_pull_comment and implement_pull_comment_line at src/devops_cli/lang/en/messages.py:2569-2573, built in implement_run.py:621-660. I found no table and no header. The table is a deliverable of feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 ("The PR comment and the stop comment show a summary table"), which is open (plan PR docs(openspec): plan #3032 keep and show a trace of each run #3194). feat(pr): post the check results of a pull request as a comment #3199 plans a different table (check results). The Feasibility bullet "search_code found the PR comment table renderer and the log-line masker" names no symbol.
    • "History of past runs from the job record". The keys of the implement job are in roadmap/store.py:204-215 and docs/ROADMAP_WORKFLOW.md:106-108. They are the last group, sha, branch, pr, stopped, failure, spend (one JSON), job, job_state and job_digest. There are no rows for steps, tool calls, checks or attempts, and docs/ROADMAP_WORKFLOW.md:123 says each new Job overwrites its keys, so no history of several runs exists. The record of ordered events is feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 ("kept under the item's job record", 8192 characters). The issue says "from the job record, the Job pod and the trace (A3)".
    • The live trace. The only log line formats I found are the Tool call: ... lines (messages.py:2214-2216, roadmap/implement_tool_log.py). The plan names no format for "step", "check" or "attempt" lines, so the parser in task 1.2 reads free text that it cannot cite. Not verified: whether the runner prints step, check and attempt lines at all.
    • Fix: make feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 a stated dependency (the issue says "Dependencies: None", the proposal has no dependency section), and plan follow on the trace format that feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 defines, or return the item to New with this evidence (devops roadmap return 3076 --comment "<evidence>" --confirm). Write no parser for free-text logs as a compensating path. Replace the Feasibility bullets: they only show that inbox, explain and follow identifiers exist; "inbox is defined at roadmap.py:813" is a call site (read_inbox(...)), and the last bullet runs a command that does not exist yet.
  2. A new command fails four existing checks that the plan does not mention. Neither the Impact list nor the tasks name these files.

    • tests/ai/mcp/test_mcp.py: test_all_cli_commands_are_either_exposed_or_excluded (line 318) fails until ("roadmap", "follow") is in the exclusion list (explain and inbox are at lines 595 and 597).
    • Dry-run ratchet: tests/invariants/test_dry_run_class_ratchet.py and the spec command-dry-run-class need @dry_run_class("request-plan") plus --dry-run, as explain_cmd and inbox_cmd do (commands/roadmap.py:748-749, 794-795), and a follow_requests in roadmap/request_plan.py (like explain_requests, line 716). Task 2.1 asserts --dry-run but no task or requirement adds it (the stage model review already says so).
    • Help rule: spec roadmap-command-help lists six commands, and tests/roadmap/test_roadmap_command_help.py:20-27 holds the same six. Task 2.2 says the help "names the live part and the one GitHub request". It must be at most 3 sentences and name docs/roadmap/follow.md. A requirement of that spec must be MODIFIED to add follow, and the test dict extended.
    • Output text: the renderers read their text from MESSAGES.roadmap (roadmap/inbox.py:252-258, roadmap/explain.py:175-192). lang/en/messages.py is not in the Impact list.
  3. Spec delta puts a change of existing behavior into a new capability. The requirement "The inbox and explain output names the follow command" is ADDED to roadmap-follow.

    • roadmap-inbox already has "Each line has the number, the age and one clearing step" and roadmap-explain fixes its lines, so this needs MODIFIED on those requirements (the stage model review flagged this too, and the PR did not change). docs/roadmap/inbox.md:7 says "the one command or action that clears it". The plan lists that file only under Reads, not Changes.
    • "For each item that they list" is wrong for the inbox. InboxLine.number is the pull request number for pull lines (inbox.py:128-135) and None for label lines. follow <number> needs the issue number, which InboxLine does not hold for job pull lines. Say which lines get the follow command and add the issue number to InboxLine. explain has one issue and two job lines, so one follow line.
    • No requirement or scenario covers a finished Job with no pod, an unreachable cluster, --dry-run, or print-once versus stream.
  4. Reuse is vague where code exists. "The Kubernetes client" should name ClusterJobApi.log_tail(name, lines) (k8s/cluster_job_api.py:174, returns one pod's tail, fixed JOB_NAMESPACE) and the follow loop in commands/k8s/cluster_jobs.py:158. The Job name comes from implement.job (store.py:214), which the plan does not say. Name the masker (mask_secrets, security/sanitizer.py:370). Say how the ordered rows come from ClusterJobApi output.

  5. Task and document hygiene.

    • Task 4.2 is a broken fragment ("4.2 docs/roadmap/follow.md, run ...").
    • 4.1 hand-edits docs/CLI_REFERENCE.md, which is generated.
    • devops docs generate --sync-readme must run in group 2 (it adds a command and help) and group 3 (it changes output), not only in the last group. The README command matrix is not listed.
    • "About 6,000 tokens to build" is copied from the issue. The stage comment sizes the inputs of the four groups at 16,561 / 18,671 / 19,647 / 12,475 tokens, so the figure looks low (inputs are not build cost; not verified).
    • PR body: "devops roadmap follow " lost its <issue>. The title repeats "plan".
  6. Order of work. refactor(roadmap): split the roadmap commands by kind #3186 and refactor(roadmap): group the job modules in subpackages #3187 move commands/roadmap.py and the flat roadmap/ modules, and refactor(roadmap): move intake-eval under roadmap eval #3185 edits the same MCP exclusion list. A new roadmap/follow.py and a command in roadmap.py will conflict. follow is an item operation in the split of refactor(roadmap): split the roadmap commands by kind #3186. feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 edits explain and the PR comment too.

Related issues:

Verdict: hold until #3032 is a stated dependency (or the item is returned to New), the plan names the real log and record formats, the delta uses MODIFIED for roadmap-inbox, roadmap-explain and roadmap-command-help, and the plan covers the MCP list, the dry-run class and the help test.


Generated by Claude Code

Copy link
Copy Markdown
Owner

Evidence for #3076 on main 46ab396 (release 0.47.0). The item cannot be built as written, so this plan stays unchanged. Per AGENTS.md rule 2, a person should run devops roadmap return 3076 --comment "<this evidence>" --confirm. That command fails with a 401 in an agent session.

The review of this PR holds. I re-checked each finding on main, and found these facts.

  1. No PR comment table exists. git grep -n ":---" over src/devops_cli/roadmap, src/devops_cli/pr and commands/roadmap.py finds only the shell-policy tables (implement_shell_policy.py:192,198). The implement comment is a bullet list: implement_pull_comment_line (lang/en/messages.py:2644), built in implement_run.py:621-660. Acceptance criterion 3 has nothing to copy. The table is a deliverable of feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 (open) and feat(pr): post the check results of a pull request as a comment #3199 (open).
  2. No history of past runs exists. ImplementRecordKey (roadmap/store.py:198-212) holds one value for each key. implement.spend is one JSON with three sums (implement_run.py:325-332). _record and set_marks overwrite the keys. A finished Job pod lives 24 hours (k8s/devops/cronjob-runner.yaml:23, ttlSecondsAfterFinished: 86400). So a finished Job has no source for its history after one day. Even feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 keeps only "the last run's trace" (its acceptance criterion 2), so feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 does not give a history of several runs.
  3. The live pod log has no step, check or attempt lines. The only structured lines are Tool call: ... (messages.py:2288-2290, implement_tool_log.py). The other lines are free notes (print_muted at implement_step.py:785,893, implement_run.py:773) and one key-value table at the end of a step (render_outcome, implement_step.py:1301-1334). A parser for the steps, checks and attempts would read free text. Review finding 1 forbids that compensating path.
  4. The dependency is real and unstated. The intake comment on feat(roadmap): a run console: follow a run and read its history #3076 says "the trace data from feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 is reused". The issue text says "the trace (A3)". The tracker feat(roadmap): an enterprise-grade plan and implement pipeline (tracker) #3027 orders feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 (item 9) before feat(roadmap): a run console: follow a run and read its history #3076 (item 29). The refine block of feat(roadmap): a run console: follow a run and read its history #3076 says Dependencies: None. feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 is open and its plan PR docs(openspec): plan #3032 keep and show a trace of each run #3194 is a placeholder ("plan feat(roadmap): a trace of every run, kept and shown in the PR comment and in explain #3032 x", one group, no trace writer).
  5. The command does not exist. uv run devops roadmap follow 3076 prints No such command 'follow'. This is not a duplicate: no open PR other than docs(openspec): plan #3076 plan the roadmap follow console #3205 names roadmap follow.

Findings 2 to 6 of the review also hold on main. They stay valid for a later plan: the MCP list (tests/ai/mcp/test_mcp.py:596,598), the request-plan dry-run class (explain_requests, request_plan.py:716), the six-command help test (tests/roadmap/test_roadmap_command_help.py:20-27), the MODIFIED entries for roadmap-inbox, roadmap-explain and roadmap-command-help, and the reuse of ClusterJobApi.log_tail (k8s/cluster_job_api.py:174) and mask_secrets (security/sanitizer.py:374). A later plan must also settle the security question: follow reads the pod log with the kubeconfig of a person, but RBAC for pods/log is in the repository only for the account roadmap-service (k8s/devops/roadmap-service/role.yaml:31), and the output must pass mask_secrets.

Also: the PR body fails body_problems with "The body has no line Closes #<issue>", as every plan body does (#3215). I did not change the PR.

Plan again after #3032 merges and defines the trace record (rows, count of runs kept, step/check/attempt events) and the PR comment table.


Generated by Claude Code

@dan-petty

Copy link
Copy Markdown
Owner

rejected

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