A claim problem or a refused credential holds its module, not the whole pass (issue 1966, S1 and S5)
The node-engine refused the whole pass when two modules claimed a seat held once, or when a consumer's credential was refused. Now the composer leaves that module out of the declaration and composes the rest: the module is returned held (Resolved.Held, resolution.ResolveHolding), reaches the declaration as left out through the filter and the declaration #218 already keep (Rendering.NotPlaced), and Declared.LeftOut names it. The second claimant of a seat is the one held; its claim is not this node's holding. The rest-of-mesh view and the network use the same, so a node with a held module stays on the network. Resolve stays strict for callers that cannot leave a module out. Quick fix: hold only the credential refusal (resolve.go planForNow), about 20 minutes. Thorough fix, chosen: every claim problem is attributed to its module (claimsOf) and both kinds go through the one left-out path of ADR 0163 rule 6, in the declaration, the filter and the network, so no per-kind refusal of a pass remains in the composer. Left for the next step: a declared-and-not-made own secret (NotMadeError) and the Foreseeing-mode refusal still refuse the pass; the frombus candidate path holds those by stub already. Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
This commit is contained in:
@@ -201,10 +201,7 @@ func TestAGrantIsCreatedForEachCredentialMadeForAConsumer(t *testing.T) {
|
||||
}
|
||||
// A consumer whose set does not resolve is skipped, not fatal.
|
||||
nodeOf(t, &in, "laptop").Assigned = append(nodeOf(t, &in, "laptop").Assigned, "files")
|
||||
in.Catalogue["files"] = catalogue.Manifest{Module: "files", Version: "1", Requires: []string{"s3-bucket"},
|
||||
Claims: []catalogue.Claim{{Name: "x", Scope: catalogue.ScopeNode}}}
|
||||
in.Catalogue["twin"] = catalogue.Manifest{Module: "twin", Version: "1", Claims: []catalogue.Claim{{Name: "x", Scope: catalogue.ScopeNode}}}
|
||||
nodeOf(t, &in, "laptop").Assigned = append(nodeOf(t, &in, "laptop").Assigned, "twin")
|
||||
in.Catalogue["files"] = catalogue.Manifest{Module: "files", Version: "1", Requires: []string{"s3-bucket", "nothing-gives-this"}}
|
||||
if got, err := Render(in, "anchor", Foreseeing); err != nil || len(got.Rendering.Grants) != 0 {
|
||||
t.Errorf("a consumer that does not resolve: %v %+v", err, got.Rendering.Grants)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user