Skip to content

fix: issues found during the release smoke test - #1464

Merged
will-lamerton merged 2 commits into
mainfrom
fix/release-smoke-test-findings
Sep 23, 2026
Merged

will-lamerton merged 2 commits into
mainfrom
fix/release-smoke-test-findings

Conversation

@will-lamerton

Copy link
Copy Markdown
Member

Fixes found while working through RELEASE-SMOKE-TEST.md against the built CLI (driven through a real pty with a scripted OpenAI-compatible stub, an Anthropic-format stub, a test MCP server, ACP over stdio, and Linux containers). Each fix has a changeset and, where it could be exercised, a spec that fails without it.

Privacy and safety

  • Prompt scrubbing now applies on every surface (--plain, ACP / VS Code, subagents, compaction), not only the main TUI chat. Secrets from .env and command output were reaching the provider with scrubbing on.
  • Truncated tool output never cuts through a token, so a secret is kept whole (and scrubbed) or dropped, never leaked as a fragment.
  • Unknown-tool loops stop inside the AI SDK so maxRepeatedToolCalls applies (previously up to 10 silent steps per request).
  • Headless subagent runs are no longer offered ask_user.

Runtime

  • nanocoder run exits 1 on provider errors and retry-cap stops (it always exited 0).
  • Daemon-triggered runs share the skill tool registry and connect MCP; MCP disconnects on stop so the daemon exits.
  • Checkpoints no longer snapshot .nanocoder/checkpoints and the timeline (each checkpoint was copying all earlier ones).
  • --plain falls back when the saved provider was removed; promptCaching and maxRetries provider settings are carried through.

TUI

  • Batched control keys (held Backspace, double Ctrl+Z) no longer insert raw bytes; the caret no longer jumps during fast typing.
  • Boot summary, status row, picker sizing, Architect gate file list, markdown table last row, ignored-directory listing, {{args}} raw text, MCP wizard server names, and several copy fixes.

Tests

  • AVA sets NANOCODER_DATA_DIR so specs never write to a developer's real sessions and stats.

Not included: RELEASE-SMOKE-TEST.md progress.

🤖 Generated with Claude Code

Privacy and safety
- Apply prompt scrubbing on every surface (--plain, ACP, subagents,
  compaction), not only the main TUI conversation
- Never cut truncated tool output through a token, so a secret is either
  kept whole and scrubbed or dropped, not leaked as a fragment
- Stop the AI SDK looping on unknown tools so maxRepeatedToolCalls applies
- Headless subagent runs are no longer offered ask_user

Runtime
- nanocoder run exits 1 on provider errors and retry-cap stops
- Daemon-triggered runs share the skill tool registry and connect MCP;
  MCP is disconnected on daemon stop so the process exits
- Checkpoints no longer snapshot .nanocoder/checkpoints and timeline
- --plain falls back when the saved provider was removed
- Carry promptCaching and maxRetries through provider config loading
- Update check uses the shared version helper and skips unknown versions

TUI
- Split batched control keys so held Backspace / Ctrl+Z work
- Fix caret jumps when fast typing races a late value echo
- Boot summary shows provider/model and drops the (default) marker
- Status row budgets fullscreen padding; hints yield to session names
- Pickers fit short terminals and shrink on resize
- Architect gate lists only files actually changed; no gate when nothing
  changed; no "Could not capture file" noise for new files
- Markdown tables keep their last row
- Hide directory-only ignored folders in list_directory and the explorer
- {{args}} receives the raw argument text
- MCP wizard shows hand-written servers by name
- Assorted copy fixes (empty checkpoint, revise footer, empty /resume)

Tests
- Isolate NANOCODER_DATA_DIR in the AVA config so specs never write to a
  developer's real sessions and stats
@github-actions github-actions Bot added area:tools Tool implementations and tool-calling area:tui Terminal UI area:docs Documentation labels Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

nc-review: comments — 3 nits

@will-lamerton — a few things worth a look, none blocking.

A 90-file, ~2600-line batch of fixes from a release smoke test (PTY-driven, scripted OpenAI-compatible and Anthropic-format stubs, test MCP, ACP over stdio). Each fix carries its own changeset and most carry a regression test that exercises the new behaviour. The change is justified, well-scoped at the per-fix level, and the design choices (per-client privacy fallback, ref-based one-shot boot identity capture, token-boundary snap before scrubbing, stopWhen on unknown SDK tool calls) match the project's architecture. The supplied diff is truncated at 2500 of 2619 lines; the changes to source/wizards/mcp-wizard.tsx and source/utils/update-checker.ts are not visible, so I have not judged those.

⚪ nit · design · source/app/App.tsx:643

The bootIdentity ref is mutated during render when appState.startChat first becomes true:

const bootIdentity = React.useRef<...>(null);
if (!bootIdentity.current && appState.startChat) {
  bootIdentity.current = {provider: appState.currentProvider, model: appState.currentModel};
}

React allows lazy ref initialisation during render, but conditional writes gated on app state are unusual and a future reader will have to convince themselves the one-shot semantics are intentional. A one-line comment ('capture once on the first render after start-up resolves the provider/model') would carry the intent and remove the surprise.

⚪ nit · design · source/app/components/app-container.spec.tsx:195

The PR deletes the three formatBootSummaryGitLabel tests but leaves their leading comment in place:

// Keep legacy formatter coverage because /status and external callers share
// the branch marker semantics.

After the deletion, this comment sits above empty space and the formatter it references is gone from app-container.tsx. Either drop the comment or update it to say the formatter and its tests were intentionally removed.

⚪ nit · correctness · source/cli.tsx

The drain scheduler in cli.tsx uses setImmediate to hand each split control key to Ink as a separate read:

const drainKeypresses = () => {
  const next = pendingKeypresses.shift();
  if (next === undefined) { drainScheduled = false; return; }
  filtered.write(next);
  setImmediate(drainKeypresses);
};

The justification in the code is that Ink's readable fires on nextTick, but setImmediate and process.nextTick interleave differently from each other and from I/O on every platform, and the comment conflates them. The implementation is plausible, but the timing argument is overstated; this would be a one-line tightening ("Ink's readable fires on the next microtask, so a setImmediate between writes is a safe gap") rather than a correctness fix.


🔴 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 /re-review.

@github-actions github-actions Bot added the agent:comments nc-review left non-blocking findings label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:comments nc-review left non-blocking findings area:docs Documentation area:tools Tool implementations and tool-calling area:tui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant