codescout icon indicating copy to clipboard operation
codescout copied to clipboard

doc(action=...): add corrected-call hints to the required-param errors still missing one

Open mareurs opened this issue 2 months ago • 0 comments

Context: when a doc(action=…) call is missing a required param, the error should name the action and offer a corrected call (RecoverableError::with_hint), so the agent can fix its next call without guessing. A 2026-08 fix did this for 9 sites. It left 8 others that named their action but offered no corrected call: move, graft, delete, merge_worktree, artifact_augment, state_at, workspace_state_at, update.

Some are already done, so audit first. Re-checked 2026-09-24:

  • doc(action="state_at") with no id: already returns a corrected-call hint (e.g. doc(action="state_at", id="<16-hex>", commit="<sha>") …).
  • doc(action="move", id=…) with no new_rel_path: still bare, move requires 'id' and 'new_rel_path': missing field \new_rel_path``, no hint.

Task: check all 8 live, and add a with_hint corrected call to each one still bare, matching the style of the 9 already fixed.

Acceptance: one test per fixed site, asserting the hint names the action and a corrected call. Per site, because one test covering all of them would pass while a single site regressed. Include the audit table (site → already-OK / fixed) in the PR description.

Background: get_guide("error-handling"). Bug file: docs/issues/2026-09-24-residual-required-param-corrected-call-hints.md. Parent, including which sites were fixed and how: docs/issues/archive/2026-08-27-required-param-failures-neither-correct-nor-suggest.md.

Base your branch on a fresh origin/experiments.

mareurs avatar Sep 24 '26 19:09 mareurs