Repository navigation
feat(#391): improve sequant_run MCP tool output structure - #407
Merged
admarble merged 4 commits intoMar 24, 2026
Merged
Conversation
Replace raw stdout tail with structured per-issue summaries parsed from run log files. Response includes status, phases, QA verdict, duration per issue, plus summary stats. Raw output retained as secondary field. Enforces 64KB response size limit with progressive truncation. Falls back to raw output when log file is unavailable. Entire-Checkpoint: 5581a0f7108f
4 tasks
…flicts - Resolve merge conflicts in src/mcp/tools/run.ts: keep async spawnAsync + resolveCliBinary from main, structured output from #391 - Convert readLatestRunLog to async (fs/promises instead of sync I/O) - Add run correlation via runStartTime parameter to filter stale logs - Fix size limit enforcement to use Buffer.byteLength (bytes, not chars) - Add multi-byte content test for size limit enforcement - Update mcp-run-async tests: mock fs for resolveCliBinary fallback, use new structured response fields (rawOutput, issues[], summary) - Fix pre-existing mcp-run-async test failures from #389 (resolveCliBinary changed spawn command from npx to process.argv[0]) Entire-Checkpoint: 5581a0f7108f
- Convert resolveLogDir to async (fs/promises.access instead of existsSync) - Make enforceResponseSizeLimit pure (returns new object, no mutation) - Add last-resort issues array truncation when structured data exceeds 64KB - Document structured response format in docs/features/mcp-server.md - Add tests: immutability check, multi-byte content, issues truncation - Mock fs/promises.access in test suites for async resolveLogDir Entire-Checkpoint: 5581a0f7108f
Revert three changes that added complexity without practical benefit: - resolveLogDir: back to existsSync (2 stat calls, negligible) - enforceResponseSizeLimit: back to simple mutation (private, single caller) - issues array truncation: removed (unrealistic edge case, O(n^2)) Keep: response format documentation in mcp-server.md (useful for clients) Entire-Checkpoint: 5581a0f7108f
admarble
deleted the
feature/391-mcp-server-improve-sequant-run-output-structure
branch
March 24, 2026 05:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rawOutputtruncationstatusfield preserved at top levelPre-PR AC Verification
buildStructuredResponse()inrun.ts:98RunToolIssueSummaryinterface, mapped fromRunLograwOutputfield, truncated to 2000 charsenforceResponseSizeLimit()at 64KBbuildFallbackResponse()returnsissues: []with raw outputstatusfield preservedTest plan
Closes #391
🤖 Generated with Claude Code