Skip to content

fix(diagnose): name the runnable next command with the run id - #899

Merged
Birfy merged 2 commits into
mainfrom
fix/898-diagnose-next-commands
Nov 8, 2026
Merged

Birfy merged 2 commits into
mainfrom
fix/898-diagnose-next-commands

Conversation

@Birfy

@Birfy Birfy commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Closes #898

agentdescent diagnose ended solved / cancelled / running / partial-improvement with prose ("review and apply the artifact", "resume the run if the answer is still wanted", …) and no run id, so after agentdescent demo → diagnose latest the user still had to dig out the id. Those recommendations now name the command with the id show_payload resolved (also when asked as latest), matching what run-failed already does (#635):

  • solved: agentdescent show <id>, then agentdescent apply <id> --dry-run (then without --dry-run)
  • cancelled: agentdescent resume <id>
  • running: agentdescent watch <id>, then agentdescent diagnose <id>
  • partial-improvement: agentdescent show <id> --json

Verdicts, evidence and the JSON shape are unchanged; only recommendation strings change. Docs table in docs/diagnose.md updated; changelog fragment changelog.d/898-diagnose-next-commands.md.

Tests: new parametrized test_next_steps_name_the_resolved_run_id; every test file mentioning diagnose passes locally. Smoke: agentdescent demo → cancel latest → diagnose latest prints next: resume it if the answer is still wanted: `agentdescent resume 20261109-060724-ddeb55` .

@Birfy

Birfy commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review at tip 4be2125

Verdict: PASS

@Birfy
Birfy enabled auto-merge (squash) November 8, 2026 22:17
@Birfy

Birfy commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS
Tip SHA: 4be2125
Ran: tests/test_diagnose.py plus every test file mentioning diagnose on the tip (all passed, 1 skip); risk_gate.py --pr 899 → T2 (51 lines / 4 files).
Not run: full suite (CI 3.9–3.13 covers it).

Correctness. diagnose_payload already rebinds run_id to payload["run_id"] from show_payload (#896) before any branch, so the new recommendations carry the resolved id even when asked as latest/last; the new test asserts latest never leaks. Commands match the CLI surface (show, show --json, apply --dry-run, resume, watch, diagnose), consistent with the apply {id} --dry-run hints already in cli.py and with run-failed (#635).

Design fit. Only recommendation strings change; verdict ordering, evidence and JSON shape are untouched, so hosts parsing verdict/evidence are unaffected. The follow-up commit dropping f-prefixes on literal-only parts is a clean lint fix.

Tests/docs. Parametrized test covers all four changed verdicts; docs/diagnose.md table and notes plus a changelog fragment are updated.

Nit (non-blocking): seed-already-solved, gate-rejected and no-improvement still give prose-only next steps; could get the same treatment later where a single command applies.

@github-actions github-actions Bot added the risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff label Nov 8, 2026
@Birfy
Birfy merged commit 1744eef into main Nov 8, 2026
8 of 9 checks passed
@Birfy
Birfy deleted the fix/898-diagnose-next-commands branch November 8, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T2 Risk tier T2 (package code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

diagnose: solved/cancelled/running next steps name no runnable command

1 participant