release 1.2.4: fix unescaped backticks in the compose render heredoc

The unquoted heredoc in render_superbrain_compose turned the comment's
backticked 'docker container inspect superbrain' into command substitution;
re-rendering while the stack runs injected inspect JSON into the compose
file and update.sh's parse guard aborted (2026-11-05, core). Reworded;
1.2.3's /deploy remains defective for updates, use 1.2.4+.
This commit is contained in:
Andrew S Erwin
2026-11-05 14:16:53 -06:00
parent aefc84441c
commit c4db566ca1
5 changed files with 18 additions and 6 deletions
+9
View File
@@ -363,6 +363,15 @@ the Gitea repo secrets `DOCKERHUB_USERNAME`/`DOCKERHUB_TOKEN` are still unset
(andrew's account gets 403 on the repo secrets API; an org owner must set (andrew's account gets 403 on the repo secrets API; an org owner must set
them) — until then every release needs a manual Option B push. them) — until then every release needs a manual Option B push.
**1.2.3 is defective for updates — use 1.2.4+:** its migrate image's
`/deploy/lib-superbrain.sh` carries unescaped backticks inside the unquoted
`render_superbrain_compose` heredoc (command substitution). A re-render while
the stack is running injects `docker container inspect` JSON into the compose
file; update.sh's parse guard aborts (safely, leaving the old compose
replaced by the broken render — restore by re-rendering from a fixed lib).
Fixed in 1.2.4 by rewording; rule: no backticks or unescaped `$` inside that
heredoc, ever.
### Not applicable ### Not applicable
- `email_superbrain`: since the notification engine (2026-10-26) the app - `email_superbrain`: since the notification engine (2026-10-26) the app
+6 -3
View File
@@ -48,7 +48,7 @@ SUPERBRAIN_APP_IP="192.168.0.94"
SUPERBRAIN_MIGRATE_IP="192.168.0.95" SUPERBRAIN_MIGRATE_IP="192.168.0.95"
# Release to install; the generic `upgrade` flow keeps .env in step with the # Release to install; the generic `upgrade` flow keeps .env in step with the
# service file's VERSION afterwards. # service file's VERSION afterwards.
SUPERBRAIN_IMAGE_VERSION="1.2.3" SUPERBRAIN_IMAGE_VERSION="1.2.4"
# render_superbrain_compose writes the app-dir compose file. Called by # render_superbrain_compose writes the app-dir compose file. Called by
# config_superbrain (install) and by deploy/federated/update.sh after a lib # config_superbrain (install) and by deploy/federated/update.sh after a lib
@@ -84,8 +84,11 @@ services:
web: web:
image: federatedcomputer/superbrain-web:\${IMAGE_VERSION} image: federatedcomputer/superbrain-web:\${IMAGE_VERSION}
# MUST be named exactly "superbrain": upgrade_app() probes # MUST be named exactly "superbrain": upgrade_app() probes
# `docker container inspect superbrain` and skips apps whose primary # "docker container inspect superbrain" and skips apps whose primary
# container it cannot find under the app name. # container it cannot find under the app name. (No backticks in this
# heredoc: it is unquoted, so they would become command substitution —
# hit in production 2026-11-05 when a re-render with the container
# running injected inspect JSON into the compose file.)
container_name: superbrain container_name: superbrain
hostname: superbrain.$DOMAIN hostname: superbrain.$DOMAIN
restart: always restart: always
+1 -1
View File
@@ -2,7 +2,7 @@ NAME=superbrain
DESCRIPTION="Bookmark & Knowledge Base" DESCRIPTION="Bookmark & Knowledge Base"
DOCS=https://github.com/andrew/superbrain DOCS=https://github.com/andrew/superbrain
CONTAINER=federatedcomputer/superbrain-app CONTAINER=federatedcomputer/superbrain-app
VERSION=1.2.3 VERSION=1.2.4
INTERNAL_IP=192.168.0.93 INTERNAL_IP=192.168.0.93
DEPENDS="postgresql" DEPENDS="postgresql"
PORTS=3000 PORTS=3000
+1 -1
View File
@@ -7,7 +7,7 @@ name = "superbrain-mcp"
# Versioned in lockstep with the Superbrain release it speaks to (house # Versioned in lockstep with the Superbrain release it speaks to (house
# tooling tracks one version per app); the federated mcpserver gateway # tooling tracks one version per app); the federated mcpserver gateway
# installs this package and spawns `superbrain-mcp` per linked instance. # installs this package and spawns `superbrain-mcp` per linked instance.
version = "1.2.3" version = "1.2.4"
description = "MCP server for Superbrain — bookmarks, tags and pages over the Superbrain REST API" description = "MCP server for Superbrain — bookmarks, tags and pages over the Superbrain REST API"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
+1 -1
View File
@@ -1,3 +1,3 @@
"""Superbrain MCP server — bookmarks, tags and pages for AI tooling.""" """Superbrain MCP server — bookmarks, tags and pages for AI tooling."""
__version__ = "1.2.3" __version__ = "1.2.4"