Repository navigation
fix(core): accept edits as a string or one object, hint a minimal call on a repeated argument error; close plan D - #489
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 671049c2be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdbc226fc5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…l on a repeated argument error; close plan D - edit_file decodes `edits` sent JSON-encoded as a string or as a single edit object. - The second identical argument-shape refusal in a run for the same tool appends a minimal valid call. The loop guard's result identity is unchanged. - Plan section D is removed; the release check notes the pending recount of repeated-error runs on a week of v0.1.10 use.
…e object The approval preview decoded edits strictly, so in Ask mode the overlay showed no path or diff for the shapes edit_file now accepts. It now uses the same decoder.
The decoder accepted an edits string or lone object, but the stored arguments kept that shape. Compaction's Files modified query, the TUI and the approval preview all read $.edits as an array: an encoded list dropped the edit from the record, and a lone object could fail the compaction query. The runtime now rewrites edits to the list when the call is admitted, so every reader sees one shape and the serde hooks go away.
Change
Closes plan section D (tool calls tell the model how to recover) by building the two items #485 left out:
edit_fileacceptseditssent as a JSON-encoded string, or as one edit object without its array. The runtime rewrites them to the array when the call is admitted, so the stored call, approval preview, clients and compaction record all see the usual shape.invalid arguments…or aninvalid_*code), the error ends with a minimal valid call for that tool, e.g.the same error as before; a minimal valid call: read_file {"path":"README.md"}. The first error is unchanged. The loop guard sees the same result identity as before.Section D is removed from
docs/plans/README.md. The release check now notes the pending recount of repeated-error runs on a week of v0.1.10 use.docs/design/tools.mdanddocs/design/architecture.mddescribe the new behaviour.Verification
cargo nextest run -p qq-core -E 'test(/edits_sent_as_a_string|a_repeated_argument_error|every_minimal_call|ac4_/)': passes.every_minimal_call_decodesdecodes each example with its tool's real argument type, so an example can't drift from the schema.edit_file_arguments_are_stored_with_edits_as_a_listfails without the admission rewrite.cargo xtask checkon 671049c: fmt, lint and clippy pass. Tests had one wall-clock timeout per run, in different tests on each of two runs (sessions::tests::goals::revision_notices_across_reactive_checkpoint_overflow_reopen_in_order,headless::tests::closing_goal_host_drains_accepted_work_without_admitting_successors). Neither touches this change, and both pass when run alone. The goals test also passes alone on main.editswas a strict list and there was no hint, but that is inferred.Known impact
run in place (windows-latest)at b6cdf6a, unrelated to this change.