Skip to content

chore(stage): count text-editor view as observation - #835

Merged
grahamking merged 1 commit into
mainfrom
gk-1565
Sep 23, 2026
Merged

grahamking merged 1 commit into
mainfrom
gk-1565

Conversation

@grahamking

@grahamking grahamking commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

The Anthropic SDK has a built in tool definition for str_replace_based_edit_tool, that that looks like edit but can
be read. Now we handle both.

This is pretty niche, for custom clients using that SDK. AI keeps wanting to fix it though, so here it is.

The fix is only 3 lines, rest is tests.

Fixes: https://linear.app/nvidia/issue/SWITCH-1565

Assisted-by: Claude:Opus 5.5 high
Signed-off-by: Graham King grahamk@nvidia.com

The Anthropic SDK has a built in tool definition that looks like edit but can
be read. Now we handle both.

This is pretty niche, for custom clients using that SDK. AI keeps
wanting to fix it though, so here it is.

The fix is only 3 lines, rest is tests.

Fixes: https://linear.app/nvidia/issue/SWITCH-1565

Assisted-by: Claude:Opus 5.5 high
Signed-off-by: Graham King <grahamk@nvidia.com>
@grahamking
grahamking requested a review from a team as a code owner September 23, 2026 14:51
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://NVIDIA-NeMo.github.io/Switchyard/pr-preview/pr-835/

Built to branch gh-pages at 2026-09-23 14:53 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@grahamking
grahamking enabled auto-merge (squash) September 23, 2026 14:54
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA-NeMo/Switchyard/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4d388047-b255-45ec-bd68-1b3454b73fe9

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0ae83 and fb72a69.

📒 Files selected for processing (2)
  • crates/libsy/src/algorithms/plan_execute.rs
  • crates/libsy/src/algorithms/util/tool_signals.rs

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

Editor tool calls with command "view" are classified as observations. Tests cover classification for both editor tools, other commands, extracted signals, and routing to the capable model.

Changes

Editor View Classification and Routing

Layer / File(s) Summary
Classify editor commands
crates/libsy/src/algorithms/util/tool_signals.rs
The two editor tool names classify command view as Observe. Tests cover other commands and object or JSON-string arguments.
Verify view routing
crates/libsy/src/algorithms/plan_execute.rs
A test checks that a str_replace_based_edit_tool call with command view routes to the capable model.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to fb72a

Editor view calls are covered by classification and routing tests; no actionable issue remains before normal merge checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: treating text-editor "view" operations as observations.

A rabbit taps a tool to view
Its signal marks an observation true
Other commands keep their edit way
Tests check the route along the way
The rabbit hops, pleased with the clue

Comment @coderabbitai help to get the list of available commands.

@grahamking
grahamking merged commit 699c7c0 into main Sep 23, 2026
20 checks passed
@grahamking
grahamking deleted the gk-1565 branch September 23, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants