Skip to content

feat(introspection): scan SessionDB and gate timeouts on failure status (Closes #399, Closes #400)#402

Merged
Lexus2016 merged 2 commits into
mainfrom
evolution/issue-399-400-introspection-state-db-timeout
Jun 20, 2026
Merged

feat(introspection): scan SessionDB and gate timeouts on failure status (Closes #399, Closes #400)#402
Lexus2016 merged 2 commits into
mainfrom
evolution/issue-399-400-introspection-state-db-timeout

Conversation

@Lexus2016

Copy link
Copy Markdown
Owner

Automated evolution PR for issues #399 and #400.\n\n- Adds SQLite SessionDB (state.db messages table) scan path to scripts/introspection_extract.py (#399).\n- Gates timeout counting on structural failure status (#400).\n- Adds regression tests for both fixes.\n\nLocal validation: ruff + pytest tests/scripts/test_introspection_extract.py all green.

… failure status

- Add SQLite SessionDB messages table scan path to
  scripts/introspection_extract.py (#399)
- Gate _TIMEOUT_RE counting on _tool_result_failed() so only genuine
  failure-level timeouts are counted (#400)
- Add regression tests for both fixes

Closes #399
Closes #400

Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: evolution/issue-399-400-introspection-state-db-timeout vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11314 on HEAD, 11314 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5942 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

…397)

- Promote _scan_mcp_description warning-only scan into a severity-aware
  structured risk report across tool name and description.
- Detect hidden instructions, role tags, concealment, credential exfil,
  code execution, dangerous imports, zero-width chars, HTML comments,
  and excessive whitespace.
- Block registration of high-severity tools unless
  mcp_servers.<name>.security.warn_only is true.
- Track server-level risk flag and expose _is_high_risk_mcp_server().
- Add tests for block and warn-only paths.

Closes #397

Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
@Lexus2016

Copy link
Copy Markdown
Owner Author

Updated this branch to also include #397: MCP supply-chain scanner gate for malicious tool descriptions.\n\nAll three issues are now in a single PR. Local validation includes tests/scripts/test_introspection_extract.py and tests/tools/test_mcp_tool.py (both green).

@Lexus2016 Lexus2016 merged commit 9526b75 into main Jun 20, 2026
39 checks passed
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