On 2026-10-26 13:40 group fix/734-lost-ask merged two of its three members: the forge answered mesh-delivery#73's merge 405 "Please try again later", and in the seconds between, group feat/890-placement merged mesh-delivery#72, so #73 then conflicted. - mesh-delivery-gate: before any member is handed, every member is read for its required statuses, its head still the approved one, and the forge's own mergeable (in conflict, or still being worked out); the forge's "no" is asked again every 5 s for 2 minutes, then the group is held and said urgent with nothing merged. - mesh-delivery-gate: an approved merge waits while another approved merge's pass is under way into a repository it goes into (handed until merged whole, or stopped), whether or not mesh/check gates merges (it waits for a merge, never for a check: ADR 0551). - mesh-delivery-gate: tool delivery_merge_again asks a refused or held merge again on the operator's word. - gitea: the merge asks again after the forge's 405 "Please try again later" (1 s, 2 s, 4 s), and a pull request carries the forge's mergeable, which gitea_commit_statuses answers.
150 lines
4.0 KiB
JSON
150 lines
4.0 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"
|
|
]
|
|
}
|
|
],
|
|
"consumes": [
|
|
"gitea.pull.updated",
|
|
"gitea.pull.merged",
|
|
"gitea.pull.closed",
|
|
"gitea.forge.status",
|
|
"gitea.forge.pull-request.edited",
|
|
"gitea.forge.pull-request.closed",
|
|
"mesh-delivery-forge-bridge.forge.**",
|
|
"mesh-config.config-changed"
|
|
],
|
|
"emits": [
|
|
"transition",
|
|
"group",
|
|
"merged"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"invokes": [
|
|
"gitea.gitea_commit_statuses",
|
|
"gitea.gitea_contains",
|
|
"gitea.gitea_open_pulls"
|
|
],
|
|
"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"
|
|
],
|
|
"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 pull request reviewed at its head is ready and its Approve asked at once, with no verdict waited on; no merge is refused for a check judged on an older trunk; a verdict that comes is shown on the pull request and the delivery, never waited on; 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
|
|
}
|
|
},
|
|
"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"
|
|
],
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
}
|