Add tool-call diagnostics and linear sign-off redaction #149

Merged
Collaborator

Log tool names, durations and outcomes without arguments. Add configurable event-loop and slow-call stack dumps while preserving FastMCP's lifespan. Replace quadratic address redaction with equivalent linear token scanning, and document the diagnostics.

Validation: pristine baseline 99 passed; focused suite 115 passed. Lint, strict typing and package build passed. Full suite: 986 passed, 1 failed, 8 skipped. The failure asserts that tool calls emit no logs; its file is outside the approved write set. make check stopped before audit.

API stderr proof command: PYTHONPATH=src:. uv run python3 /tmp/mailmind-148-proof.py > /tmp/mailmind-148-proof.stdout 2> /tmp/mailmind-148-proof.stderr
Captured JSON: {"ts": "2026-11-03T10:42:06", "level": "INFO", "logger": "mail_mind_mcp.server", "msg": "tool call", "tool": "mail_evidence", "duration_ms": 1514, "outcome": "ok"}
Captured dump excerpt:
slow tool call tool=mail_evidence seconds=1
Thread 0x0000000172dff000 [AnyIO worker thread] (most recent call first):
File "/tmp/mailmind-148-proof.py", line 30 in slow

Authentication and argument validation precede the logging hook. The stall's root cause remains unresolved.

Refs #148

Co-Authored-By: gpt-6.1-sol noreply@openai.com

Log tool names, durations and outcomes without arguments. Add configurable event-loop and slow-call stack dumps while preserving FastMCP's lifespan. Replace quadratic address redaction with equivalent linear token scanning, and document the diagnostics. Validation: pristine baseline 99 passed; focused suite 115 passed. Lint, strict typing and package build passed. Full suite: 986 passed, 1 failed, 8 skipped. The failure asserts that tool calls emit no logs; its file is outside the approved write set. make check stopped before audit. API stderr proof command: PYTHONPATH=src:. uv run python3 /tmp/mailmind-148-proof.py > /tmp/mailmind-148-proof.stdout 2> /tmp/mailmind-148-proof.stderr Captured JSON: {"ts": "2026-11-03T10:42:06", "level": "INFO", "logger": "mail_mind_mcp.server", "msg": "tool call", "tool": "mail_evidence", "duration_ms": 1514, "outcome": "ok"} Captured dump excerpt: slow tool call tool=mail_evidence seconds=1 Thread 0x0000000172dff000 [AnyIO worker thread] (most recent call first): File "/tmp/mailmind-148-proof.py", line 30 in slow Authentication and argument validation precede the logging hook. The stall's root cause remains unresolved. Refs #148 Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Log tool names, durations and outcomes without arguments. Add configurable event-loop and slow-call stack dumps while preserving FastMCP's lifespan. Replace quadratic address redaction with equivalent linear token scanning, and document the diagnostics.

Validation: pristine baseline 99 passed; focused suite 115 passed. Lint, strict typing and package build passed. Full suite: 986 passed, 1 failed, 8 skipped. The failure asserts that tool calls emit no logs; its file is outside the approved write set. make check stopped before audit.

API stderr proof command: PYTHONPATH=src:. uv run python3 /tmp/mailmind-148-proof.py > /tmp/mailmind-148-proof.stdout 2> /tmp/mailmind-148-proof.stderr
Captured JSON: {"ts": "2026-11-03T10:42:06", "level": "INFO", "logger": "mail_mind_mcp.server", "msg": "tool call", "tool": "mail_evidence", "duration_ms": 1514, "outcome": "ok"}
Captured dump excerpt:
slow tool call tool=mail_evidence seconds=1
Thread 0x0000000172dff000 [AnyIO worker thread] (most recent call first):
  File "/tmp/mailmind-148-proof.py", line 30 in slow

Authentication and argument validation precede the logging hook. The stall's root cause remains unresolved.

Refs #148

Closes #148
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Replace the stale log-silence assertion with the two A1 assertions: allow only tool-call messages and verify mailbox names never appear in messages or permitted fields.

Validation: 987 tests passed, 8 skipped; Ruff, strict mypy and dependency audit passed. Audit used a permitted temporary uv tool directory.

Closes #148
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
svc-agent-writer deleted branch feat/svd-dev-mail-mind-mcp-148-mail-evidence-call-in-flight-9-7aa0e4ad 2026-11-02 23:56:25 +00:00
Sign in to join this conversation.
No description provided.