Take the catalogue's composition rules into the node-engine

ADR 0593 §7: the composer with its refusals leaves mesh-sdk, so mesh-sdk
carries no composition rule. The catalogue functions only the
node-engine's composition reaches (Resolve, Resolution's Compose,
Declaration, DataItems, LeftOut, Rules and the rest, the settings,
placeholder and template refusals, the rendering helpers) are copied
with their tests into internal/compose/resolution; a method of a
mesh-sdk shape becomes a function taking it first. The composition
calls its own copies, and the captured catalogue its tests read lives
here now, shared by mesh-compose's tests.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-02 19:15:55 +01:00
parent be0226b624
commit d68e241724
686 changed files with 35703 additions and 80 deletions
@@ -0,0 +1 @@
{"live-restore": true, "insecure-registries": ["${seat:mesh-artifact-store:reach}"], "log-driver": "json-file", "log-opts": {"max-size": "${config:log-max-size}", "max-file": "${config:log-max-file}"}}
@@ -0,0 +1,15 @@
# Generated by the mesh. Do not edit — module docker writes this file and replaces it at every push.
[Unit]
Description=Prune dangling images and unused build cache (the mesh's docker module)
# Never volumes, never a container, never an image a container uses: dangling
# images and build cache nothing refers to, unused for a week. What a person
# prunes beyond that is docker_prune's, by hand.
After=docker.service
ConditionPathExists=/run/docker.sock
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=idle
ExecStart=/usr/bin/docker image prune --force --filter until=168h
ExecStart=/usr/bin/docker builder prune --force --filter until=168h
@@ -0,0 +1,11 @@
# Generated by the mesh. Do not edit — module docker writes this file and replaces it at every push.
[Unit]
Description=Weekly prune of dangling images and unused build cache (the mesh's docker module)
[Timer]
OnCalendar=weekly
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target
@@ -0,0 +1,5 @@
# The log rotation daemon.json takes, written by the mesh from this machine's settings log-max-size and
# log-max-file, and judged by the step log-rotation-check before daemon.json is written (novox/hq issue 452).
# Replaced on every push; change the settings, never this file.
size=${config:log-max-size}
files=${config:log-max-file}
@@ -0,0 +1,179 @@
{
"module": "docker",
"version": "1",
"capabilities": [
"package-manager",
"service-manager",
"privileged"
],
"invokes": [
"seat:mesh-controller.images"
],
"claims": [
{
"name": "node-container-runtime",
"scope": "node"
}
],
"tools": [
"docker_list",
"docker_inspect",
"docker_resolv_conf",
"docker_logs",
"docker_secrets_in_logs",
"docker_secrets_in_events",
"docker_stats",
"docker_start",
"docker_stop",
"docker_restart",
"docker_top",
"docker_images",
"docker_prune",
"docker_prune_images",
"docker_disk_usage",
"docker_networks",
"docker_volumes",
"docker_events",
"docker_daemon_config",
"docker_unlabelled",
"docker_problems",
"docker_ports"
],
"replaces": {
"docker_resolv_conf": [
"docker exec cat /etc/resolv.conf"
]
},
"config": {
"log-max-size": {
"type": "string",
"description": "The size each container's log is cut at, a whole number from 1 with k, m or g after it; the runtime keeps log-max-file of them, so 100m and 10 hold about 1 GB per container (novox/hq issue 452). The runtime reads it only at its next start, which the mesh never forces, and a container created before that keeps the options it was created with until it is created again.",
"pattern": "[1-9][0-9]*[kmg]",
"trusted": true,
"default": "100m"
},
"log-max-file": {
"type": "number",
"description": "How many of a container's log files of log-max-size the runtime keeps, a count from 1 to 99, the oldest dropped first; taken at the runtime's next start and by containers created after it, like log-max-size (novox/hq issue 452).",
"minimum": 1,
"maximum": 99,
"trusted": true,
"default": 10
}
},
"resources": [
{
"id": "package",
"type": "package",
"package": "docker"
},
{
"id": "buildx",
"type": "package",
"package": "docker-buildx"
},
{
"id": "socket",
"type": "service",
"unit": "docker.socket",
"state": "running",
"boot": "enabled"
},
{
"id": "state",
"type": "directory",
"mode": "0700",
"place": "mesh",
"unknown": "program"
},
{
"id": "log-rotation",
"type": "file",
"path": "${dir:state}/log-rotation.conf",
"mode": "0600",
"trusted": true,
"template": "files/log-rotation.conf"
},
{
"id": "log-rotation-check",
"type": "process",
"name": "docker-log-rotation-check",
"artifact": "tools",
"run": [
"./docker-tools",
"check-log-rotation"
],
"run-once": true,
"env": {
"DOCKER_LOG_ROTATION": "${dir:state}/log-rotation.conf"
},
"restart-on": [
"log-rotation"
]
},
{
"id": "daemon",
"type": "file",
"path": "/etc/docker/daemon.json",
"mode": "0644",
"into": "json",
"trusted": true,
"template": "files/daemon.json"
},
{
"id": "runtime",
"type": "service",
"unit": "docker.service",
"state": "running",
"boot": "enabled",
"reload-on": [
"daemon"
]
},
{
"id": "prune-service",
"type": "file",
"path": "/etc/systemd/system/docker-prune.service",
"mode": "0644",
"template": "files/docker-prune.service"
},
{
"id": "prune-timer",
"type": "file",
"path": "/etc/systemd/system/docker-prune.timer",
"mode": "0644",
"template": "files/docker-prune.timer"
},
{
"id": "prune",
"type": "service",
"unit": "docker-prune.timer",
"state": "running",
"boot": "enabled",
"restart-on": [
"prune-service",
"prune-timer"
]
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/docker-tools",
"binary": "docker-tools",
"loads": [
"docker-tools"
]
},
{
"name": "files",
"kind": "archive",
"from": "files"
}
]
}
}