verae-mcp-timestamping-server/recommended-changes/2026-09-21-event-loop-and-ledger-perms/What-to-Change.md
George Lambert 60bcefbca2 fix: keep global HTTP off the event loop
WhatToChange: recommended-changes/2026-09-21-event-loop-and-ledger-perms/
  What-to-Change.md
  What-to-Change-To.md
  How-to-implement-the-changes.md

What was actually done:
- Global HTTP stamp and verify run via asyncio.to_thread.
- File ledger saves chmod 0600.
- .gitignore covers coverage, mypy, logs, and editor directories.

What was not done:
- (none)
2026-09-21 14:11:29 -04:00

1.2 KiB

What to Change:

Reviewed against main @ 1bbd0a6 (dirty working tree). uv run pytest — 14 passed.

What is working

  • Tools stamp, verify, and hash_report accept a SHA-256 hex digest and refuse to take file bytes.
  • scope=global posts to https://api.veraetime.net/api/timestamp with wait=true.
  • Local receipts persist in ~/.verae/mcp-timestamp-local.json.
  • Job-complete traffic is not on JetStream. NATS use here is request/reply on verae.ts.request, verae.ts.verify, and verae.hash.report only when a NatsLedger is constructed. The default process uses the file ledger plus HTTPS.
Component Problem Evidence Severity Type
GlobalLedger.stamp / verify Blocking urllib and time.sleep run on the asyncio loop while other MCP tools wait global_client.py submit calls urlopen and time.sleep(0.25) from async def stamp high design flaw
FileLedger._save Receipt file is created with the process umask, often world-readable ledger.py write_text with no chmod high missing gate
.gitignore Coverage, mypy, logs, and editor dirs are not ignored .gitignore listed venv and pytest only low missing gate