Skip to content

fix(tier3): count explicit root searches as wasted tool calls - #229

Merged
chrisknvidia merged 11 commits into
mainfrom
feat/christopherk/public-root-search-efficiency
Oct 29, 2026
Merged

chrisknvidia merged 11 commits into
mainfrom
feat/christopherk/public-root-search-efficiency

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

An explicit root search such as find / -name task.py currently receives full tool-productivity credit when it names the expected script. Classify supported literal filesystem-root searches before expected-name credit, consistently in host and bundled scoring. Scoped searches and slash-valued search patterns keep their previous classification. Unknown option arity, expansions, comments and redirection syntax retain the old score rather than inventing a search path.

Verification

  • Reviewed the contributing guidelines and added host/bundled regressions, including option and shell-grammar controls; the root-search regressions failed before implementation.
  • 133 focused tests passed. Independent review ran 268 related tests, 72 supported root-search combinations and 20 baseline-preserving controls; reported parser issues were corrected and re-reviewed.
  • Actual bundled verifier in an isolated, read-only, network-disabled Docker container: real root/scoped searches of the same fixture scored 0/1 respectively; ordinary expected-script execution retained score 1.
  • Lint, wheel/sdist build and documentation validation passed. Fern skips the authenticated redirects check without a token.
  • Public-only source and synthetic fixtures; privacy and Gitleaks scans passed.
  • Full default regression suite completed: 14,576 passed, 27 skipped, one existing macOS timeout stderr assertion failed. The same assertion failed in 2/8 isolated runs on unchanged public main and 2/8 on this branch; the test and local execution implementation are unchanged. All new search-scoring tests passed.

This is bounded classification of common top-level commands, not a shell interpreter. No live model-provider agent or GPU evaluation was run.

Release Impact

  • Updated CHANGELOG.md and report guidance.

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 2 potential issues.

@chrisknvidia
chrisknvidia marked this pull request as ready for review October 23, 2026 21:32
@NVIDIA NVIDIA deleted a comment from devin-ai-integration Bot Oct 23, 2026
@NVIDIA NVIDIA deleted a comment from devin-ai-integration Bot Oct 23, 2026

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

@NVIDIA NVIDIA deleted a comment from devin-ai-integration Bot Oct 23, 2026
@NVIDIA NVIDIA deleted a comment from devin-ai-integration Bot Oct 23, 2026

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: 2 findings (0 P1, 1 P2, 1 P3); 2 posted inline.

Reviewed at 6fb0ef1. The host and bundled classifiers agree on 20k randomized commands, and tests/tier3 passes (5049 passed). The comments below are about root searches the classifier skips and the CHANGELOG wording.

Comment thread CHANGELOG.md Resolved
Skip redirection operators and their targets instead of returning early
on < and >, keep the prior score for here-documents and process
substitution, and classify sh -c / bash -c payloads with a depth bound.
Reword the changelog and report guidance: every classified root search is
waste, whether or not it names the expected skill or script.

Signed-off-by: Christopher Kevin <[email protected]>
@chrisknvidia
chrisknvidia force-pushed the feat/christopherk/public-root-search-efficiency branch from 6fb0ef1 to 709c1f2 Compare October 27, 2026 17:09
devin-ai-integration[bot]

This comment was marked as resolved.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: 1 findings (0 P1, 0 P2, 1 P3); 1 posted inline.

Follow-up to the re-review at 2a984d1: one more gap that a second check of the root-search classifier turned up. It is minor and does not block.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @chrisknvidia, for this improvement and the quick turnaround on the review. Re-reviewed at 2a984d1: both earlier findings are fixed in 709c1f2, the host and bundled checkers agree, and tests/tier3 passes. The bare VAR=value prefix comment is a non-blocking follow-up. Approving.

rng1995 and others added 4 commits October 28, 2026 08:15
A command such as `LC_ALL=C find / -name task.py` was read with the
assignment as its executable, so the root search kept full tool-efficiency
credit. Skip leading NAME=value words before unwrapping wrappers, in both
the host and bundled scorers.

Signed-off-by: Christopher Kevin <[email protected]>
devin-ai-integration[bot]

This comment was marked as resolved.

…ssification

A quoted or escaped assignment-looking word such as 'LC_ALL=C' or LC_ALL\=C
is the command name to the shell, not an assignment, so the search after it
never runs. Skip leading NAME=value words only when NAME= is written unquoted,
in both the host and bundled scorers, and add quoted and escaped controls.

Signed-off-by: Christopher Kevin <[email protected]>
Searching the whole command text for NAME= let an unquoted assignment in
one command (FOO=1; 'FOO=2' find /) make a quoted command name in another
look like an assignment. Mask every = that does not follow an unquoted
NAME at the start of its word, tokenize the masked text alongside the
original, and skip a leading word only when its masked token is still an
assignment. Same change in the host and bundled scorers, with controls for
separate commands that reuse an assignment name.

Signed-off-by: Christopher Kevin <[email protected]>
@chrisknvidia
chrisknvidia merged commit ea014d4 into main Oct 29, 2026
17 checks passed
@chrisknvidia
chrisknvidia deleted the feat/christopherk/public-root-search-efficiency branch October 29, 2026 02:30
@rng1995 rng1995 mentioned this pull request Oct 30, 2026
15 of 20 tasks
chrisknvidia added a commit that referenced this pull request Oct 30, 2026
* fix(tier3): count explicit root searches as wasted tool calls
* fix(tier3): classify find root operands after the option terminator
* fix(tier3): classify redirected and sh -c wrapped root searches
* fix(tier3): skip leading assignments before root-search classification
* fix(tier3): only skip unquoted leading assignments in root-search classification
* fix(tier3): decide leading assignments per shell word

Signed-off-by: Christopher Kevin <[email protected]>
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