Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Keep runtime-hash verification and manifest responses consistent during concurrent release-policy updates. Publish owned immutable hash sets, preserve the active-release union, and serialize fallback merges with live-provider revalidation.

## Release candidate v0.9.2 — Gemma QAT caching, adaptive MTP and Nemotron Lightning (not shipped; 2026-09-10)

Source changes since `v0.9.1`. Provider changes require a new signed bundle.
Expand Down
22 changes: 11 additions & 11 deletions coordinator/api/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,16 @@ func (s *Server) providerReadLoop(ctx context.Context, conn *websocket.Conn, pro
// Verify runtime integrity against the known-good manifest. Swift
// providers omit Python/vllm hashes, but they still report external
// runtime assets such as mlx.metallib under template_hashes.
if s.knownRuntimeManifest != nil {
runtimeOK, mismatches := s.verifyRuntimeHashesForBackend(
regMsg.Backend, regMsg.PythonHash, regMsg.RuntimeHash, regMsg.TemplateHashes)
provider.Mu().Lock()
provider.Mu().Lock()
manifest := s.knownRuntimeManifest.Load()
if manifest != nil {
runtimeOK, mismatches := s.verifyRuntimeHashesForBackendWithManifest(
manifest, regMsg.Backend, regMsg.PythonHash, regMsg.RuntimeHash, regMsg.TemplateHashes)
provider.RuntimeVerified = runtimeOK
provider.RuntimeManifestChecked = runtimeOK
provider.MetallibVerified = runtimeOK &&
runtimeManifestApprovesMetallib(
s.knownRuntimeManifest, regMsg.TemplateHashes)
manifest, regMsg.TemplateHashes)
if !runtimeOK || !provider.MetallibVerified {
provider.RuntimeCapabilities = nil
provider.FreshCodeAttested = false
Expand Down Expand Up @@ -511,7 +512,6 @@ func (s *Server) providerReadLoop(ctx context.Context, conn *websocket.Conn, pro
}
} else {
// No manifest configured — fail-closed for routing.
provider.Mu().Lock()
provider.RuntimeVerified = true
provider.RuntimeManifestChecked = false
provider.MetallibVerified = false
Expand Down Expand Up @@ -1703,16 +1703,17 @@ func (s *Server) applyChallengeRuntimePolicy(
provider *registry.Provider,
resp *protocol.AttestationResponseMessage,
) (bool, bool, []protocol.RuntimeMismatch) {
manifest := s.knownRuntimeManifest
provider.Mu().Lock()
defer provider.Mu().Unlock()
manifest := s.knownRuntimeManifest.Load()
policyActive := manifest != nil
runtimeOK := false
var mismatches []protocol.RuntimeMismatch
if policyActive {
runtimeOK, mismatches = s.verifyRuntimeHashesForBackend(
provider.Backend, resp.PythonHash, resp.RuntimeHash, resp.TemplateHashes)
runtimeOK, mismatches = s.verifyRuntimeHashesForBackendWithManifest(
manifest, provider.Backend, resp.PythonHash, resp.RuntimeHash, resp.TemplateHashes)
}

provider.Mu().Lock()
runtimeIdentityChanged :=
resp.PythonHash != provider.PythonHash ||
resp.RuntimeHash != provider.RuntimeHash ||
Expand All @@ -1737,7 +1738,6 @@ func (s *Server) applyChallengeRuntimePolicy(
provider.PythonHash = resp.PythonHash
provider.RuntimeHash = resp.RuntimeHash
provider.TemplateHashes = registry.CloneStringMap(resp.TemplateHashes)
provider.Mu().Unlock()
return policyActive, runtimeOK, mismatches
}

Expand Down
8 changes: 4 additions & 4 deletions coordinator/api/release_policy_failclosed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ func TestReleaseDeactivationReadFailureConvergesPolicyFromCommittedDeactivation(

// The runtime manifest converged from the retained snapshot: the shared
// metallib survives via the remaining 2.1.0 release.
if srv.knownRuntimeManifest == nil || !srv.knownRuntimeManifest.TemplateHashes["mlx_metallib"][trHashC] {
t.Fatalf("runtime manifest did not converge with the committed deactivation: %+v", srv.knownRuntimeManifest)
if srv.knownRuntimeManifest.Load() == nil || !srv.knownRuntimeManifest.Load().TemplateHashes["mlx_metallib"][trHashC] {
t.Fatalf("runtime manifest did not converge with the committed deactivation: %+v", srv.knownRuntimeManifest.Load())
}

// Recovery rebuilds the identical authorized set from the exact inventory.
Expand Down Expand Up @@ -513,8 +513,8 @@ func TestRegisterReleaseInventoryFailureConvergesPolicyWithCommittedRelease(t *t
}

// The runtime manifest converged with the committed release too.
if srv.knownRuntimeManifest == nil || !srv.knownRuntimeManifest.TemplateHashes["mlx_metallib"][trHashC] {
t.Fatalf("runtime manifest did not converge with the committed release: %+v", srv.knownRuntimeManifest)
if srv.knownRuntimeManifest.Load() == nil || !srv.knownRuntimeManifest.Load().TemplateHashes["mlx_metallib"][trHashC] {
t.Fatalf("runtime manifest did not converge with the committed release: %+v", srv.knownRuntimeManifest.Load())
}

// Routine registration during the outage must not deroute the approved fleet.
Expand Down
Loading
Loading