Skip to content

Bring every prediction path under the hot-reload swap - #1041

Merged
Userunknown84 merged 2 commits into
Userunknown84:mainfrom
pavsoss:feat/1037-reload-coverage
Aug 1, 2026
Merged

Bring every prediction path under the hot-reload swap#1041
Userunknown84 merged 2 commits into
Userunknown84:mainfrom
pavsoss:feat/1037-reload-coverage

Conversation

@pavsoss

@pavsoss pavsoss commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

A hot reload atomically swapped the text classifier, but two prediction paths sat outside it: the URL classifier was loaded once into module state, and mailbox scanning read model objects pinned on the application at startup. After a reload those paths kept serving whatever the process booted with, so a swap updated some paths and not others — the same class of defect as train-serve skew, arrived at from a different direction.

Closes #1037.

Changes

Both now travel in the versioned serving snapshot, so one reload moves every prediction path together and a request continues to see an internally consistent set of objects even if a reload lands mid-flight. Loaders that do not supply the URL pair keep working unchanged, so existing callers and lightweight test doubles are unaffected.

Test plan

  • The URL pair is present in the initial snapshot and replaced by a reload, including the case where a loader omits it.
  • A mailbox scan performed after a reload is shown to use the reloaded objects rather than the startup ones.
  • A snapshot already handed to a reader is unaffected by a later reload.

Depends on

Stacked on #1038, #1039 and #1040. Their commits are included here, so this diff shrinks to just the reload-coverage changes once they merge.

The URL classifier lived in module globals and mailbox scanning read objects pinned on the application at startup, so a reload refreshed some prediction paths and left others on the model the process booted with.
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

@pavsoss is attempting to deploy a commit to the Aditya Sharma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Userunknown84

Copy link
Copy Markdown
Owner

@pavsoss merge conflict h fix it fastly

@Userunknown84
Userunknown84 merged commit 1bf7041 into Userunknown84:main Aug 1, 2026
1 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Unify the train–serve inference contract across every prediction path

2 participants