Review round 1 of the bus want: a removal keeps the bus server, the have says a server made anew runs the want's fingerprint, the old build is read before the first write, and an unanswered inspect fails the apply rather than replacing the server (ADR 0594 §2, §4)
mesh/delivery-group group feat/774-bus-want rejected: composed together: the checker's verdict at the members' heads (a0ab6ce2e316): novox
mesh/delivery closed: the pull request closed unmerged
mesh/check failed: novox: not composed on novox: nats has not been built for this mesh: server is its "server" artifact… | 2c5f818d1522 on 798d73eb11e9

This commit is contained in:
2026-11-03 09:18:31 +01:00
parent a096abac92
commit 2c5f818d15
7 changed files with 279 additions and 55 deletions
+8 -8
View File
@@ -123,8 +123,8 @@ func (h sessionHaves) Write(ctx context.Context, x agent.Have) {
Sealed: x.Sealed, Server: x.Server})
}
func (h sessionHaves) Removed(ctx context.Context, module string) {
h.session.NoteRemoved(ctx, module, "")
func (h sessionHaves) Removed(ctx context.Context, module string, words ...string) {
h.session.NoteRemoved(ctx, module, "", words...)
}
// shorten keeps a have's detail within what a have value holds: its head, which says what failed, and its tail, which is
@@ -564,9 +564,9 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
sayFacts(ctx, ag)
return res
},
Remove: func(ctx context.Context, module string, others []delivery.Composed) agent.Result {
Remove: func(ctx context.Context, module string, others []delivery.Composed, keep map[string]bool) agent.Result {
actx, done := applyContext(session.WithLink(ctx))
res := removeComposition(actx, opts, module, others, ag.Placed(module), sched, say)
res := removeComposition(actx, opts, module, others, ag.Placed(module), keep, sched, say)
done()
afterApply()
sayFacts(ctx, ag)
@@ -732,13 +732,13 @@ func applyComposition(ctx context.Context, opts options, c delivery.Composed, ot
if got.Probe != nil {
return failedWith(got.Probe.partial().Error())
}
return agent.Result{}
return agent.Result{Kept: got.Outcome.Kept}
}
// removeComposition removes one module's own resources and nothing of another's.
func removeComposition(ctx context.Context, opts options, module string, others []delivery.Composed, placed map[string]bool,
func removeComposition(ctx context.Context, opts options, module string, others []delivery.Composed, placed, keep map[string]bool,
sched *apply.Scheduler, say link.Announce) agent.Result {
scope := apply.Scope{Module: module, Others: resourcesOf(others), Placed: placed}
scope := apply.Scope{Module: module, Others: resourcesOf(others), Placed: placed, Keep: keep}
got := applyModuleHeld(ctx, opts, &declaration.Declaration{Version: declaration.Version}, &scope, sched, say)
switch {
case got.Refused != "":
@@ -746,7 +746,7 @@ func removeComposition(ctx context.Context, opts options, module string, others
case got.Err != nil:
return agent.Result{Failed: true, Detail: shorten(got.Err.Error())}
}
return agent.Result{}
return agent.Result{Kept: got.Outcome.Kept}
}
// busyModules are the modules whose last apply left a container running because it said busy.