Skip to content

feat(roadmap): tool log names the reason of a retried call - #2875

Merged
dan-petty merged 7 commits into
mainfrom
feat/2866-tool-log-names-edit-retry-reason
Oct 31, 2026
Merged

dan-petty merged 7 commits into
mainfrom
feat/2866-tool-log-names-edit-retry-reason

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The tool log line of a retried call now names the reason that the tool returned. The Job log and the stop comment then show why edit_file kept refusing a call, for example old_text not found in src/x.py.

  • The log line holds the message of the ModelRetry, masked, escaped to one line and cut to CONST_ROADMAP_IMPLEMENT_LOG_REASON_CHARS characters.
  • The line shows the path argument of the call only when the checkout holds that path. Any other path is text that the model chose and shows as <path>. ToolCallLog gets the root of the checkout for this.
  • When the message lacks the path, the line adds Path: <path>. The cut of a long message leaves room for it.
  • A refusal by policy and a failed validation have no reason.
  • When a tool exceeds its retries, the stop reason ends with the last reasons of that tool, in the same bounded form.

Closes #2866

@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Oct 31, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test notes for review.

Fail-to-pass: uv run devops ci fail-to-pass --base origin/main found 22 tests that fail on base and pass on head (tests/roadmap/test_roadmap_implement_tool_log.py, tests/roadmap/test_roadmap_implement_step.py, tests/commands/test_ai_cmd.py).

Full uv run devops ci on the host: every check passes except test (1 test: test_scan_report_skips_named_scanners, the known host fact of #2165, kube-linter is on PATH). The test check took 6m 36s on the host with other agents running in parallel.

Review findings fixed:

  • major (integrity): the log echoed the model's path argument, so a plain string such as a password reached the Job log and the public stop comment. The line now shows a path only when the checkout holds it, and <path> otherwise.
  • minor (spec): a message longer than the limit lost the Path: <path> suffix. The cut now leaves room for it. The spec has a new requirement and two scenarios for both.

Not fixed: the harness Pattern ... is not a valid glob pattern message echoes the pattern argument. That argument is model text, but it is not a path. This change does not cover it.

Extra commit: test(ai): the chat helper test asserts what the helpers print. The ast-grep hook failed on origin/main for every commit (issue #2874), so no commit could pass. The commit adds the missing assertion. It touches one test only.

@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 15:08
@dan-petty
dan-petty merged commit 03d3dc5 into main Oct 31, 2026
19 checks passed
@dan-petty
dan-petty deleted the feat/2866-tool-log-names-edit-retry-reason branch October 31, 2026 15:24
dan-petty pushed a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.28.0](v0.27.0...v0.28.0)
(2026-10-31)


### Features

* **ai:** preview requests in dry run for rag ingest analyze
([#2873](#2873))
([c53bcec](c53bcec)),
closes [#2244](#2244)
* **ai:** preview requests in dry run for runs cost cache
([#2884](#2884))
([0df9777](0df9777))
* **roadmap:** the Service marks green stage drafts ready
([#2882](#2882))
([63fae06](63fae06)),
closes [#2865](#2865)
* **roadmap:** tool log names the reason of a retried call
([#2875](#2875))
([03d3dc5](03d3dc5)),
closes [#2866](#2866)


### Bug Fixes

* **ci:** devops ci test expands or refuses a path argument
([#2879](#2879))
([884a80b](884a80b)),
closes [#2868](#2868)
* **roadmap:** cap output and deadline of a step model call
([#2881](#2881))
([0c4bd3a](0c4bd3a)),
closes [#2869](#2869)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
dan-petty pushed a commit that referenced this pull request Nov 1, 2026
…2976)

Plans #2949

This change isolates per-item failures in the alternatives check round.
A failed check of one item is recorded in the item's job record with the
error class and the time. The round succeeds when at least one item is
checked. The row fails only when no item could be checked in the round.
A failed item is retried after roadmap.alternatives.retry_days (3 by
default), not in the next round. The stop reason uses the format of
#2875 and the readable text of #2922. This prevents one bad item from
suspending the entire alternatives row after three failed rounds, as
happened on 2026-10-30 for dan-petty/devops-cli.

Change: `openspec/changes/2949-a-failed-alternatives-check-skips-its/`

Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): the tool log of an implement step names why an edit_file call was retried

1 participant