Skip to content

fix: recover truncated ingest output and cap clip retries#603

Open
AndrewDongminYoo wants to merge 2 commits into
nashsu:mainfrom
AndrewDongminYoo:agent/fix-ingest-truncation-and-clip-retries
Open

fix: recover truncated ingest output and cap clip retries#603
AndrewDongminYoo wants to merge 2 commits into
nashsu:mainfrom
AndrewDongminYoo:agent/fix-ingest-truncation-and-clip-retries

Conversation

@AndrewDongminYoo

@AndrewDongminYoo AndrewDongminYoo commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Retry incomplete FILE blocks once with a targeted, bounded generation request.
  • Allow only the originally truncated paths in repair output and avoid caching unrecovered partial output.
  • Enforce the clip server restart limit instead of resetting the counter after every successful bind.

Root cause

  • Provider streams can end mid-FILE; the parser dropped the incomplete block with a warning but did not attempt targeted recovery. CLI transports also cannot apply the configured max_tokens override.
  • The clip server reset restart_count immediately after every bind, so repeated server-loop exits could never reach MAX_RESTART_RETRIES.

Verification

  • npm run test:mocks — 118 files, 1,722 tests passed
  • npm run typecheck
  • npm run build
  • npm --prefix mcp-server run build
  • cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
  • cargo test --manifest-path src-tauri/Cargo.toml --lib — 348 passed, 1 ignored
  • cargo check --manifest-path src-tauri/Cargo.toml --message-format=short
  • git diff --check upstream/main...HEAD

@AndrewDongminYoo
AndrewDongminYoo marked this pull request as ready for review July 22, 2026 04:24
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.

1 participant