Repository navigation
Add MCP SDK v2 server and agent hooks - #12
Conversation
🔍 Devscope Health CheckUpdated: Sat, 05 Dec 2026 13:01:38 GMT |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Addressed the review blockers in b7e4402:\n\n- all six tools now use the same default-base index; regression test alternates cochange, review_changes, and owners and asserts every ensure() call uses main\n- Stop hook checks staged, unstaged, and untracked files; advisory output is hookSpecificOutput.additionalContext, strict writes stderr and exits 2, and no findings are silent\n- installers now write portable devscope mcp entries, with optional --command uvx for uvx devscope mcp; no absolute paths\n- MCP review output has no ranking, and file_risk returns only fix SHAs, churn, and owners with no score\n- CI now includes Python 3.13\n- confirmed Codex supports trusted project .codex/config.toml layers; installer prints the trust requirement\n\nVerification: 236 local tests passed; CI passed on Python 3.11, 3.12, and 3.13; Ruff and strict mypy passed. |
|
Hardened the Stop hook in 46e17e4:\n\n- check now defaults to staged + unstaged + untracked working-tree changes; --working-tree remains an optional compatibility flag\n- malformed check invocations and legacy --format agent fail open with exit 0 and no usage noise\n- non-Git directories and runtime errors exit 0 silently\n- stdin hook JSON is read for stop_hook_active\n- strict findings exit 2 only on the first Stop pass; an active continuation is downgraded to advisory additionalContext\n- clean runs remain silent\n\nAdded regression tests for malformed usage, legacy flags, non-Git sessions, default working-tree behavior, and repeated strict Stop calls. Local verification: 238 passed, Ruff clean, strict mypy clean. |
|
Fixed the final open-stdin hang in cb5bd7f.\n\ncheck now waits at most 200 ms for hook input: select.select on POSIX, and a daemon reader thread joined for 200 ms on Windows. If no data arrives it uses an empty hook object and continues fail-open.\n\nRegression coverage launches devscope check with stdin=PIPE, deliberately leaves the pipe open and unwritten, and requires a clean exit within 5 seconds.\n\nLocal verification: 239 passed; Ruff and strict mypy passed. |
Summary\n- add a local read-only MCP SDK v2 server with review_changes, cochange, file_risk, fix_history, owners, and blast_radius\n- use one default-base index for every tool so alternating calls neither rebuild nor read the agent branch\n- add portable, non-destructive installers for Claude Code, Cursor, and Codex\n- add a Claude Stop hook that checks staged, unstaged, and untracked files\n- move the supported runtime and CI floor to Python 3.11, with CI on 3.11, 3.12, and 3.13\n\n## Review fixes\n- review_changes leads with missing co-change partners and lists files without risk ranking\n- file_risk returns only fix SHAs, recent churn, and owners; no model score\n- advisory Stop output uses hookSpecificOutput.additionalContext; no findings produce no output\n- strict Stop output writes feedback to stderr and exits 2\n- shared configs use devscope mcp, or uvx devscope mcp with --command uvx; no absolute machine paths\n- Codex project config is documented as requiring a trusted project\n\n## Safety\n- reads local Git history only\n- does not execute repository code\n- does not use the network\n- refuses to overwrite an existing Devscope MCP entry\n\n## Verification\n- 236 passed on Python 3.11\n- focused MCP suite: 11 passed\n- ruff check src tests scripts\n- mypy src