Ask the packet filter's holder allowed at every compose of the filter

The node-engine stays the one renderer of the filter file: at each compose of
a converged node's filter it asks the holder of node-packet-filter its verb
allowed within the setting compose-ask-bound (10 s) and renders the answer.
When allowed does not answer, or answers what is not its answer, no filter file
is composed: the one loaded is kept as it runs, the holder's module is not held
(an old holder must stay replaceable), and the part withheld is said once in
the journal until an answer comes between. The node hears allowances-changed
on its own node's subject and composes again. The manifest invokes
seat:node-packet-filter.allowed and consumes node-packet-filter.allowances-changed.

Builds: design 08 control-verbs §1, §3, §4, §5, §7, §8; ADR 0683; H-A-305, H-A-307 (1), (2), H-A-314 (3), (5), (7), H-A-315 (2), (6), H-A-321
This commit is contained in:
2026-11-21 22:32:36 +01:00
parent 2a29c458ce
commit dc3765bb7c
18 changed files with 486 additions and 30 deletions
+10
View File
@@ -201,6 +201,10 @@ type Scope struct {
// keeps offering the others (what it provides, contributes and listens on), since it keeps running what it runs. False
// where nothing is read; the manifest it is composed from is its offer then. Nil: none is read.
RunningManifest func(module string) (catalogue.Manifest, bool)
// Filter is, for the node composing itself, what the compose of its packet filter is given beside the derived ports
// (compose.Node.Filter): the allowances the holder of node-packet-filter answered its verb allowed, or why it did not
// answer, and then the filter file is kept as it runs in Running (design 08 control-verbs §1, §4). Empty renders none.
Filter resolution.Filter
}
// InOwn is, of the modules p places on its node, those whose resources the node's own composition it runs
@@ -479,6 +483,12 @@ func readBase(ctx context.Context, r Reader, mesh Mesh, s Scope) (base, error) {
n.RunsRuntime = compose.RuntimeRunning(s.Running)
// And every runtime process as it runs, whose words give each held module's share of a holder's (H-A-335).
n.RunsRuntimes = compose.RuntimesRunning(s.Running)
// And its packet filter's allowances, or the filter file as it runs where allowed did not answer (design 08
// control-verbs §4).
n.Filter = s.Filter
if n.Filter.Withheld != "" {
n.Filter.Running = compose.FilterRunning(s.Running)
}
for _, module := range s.InOwn {
if n.InOwn == nil {
n.InOwn = map[string]bool{}