The gate named the forge module's tools and events and guessed their answers' shape (operator (d), F14). Its reads now are the seat git's verbs pull, statuses, open-pulls and contains, typed in the seat's contract, a failed read an error and never none; its forge events are the seat's pull.updated, pull.merged, pull.closed, forge.pull, forge.status and repo.writable, read into the gate's own forms in one place (gitseat.go). What the forge would merge now (the base's protection, its conflict word, whether the merging account writes) has no verb of the seat yet: it stays the one read of the forge's statuses tool, named as such (mergeStateTool), until the seat carries it. The bus tests' runtime now serves the gate's ledger, so the two whole-bundle tests that failed since W11.1 pass again. Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ (Joined from 14338514.) Builds: design 47 G §252, §310, §312, test 51 (GATE14) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
378 lines
9.8 KiB
JSON
378 lines
9.8 KiB
JSON
{
|
|
"module": "mesh-delivery-gate",
|
|
"version": "1",
|
|
"slug": "gate",
|
|
"claims": [
|
|
{
|
|
"name": "mesh-delivery",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"deliveries",
|
|
"show",
|
|
"groups",
|
|
"checks",
|
|
"table",
|
|
"stalled",
|
|
"recheck",
|
|
"close",
|
|
"settle"
|
|
]
|
|
}
|
|
],
|
|
"consumes": [
|
|
"git.pull.updated",
|
|
"git.pull.merged",
|
|
"git.pull.closed",
|
|
"git.forge.pull",
|
|
"git.forge.status",
|
|
"git.repo.writable",
|
|
"mesh-delivery-forge-bridge.forge.**",
|
|
"mesh-config.config-changed",
|
|
"mesh-delivery-indexer.take-in.taken"
|
|
],
|
|
"emits": [
|
|
"transition",
|
|
"group",
|
|
"merged"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"requires": [
|
|
{
|
|
"name": "records",
|
|
"storage": "ledger",
|
|
"template": "ledger",
|
|
"options": {
|
|
"max-mib": 768
|
|
},
|
|
"types": [
|
|
{
|
|
"name": "record",
|
|
"schema": {
|
|
"milestone": {
|
|
"type": "string"
|
|
},
|
|
"heads": {
|
|
"type": "object"
|
|
},
|
|
"opened": {
|
|
"type": "string"
|
|
},
|
|
"forge-made": {
|
|
"type": "boolean"
|
|
},
|
|
"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"
|
|
},
|
|
"revision": {
|
|
"type": "string"
|
|
},
|
|
"half": {
|
|
"type": "string"
|
|
},
|
|
"ended": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"operations": [
|
|
{
|
|
"name": "open",
|
|
"effect": "set-fields",
|
|
"fields": [
|
|
"milestone",
|
|
"heads",
|
|
"opened",
|
|
"forge-made",
|
|
"form"
|
|
],
|
|
"sequence": true
|
|
},
|
|
{
|
|
"name": "group",
|
|
"effect": "set-fields",
|
|
"fields": [
|
|
"group"
|
|
],
|
|
"sequence": true
|
|
},
|
|
{
|
|
"name": "trace",
|
|
"effect": "set-fields",
|
|
"fields": [
|
|
"trace"
|
|
],
|
|
"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": "pin",
|
|
"effect": "set-entry",
|
|
"fields": [
|
|
"revision",
|
|
"half"
|
|
],
|
|
"into": "pinned",
|
|
"key": "revision"
|
|
},
|
|
{
|
|
"name": "free",
|
|
"effect": "remove",
|
|
"into": "pinned",
|
|
"key": "revision"
|
|
},
|
|
{
|
|
"name": "end",
|
|
"effect": "set-fields",
|
|
"fields": [
|
|
"ended"
|
|
],
|
|
"sequence": true
|
|
},
|
|
{
|
|
"name": "remove",
|
|
"effect": "remove"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"packages": {
|
|
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg": "0.1"
|
|
},
|
|
"invokes": [
|
|
"seat:git.pull",
|
|
"seat:git.statuses",
|
|
"seat:git.open-pulls",
|
|
"seat:git.contains",
|
|
"gitea.gitea_commit_statuses"
|
|
],
|
|
"state": [
|
|
"deliveries",
|
|
"groups",
|
|
"pulls",
|
|
{
|
|
"name": "asks",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "merges",
|
|
"history": 10
|
|
},
|
|
{
|
|
"name": "owed",
|
|
"history": 5
|
|
},
|
|
{
|
|
"name": "source",
|
|
"history": 64
|
|
},
|
|
"conditions",
|
|
{
|
|
"name": "turns",
|
|
"history": 5
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-delivery-teller.answers",
|
|
"mesh-delivery-checker.verdicts",
|
|
"mesh-delivery-view.reach"
|
|
],
|
|
"tools": [
|
|
"delivery_hand_now",
|
|
"delivery_merge_again",
|
|
"delivery_status",
|
|
"delivery_turns"
|
|
],
|
|
"config": {
|
|
"refusal-stall-floor-minutes": {
|
|
"type": "number",
|
|
"description": "minutes, at least, before a merge refused because its trunk moved, whose check the gate asked again, is said as stalled; twice the repository's last check time when that is longer (ADR 0505 §4).",
|
|
"minimum": 1,
|
|
"maximum": 1440,
|
|
"trusted": false,
|
|
"default": 10
|
|
},
|
|
"author-new-head-minutes": {
|
|
"type": "number",
|
|
"description": "minutes a delivery that needs its author's new head (a conflict, a failed check, a rejected group) waits for one before the operator hears of it (ADR 0505 §5).",
|
|
"minimum": 1,
|
|
"maximum": 10080,
|
|
"trusted": false,
|
|
"default": 120
|
|
},
|
|
"check-gates-merge": {
|
|
"type": "boolean",
|
|
"description": "Whether mesh/check gates the merge. True (the default): the operator's Approve is asked, and a merge handed, only on a passing verdict judged against the trunk's head, and a trunk's move puts a verdict out of date (ADR 0447, ADR 0505 §4). False (the operator, 2026-10-25 22:56: \"run the check locally only, but not as a gate, it loses us too much time\"; developers run the unit and integration levels locally before a pull request): a ready pull request (no review line is waited for, ADR 0659) has its Approve is asked once the check at its heads (a group: of all its heads together) has a verdict, a pass or a failure said in the ask, or after 60 minutes with none, said so (the operator, 2026-10-27 23:54: \"if you don't want me to approve it, don't send the approval request\"); an approved merge waits for no verdict; no merge is refused for a check judged on an older trunk; a later verdict is shown on the pull request and the delivery, and asks a pending Approve again in its words; a group still merges all its members in one pass. Set it false together with the gitea module's check-gates-merge, which lets its merge tool merge an approved head without a passing mesh/check.",
|
|
"trusted": false,
|
|
"default": true
|
|
},
|
|
"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": [
|
|
"refusal-stall-floor-minutes",
|
|
"author-new-head-minutes",
|
|
"check-gates-merge",
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|