Files
mesh-delivery/modules/mesh-delivery-forge-bridge/module.json
T
jschoubben b76b9c58f4 F2: the bridge's state performed is capped and pruned toward its cap at the bridge's own writes
performed filled on 2026-11-21 with nothing to stop it. It is now bound through
mesh-sdk's process.PrunedState: its figures are read when the bridge opens the
bucket its binding names, each write is counted, and past prune-mark (70 %) the
oldest acts are purged to prune-target (50 %) in one journal line, a key kept
under _keep/<key> staying. The bus drops acts older than three days by the
entry's TTL (performed-keep). performed, heads and owed-asks name an 8 MiB cap.
The tools bundle serves mesh-delivery-forge-bridge_state_prune_now and
_state_keep from stateobjects.PruneTools, each written in the hand-act log.

Builds: design 47 H2 §812, §819, H-A-380, H-A-386, H-A-411 (2), H-A-433
2026-11-22 01:36:34 +01:00

139 lines
3.4 KiB
JSON

{
"module": "mesh-delivery-forge-bridge",
"version": "0.1",
"slug": "forge-bridge",
"consumes": [
"git.branch-moved",
"mesh-catalog.registration-changed",
"mesh-delivery.source-moved",
"mesh-delivery.owed",
"mesh-broker.recreated",
"mesh-broker.dropped"
],
"streams": [
{ "name": "forge", "events": ["forge.**", "owed.ended"], "max-age-days": 7 }
],
"state": [
{ "name": "heads", "history": 1, "max-mib": 8 },
{ "name": "owed-asks", "history": 1, "max-mib": 8 }
],
"tools": [
"bridge_tags",
"bridge_heads",
"bridge_owed",
"bridge_owed_again",
"bridge_owed_drop",
"mesh-delivery-forge-bridge_state_prune_now",
"mesh-delivery-forge-bridge_state_keep"
],
"invokes": [
"seat:git.status",
"seat:git.comment",
"seat:git.view",
"seat:git.note",
"seat:mesh-hand-acts.hand-act",
"seat:git.tags",
"seat:git.branch",
"seat:mesh-catalog.registrations",
"seat:mesh-delivery.source",
"seat:mesh-broker.show"
],
"requires": [
{
"name": "performed",
"storage": "key-value",
"template": "state",
"options": { "history": 1, "ttl-seconds": 259200, "max-mib": 8 }
}
],
"config": {
"prune-mark": {
"type": "number",
"description": "The fill of the bridge's state performed, in percent of its cap, past which the bridge prunes it at its own write, oldest acts 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 bridge's state performed takes it down to (design 47 H2 §812); below prune-mark.",
"trusted": false,
"runtime": true,
"minimum": 1,
"maximum": 100,
"default": 50
}
},
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-delivery-forge-bridge",
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-delivery-forge-bridge",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-delivery-forge-bridge"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-delivery-forge-bridge",
"place": ".",
"unknown": "program"
},
{
"id": "bridge",
"type": "process",
"name": "mesh-delivery-forge-bridge",
"artifact": "program",
"run": [
"./mesh-delivery-forge-bridge"
],
"env": {
"MESH_BROKER_FILE": "${dir:state}/broker"
},
"user": "mesh-delivery-forge-bridge",
"health": {
"kind": "unit"
}
}
],
"build": {
"artifacts": [
{
"name": "program",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-forge-bridge",
"binary": "mesh-delivery-forge-bridge"
},
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-forge-bridge-tools",
"binary": "mesh-delivery-forge-bridge-tools",
"loads": [
"mesh-delivery-forge-bridge-tools"
]
},
{
"name": "forgemsg",
"kind": "package",
"language": "go",
"paths": [
"forgemsg"
],
"series": "0.1"
}
]
}
}