Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix: wire local packages into the image rebuild graph

Alfredo Lopez31b222d4c64e
diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml
index 578b6c987..71e127677 100644
--- a/.github/workflows/build-publish.yml
+++ b/.github/workflows/build-publish.yml
@@ -136,9 +136,11 @@ jobs:
- 'packages/workflow-recipe-capability-policy/**'
- 'packages/image-policy/**'
- 'packages/network-policy-core/**'
+ - 'packages/codex-catalog-projection/**'
mcp-host:
- 'mcp-host/**'
- 'packages/llm-provider-attempt-contract/**'
+ - 'packages/codex-catalog-projection/**'
mcp-proxy:
- 'mcp-proxy/**'
gfs-controller:
@@ -157,6 +159,8 @@ jobs:
- 'packages/workflow-recipe-capability-policy/**'
- 'packages/image-policy/**'
- 'packages/network-policy-core/**'
+ - 'packages/llm-provider-attempt-contract/**'
+ - 'packages/codex-catalog-projection/**'
- 'scripts/e2e/**'
- 'tests/e2e/fixtures/**'
stdio-bridge:
diff --git a/charts/clerum-crds/crds/workflowrecipe.yaml b/charts/clerum-crds/crds/workflowrecipe.yaml
index 48d0d588e..d5f1362b7 100644
--- a/charts/clerum-crds/crds/workflowrecipe.yaml
+++ b/charts/clerum-crds/crds/workflowrecipe.yaml
@@ -2169,8 +2169,10 @@ spec:
bootstrapContractVersion:
type: integer
# v2 = static-credential SDK bootstrap; v3 = Codex
- # reservation-only binding. WRC persists 3 for
- # spec.agent.provider=codex-subscription.
+ # reservation-only binding. WRC persists 3 when the
+ # eager-resolved agent provider is codex-subscription:
+ # spec.agent, or — when spec.agent is absent — the
+ # first step that declares a complete agent.
enum: [2, 3]
bootstrapPodUid:
type: string
diff --git a/deploy/images.json b/deploy/images.json
index ee8332590..9d9359f2a 100644
--- a/deploy/images.json
+++ b/deploy/images.json
@@ -56,7 +56,8 @@
"host-context-controller/**",
"packages/workflow-recipe-capability-policy/**",
"packages/image-policy/**",
- "packages/network-policy-core/**"
+ "packages/network-policy-core/**",
+ "packages/codex-catalog-projection/**"
],
"published": true,
"deployed_to_minikube": true
@@ -65,7 +66,11 @@
"name": "mcp-host",
"path": "mcp-host",
"rooted": true,
- "source_paths": ["mcp-host/**", "packages/llm-provider-attempt-contract/**"],
+ "source_paths": [
+ "mcp-host/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**"
+ ],
"published": true,
"deployed_to_minikube": true
},
@@ -74,7 +79,11 @@
"path": "mcp-host",
"dockerfile": "Dockerfile.slim",
"rooted": true,
- "source_paths": ["mcp-host/**", "packages/llm-provider-attempt-contract/**"],
+ "source_paths": [
+ "mcp-host/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**"
+ ],
"published": true,
"deployed_to_minikube": true
},
@@ -83,7 +92,11 @@
"path": "mcp-host",
"dockerfile": "Dockerfile.full",
"rooted": true,
- "source_paths": ["mcp-host/**", "packages/llm-provider-attempt-contract/**"],
+ "source_paths": [
+ "mcp-host/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**"
+ ],
"published": true,
"deployed_to_minikube": true
},
@@ -92,7 +105,11 @@
"path": "mcp-host",
"dockerfile": "Dockerfile.desktop",
"rooted": true,
- "source_paths": ["mcp-host/**", "packages/llm-provider-attempt-contract/**"],
+ "source_paths": [
+ "mcp-host/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**"
+ ],
"published": true,
"deployed_to_minikube": false
},
@@ -143,6 +160,8 @@
"packages/workflow-recipe-capability-policy/**",
"packages/image-policy/**",
"packages/network-policy-core/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**",
"scripts/e2e/**",
"tests/e2e/fixtures/**"
],
@@ -161,6 +180,8 @@
"packages/workflow-recipe-capability-policy/**",
"packages/image-policy/**",
"packages/network-policy-core/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**",
"scripts/e2e/**",
"tests/e2e/fixtures/**"
],
@@ -178,6 +199,8 @@
"packages/workflow-recipe-capability-policy/**",
"packages/image-policy/**",
"packages/network-policy-core/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**",
"scripts/e2e/**",
"tests/e2e/fixtures/**"
],
@@ -196,6 +219,8 @@
"packages/workflow-recipe-capability-policy/**",
"packages/image-policy/**",
"packages/network-policy-core/**",
+ "packages/llm-provider-attempt-contract/**",
+ "packages/codex-catalog-projection/**",
"scripts/e2e/**",
"tests/e2e/fixtures/**"
],
diff --git a/scripts/tests/test-images-manifest.sh b/scripts/tests/test-images-manifest.sh
index 1e96d1dd0..dc951d583 100755
--- a/scripts/tests/test-images-manifest.sh
+++ b/scripts/tests/test-images-manifest.sh
@@ -662,14 +662,18 @@ assert_llm_provider_attempt_contract_change_rebuilds_consumers() {
const wfPath = "'"$REPO_ROOT"'/.github/workflows/build-publish.yml"
const wf = fs.readFileSync(wfPath, "utf8")
const sourcePath = "packages/llm-provider-attempt-contract/**"
- const expectedFilters = ["codex-llm-proxy", "control-api", "mcp-host"]
+ const expectedFilters = ["codex-llm-proxy", "control-api", "mcp-host", "workflow-recipes"]
const expectedImages = [
+ "clerum-workflow-base",
"codex-llm-proxy",
"control-api",
"mcp-host",
"mcp-host-desktop",
"mcp-host-full",
"mcp-host-slim",
+ "workflow-coordinator",
+ "workflow-recipes",
+ "workflow-snippet-runner",
]
const filtersMatch = wf.match(/filters: \|\n([\s\S]*?)\n\n {2}build-push:/)
@@ -735,12 +739,115 @@ assert_llm_provider_attempt_contract_change_rebuilds_consumers() {
if [ "$rc" -ne 0 ]; then
fail "llm-provider-attempt-contract changed-path contract parse failed: $output"
elif [ -z "$output" ]; then
- pass "a provider-attempt-contract change rebuilds Control API, mcp-host variants, and the proxy"
+ pass "a provider-attempt-contract change rebuilds Control API, mcp-host variants, the proxy, and the workflow-recipes family"
else
fail "llm-provider-attempt-contract changed-path contract failed: $output"
fi
}
+# assert_source_paths_match_filters only proves the two sides AGREE; it passes
+# when a shared package is absent from both, which is exactly how
+# codex-catalog-projection stayed invisible to the rebuild graph while HCC,
+# mcp-host, and WRC all baked it into their images. This case pins the
+# consumer set itself, so dropping the path from the graph fails loudly.
+#
+# clerum-workflow-base is in expectedImages even though packages/workflow-sdk/
+# Dockerfile.base does not COPY the package: the four WRC-family images share
+# the single `workflow-recipes` filter, and assert_source_paths_match_filters
+# demands each image's source_paths equal that filter's list exactly. The
+# filter, not the image, is the smallest unit this manifest can express, so
+# the family deliberately over-rebuilds (clerum-workflow-base already carries
+# packages/image-policy/** and scripts/e2e/** on the same terms).
+assert_codex_catalog_projection_change_rebuilds_consumers() {
+ local output rc
+ output="$(node -e '
+ import("'"$REPO_ROOT"'/scripts/release/images-manifest.mjs").then(async m => {
+ const fs = await import("node:fs")
+ const wfPath = "'"$REPO_ROOT"'/.github/workflows/build-publish.yml"
+ const wf = fs.readFileSync(wfPath, "utf8")
+ const sourcePath = "packages/codex-catalog-projection/**"
+ const expectedFilters = ["host-context-controller", "mcp-host", "workflow-recipes"]
+ const expectedImages = [
+ "clerum-workflow-base",
+ "host-context-controller",
+ "mcp-host",
+ "mcp-host-desktop",
+ "mcp-host-full",
+ "mcp-host-slim",
+ "workflow-coordinator",
+ "workflow-recipes",
+ "workflow-snippet-runner",
+ ]
+
+ const filtersMatch = wf.match(/filters: \|\n([\s\S]*?)\n\n {2}build-push:/)
+ if (!filtersMatch) {
+ console.log(`PARSE_ERROR: could not find the paths-filter filters block in ${wfPath}`)
+ process.exit(1)
+ }
+ const filters = {}
+ let currentKey = null
+ for (const line of filtersMatch[1].split("\n")) {
+ if (!line.trim()) continue
+ const keyMatch = line.match(/^\s*([\w.-]+):\s*$/)
+ const pathMatch = line.match(/^\s*-\s*\x27([^\x27]+)\x27\s*$/)
+ if (keyMatch) {
+ currentKey = keyMatch[1]
+ filters[currentKey] = []
+ } else if (pathMatch && currentKey) {
+ filters[currentKey].push(pathMatch[1])
+ }
+ }
+
+ const sectionMatch = wf.match(/include:\n([\s\S]*?)\n {4}steps:/)
+ if (!sectionMatch) {
+ console.log(`PARSE_ERROR: could not find the build-push matrix section in ${wfPath}`)
+ process.exit(1)
+ }
+ const imageFilterKeys = {}
+ for (const block of sectionMatch[1].split(/\n(?=\s*- image:)/)) {
+ const image = block.match(/- image:\s*(\S+)/)?.[1]
+ if (!image) continue
+ const changedKey = block.match(/\n\s*changed:\s*\$\{\{\s*needs\.detect\.outputs\.([\w.-]+)\s*\}\}/)?.[1]
+ if (changedKey) imageFilterKeys[image] = changedKey
+ }
+
+ const problems = []
+ const filterKeys = Object.entries(filters)
+ .filter(([, paths]) => paths.includes(sourcePath))
+ .map(([key]) => key)
+ .sort()
+ if (filterKeys.join(",") !== expectedFilters.join(",")) {
+ problems.push(`filters are ${filterKeys.join(",") || "<none>"}, expected ${expectedFilters.join(",")}`)
+ }
+ const selectedImages = Object.entries(imageFilterKeys)
+ .filter(([, filterKey]) => filterKeys.includes(filterKey))
+ .map(([image]) => image)
+ .sort()
+ if (selectedImages.join(",") !== expectedImages.join(",")) {
+ problems.push(`selected images are ${selectedImages.join(",") || "<none>"}, expected ${expectedImages.join(",")}`)
+ }
+ for (const name of expectedImages) {
+ const image = m.IMAGES.find(item => item.name === name)
+ if (!image) problems.push(`${name} has no manifest row`)
+ else if (!image.source_paths?.includes(sourcePath)) {
+ problems.push(`${name} does not mirror ${sourcePath} in source_paths`)
+ }
+ }
+ console.log(problems.join("; "))
+ }).catch(err => {
+ console.log(`PARSE_ERROR: ${err.message}`)
+ process.exit(1)
+ })' 2>&1)"
+ rc=$?
+ if [ "$rc" -ne 0 ]; then
+ fail "codex-catalog-projection changed-path contract parse failed: $output"
+ elif [ -z "$output" ]; then
+ pass "a codex-catalog-projection change rebuilds HCC, mcp-host variants, and the workflow-recipes family"
+ else
+ fail "codex-catalog-projection changed-path contract failed: $output"
+ fi
+}
+
# THREE copies of the 28-image list exist in build-publish.yml, not two:
# build-push's `image:` matrix dimension (the array that, crossed with
# `arch`, produces the 56 base combinations), build-push's `include:` list
@@ -1232,6 +1339,7 @@ assert_source_paths_match_filters
assert_network_policy_core_change_rebuilds_all_consumers
assert_display_field_change_rebuilds_both_consumers
assert_llm_provider_attempt_contract_change_rebuilds_consumers
+assert_codex_catalog_projection_change_rebuilds_consumers
assert_all_three_image_lists_agree
assert_the_verify_set_splits_on_published_not_on_mode
assert_the_default_ghcr_verify_set_omits_only_the_e2e_fixtures