Files
mesh-catalog/modules/mesh-delivery-gate/module.json
T
jschoubben 74dd8af699 M1: the gate prunes its state heads toward its cap at its own writes
heads is written through the SDK's pruned state, which judges the fill each
put answers and past prune-mark (70 %) prunes the oldest keys to
prune-target (50 %); the gate serves mesh-delivery-gate_state_prune_now and
mesh-delivery-gate_state_keep, each written in the hand-act log.

Builds: design 47 H2 §812; H-A-380, H-A-386, H-A-411 (3)
2026-11-22 01:03:06 +01:00

534 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"
},
"id": {
"type": "string"
},
"act": {
"type": "string"
},
"repository": {
"type": "string"
},
"number": {
"type": "integer"
},
"head": {
"type": "string"
},
"words": {
"type": "string"
},
"recovery": {
"type": "object"
},
"owed": {
"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": "act",
"effect": "set-entry",
"fields": [
"id",
"act",
"repository",
"number",
"head",
"outcome",
"words",
"at",
"owed"
],
"into": "acts",
"key": "id",
"sequence": true
},
{
"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": "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"
}
]
}
}