Files
mesh-catalog/modules/mesh-delivery-gate/module.json
T
jschoubben 758a8ad653 GT1: each owed act is a ledger entry of its own; every ledger write is measured
An act the gate owes the forge is now the entry act/<branch.source.act.id>
(type act, index acts on its record's key in the manifest), removed when
the forge bridge performed it; the head entry holds the record's fields
alone, and the record's acts are joined from their entries when read.
The record type keeps no act operation: a head written before this change
is read for its fields and the acts embedded in it are ignored (they are
notes and views of the few records in flight at the delivery; losing them
changes nothing the operator relies on). A view act's text is the record's
summary, the head's fields and a count of movers per outcome, so it fits
64 KiB for any record; gate_record still shows the whole record. The
64 KiB refusal measures every write, the head's, a mover's and an act's,
raising record-too-large, which the record's end clears for every entry
of it. The gate's whole test gains the step: 126 movers write 127 entries
plus their acts, none over 64 KiB, the head counting 126 and holding no
act; a take-in said again with a why past 64 KiB raises record-too-large
and the record's end clears it.

Builds: design 47 H2 §809, H-A-385, H-A-391, H-A-453 (3), H-A-455, H-A-457, H-A-459
2026-11-22 02:58:39 +01:00

557 lines
13 KiB
JSON

{
"module": "mesh-delivery-gate",
"version": "0.1",
"class": "core",
"slug": "gate",
"claims": [
{
"name": "mesh-delivery",
"scope": "mesh",
"serves": [
"deliveries",
"show",
"source",
"recovery",
"stalled"
]
}
],
"consumes": [
"mesh-delivery-forge-bridge.owed.ended",
"git.merge-called.*",
"mesh-delivery-forge-bridge.forge.*.*.*.head-moved",
"mesh-delivery-indexer.take-in.taken",
"mesh-pipeline-runner.pipeline-started.*.*",
"mesh-pipeline-runner.pipeline-ended.*.*",
"mesh-pipeline-runner.wait-held.*.*",
"mesh-pipeline-runner.wait-ended.*.*",
"mesh-wants.wanted.*.*",
"mesh-wants.pipeline-wanted.*.*",
"node-engine.running.*.*",
"mesh-catalog.registration-changed",
"mesh-conditions.findings-asked"
],
"requires": [
{
"name": "records",
"storage": "ledger",
"template": "ledger",
"options": {
"max-mib": 1024
},
"types": [
{
"name": "record",
"schema": {
"milestone": {
"type": "string"
},
"source": {
"type": "integer"
},
"call": {
"type": "string"
},
"heads": {
"type": "object"
},
"opened": {
"type": "string"
},
"form": {
"type": "integer"
},
"group": {
"type": "object"
},
"trace": {
"type": "object"
},
"key": {
"type": "string"
},
"module": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"node": {
"type": "string"
},
"step": {
"type": "string"
},
"outcome": {
"type": "string"
},
"why": {
"type": "string"
},
"at": {
"type": "string"
},
"event": {
"type": "string"
},
"since": {
"type": "string"
},
"branch": {
"type": "string"
},
"ended": {
"type": "object"
},
"recovery": {
"type": "object"
},
"movers": {
"type": "integer"
},
"merge-called": {
"type": "string"
},
"delivery-time": {
"type": "string"
},
"class": {
"type": "string"
},
"phases": {
"type": "object"
}
},
"operations": [
{
"name": "open",
"effect": "set-fields",
"fields": [
"milestone",
"branch",
"source",
"call",
"heads",
"opened",
"form",
"merge-called"
],
"sequence": true
},
{
"name": "group",
"effect": "set-fields",
"fields": [
"group"
],
"sequence": true
},
{
"name": "trace",
"effect": "set-fields",
"fields": [
"trace",
"recovery"
],
"sequence": true
},
{
"name": "movers",
"effect": "set-fields",
"fields": [
"movers"
],
"sequence": true
},
{
"name": "phases",
"effect": "set-fields",
"fields": [
"phases"
],
"sequence": true
},
{
"name": "away",
"effect": "set-entry",
"fields": [
"node",
"since"
],
"into": "away",
"key": "node"
},
{
"name": "back",
"effect": "remove",
"into": "away",
"key": "node"
},
{
"name": "end",
"effect": "set-fields",
"fields": [
"ended",
"delivery-time",
"class"
],
"sequence": true
}
]
},
{
"name": "mover",
"schema": {
"record": {
"type": "string"
},
"module": {
"type": "string"
},
"pipeline": {
"type": "string"
},
"version": {
"type": "string"
},
"key": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"node": {
"type": "string"
},
"step": {
"type": "string"
},
"outcome": {
"type": "string"
},
"why": {
"type": "string"
},
"at": {
"type": "string"
},
"event": {
"type": "string"
},
"class": {
"type": "string"
}
},
"operations": [
{
"name": "mover",
"effect": "set-fields",
"fields": [
"record",
"module",
"class",
"pipeline",
"version"
],
"sequence": true
},
{
"name": "entry",
"effect": "set-entry",
"fields": [
"key",
"module",
"fingerprint",
"node"
],
"into": "entries",
"key": "key",
"sequence": true
},
{
"name": "outcome",
"effect": "set-entry",
"fields": [
"key",
"module",
"fingerprint",
"node",
"step",
"outcome",
"why",
"at",
"event"
],
"into": "outcomes",
"key": "key",
"sequence": true
}
],
"indexes": [
{
"name": "movers",
"on": [
"record"
]
}
]
},
{
"name": "act",
"schema": {
"record": {
"type": "string"
},
"id": {
"type": "string"
},
"act": {
"type": "string"
},
"repository": {
"type": "string"
},
"number": {
"type": "integer"
},
"head": {
"type": "string"
},
"outcome": {
"type": "string"
},
"words": {
"type": "string"
},
"at": {
"type": "string"
},
"owed": {
"type": "object"
}
},
"operations": [
{
"name": "act",
"effect": "set-fields",
"fields": [
"record",
"id",
"act",
"repository",
"number",
"head",
"outcome",
"words",
"at",
"owed"
],
"sequence": true
}
],
"indexes": [
{
"name": "acts",
"on": [
"record"
]
}
]
},
{
"name": "held",
"schema": {
"instance": {
"type": "string"
},
"opened": {
"type": "string"
}
},
"operations": [
{
"name": "hold",
"effect": "set-entry",
"fields": [
"instance",
"opened"
],
"into": "records",
"key": "instance"
},
{
"name": "drop",
"effect": "remove",
"into": "records",
"key": "instance"
}
]
}
]
},
{
"name": "heads",
"storage": "key-value",
"template": "state",
"options": {
"max-mib": 8
}
},
{
"name": "findings",
"storage": "key-value",
"template": "state",
"options": {
"max-mib": 8
}
},
{
"name": "finding-events",
"storage": "stream",
"template": "events",
"options": {
"events": [
"finding-written.*",
"finding-cleared.*",
"findings-stated.*"
],
"max-age-days": 7,
"max-mib": 8
}
}
],
"packages": {
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-assigner/asks": "0.3",
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg": "0.1"
},
"invokes": [
"seat:git.branch",
"seat:mesh-catalog.entry",
"seat:mesh-catalog.registrations",
"seat:mesh-hand-acts.hand-act",
"seat:mesh-wants.entry",
"seat:node-engine.composition"
],
"state": [
{
"name": "source",
"history": 64,
"max-mib": 8
}
],
"capabilities": [
"ledger-calls",
"ledger-upkeep-calls"
],
"tools": [
"delivery_status",
"gate_consumer",
"gate_head_take",
"gate_heads",
"gate_record",
"gate_record_end",
"gate_record_repair",
"gate_records",
"gate_source",
"gate_source_again",
"gate_source_seed",
"gate_source_start",
"gate_times",
"mesh-delivery-gate_state_keep",
"mesh-delivery-gate_state_prune_now"
],
"config": {
"record-retention": {
"type": "number",
"description": "days a delivery record is kept from when it opened (design 47 *The delivery record*): ninety covers every trace asked of a past delivery so far; when a record is removed at its retention, the gate says freed for each graph revision it pinned. Nothing else is removed to make room.",
"minimum": 1,
"maximum": 3650,
"trusted": false,
"default": 90
},
"untaken-bound": {
"type": "number",
"description": "minutes a watched branch's head may stand that no merge call delivered before the gate raises head-untaken (design 47 H §740); the gate keeps one deadline timer for the earliest.",
"minimum": 1,
"trusted": false,
"default": 10
},
"budget-core": {
"type": "string",
"description": "The budget of a delivery that moves a core module, from merge-called to the last running of its movers, as a duration such as 10m (ADR 0282; design 47 H2 §810): gate_times names every delivery over it, and the self-check raises over-budget for it.",
"trusted": false,
"runtime": true,
"default": "10m"
},
"budget-leaf": {
"type": "string",
"description": "The budget of a delivery that moves only leaf modules, as a duration such as 3m (ADR 0304; design 47 H2 §810).",
"trusted": false,
"runtime": true,
"default": "3m"
},
"prune-mark": {
"type": "number",
"description": "The fill of the gate's state heads, in percent of its cap, past which the gate prunes it at its own write, oldest first (design 47 H2 §812): below the bus module's raise mark of 75 %.",
"trusted": false,
"runtime": true,
"minimum": 1,
"maximum": 100,
"default": 70
},
"prune-target": {
"type": "number",
"description": "The fill, in percent of the cap, a prune of the gate's state heads takes it down to (design 47 H2 §812); below prune-mark.",
"trusted": false,
"runtime": true,
"minimum": 1,
"maximum": 100,
"default": 50
}
},
"resources": [
{
"id": "state",
"type": "directory",
"mode": "0700",
"place": ".",
"unknown": "program"
},
{
"id": "settings",
"type": "file",
"path": "${dir:state}/settings.json",
"mode": "0600",
"takes-config": [
"record-retention",
"untaken-bound"
],
"merge": "json",
"template": "files/settings.json"
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-gate",
"binary": "mesh-delivery-gate",
"loads": [
"mesh-delivery-gate"
],
"env": {
"MESH_DELIVERY_GATE_SETTINGS": "${dir:state}/settings.json"
}
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}