ADR 0615 §1: the watchman invokes assigner_read_wants and indexer_read_modules, consumes their views families and never reads either bucket; it keeps first-views and writes an unanswered first view as a finding of its own. The lead's ruling: an owner that is down never holds the start; each state is read on a goroutine once its first view is answered, and what it holds (seeded pulses, stuck keys, the findings it is the source of) is reconciled then (watch.Awaits, ReadLate), never dropped at the start's end. Tools watchman_first_views and watchman_first_view_again. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
116 lines
2.6 KiB
JSON
116 lines
2.6 KiB
JSON
{
|
|
"module": "mesh-delivery-watchman",
|
|
"version": "1",
|
|
"slug": "watchman",
|
|
"claims": [
|
|
{
|
|
"name": "mesh-watchdogs",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"signals",
|
|
"stuck",
|
|
"presence",
|
|
"dead-letters",
|
|
"resync"
|
|
]
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-build-go.steps",
|
|
"mesh-build-image.steps",
|
|
"mesh-build-node.steps",
|
|
"mesh-delivery-builder.builds",
|
|
"mesh-host.health",
|
|
"mesh-provisioner.provisions",
|
|
"node-engine.have"
|
|
],
|
|
"invokes": [
|
|
"mesh-delivery-assigner.assigner_read_wants",
|
|
"mesh-delivery-indexer.indexer_read_modules"
|
|
],
|
|
"consumes": [
|
|
"mesh-delivery-assigner.views.wants",
|
|
"mesh-delivery-indexer.views.modules"
|
|
],
|
|
"tools": [
|
|
"watchman_findings",
|
|
"watchman_first_views",
|
|
"watchman_first_view_again"
|
|
],
|
|
"state": [
|
|
{ "name": "presence", "history": 20 },
|
|
{ "name": "pulse", "key-ttl": true },
|
|
{ "name": "stuck", "history": 20 },
|
|
{ "name": "findings", "history": 5 },
|
|
{ "name": "first-views", "history": 1 }
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-delivery-watchman",
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-delivery-watchman",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-delivery-watchman"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-delivery-watchman",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "socket-dir",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh-delivery-watchman-tools",
|
|
"mode": "0755",
|
|
"owner": "mesh-delivery-watchman",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "watchman",
|
|
"type": "process",
|
|
"name": "mesh-delivery-watchman",
|
|
"artifact": "program",
|
|
"run": [
|
|
"./mesh-delivery-watchman"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "${dir:state}/broker"
|
|
},
|
|
"user": "mesh-delivery-watchman",
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "program",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-delivery-watchman",
|
|
"binary": "mesh-delivery-watchman"
|
|
},
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-delivery-watchman-tools",
|
|
"binary": "mesh-delivery-watchman-tools",
|
|
"loads": [
|
|
"mesh-delivery-watchman-tools"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|