Files
mesh-delivery/modules/mesh-delivery-builder/module.json
T
jschoubben 473451f7e6 Builder: its process runs on the module's account again, with no bus
A process account is granted only what its bus names, never its seat's
work, so a builder on an account of its own could build nothing at its
first start. The process declares no bus and takes the module's broker
credential, as before B13; as the module's one process it is the one
reader of the work queue publishes. Class, caps, settings and the
publish-queue removal stay. The validator built at this head accepts the
builder in the change case (the trunk case refuses it: no class, uncapped
states).

Builds: design 47 H2 §793, §820; H-A-464 (corrects H-A-454 second addendum); review round 2
2026-11-22 03:56:30 +01:00

417 lines
14 KiB
JSON

{
"module": "mesh-delivery-builder",
"version": "0.1",
"slug": "builder",
"class": "core",
"claims": [
{
"name": "mesh-builds",
"scope": "mesh",
"serves": [
"reserved",
"published",
"drop",
"publish-queue"
]
}
],
"tools": [
"builder_announce_again",
"builder_seat_list",
"builder_seat_list_again",
"builder_ask_again",
"builder_bounds",
"builder_build",
"builder_build_again",
"builder_builds_since",
"builder_engine_reads",
"builder_floor_again",
"builder_floor_waits",
"builder_old_form",
"builder_publish_again",
"builder_publish_queue",
"builder_reserved",
"builder_release",
"builder_reserved_drop",
"builder_reserve_done",
"builder_seat_queue",
"builder_stuck",
"builder_toolchains",
"builder_toolchains_drop",
"builder_waits",
"builder_unbuildable",
"builder_health",
"builder_ask_drop",
"builder_asks",
"builder_versions",
"builder_first_views",
"builder_first_view_again",
"build_current"
],
"emits": [
"build.asked-again",
"version.old-form-closed"
],
"consumes": [
"mesh-conditions.findings-asked",
"container-image-registry.kept",
"container-image-registry.published",
"container-image-registry.refused",
"container-image-registry.removed",
"go-package-registry.kept",
"go-package-registry.published",
"go-package-registry.refused",
"go-package-registry.removed",
"mesh-artifact-sweep.artifacts-gone",
"mesh-catalog.seat-definition-changed",
"mesh-catalog.seat-definition-removed",
"mesh-catalog.version-released",
"mesh-catalog.versions-filled",
"mesh-conditions.condition-cleared",
"mesh-delivery-indexer.take-in.taken",
"node-build-go.toolchain-reported",
"node-build-node.toolchain-reported",
"node-engine.manifest-reads-changed",
"node-engine.running",
"operator-channel.decided",
"npm-package-registry.kept",
"npm-package-registry.published",
"npm-package-registry.refused",
"npm-package-registry.removed",
"oci-artifact-registry.kept",
"oci-artifact-registry.published",
"oci-artifact-registry.refused",
"oci-artifact-registry.removed",
"seat:mesh-module-assigner.views.assignments",
"seat:mesh-module-assigner.views.seat-holders",
"mesh-catalog.catalog-revision",
"mesh-catalog.registration-changed",
"mesh-delivery.source-moved"
],
"invokes": [
"seat:container-image-registry.remove",
"seat:container-image-registry.versions",
"seat:git.tag",
"seat:git.tags",
"seat:go-package-registry.remove",
"seat:go-package-registry.versions",
"seat:mesh-artifact-sweep.held",
"seat:mesh-builds.reserved",
"seat:mesh-builds.drop",
"seat:mesh-builds.publish-queue",
"seat:mesh-catalog.versions",
"seat:mesh-hand-acts.hand-act",
"seat:mesh-module-assigner.assignments",
"seat:mesh-watchdogs.presence",
"seat:node-build-go.drop",
"seat:node-build-image.drop",
"seat:node-build-node.drop",
"seat:node-build-go.answer",
"seat:node-build-image.answer",
"seat:node-build-node.answer",
"seat:node-engine.manifest-reads",
"seat:npm-package-registry.remove",
"seat:npm-package-registry.versions",
"seat:oci-artifact-registry.remove",
"seat:oci-artifact-registry.versions",
"seat:container-image-registry.publish",
"seat:go-package-registry.publish",
"seat:npm-package-registry.publish",
"seat:oci-artifact-registry.publish",
"seat:mesh-catalog.entry",
"seat:mesh-catalog.registrations",
"seat:mesh-catalog.seat-definitions",
"seat:mesh-catalog.revision",
"seat:mesh-delivery.source",
"seat:node-build-go.accept.delivery",
"seat:node-build-node.accept.delivery",
"seat:node-build-image.accept.delivery",
"seat:node-build-go.current",
"seat:node-build-image.current",
"seat:node-build-node.current"
],
"state": [
{ "name": "builds", "history": 5, "max-mib": 128 },
{ "name": "engine-reads", "history": 1, "max-mib": 8 },
{ "name": "findings", "history": 5, "max-mib": 32 },
{ "name": "floor-waits", "history": 1, "max-mib": 8 },
{ "name": "hearing", "history": 1, "max-mib": 8 },
{ "name": "instances", "history": 1, "max-mib": 8 },
{ "name": "old-form", "history": 1, "max-mib": 8 },
{ "name": "bounds", "history": 1, "key-ttl": true, "max-mib": 16 },
{ "name": "taken", "history": 1, "key-ttl": true, "max-mib": 8 },
{ "name": "queues", "history": 1, "max-mib": 8 },
{ "name": "toolchains-heard", "history": 1, "max-mib": 8 },
{ "name": "waits", "history": 1, "max-mib": 4 },
{ "name": "reserved", "history": 1, "max-mib": 8 },
{ "name": "acted", "history": 1, "max-mib": 1 },
{ "name": "asked", "history": 1, "max-mib": 8 },
{ "name": "reasks", "history": 1, "max-mib": 8 },
{ "name": "versions", "history": 1, "max-mib": 32 },
{ "name": "first-views", "history": 1, "max-mib": 8 },
{ "name": "unbuildable", "history": 1, "max-mib": 8 },
{ "name": "consumers", "history": 1, "max-mib": 8 }
],
"streams": [
{ "name": "waits", "events": ["wait-held.**", "wait-ended.**"], "max-age-days": 7, "max-mib": 16 },
{ "name": "mesh-delivery-builder-builds", "events": ["build.ended.**"], "max-age-days": 7, "max-mib": 16, "last-per-subject": true },
{ "name": "mesh-delivery-builder-findings", "events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"], "max-age-days": 7, "max-mib": 8 },
{ "name": "publishes", "events": ["publish.**"], "retention": "work-queue", "duplicates": 24, "max-deliveries": 10, "max-age-days": 7, "max-mib": 64 }
],
"config": {
"toolchain-wait-minutes": {
"type": "number",
"description": "minutes an entry waits for the agreed toolchain of its language to name the version its fingerprint names (design 47 G section 672); a bound a whole test sets in seconds.",
"minimum": 1,
"maximum": 10080,
"trusted": false,
"default": 60
},
"revision-wait-minutes": {
"type": "number",
"description": "minutes a build step ask waits for the builder's picture of its branch to hold its source revision before it fails, building nothing (design 47 H H-A-155, H-A-156).",
"minimum": 1,
"maximum": 60,
"trusted": false,
"default": 2
},
"package-wait-minutes": {
"type": "number",
"description": "minutes a build step ask waits for the release of a mesh package its entry names with no pin before it fails, building nothing (design 47 H H-A-165).",
"minimum": 1,
"maximum": 120,
"trusted": false,
"default": 10
},
"ask-taken-bound": {
"type": "string",
"description": "how long the builder keeps the id of an ask it took from the seat mesh-builds' work queue, so a repeat of it is taken once, a Go duration such as 10m (design 47 H2 §775; H-A-381 (2)).",
"trusted": false,
"default": "10m",
"runtime": true
},
"kept-call-pace-first": {
"type": "string",
"description": "the first wait before a kept call met by a transport fault is made again, doubled per call up to kept-call-pace-max, a Go duration (design 47 H2 §775).",
"trusted": false,
"default": "1s",
"runtime": true
},
"kept-call-pace-max": {
"type": "string",
"description": "the most a kept call's wait between calls grows to, a Go duration (design 47 H2 §775).",
"trusted": false,
"default": "30s",
"runtime": true
},
"slow-event": {
"type": "string",
"description": "how long the handling of one heard event may take before the builder says it in its journal, with its duration and the part that took it, a Go duration (design 47 H2 §794; H-A-461 (2)).",
"trusted": false,
"default": "100ms",
"runtime": true
},
"events-behind-bound": {
"type": "string",
"description": "how long a durable consumer's oldest unacknowledged message may wait before builder_health names it, an events backlog or a handler standing still, a Go duration (design 47 H2 §794; H-A-461 (2)).",
"trusted": false,
"default": "5m",
"runtime": true
},
"publish-pause": {
"type": "number",
"description": "seconds before a version's second publish try, doubled per try up to publish-pause-max (design 47 G A-457a).",
"minimum": 1,
"maximum": 3600,
"trusted": false,
"default": 30
},
"publish-pause-max": {
"type": "number",
"description": "minutes, the most a pause between a version's publish tries grows to (design 47 G A-457a).",
"minimum": 1,
"maximum": 1440,
"trusted": false,
"default": 30
},
"released-kept": {
"type": "number",
"description": "how many of a module's last releases the builder keeps, by fingerprint, to judge a rerun of a released build's step (design 47 G A-456b); the oldest is dropped.",
"minimum": 1,
"maximum": 1000,
"trusted": false,
"default": 16
},
"publish-tries": {
"type": "number",
"description": "how many times the builder tries a done build's publish before it ends loudly (log and condition) and leaves it readable in builder_publish_queue, at most 10, the work queue publishes' max-deliveries (design 47 G A-457a; H2 H-A-446 (2)).",
"minimum": 1,
"maximum": 10,
"trusted": false,
"default": 5
}
},
"logs": [
{ "name": "build-log", "max-age-days": 30, "max-mib": 3072 }
],
"reads": [
"seat:mesh-module-assigner.assignments",
"seat:node-build-go.steps",
"seat:node-build-image.steps",
"seat:node-build-node.steps"
],
"uses": [
"node-build-go",
"node-build-image",
"node-build-node",
"operator-channel"
],
"own-secrets": {
"broker": "${dir:state}/broker"
},
"secrets-owner": "mesh-delivery-builder",
"resources": [
{
"id": "account",
"type": "user",
"name": "mesh-delivery-builder",
"shell": "/usr/bin/nologin",
"home": "/var/lib/mesh-delivery-builder"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"owner": "mesh-delivery-builder",
"place": ".",
"unknown": "program"
},
{
"id": "toolchain-wait",
"type": "file",
"path": "${dir:state}/toolchain-wait-minutes",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:toolchain-wait-minutes}"
},
{
"id": "revision-wait",
"type": "file",
"path": "${dir:state}/revision-wait-minutes",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:revision-wait-minutes}"
},
{
"id": "package-wait",
"type": "file",
"path": "${dir:state}/package-wait-minutes",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:package-wait-minutes}"
},
{
"id": "publish-pause",
"type": "file",
"path": "${dir:state}/publish-pause",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:publish-pause}"
},
{
"id": "publish-pause-max",
"type": "file",
"path": "${dir:state}/publish-pause-max",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:publish-pause-max}"
},
{
"id": "released-kept",
"type": "file",
"path": "${dir:state}/released-kept",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:released-kept}"
},
{
"id": "publish-tries",
"type": "file",
"path": "${dir:state}/publish-tries",
"owner": "mesh-delivery-builder",
"mode": "0600",
"content": "${config:publish-tries}"
},
{
"id": "builder",
"type": "process",
"name": "mesh-delivery-builder",
"artifact": "program",
"serves": [
"seat:mesh-builds.reserved",
"seat:mesh-builds.published",
"seat:mesh-builds.drop",
"seat:mesh-builds.publish-queue"
],
"run": [
"./mesh-delivery-builder"
],
"env": {
"MESH_BROKER_FILE": "${dir:state}/broker",
"MESH_BUILDER_TOOLCHAIN_WAIT_FILE": "${dir:state}/toolchain-wait-minutes",
"MESH_BUILDER_REVISION_WAIT_FILE": "${dir:state}/revision-wait-minutes",
"MESH_BUILDER_PACKAGE_WAIT_FILE": "${dir:state}/package-wait-minutes",
"MESH_BUILDER_PUBLISH_PAUSE_FILE": "${dir:state}/publish-pause",
"MESH_BUILDER_PUBLISH_PAUSE_MAX_FILE": "${dir:state}/publish-pause-max",
"MESH_BUILDER_PUBLISH_TRIES_FILE": "${dir:state}/publish-tries",
"MESH_BUILDER_RELEASED_KEPT_FILE": "${dir:state}/released-kept"
},
"user": "mesh-delivery-builder",
"health": {
"kind": "unit"
}
}
],
"build": {
"artifacts": [
{
"name": "program",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-builder",
"binary": "mesh-delivery-builder"
},
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/mesh-delivery-builder-tools",
"binary": "mesh-delivery-builder-tools",
"loads": [
"mesh-delivery-builder-tools"
]
},
{
"name": "builds",
"kind": "package",
"language": "go",
"paths": [
"builds"
],
"series": "0.1"
},
{
"name": "buildrun",
"kind": "package",
"language": "go",
"paths": [
"buildrun"
],
"series": "0.1"
}
]
}
}