Repository navigation
feat(tui): grade tool errors as corrections, outcomes, or failures (T17) - #272
Conversation
Every is_error result rendered as a red ✕ with an error panel, so a model correcting its own argument looked like a crash (tool-layer D9). qq-protocol gains ToolErrorKind, classified from the result's leading error code (ToolErrorKind::of / ToolCallSnapshot::error_kind). There is no wire field: stored rows and older servers grade the same, with no store migration or protocol bump. Unlisted codes stay Failure. The TUI renders a Correction as a muted ↻ 'corrected' with no panel, an Outcome as a warning ! with its code and one row of tail, and a Failure as before. A correction followed by a successful call to the same tool folds into the retry; selecting or expanding still shows it. Refs ENG-1012
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: 117f8f94d4
ℹ️ 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".
# Conflicts: # docs/plans/progress/tool-layer.md
T17 / ENG-1014. Gate severity by reserved built-in names, retain malformed codes as failures, and normalize batch/exit labels. Add regressions and record render measurements plus workspace gates.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c50df4b2e8
ℹ️ 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: 966d93a54a
ℹ️ 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: 4c8cb0675c
ℹ️ 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".
…rnal pre-dispatch text
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3207f528d3
ℹ️ 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".
…r outcome details after timing
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c10c44705
ℹ️ 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".
…es, keep exit when the metric drops
Stacked on #267 (T15; base
fix/eng-1012-t15-tolerant-defaults). Implements T17 fromdocs/plans/tool-layer.md§ D9.Closes ENG-1014 · part of ENG-1012
User-visible behavior
Every
is_errortool result used to render as a red ✕ with an error panel, so a model fixing its own argument looked like a crash. Error rows are now graded:invalid_*,bad_glob,cursor_invalid,not executed:,not_read:↻…correctedpath_not_found,stale_file,not_found,range_out_of_bounds, non-zeroshell/execexit!…<code>✕as todayA correction followed later in the block by a successful call to the same tool folds into that retry: the retry's row is the record. The transcript cursor and expand still reach it, and a block of retried reads still folds to one
▸ Read ×Nsummary.Design notes
code:, soqq_protocol::ToolErrorKind::of(name, result)andToolCallSnapshot::error_kind()classify on read. Stored history and older servers therefore grade the same way, with no store migration and noPROTOCOL_VERSIONbump.ToolCallSnapshotisdeny_unknown_fields, so even an optional field would have forced a bump. The plan has been updated to match.Failure, so nothing becomes quieter by accident.Verification
cargo fmt --all -- --check; workspacecargo clippy --all-targets --all-features -- -D warningscargo test -p qq-protocol -p qq-tui: newtool_error_kinds_follow_the_leading_error_codeanderror_rows_grade_by_kind_and_corrections_fold_into_their_retry. All 332 TUI lib tests and the goldens pass; the failure-row tests are unchanged.tool_calls_32_rows23.9/24.8 vs 24.4/25.3 µs,folded12.3/12.9 vs 12.4/12.3 µs,expanded53.4/55.6 vs 54.1/53.8 µs. This is noise. Blocks without an error skip the filter allocation.Compatibility / performance
Rendering only. No protocol, store, or model-text change.
Review repairs (c50df4b)
invalid credentialsand malformed batch indices remain failures.