records: the record is read where it is written

A module keeping a checkout of a repository of decisions, designs and issues from the git seat,
current on every announced merge and on a timer, answering records_search / records_read /
records_list / records_status / records_sync at the commit it read (novox/hq ADR 0025, ADR 0153).
The repository is a setting; it names no mesh.
This commit is contained in:
2026-09-30 17:45:39 +02:00
parent 96fb441f30
commit 6512878eef
9 changed files with 630 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
{
"module": "records",
"version": "1",
"slug": "records",
"capabilities": [
"container-runtime"
],
"requires": [
"git"
],
"binds": {
"git": "/var/lib/mesh/records/git.json"
},
"own-secrets": {
"broker": "/var/lib/mesh/records/broker"
},
"consumes": [
"gitea.pull.merged"
],
"tools": [
"records_search",
"records_read",
"records_list",
"records_status",
"records_sync"
],
"resources": [
{
"id": "mesh-state",
"type": "directory",
"path": "/var/lib/mesh/records",
"mode": "0700"
},
{
"id": "checkout",
"type": "directory",
"path": "/var/lib/records",
"mode": "0700"
},
{
"id": "config",
"type": "file",
"path": "/var/lib/mesh/records/config.json",
"mode": "0600",
"content": "{}\n",
"merge": "json"
},
{
"id": "origin",
"type": "file",
"path": "/var/lib/mesh/records/origin",
"mode": "0600",
"content": "${bound:git:scheme}://${bound:git:at}:${bound:git:port}\n"
},
{
"id": "runtime",
"type": "container",
"name": "records",
"network": "host",
"volumes": [
"/var/lib/mesh/records/broker:/run/secrets/broker:ro",
"/var/lib/mesh/records/config.json:/run/config/config.json:ro",
"/var/lib/mesh/records/origin:/run/config/origin:ro",
"/var/lib/records:/var/lib/records"
],
"env": {
"MESH_BROKER_FILE": "/run/secrets/broker",
"MESH_RECORDS_CONFIG_FILE": "/run/config/config.json",
"MESH_RECORDS_ORIGIN_FILE": "/run/config/origin",
"MESH_RECORDS_DIR": "/var/lib/records"
},
"artifact": "runtime",
"restart-on": [
"config",
"origin"
]
}
],
"build": {
"on": [
{
"arg": "BUILD_BASE",
"module": "mesh-tools",
"artifact": "build"
},
{
"arg": "RUNTIME_BASE",
"module": "mesh-tools",
"artifact": "runtime"
}
],
"artifacts": [
{
"name": "runtime",
"kind": "image",
"from": "Dockerfile"
}
]
}
}