Conversation
The agent evaluation harness (Nano-Collective#1197) needs a per-run step count, and nothing in nanocoder reports one. toolCalls.length is not a substitute: a step can issue zero tool calls (an empty-turn nudge, a malformed retry) or several at once. runPlainConversation now counts every model round-trip, retried turns included, and returns it as steps on all three outcome variants. The --plain --json report carries it through, and the three reports emitted before the model is ever called (untrusted directory, init failure, a user-prompt-submit hook veto) report steps: 0, so the field is always present. Part of Nano-Collective#1197.
nc-review: needs work — 1 blocking, 1 important@addyCooks — there is a blocking item below. PR #1333 adds a 🔴 blocking ·
In Two correct fixes: either make 🟠 important · The new tests cover the success path, the empty-turn nudge cap, the empty-turn recovery, the auto-approved tool path, the tool-approval-required path, and the pre-loop abort. They do not cover:
Given the rubric's note that retry paths have shipped with untested assertions before, and that the harness in #1197 will rely on 🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with |
…aths Adds steps assertions to the malformed-retry and truncated-turn tests and a new test for the post-loop 'exceeded maxTurns' fallback, so every retry path the eval harness relies on is covered. Gives every PlainConversationOutcome literal in shell.spec.ts a steps value to match the now-required field.
Part of #1197
Description
The agent evaluation harness in #1197 needs a step count per run, and nothing in nanocoder reports one today.
toolCalls.lengthdoesn't work as a stand-in: one step can make zero tool calls (an empty-turn nudge or a malformed-call retry) or several at once.This is the one change to nanocoder's own code that the harness needs, so it lands on its own before the harness.
runPlainConversationcounts every model round-trip, retried turns included, and returns it asstepson all three outcome variants (success,tool-approval-required,error).--plain --jsonreport includessteps.user-prompt-submithook veto) reportsteps: 0, so the field is always present.docs/features/commands.mddocuments the new field.Agent behaviour is unchanged; this only counts and reports.
Type of Change
Changeset
Testing
Automated Tests
pnpm test:allcompletes successfully)Manual Testing
Checklist