Files
mesh-catalog/modules/mesh-delivery-gate/module.json
T
jschoubben e44a2d140d GATE-4, GATE-5: a merge call names one source revision per branch and opens its record
The gate consumes the seat git's merge-called and, per watched branch its
members name, writes source.<branch> once by compare-and-set keyed by the
call, numbered one above the branch's newest; opens that revision's record
keyed <branch>.<source> with the call, by and account in its trace; says
record-opened on record-opened.<call> and source-moved on
source-moved.<branch>.<source>. The take-in.taken writes its movers into
the record read by its key, and a take-in with no mover ends it as nothing
to deliver. The verb groups, the record's pins and pins-stated, forge-made
and the emitted transition go. One commit for both subtasks: the record's
opening is the handler's second half and neither compiles alone against
the contracts.

Builds: design 47 H §737, §738 (a take-in with no movers ends its record), §749 (the pins are the indexer's), §764 (the gate: the source moved on take-in.taken, the verb groups); H-A-13, H-A-19, H-A-24, H-A-25, H-A-28, H-A-29, H-A-33, H-A-47 (the start writes through the seed's path, no record), H-A-48 (pins, pins-stated, transition, members <repository>@<number>), H-A-76 (Q-G1: the say-again carries the value's heads, start false)

Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
2026-11-20 03:12:57 +01:00

373 lines
8.4 KiB
JSON

{
"module": "mesh-delivery-gate",
"version": "0.1",
"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-indexer.take-in.taken",
"mesh-catalog.registration-changed",
"mesh-conditions.findings-asked"
],
"uses": [
"operator-channel"
],
"requires": [
{
"name": "records",
"storage": "ledger",
"template": "ledger",
"options": {
"max-mib": 768
},
"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"
}
},
"operations": [
{
"name": "open",
"effect": "set-fields",
"fields": [
"milestone",
"branch",
"source",
"call",
"heads",
"opened",
"form"
],
"sequence": true
},
{
"name": "group",
"effect": "set-fields",
"fields": [
"group"
],
"sequence": true
},
{
"name": "trace",
"effect": "set-fields",
"fields": [
"trace",
"recovery"
],
"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
},
{
"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"
],
"sequence": true
}
]
},
{
"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": "conditions",
"storage": "key-value",
"template": "state"
},
{
"name": "findings",
"storage": "key-value",
"template": "state"
},
{
"name": "finding-events",
"storage": "stream",
"template": "events",
"options": {
"events": [
"finding-written.*",
"finding-cleared.*",
"findings-stated.*"
],
"max-age-days": 7,
"max-mib": 16
}
}
],
"packages": {
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg": "0.1"
},
"invokes": [
"seat:git.branch",
"seat:mesh-catalog.registrations",
"seat:mesh-hand-acts.hand-act",
"seat:mesh-wants.entry",
"seat:node-engine.composition"
],
"state": [
{
"name": "source",
"history": 64
}
],
"capabilities": [
"ledger-calls",
"ledger-upkeep-calls"
],
"tools": [
"delivery_status",
"gate_consumer",
"gate_record",
"gate_record_end",
"gate_record_repair",
"gate_records",
"gate_source",
"gate_source_again",
"gate_source_start"
],
"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
}
},
"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"
],
"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"
}
]
}
}