Skip to content

fix: harden doctor gemini and wal checks#24033

Open
Inchesdeep wants to merge 1 commit into
NousResearch:mainfrom
Inchesdeep:fix/doctor-gemini-wal-hardening
Open

fix: harden doctor gemini and wal checks#24033
Inchesdeep wants to merge 1 commit into
NousResearch:mainfrom
Inchesdeep:fix/doctor-gemini-wal-hardening

Conversation

@Inchesdeep

Copy link
Copy Markdown

Summary

  • fix the doctor Gemini native API probe to use x-goog-api-key instead of generic Bearer auth
  • switch hermes doctor --fix WAL cleanup from wal_checkpoint(PASSIVE) to wal_checkpoint(TRUNCATE)
  • report incomplete WAL cleanup honestly when the WAL remains large after checkpoint
  • add regression tests covering both the Gemini probe and WAL checkpoint behavior

Why

hermes doctor was producing a false negative for valid Gemini API keys because the native Gemini /v1beta/models endpoint does not use Bearer auth. Separately, doctor could claim it fixed a large SQLite WAL file even when the file size did not materially shrink.

Evidence

  • direct Gemini API probe to https://generativelanguage.googleapis.com/v1beta/models returned HTTP 200 with the configured key
  • local doctor output now shows ✓ gemini
  • targeted test suite passes: scripts/run_tests.sh tests/hermes_cli/test_doctor.py -q

Verification

  • hermes doctor
  • scripts/run_tests.sh tests/hermes_cli/test_doctor.py -q
  • git diff --check

Notes

This PR comes from a fork because direct push permission to NousResearch/hermes-agent was not available from this machine.

- use x-goog-api-key for Gemini native /models probing
- use wal_checkpoint(TRUNCATE) for doctor --fix
- report incomplete WAL cleanup honestly
- add regression coverage for Gemini probe and WAL checkpoint behavior
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/gemini Google Gemini (AI Studio, Cloud Code) duplicate This issue or pull request already exists labels May 11, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #24030 (same fix, already closed/merged). This PR has the identical title and addresses the same zoneinfo.ZoneInfo.utcoffset(None) regression from #23981.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have provider/gemini Google Gemini (AI Studio, Cloud Code) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants