Repository navigation
router: hot-reload InferencePolicy + ClawMemory loaders (Slice 2/3 DoD) - #283
Merged
Pal Lakatos-Toth (pallakatos) merged 1 commit intoMay 13, 2026
Merged
Conversation
Adds mtime-poll watchers for both /etc/azureclaw/inference and /etc/azureclaw/memory mount directories, mirroring the existing governance::Governance::spawn_policy_watcher pattern. Closes Slice 3 DoD #4 (router reloads within 5s of kubectl edit) explicitly and Slice 2 DoD #1 implicitly (the echo loop now closes Compiled→Ready on every change, not just the first). - spawn_inference_policy_watcher (INFERENCE_POLICY_WATCH_INTERVAL, default 5s) - spawn_memory_binding_watcher (MEMORY_BINDING_WATCH_INTERVAL, default 5s) - load_and_install now clears the handle on NoBinding/NoPolicy and preserves it on Error — proper hot-reload semantics for when an operator removes spec.memoryRef / spec.inferenceRef. - Both watchers wired in main.rs after governance. - 779 router lib tests (+5). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pal Lakatos-Toth (pallakatos)
deleted the
slice-3-mem-hot-reload-and-ensure
branch
May 13, 2026 15:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes Slice 3 DoD #4 (router reloads within 5s of kubectl edit) and the implicit Slice 2 DoD #1 gap where the echo loop never closed Compiled→Ready after the first reconcile.
What
Both
inference_policy_loader::load_and_installandmemory_binding_loader::load_and_installwere one-shot at router startup. After the initial load the file on disk could change but the router happily kept echoing the first digest forever — the controller-side/internal/policy-statusecho loop never closed for subsequent edits.This PR adds mtime-poll watchers mirroring the existing
Governance::spawn_policy_watcherpattern:spawn_inference_policy_watcher(dir, registry, handle)(INFERENCE_POLICY_WATCH_INTERVAL, default 5s)spawn_memory_binding_watcher(dir, registry, handle)(MEMORY_BINDING_WATCH_INTERVAL, default 5s)Plus tightens
load_and_installsemantics in both loaders:spec.memoryRef/spec.inferenceRefnow actually unbinds.Tests
cargo clippy -D warningsclean.cargo fmt --checkclean.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com