Skip to content

Notify subscribers when prompt reload fails - #36

Open
maoji-y wants to merge 1 commit into
priompt:mainfrom
maoji-y:fix/reload-notify-on-error
Open

maoji-y wants to merge 1 commit into
priompt:mainfrom
maoji-y:fix/reload-notify-on-error

Conversation

@maoji-y

@maoji-y maoji-y commented Dec 3, 2026

Copy link
Copy Markdown

Issue

Fixes #18

What changed

A reload policy exception or an automatic refetch failure currently prevents on_change from running. The subscription handler now logs a warning and still delivers the version and classification. It awaits the blocking refetch in a worker thread, so a successful refresh keeps the cache warm before the callback runs.

The regression tests use fake NATS and gRPC clients to cover both failure paths.

How I tested it

  • Both added regressions failed on current main at b1c97cc and passed with the fix. The full python -m pytest -q suite passed all 44 tests on Python 3.13.

  • git diff --check passed.

OpenAI Codex implemented, reviewed, and validated this change.

Checklist

  • The issue above is assigned to me.
  • I have at most 2 open pull requests in the priompt organisation.
  • Tests pass locally.
  • If this is a good first issue: this is one of my first open-source contributions.
  • I used AI tools for this change: yes (if yes, I understand and can explain every line).

This branch has not been deployed

No deployments
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.

on_change is skipped when the reload refetch fails

1 participant