Skip to content

fix(hindsight): warn when daemon fails due to stale pg0 PID (#110838) - #110879

Closed
E-R-Butch wants to merge 1 commit into
NousResearch:mainfrom
E-R-Butch:fix/hindsight-stale-pid-warning
Closed

E-R-Butch wants to merge 1 commit into
NousResearch:mainfrom
E-R-Butch:fix/hindsight-stale-pid-warning

Conversation

@E-R-Butch

Copy link
Copy Markdown

fix(hindsight): warn when daemon fails due to stale pg0 PID

Summary

Resolves #110838.

When the Hindsight embedded PostgreSQL daemon fails to start after an OS reboot due to a stale PID (vectorize-io/pg0#37), _daemon_start_worker() in plugins/memory/hindsight/__init__.py previously caught the exception and silently logged it only into $HERMES_HOME/logs/hindsight-embed.log. As highlighted in #110838, _check_local_runtime() still reported the runtime as available, leaving users unaware of the silent failure.

Following the discussion with @KeyArgo in #110838:

  • Classify Failed to start embedded PostgreSQL and Instance already running errors in _daemon_start_worker().
  • Emit an actionable logger.warning and a console stderr notice (⚠ ...) directing users to verify port 5432 and inspect postmaster.pid.
  • Add a dedicated unit test in tests/plugins/memory/test_hindsight_provider.py.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers area/memory duplicate This issue or pull request already exists labels Sep 14, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Duplicate of #110845 (earlier open PR, same mechanism: classify the pg0 Instance already running failure in _daemon_start_worker and surface a warning with recovery guidance for #110838). Maintainer picks the implementation.

@E-R-Butch

Copy link
Copy Markdown
Author

Closing: fixed at the source — vectorize-io/pg0#38 (pg0 0.15.2) handles pid reuse after reboot, making this warning layer moot. See #110838.

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

Labels

comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hindsight: stale pg0 pid after macOS reboot blocks embedded daemon restart (macOS sibling of #66718)

2 participants