From 1aac99170438506762693ec72ab4a07b97eca91b Mon Sep 17 00:00:00 2001 From: Santhi Prakash Date: Fri, 21 Aug 2026 20:35:16 +0000 Subject: [PATCH] fix(apps): declare minEngine=0.6.6 on catalog entries that use commandArgv/stopGracePeriod (fix #599) Five bundled apps (posthog, clickhouse, minio, neon, redis) ship services that use post-release serviceSpec fields (commandArgv, stopGracePeriod). These fields were added to the template schema in commit 550fe22f and first shipped in v0.6.6, but no entry declared minEngine, so the engine-gate in catalog-source.ts had nothing to compare against and could not refuse a pre-0.6.6 install. The silently-dropped field produces wrong-role containers: PostHog worker installs without a command and runs the wrong role; MinIO exits with 'sh is not a minio sub-command' because the shell-wrapped command never reaches the entrypoint. Add minEngine='0.6.6' to each of the five entries, then add a regression test that fails the catalog if any service.commandArgv/stopGracePeriod is set without an entry-level minEngine >= 0.6.6. Verified locally with a sabotage run that removing the field from posthog.json makes the new test fail; restoring it makes the suite pass (27/27 catalog tests, 809/809 core tests). Signed-off-by: Santhi Prakash --- packages/core/src/apps/catalog.json | 5 ++++ packages/core/src/apps/catalog.test.ts | 24 +++++++++++++++++++ .../core/src/apps/catalog/clickhouse.json | 1 + packages/core/src/apps/catalog/minio.json | 1 + packages/core/src/apps/catalog/neon.json | 1 + packages/core/src/apps/catalog/posthog.json | 1 + packages/core/src/apps/catalog/redis.json | 1 + 7 files changed, 34 insertions(+) diff --git a/packages/core/src/apps/catalog.json b/packages/core/src/apps/catalog.json index 6fba1d7bd..5f6f5b884 100644 --- a/packages/core/src/apps/catalog.json +++ b/packages/core/src/apps/catalog.json @@ -2046,6 +2046,7 @@ { "available": true, "verified": true, + "minEngine": "0.6.6", "id": "minio", "name": "MinIO", "description": "S3-compatible object storage with a web console — point any S3 client (aws-cli, SDKs) at it, or bind a bucket straight into another project's uploads.", @@ -2540,6 +2541,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "minResources": { "memoryMb": 4096, "cpuCores": 2 @@ -2719,6 +2721,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "minResources": { "memoryMb": 16384, "cpuCores": 4 @@ -3497,6 +3500,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "id": "redis", "name": "Valkey (Redis)", "description": "In-memory data store for caching, sessions, rate limits, and queues — Valkey, the open-source Redis fork. Drop-in Redis-compatible: point any redis client at it. Ships with RedisInsight, a browser UI that arrives already connected to this instance.", @@ -3975,6 +3979,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "id": "clickhouse", "name": "ClickHouse", "description": "The columnar SQL database for analytics — billions of rows scanned per second. Ships with the CH-UI console, so you get a SQL editor, schema browser and dashboards the moment it installs: sign in with the ClickHouse user and password below, no extra setup.", diff --git a/packages/core/src/apps/catalog.test.ts b/packages/core/src/apps/catalog.test.ts index 33726291a..a696b080d 100644 --- a/packages/core/src/apps/catalog.test.ts +++ b/packages/core/src/apps/catalog.test.ts @@ -25,6 +25,30 @@ describe("app catalog (JSON)", () => { expect(isValidAppTemplate(null)).toBe(false); expect(isValidAppTemplate({ id: "x", name: "X", description: "d", kind: "template", logo: "x", category: "bogus" })).toBe(false); }); + + it("every entry that uses commandArgv/stopGracePeriod declares minEngine >= 0.6.6 (issue #599)", () => { + // `commandArgv` and `stopGracePeriod` were added to the serviceSpec schema + // in commit 550fe22f, released as v0.6.6. Without minEngine >= 0.6.6 on the + // entry, the engine-gate cannot refuse to install the app on a pre-0.6.6 + // engine — the install silently drops the field and the container runs the + // wrong role (PostHog worker, MinIO "sh is not a minio sub-command", …). + const MIN_ENGINE = "0.6.6"; + for (const app of APP_TEMPLATES) { + for (const service of app.services ?? []) { + const usesPostRelease = + service.commandArgv !== undefined || service.stopGracePeriod !== undefined; + if (!usesPostRelease) continue; + expect( + app.minEngine, + `${app.id}/${service.name} uses a post-0.6.6 serviceSpec field but entry has no minEngine — engine gate cannot refuse pre-0.6.6 installs`, + ).toBeDefined(); + expect( + templateEngineOk(app.minEngine, MIN_ENGINE), + `${app.id}/${service.name} declares minEngine=${app.minEngine}, must be >= ${MIN_ENGINE}`, + ).toBe(true); + } + } + }); }); describe("mail has exactly one entry point in the catalog", () => { diff --git a/packages/core/src/apps/catalog/clickhouse.json b/packages/core/src/apps/catalog/clickhouse.json index 81232cdbe..c4e759ffb 100644 --- a/packages/core/src/apps/catalog/clickhouse.json +++ b/packages/core/src/apps/catalog/clickhouse.json @@ -1,6 +1,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "id": "clickhouse", "name": "ClickHouse", "description": "The columnar SQL database for analytics — billions of rows scanned per second. Ships with the CH-UI console, so you get a SQL editor, schema browser and dashboards the moment it installs: sign in with the ClickHouse user and password below, no extra setup.", diff --git a/packages/core/src/apps/catalog/minio.json b/packages/core/src/apps/catalog/minio.json index 715373fc5..58927a4ba 100644 --- a/packages/core/src/apps/catalog/minio.json +++ b/packages/core/src/apps/catalog/minio.json @@ -1,6 +1,7 @@ { "available": true, "verified": true, + "minEngine": "0.6.6", "id": "minio", "name": "MinIO", "description": "S3-compatible object storage with a web console — point any S3 client (aws-cli, SDKs) at it, or bind a bucket straight into another project's uploads.", diff --git a/packages/core/src/apps/catalog/neon.json b/packages/core/src/apps/catalog/neon.json index 949247d1f..9c9c3380b 100644 --- a/packages/core/src/apps/catalog/neon.json +++ b/packages/core/src/apps/catalog/neon.json @@ -1,6 +1,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "minResources": { "memoryMb": 4096, "cpuCores": 2 diff --git a/packages/core/src/apps/catalog/posthog.json b/packages/core/src/apps/catalog/posthog.json index 3552cdd1a..34848f1f0 100644 --- a/packages/core/src/apps/catalog/posthog.json +++ b/packages/core/src/apps/catalog/posthog.json @@ -1,6 +1,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "minResources": { "memoryMb": 16384, "cpuCores": 4 diff --git a/packages/core/src/apps/catalog/redis.json b/packages/core/src/apps/catalog/redis.json index 3f2d64eb5..b869d809e 100644 --- a/packages/core/src/apps/catalog/redis.json +++ b/packages/core/src/apps/catalog/redis.json @@ -1,6 +1,7 @@ { "available": true, "verified": false, + "minEngine": "0.6.6", "id": "redis", "name": "Valkey (Redis)", "description": "In-memory data store for caching, sessions, rate limits, and queues — Valkey, the open-source Redis fork. Drop-in Redis-compatible: point any redis client at it. Ships with RedisInsight, a browser UI that arrives already connected to this instance.",