From 2930980403466449484dabd98560d2a417568562 Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Mon, 30 Nov 2026 12:39:04 -0800 Subject: [PATCH 1/6] ci(compat-matrix): report engine builds and watch the current Adobe patch The Adobe legs ran builds baked into the images, and nothing said which build a green leg actually used, so the matrix could be green while the patch users run was broken (#4715; CF-4234761 reached users that way). Record the engine build each leg starts (`box server info`'s engineVersion) in the job, per-leg and matrix summaries, and add an observational workflow that builds the newest Adobe 2023/2025 patch from ForgeBox and runs the core SQLite suite there. The watch is a separate, continue-on-error workflow linked from every matrix summary, so a red result is visible but cannot fail a PR or the release gate. Patches proven incompatible are recorded with evidence and a recheck date in tools/docker/adobe-patch-known-bad.json and report as KNOWN-BAD. u26/u14 are recorded there: the masked-where ReReplace path in model/sql.cfm corrupts `username='...'` into `username1?8`, so the suite 500s on those patches while the pinned u11/u06 legs stay green. Document the monthly refresh policy for the Adobe pins in .ai/wheels/testing/adobe-engine-pins.md. Signed-off-by: Peter Amiri --- .ai/wheels/testing/adobe-engine-pins.md | 76 ++++++++++ .github/workflows/adobe-patch-watch.yml | 179 ++++++++++++++++++++++++ .github/workflows/compat-matrix.yml | 42 ++++++ CLAUDE.md | 1 + tools/docker/adobe-patch-known-bad.json | 19 +++ tools/docker/adobe2023/Dockerfile | 6 +- tools/docker/adobe2025/Dockerfile | 6 +- 7 files changed, 327 insertions(+), 2 deletions(-) create mode 100644 .ai/wheels/testing/adobe-engine-pins.md create mode 100644 .github/workflows/adobe-patch-watch.yml create mode 100644 tools/docker/adobe-patch-known-bad.json diff --git a/.ai/wheels/testing/adobe-engine-pins.md b/.ai/wheels/testing/adobe-engine-pins.md new file mode 100644 index 0000000000..3304fc45d9 --- /dev/null +++ b/.ai/wheels/testing/adobe-engine-pins.md @@ -0,0 +1,76 @@ +# Adobe engine pins and current-patch observation + +The compatibility matrix does **not** track Adobe's latest patch by itself. Each +Adobe image is built from a pinned `cfengine` in two places: + +| image | `ARG CFENGINE` default (Dockerfile) | `server.json` `app.cfengine` | last refreshed | +|---|---|---|---| +| `tools/docker/adobe2023` | `adobe@2023.0.11+330706` | same | 2026-11-30 | +| `tools/docker/adobe2025` | `adobe@2025.0.06+331564` | same | 2026-11-30 | + +Both are wired to the same value; changing one without the other is a bug. +`tools/docker/adobe-patch-known-bad.json` records patches that the observational +watch has proven incompatible with Wheels, with evidence and a recheck date. + +## Why "green" must name the build + +An old pin means the matrix can be green while the patch users actually run is +broken — that is how the CF-4234761 replacement-escape change reached users +(#4649, #4715). Two mechanisms fix that: + +1. **Every gating leg reports its build.** A `Record engine build` step runs + `box server info --json` in the container and writes `engineVersion` to the + job summary, the per-leg summary, and the matrix summary's + **Engine builds observed** table. A green cell therefore means "green on this + build", not "green on some pin". +2. **A non-blocking current-patch watch.** `.github/workflows/adobe-patch-watch.yml` + (weekly, Mondays 09:00 UTC, also `workflow_dispatch`) resolves the newest + `2023.x.y+` and `2025.x.y+` from ForgeBox, builds each image at + that patch with `--build-arg CFENGINE=...`, runs the core SQLite suite, and + reports the build it actually started. Its jobs are `continue-on-error` and it + is a separate workflow, so a red result cannot fail a PR or the release gate. + Every matrix summary links to it. A red *unknown* patch is labelled + "not a known-bad patch; treat as Adobe-changed-or-Wheels-broke"; a patch in + `adobe-patch-known-bad.json` reports `KNOWN-BAD (recheck )` and stays + non-blocking. + +## Refresh policy (do not let a pin age again) + +Run this on the **first business day of each month** (and whenever Adobe ships a +security update): + +1. Resolve the newest patch for each major: + ```bash + curl -s "https://forgebox.io/api/v1/entry/adobe/versions?maxRows=200" \ + | jq -r '.data[].version' \ + | grep -E '^202[35]\.' | sort -V | tail -20 + ``` +2. In `tools/docker/adobe2023` and `tools/docker/adobe2025`, update **both** + `ARG CFENGINE=adobe@` and `"cfengine":"adobe@"`. +3. Rebuild and run the SQLite leg for each bumped engine: + ```bash + bash tools/test-matrix.sh --rebuild adobe2023 sqlite + bash tools/test-matrix.sh --rebuild adobe2025 sqlite + ``` + (Cold Adobe starts take several minutes; `tools/test-matrix.sh`'s local + readiness budget can expire while the engine installs its CFPM packages — + re-run once the container answers 200.) +4. Green: update the table above and remove any `adobe-patch-known-bad.json` + entry for that engine. Red: do **not** re-pin away the failure — record it in + `adobe-patch-known-bad.json` with the failing spec/line, the build, and a + recheck date (max 30 days), and open an issue if it is a Wheels-side break. +5. Dispatch `adobe-patch-watch.yml` for the engine you bumped and confirm the + summary names the new build. + +### Current known-bad (2026-11-30) + +| engine | patch | evidence | recheck | +|---|---|---|---| +| adobe2023 | `2023.0.26+331018` | `GET /wheels/core/tests?db=sqlite&format=json` → HTTP 500 at `vendor/wheels/model/sql.cfm` (`Wheels.UnbindableWhereValue` path). Instrumented stage-1 log on an image rebuilt at this patch: input `username=''` → `stage1=[username1?8]` instead of `username=?`. The same instrumentation on the pinned u11 build returns `username=?`. | 2026-12-15 | +| adobe2025 | `2025.0.14+332029` | Same suite failure at the same `sql.cfm` path on an image rebuilt at this patch. | 2026-12-15 | + +This is a **Wheels/Adobe-patch incompatibility, not an Adobe outage**: the +masked-where `ReReplace(..., "\1?\8", "all")` path in +`vendor/wheels/model/sql.cfm` produces a corrupted element on these patches, so +the where parser rejects it. Users on those patches hit it; the gating matrix +cannot see it because its images predate the change. diff --git a/.github/workflows/adobe-patch-watch.yml b/.github/workflows/adobe-patch-watch.yml new file mode 100644 index 0000000000..36e5671122 --- /dev/null +++ b/.github/workflows/adobe-patch-watch.yml @@ -0,0 +1,179 @@ +name: Adobe current-patch watch + +# Observational, NOT a gate (#4715). The compat matrix pins the Adobe builds +# baked into the images; those pins age, and an Adobe patch can change engine +# behaviour (e.g. the CF-4234761 replacement-escape change) while the gating +# legs stay green. This workflow builds each Adobe image at the CURRENT +# ForgeBox patch, runs the core SQLite suite, and reports the build it ran. +# It runs on its own schedule and its jobs are continue-on-error, so a red +# result is visible without blocking any PR. Known-bad patches are listed with +# their evidence and a recheck date in tools/docker/adobe-patch-known-bad.json +# and report as KNOWN-BAD instead of a fresh failure. + +on: + schedule: + - cron: '0 9 * * 1' # Mondays 09:00 UTC + workflow_dispatch: + inputs: + engine: + description: 'adobe2023, adobe2025, or blank for both' + type: string + default: '' + +permissions: + contents: read + +jobs: + resolve: + name: Resolve current Adobe patches + runs-on: ubuntu-24.04 + outputs: + matrix: ${{ steps.resolve.outputs.matrix }} + steps: + - name: Resolve the newest patch from ForgeBox + id: resolve + env: + WANT: ${{ inputs.engine }} + run: | + python3 - <<'PY' >> "$GITHUB_OUTPUT" + import json, os, re, urllib.request + want = os.environ.get("WANT", "").strip() + with urllib.request.urlopen("https://forgebox.io/api/v1/entry/adobe/versions?maxRows=200") as r: + versions = [v["version"] for v in json.load(r)["data"]] + def key(v): + return tuple(int(x) for x in v.split("+")[0].split(".")) + include = [] + for engine, major in (("adobe2023", "2023"), ("adobe2025", "2025")): + if want and engine != want: + continue + cand = [v for v in versions if re.fullmatch(major + r"\.\d+\.\d+\+\d+", v)] + if cand: + include.append({"engine": engine, "version": max(cand, key=key)}) + print("matrix=" + json.dumps({"include": include})) + PY + + observe: + name: "Adobe current patch (observational): ${{ matrix.engine }}" + needs: resolve + if: needs.resolve.outputs.matrix != '' + continue-on-error: true + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.resolve.outputs.matrix) }} + runs-on: ubuntu-24.04 + env: + ENGINE: ${{ matrix.engine }} + VERSION: ${{ matrix.version }} + steps: + - uses: actions/checkout@v5 + + - name: Point this throwaway checkout at the current patch + run: | + python3 - <<'PY' + import json, os + engine, version = os.environ["ENGINE"], os.environ["VERSION"] + path = f"tools/docker/{engine}/server.json" + with open(path) as f: + data = json.load(f) + data["app"]["cfengine"] = f"adobe@{version}" + with open(path, "w") as f: + json.dump(data, f, indent="\t") + PY + git diff --stat + + - name: Build and start at ${{ matrix.version }} + run: | + docker compose build --build-arg "CFENGINE=adobe@${VERSION}" "$ENGINE" + docker compose up -d "$ENGINE" + + - name: Run the suite and report the build + id: suite + run: | + case "$ENGINE" in + adobe2023) PORT=62023 ;; + adobe2025) PORT=62025 ;; + *) echo "::error::unknown engine $ENGINE"; exit 2 ;; + esac + CONTAINER="wheels-${ENGINE}-1" + READY=false + for i in $(seq 1 120); do + CODE=$(curl -s -o /dev/null --max-time 8 -w '%{http_code}' "http://localhost:${PORT}/" 2>/dev/null || true) + if [ "$CODE" = "200" ]; then READY=true; break; fi + sleep 10 + done + BUILD="unknown" + if docker inspect "$CONTAINER" >/dev/null 2>&1; then + BUILD=$(docker exec "$CONTAINER" box server info --json 2>/dev/null \ + | python3 -c 'import json,sys; print(json.load(sys.stdin).get("engineVersion","unknown"))' 2>/dev/null || echo unknown) + fi + echo "build=${BUILD}" >> "$GITHUB_OUTPUT" + { + echo "### Adobe current-patch watch: ${ENGINE}" + echo "" + echo "| Field | Value |" + echo "|-------|-------|" + echo "| Requested patch | \`adobe@${VERSION}\` |" + echo "| Engine build actually started | \`${BUILD}\` |" + } >> "$GITHUB_STEP_SUMMARY" + + if [ "$READY" != "true" ]; then + echo "| Suite | :x: engine never became ready (last HTTP ${CODE:-000}) |" >> "$GITHUB_STEP_SUMMARY" + docker logs "$CONTAINER" 2>&1 | tail -50 || true + exit 1 + fi + + curl -s --max-time 900 "http://localhost:${PORT}/wheels/core/tests?db=sqlite&format=json" -o /tmp/result.json || true + RESULT=$(python3 - <<'PY' + import json + try: + d = json.load(open("/tmp/result.json")) + except Exception: + print("UNPARSEABLE") + raise SystemExit(0) + print(f"{d.get('totalPass', 0)} {d.get('totalFail', 0)} {d.get('totalError', 0)} {d.get('location', {}).get('template', '')}") + PY + ) + PASS=$(echo "$RESULT" | awk '{print $1}') + FAIL=$(echo "$RESULT" | awk '{print $2}') + ERROR=$(echo "$RESULT" | awk '{print $3}') + WHERE=$(echo "$RESULT" | cut -d' ' -f4-) + echo "Result: pass=${PASS} fail=${FAIL} error=${ERROR} where=${WHERE}" + echo "| Suite | pass=${PASS}, fail=${FAIL}, error=${ERROR} |" >> "$GITHUB_STEP_SUMMARY" + + KNOWN=$(python3 - "$ENGINE" "$VERSION" <<'PY' + import json, sys + engine, version = sys.argv[1], sys.argv[2] + try: + data = json.load(open("tools/docker/adobe-patch-known-bad.json")) + except Exception: + print("") + raise SystemExit(0) + entry = data.get(engine, {}).get(version) + if entry: + print(f"{entry.get('recheck', '')}|{entry.get('reason', '')}") + PY + ) + if [ "$FAIL" != "0" ] || [ "$ERROR" != "0" ] || [ "$RESULT" = "UNPARSEABLE" ]; then + if [ -n "$KNOWN" ]; then + RECHECK=${KNOWN%%|*} + REASON=${KNOWN#*|} + echo "::warning::${ENGINE} ${BUILD}: suite failed but this patch is listed known-bad (recheck ${RECHECK}): ${REASON}" + echo "| Verdict | :warning: KNOWN-BAD (recheck ${RECHECK}) |" >> "$GITHUB_STEP_SUMMARY" + echo "| Reason | ${REASON} |" >> "$GITHUB_STEP_SUMMARY" + exit 0 + fi + echo "::error::${ENGINE} ${BUILD}: suite failed on the current patch (pass=${PASS} fail=${FAIL} error=${ERROR} where=${WHERE}) — not listed known-bad" + echo "| Verdict | :x: FAILED — not a known-bad patch; treat as Adobe-changed-or-Wheels-broke and investigate |" >> "$GITHUB_STEP_SUMMARY" + exit 1 + fi + echo "| Verdict | :white_check_mark: green on the current patch |" >> "$GITHUB_STEP_SUMMARY" + + - name: Upload result + if: always() + uses: actions/upload-artifact@v6 + with: + name: adobe-patch-watch-${{ matrix.engine }}-${{ matrix.version }} + path: | + /tmp/result.json + tools/docker/adobe-patch-known-bad.json + if-no-files-found: ignore diff --git a/.github/workflows/compat-matrix.yml b/.github/workflows/compat-matrix.yml index 086bc762f3..a6b04c1841 100644 --- a/.github/workflows/compat-matrix.yml +++ b/.github/workflows/compat-matrix.yml @@ -423,6 +423,29 @@ jobs: exit 1 fi + # The summary must say which engine build each leg actually ran, not only + # the pin we configured (#4715). `box server info` reports the engine + # CommandBox resolved in the container; it runs even when readiness failed + # so a red leg still names its build. + - name: Record engine build + id: engine + if: always() + env: + CFENGINE: ${{ matrix.cfengine }} + run: | + CONTAINER="wheels-${CFENGINE}-1" + BUILD="unknown" + if docker inspect "$CONTAINER" >/dev/null 2>&1; then + BUILD=$(docker exec "$CONTAINER" box server info --json 2>/dev/null \ + | python3 -c 'import json,sys; print(json.load(sys.stdin).get("engineVersion","unknown"))' 2>/dev/null || echo unknown) + fi + echo "build=${BUILD}" >> "$GITHUB_OUTPUT" + echo "Engine build: \`${CFENGINE}\` \`${BUILD}\`" >> "$GITHUB_STEP_SUMMARY" + mkdir -p /tmp/test-results + printf '{"engine":"%s","database":"%s","build":"%s"}\n' \ + "${CFENGINE}" "${{ matrix.database }}" "${BUILD}" \ + > "/tmp/test-results/${CFENGINE}-${{ matrix.database }}-build.json" + - name: Patch Adobe CF serialfilter.txt for Oracle JDBC if: (matrix.cfengine == 'adobe2023' || matrix.cfengine == 'adobe2025') && matrix.database == 'oracle' run: | @@ -648,6 +671,8 @@ jobs: DB="${{ matrix.database }}" echo "### ${{ matrix.cfengine }} + ${DB} Test Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY + echo "Engine build: \`${{ steps.engine.outputs.build }}\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY echo "| Database | Result |" >> $GITHUB_STEP_SUMMARY echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY @@ -915,6 +940,23 @@ jobs: echo "MATRIX_GRID_EOF" } >> "$GITHUB_OUTPUT" + - name: Record engine builds in the summary + if: always() + run: | + { + echo "" + echo "### Engine builds observed" + echo "" + echo "| Engine | Build |" + echo "|--------|-------|" + for f in results/*/*-build.json; do + [ -f "$f" ] || continue + jq -r '"| `" + .engine + "` | `" + .build + "` |"' "$f" + done | sort -u + echo "" + echo "**Adobe current-patch watch (non-blocking, not a gate):** [latest run](${{ github.server_url }}/${{ github.repository }}/actions/workflows/adobe-patch-watch.yml) — observes the newest Adobe patch separately from the gating legs above." + } >> "$GITHUB_STEP_SUMMARY" + - name: Post matrix to PR if: github.event_name == 'pull_request' env: diff --git a/CLAUDE.md b/CLAUDE.md index 7cf6464283..1a9f7c7708 100755 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -551,6 +551,7 @@ recoverable from reading the code: - [.ai/wheels/wheels-bot.md](.ai/wheels/wheels-bot.md) — Bot architecture (extracted from CLAUDE.md) - [.ai/wheels/testing/browser-testing.md](.ai/wheels/testing/browser-testing.md) — Browser DSL (extracted from CLAUDE.md) - [.ai/wheels/testing/onboarding-harness.md](.ai/wheels/testing/onboarding-harness.md) — Fresh-install simulation +- [.ai/wheels/testing/adobe-engine-pins.md](.ai/wheels/testing/adobe-engine-pins.md) — Adobe image pins, current-patch watch, refresh policy (#4715) - [.ai/wheels/troubleshooting/shared-dev-databases.md](.ai/wheels/troubleshooting/shared-dev-databases.md) — Orphan-version handling + `migrate doctor` / `forget` / `pretend` reconciliation commands (#2780) **External:** user-facing guides at `web/sites/guides/src/content/docs/v4-0-0/` (deployment, command-line-tools/mcp-integration, etc.) — these ship to guides.wheels.dev. Use when you need the version Wheels users read. diff --git a/tools/docker/adobe-patch-known-bad.json b/tools/docker/adobe-patch-known-bad.json new file mode 100644 index 0000000000..65b79c632c --- /dev/null +++ b/tools/docker/adobe-patch-known-bad.json @@ -0,0 +1,19 @@ +{ + "_note": "Versions listed here are observed by adobe-patch-watch.yml but their suite failure is expected and does not turn the observational job red. Every entry must carry the evidence and a recheck date; recheck means re-run the watch and either delete the entry (green) or update it with new evidence.", + "adobe2023": { + "2023.0.26+331018": { + "status": "known-bad", + "recheck": "2026-12-15", + "reason": "Wheels' where-clause masking is corrupted on Adobe CF 2023 u26: `ReReplace(..., \"\\1?\\8\", \"all\")` in vendor/wheels/model/sql.cfm:1438 returns `username1?8` for a masked `username='...'` condition instead of `username=?`, so the where parser throws Wheels.UnbindableWhereValue.", + "evidence": "Local adobe2023 image rebuilt with adobe@2023.0.26+331018 (server.json + Dockerfile ARG), sqlite; GET /wheels/core/tests?db=sqlite&format=json -> HTTP 500 at vendor/wheels/model/sql.cfm:1548 (Wheels.UnbindableWhereValue path). Instrumented stage-1 log: input=[username='746f6e7970'] stage1=[username1?8]. The same instrumentation on the pinned u11 build returns username=?." + } + }, + "adobe2025": { + "2025.0.14+332029": { + "status": "known-bad", + "recheck": "2026-12-15", + "reason": "Same masked-where corruption as adobe2023 u26 on Adobe CF 2025 u14.", + "evidence": "Local adobe2025 image rebuilt with adobe@2025.0.14+332029; GET /wheels/core/tests?db=sqlite&format=json -> HTTP 500 at vendor/wheels/model/sql.cfm:1548 (Wheels.UnbindableWhereValue path)." + } + } +} diff --git a/tools/docker/adobe2023/Dockerfile b/tools/docker/adobe2023/Dockerfile index 49a38e077c..0a788361c8 100644 --- a/tools/docker/adobe2023/Dockerfile +++ b/tools/docker/adobe2023/Dockerfile @@ -14,7 +14,11 @@ ENV ENV_MODE "remote" ENV BOX_SERVER_CFCONFIGFILE "/wheels-test-suite/CFConfig.json" ENV BOX_SERVER_PROFILE "none" ENV BOX_INSTALL TRUE -ENV BOX_SERVER_APP_CFENGINE "adobe@2023.0.11+330706" +# The pinned engine is the default; adobe-patch-watch.yml overrides it with +# --build-arg CFENGINE=adobe@ to observe the patch users run +# without moving the gating matrix (tools/docker/adobe-patch-known-bad.json). +ARG CFENGINE=adobe@2023.0.11+330706 +ENV BOX_SERVER_APP_CFENGINE "${CFENGINE}" # Set working directory WORKDIR ${APP_DIR} diff --git a/tools/docker/adobe2025/Dockerfile b/tools/docker/adobe2025/Dockerfile index 1b6d114c96..b9a3e74c2a 100644 --- a/tools/docker/adobe2025/Dockerfile +++ b/tools/docker/adobe2025/Dockerfile @@ -14,7 +14,11 @@ ENV ENV_MODE "remote" ENV BOX_SERVER_CFCONFIGFILE "/wheels-test-suite/CFConfig.json" ENV BOX_SERVER_PROFILE "none" ENV BOX_INSTALL TRUE -ENV BOX_SERVER_APP_CFENGINE "adobe@2025.0.06+331564" +# The pinned engine is the default; adobe-patch-watch.yml overrides it with +# --build-arg CFENGINE=adobe@ to observe the patch users run +# without moving the gating matrix (tools/docker/adobe-patch-known-bad.json). +ARG CFENGINE=adobe@2025.0.06+331564 +ENV BOX_SERVER_APP_CFENGINE "${CFENGINE}" # Set working directory WORKDIR ${APP_DIR} From 081f54d9ddcbdbd436d4266fb745036317e83986 Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Mon, 30 Nov 2026 12:39:14 -0800 Subject: [PATCH 2/6] ci(adobe): validate the patch watch on workflow edits A brand-new workflow cannot be dispatched before it exists on the default branch. Trigger the observer from pull_request only when its own file or the known-bad list changes, so this PR produces the first observation and later edits are self-validating; ordinary PRs still never run it. Signed-off-by: Peter Amiri --- .github/workflows/adobe-patch-watch.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/adobe-patch-watch.yml b/.github/workflows/adobe-patch-watch.yml index 36e5671122..08749c66a0 100644 --- a/.github/workflows/adobe-patch-watch.yml +++ b/.github/workflows/adobe-patch-watch.yml @@ -13,6 +13,14 @@ name: Adobe current-patch watch on: schedule: - cron: '0 9 * * 1' # Mondays 09:00 UTC + # Also run when this workflow or its known-bad list changes: a new workflow + # cannot be workflow_dispatch-ed before it exists on the default branch, and + # an edit to the observer should be validated by its own run. No other paths, + # so ordinary PRs still do not run it. + pull_request: + paths: + - .github/workflows/adobe-patch-watch.yml + - tools/docker/adobe-patch-known-bad.json workflow_dispatch: inputs: engine: From eb8bde2988c559de8747a17c9343eebe48a25b10 Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Mon, 30 Nov 2026 12:47:52 -0800 Subject: [PATCH 3/6] ci(adobe): treat an empty error envelope as a failed observation A 500 from the suite is a Wheels error envelope with no totals, so pass=0/fail=0/error=0 looked green. Require HTTP 200, at least one passing spec and no error location before calling an observation green, and print the build and known-bad verdict to the job log (not only the step summary). Signed-off-by: Peter Amiri --- .github/workflows/adobe-patch-watch.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adobe-patch-watch.yml b/.github/workflows/adobe-patch-watch.yml index 08749c66a0..b3e556549c 100644 --- a/.github/workflows/adobe-patch-watch.yml +++ b/.github/workflows/adobe-patch-watch.yml @@ -130,7 +130,9 @@ jobs: exit 1 fi - curl -s --max-time 900 "http://localhost:${PORT}/wheels/core/tests?db=sqlite&format=json" -o /tmp/result.json || true + HTTP_CODE=$(curl -s --max-time 900 -o /tmp/result.json -w '%{http_code}' "http://localhost:${PORT}/wheels/core/tests?db=sqlite&format=json" || true) + echo "Engine build: ${BUILD}" + echo "Suite HTTP status: ${HTTP_CODE}" RESULT=$(python3 - <<'PY' import json try: @@ -161,10 +163,14 @@ jobs: print(f"{entry.get('recheck', '')}|{entry.get('reason', '')}") PY ) - if [ "$FAIL" != "0" ] || [ "$ERROR" != "0" ] || [ "$RESULT" = "UNPARSEABLE" ]; then + # A 500 error envelope has no totals at all (pass=0 fail=0 error=0), + # so "no failures" alone is not a green result: require HTTP 200 and at + # least one passing spec. + if [ "$HTTP_CODE" != "200" ] || [ -n "$WHERE" ] || [ "$PASS" -lt 1 ] || [ "$FAIL" != "0" ] || [ "$ERROR" != "0" ] || [ "$RESULT" = "UNPARSEABLE" ]; then if [ -n "$KNOWN" ]; then RECHECK=${KNOWN%%|*} REASON=${KNOWN#*|} + echo "KNOWN-BAD (recheck ${RECHECK}): ${REASON}" echo "::warning::${ENGINE} ${BUILD}: suite failed but this patch is listed known-bad (recheck ${RECHECK}): ${REASON}" echo "| Verdict | :warning: KNOWN-BAD (recheck ${RECHECK}) |" >> "$GITHUB_STEP_SUMMARY" echo "| Reason | ${REASON} |" >> "$GITHUB_STEP_SUMMARY" From 84ea676cfe1161ab9db654848128903c7cfdbd7e Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Mon, 30 Nov 2026 12:55:52 -0800 Subject: [PATCH 4/6] ci(compat-matrix): print the recorded engine build to the job log The summary line alone is not visible in the run log, so a reviewer cannot copy the build a leg ran. Echo it from the build-recording step as well. Signed-off-by: Peter Amiri --- .github/workflows/compat-matrix.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compat-matrix.yml b/.github/workflows/compat-matrix.yml index a6b04c1841..1da6e65146 100644 --- a/.github/workflows/compat-matrix.yml +++ b/.github/workflows/compat-matrix.yml @@ -440,6 +440,7 @@ jobs: | python3 -c 'import json,sys; print(json.load(sys.stdin).get("engineVersion","unknown"))' 2>/dev/null || echo unknown) fi echo "build=${BUILD}" >> "$GITHUB_OUTPUT" + echo "Engine build: ${CFENGINE} ${BUILD}" echo "Engine build: \`${CFENGINE}\` \`${BUILD}\`" >> "$GITHUB_STEP_SUMMARY" mkdir -p /tmp/test-results printf '{"engine":"%s","database":"%s","build":"%s"}\n' \ From d9df93deb09bb64cc528560b6ae07302c323e5ae Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Mon, 30 Nov 2026 21:44:24 -0800 Subject: [PATCH 5/6] fix(ci): enforce known-bad expiry and surface observer failures Review fixes for the Adobe current-patch observer: - a known-bad entry whose recheck date has passed no longer suppresses the failure: the observation fails (and files/updates an issue) instead of turning red into a green KNOWN-BAD forever. A green run with a stale entry warns to remove it. - the resolve job is not continue-on-error while the observation jobs are; the header now says exactly that instead of claiming all jobs are. - drop the paths-limited pull_request trigger: after merge, `gh workflow run adobe-patch-watch.yml --ref ` validates edits without spending two Adobe builds on every PR touching these files. Add an optional exact `version` input for rechecking a known-bad entry. - on a red observation, open or update an `adobe-patch-watch` issue so a permanently red observer is actually surfaced, not just a passive link. - docs: pins were "last reviewed" (not refreshed) on 2026-11-30; name the release manager as the monthly-refresh owner; document the expiry consequence and the dispatch-based recheck. Signed-off-by: Peter Amiri Signed-off-by: Peter Amiri --- .ai/wheels/testing/adobe-engine-pins.md | 25 ++++-- .github/workflows/adobe-patch-watch.yml | 115 ++++++++++++++++++++---- 2 files changed, 119 insertions(+), 21 deletions(-) diff --git a/.ai/wheels/testing/adobe-engine-pins.md b/.ai/wheels/testing/adobe-engine-pins.md index 3304fc45d9..de31434662 100644 --- a/.ai/wheels/testing/adobe-engine-pins.md +++ b/.ai/wheels/testing/adobe-engine-pins.md @@ -3,10 +3,10 @@ The compatibility matrix does **not** track Adobe's latest patch by itself. Each Adobe image is built from a pinned `cfengine` in two places: -| image | `ARG CFENGINE` default (Dockerfile) | `server.json` `app.cfengine` | last refreshed | +| image | `ARG CFENGINE` default (Dockerfile) | `server.json` `app.cfengine` | last reviewed | |---|---|---|---| -| `tools/docker/adobe2023` | `adobe@2023.0.11+330706` | same | 2026-11-30 | -| `tools/docker/adobe2025` | `adobe@2025.0.06+331564` | same | 2026-11-30 | +| `tools/docker/adobe2023` | `adobe@2023.0.11+330706` | same | 2026-11-30 (unchanged; coverage PR only) | +| `tools/docker/adobe2025` | `adobe@2025.0.06+331564` | same | 2026-11-30 (unchanged; coverage PR only) | Both are wired to the same value; changing one without the other is a bug. `tools/docker/adobe-patch-known-bad.json` records patches that the observational @@ -29,15 +29,23 @@ broken — that is how the CF-4234761 replacement-escape change reached users that patch with `--build-arg CFENGINE=...`, runs the core SQLite suite, and reports the build it actually started. Its jobs are `continue-on-error` and it is a separate workflow, so a red result cannot fail a PR or the release gate. - Every matrix summary links to it. A red *unknown* patch is labelled + Every matrix summary links to it. It runs on its schedule and on + `workflow_dispatch` only (no `pull_request` trigger: `gh workflow run + adobe-patch-watch.yml --ref ` validates edits after merge without + spending two Adobe builds on every PR that touches these files). Use + `-f engine=adobe2023 -f version=2023.0.26+331018` to recheck one known-bad + entry against the real registry version. A red *unknown* patch is labelled "not a known-bad patch; treat as Adobe-changed-or-Wheels-broke"; a patch in `adobe-patch-known-bad.json` reports `KNOWN-BAD (recheck )` and stays non-blocking. ## Refresh policy (do not let a pin age again) -Run this on the **first business day of each month** (and whenever Adobe ships a -security update): +**Owner:** the release manager (currently `@bpamiri`) runs this on the **first +business day of each month**, and whenever Adobe ships a security update. If a +month is missed, the weekly observer's expired-known-bad path fails and +opens/updates an `adobe-patch-watch` issue — a missed rotation is visible, not +silent. 1. Resolve the newest patch for each major: ```bash @@ -69,6 +77,11 @@ security update): | adobe2023 | `2023.0.26+331018` | `GET /wheels/core/tests?db=sqlite&format=json` → HTTP 500 at `vendor/wheels/model/sql.cfm` (`Wheels.UnbindableWhereValue` path). Instrumented stage-1 log on an image rebuilt at this patch: input `username=''` → `stage1=[username1?8]` instead of `username=?`. The same instrumentation on the pinned u11 build returns `username=?`. | 2026-12-15 | | adobe2025 | `2025.0.14+332029` | Same suite failure at the same `sql.cfm` path on an image rebuilt at this patch. | 2026-12-15 | +A `recheck` date is a deadline, not a note: once it passes, the observer stops +treating the entry as known-bad (the job goes red and files/updates an issue) +instead of suppressing the failure forever. A green run that still has a +known-bad entry logs a warning to remove the stale entry. + This is a **Wheels/Adobe-patch incompatibility, not an Adobe outage**: the masked-where `ReReplace(..., "\1?\8", "all")` path in `vendor/wheels/model/sql.cfm` produces a corrupted element on these patches, so diff --git a/.github/workflows/adobe-patch-watch.yml b/.github/workflows/adobe-patch-watch.yml index b3e556549c..1de6613bad 100644 --- a/.github/workflows/adobe-patch-watch.yml +++ b/.github/workflows/adobe-patch-watch.yml @@ -5,31 +5,40 @@ name: Adobe current-patch watch # behaviour (e.g. the CF-4234761 replacement-escape change) while the gating # legs stay green. This workflow builds each Adobe image at the CURRENT # ForgeBox patch, runs the core SQLite suite, and reports the build it ran. -# It runs on its own schedule and its jobs are continue-on-error, so a red -# result is visible without blocking any PR. Known-bad patches are listed with -# their evidence and a recheck date in tools/docker/adobe-patch-known-bad.json -# and report as KNOWN-BAD instead of a fresh failure. +# It runs on its own schedule and is a separate workflow, so a red result is +# visible without blocking any PR or the release gate. The OBSERVATION jobs are +# continue-on-error (their red does not fail the workflow); the resolve job is +# not, so an upstream registry outage shows up as one red run that observed +# nothing instead of a silent skip. +# +# Known-bad patches are listed with their evidence and a RECHECK date in +# tools/docker/adobe-patch-known-bad.json. A listed patch reports KNOWN-BAD and +# does not fail the observation; an entry whose recheck date has passed stops +# suppressing the failure (the observation goes red and opens/updates an issue), +# so an old pin cannot stay explained forever. +# +# No pull_request trigger: after merge, `gh workflow run +# adobe-patch-watch.yml --ref ` validates edits to this file or the +# known-bad list, without spending two 5-10 minute Adobe builds on every PR that +# touches them and without putting an unrelated red observer check on such PRs. on: schedule: - cron: '0 9 * * 1' # Mondays 09:00 UTC - # Also run when this workflow or its known-bad list changes: a new workflow - # cannot be workflow_dispatch-ed before it exists on the default branch, and - # an edit to the observer should be validated by its own run. No other paths, - # so ordinary PRs still do not run it. - pull_request: - paths: - - .github/workflows/adobe-patch-watch.yml - - tools/docker/adobe-patch-known-bad.json workflow_dispatch: inputs: engine: description: 'adobe2023, adobe2025, or blank for both' type: string default: '' + version: + description: 'Optional exact patch for --engine, e.g. 2023.0.26+331018 (blank = newest); use to recheck a known-bad entry' + type: string + default: '' permissions: contents: read + issues: write jobs: resolve: @@ -42,10 +51,16 @@ jobs: id: resolve env: WANT: ${{ inputs.engine }} + EXACT: ${{ inputs.version }} run: | python3 - <<'PY' >> "$GITHUB_OUTPUT" - import json, os, re, urllib.request + import json, os, re, sys, urllib.request want = os.environ.get("WANT", "").strip() + exact = os.environ.get("EXACT", "").strip() + if exact and not re.fullmatch(r"\d{4}\.\d+\.\d+\+\d+", exact): + sys.exit(f"::error::version '{exact}' is not a vX.Y.Z+build patch id") + if exact and not want: + sys.exit("::error::version requires engine (adobe2023 or adobe2025)") with urllib.request.urlopen("https://forgebox.io/api/v1/entry/adobe/versions?maxRows=200") as r: versions = [v["version"] for v in json.load(r)["data"]] def key(v): @@ -54,6 +69,9 @@ jobs: for engine, major in (("adobe2023", "2023"), ("adobe2025", "2025")): if want and engine != want: continue + if exact: + include.append({"engine": engine, "version": exact}) + continue cand = [v for v in versions if re.fullmatch(major + r"\.\d+\.\d+\+\d+", v)] if cand: include.append({"engine": engine, "version": max(cand, key=key)}) @@ -163,13 +181,46 @@ jobs: print(f"{entry.get('recheck', '')}|{entry.get('reason', '')}") PY ) + RECHECK="" + if [ -n "$KNOWN" ]; then + RECHECK=${KNOWN%%|*} + fi + RECHECK_STATE="none" + if [ -n "$RECHECK" ]; then + # A recheck date is a deadline, not a note: once it has passed the + # entry stops suppressing the failure, otherwise a stale known-bad + # would turn this red suite green forever and the pin would age in + # the dark again (the exact failure mode this workflow exists for). + RECHECK_STATE=$(python3 - "$RECHECK" <<'PY' + import datetime, sys + try: + due = datetime.date.fromisoformat(sys.argv[1]) + except Exception: + print("invalid") + raise SystemExit(0) + print("expired" if datetime.date.today() > due else "ok") + PY + ) || RECHECK_STATE="invalid" + echo "Known-bad recheck date: ${RECHECK} (${RECHECK_STATE})" + fi + # A 500 error envelope has no totals at all (pass=0 fail=0 error=0), # so "no failures" alone is not a green result: require HTTP 200 and at # least one passing spec. + FAILED=0 if [ "$HTTP_CODE" != "200" ] || [ -n "$WHERE" ] || [ "$PASS" -lt 1 ] || [ "$FAIL" != "0" ] || [ "$ERROR" != "0" ] || [ "$RESULT" = "UNPARSEABLE" ]; then + FAILED=1 + fi + + if [ "$FAILED" = "1" ]; then if [ -n "$KNOWN" ]; then - RECHECK=${KNOWN%%|*} REASON=${KNOWN#*|} + if [ "$RECHECK_STATE" != "ok" ]; then + echo "::error::known-bad entry for ${ENGINE} ${VERSION} is ${RECHECK_STATE} (recheck ${RECHECK:-missing}); it no longer suppresses this failure" + echo "| Verdict | :x: KNOWN-BAD EXPIRED (${RECHECK_STATE}, recheck ${RECHECK:-missing}) — suppression removed |" >> "$GITHUB_STEP_SUMMARY" + echo "| Reason | ${REASON} |" >> "$GITHUB_STEP_SUMMARY" + exit 1 + fi echo "KNOWN-BAD (recheck ${RECHECK}): ${REASON}" echo "::warning::${ENGINE} ${BUILD}: suite failed but this patch is listed known-bad (recheck ${RECHECK}): ${REASON}" echo "| Verdict | :warning: KNOWN-BAD (recheck ${RECHECK}) |" >> "$GITHUB_STEP_SUMMARY" @@ -180,7 +231,41 @@ jobs: echo "| Verdict | :x: FAILED — not a known-bad patch; treat as Adobe-changed-or-Wheels-broke and investigate |" >> "$GITHUB_STEP_SUMMARY" exit 1 fi - echo "| Verdict | :white_check_mark: green on the current patch |" >> "$GITHUB_STEP_SUMMARY" + + if [ -n "$KNOWN" ]; then + echo "::warning::${ENGINE} ${VERSION} is listed known-bad (recheck ${RECHECK}) but the suite is green; remove the stale entry" + echo "| Verdict | :white_check_mark: green, but the known-bad entry is stale — remove it |" >> "$GITHUB_STEP_SUMMARY" + else + echo "| Verdict | :white_check_mark: green on the current patch |" >> "$GITHUB_STEP_SUMMARY" + fi + + # A red observer nobody reads is the failure mode this workflow exists to + # prevent. On an unknown red (or an expired known-bad, which also exits 1) + # open/update a tracking issue so a maintainer is actually told. + - name: Surface the failure as an issue + if: failure() + env: + GH_TOKEN: ${{ github.token }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + set -euo pipefail + LABEL="adobe-patch-watch" + gh label create "$LABEL" --color B60205 \ + --description "Adobe current-patch watch needs attention" --force >/dev/null + TITLE="Adobe patch watch: ${ENGINE} ${VERSION} failing" + BODY="The Adobe current-patch observation failed on \`${ENGINE}\` \`${VERSION}\` (build \`${{ steps.suite.outputs.build }}\`). + + Run: ${RUN_URL} + + This is either an Adobe patch change or a Wheels break — it is not a current known-bad entry (or that entry's recheck date expired). See \`.ai/wheels/testing/adobe-engine-pins.md\` for the refresh/known-bad process." + EXISTING=$(gh issue list --label "$LABEL" --state open --limit 100 \ + --json number,title --jq --arg t "$TITLE" '.[] | select(.title == $t) | .number' | head -1) + if [ -n "$EXISTING" ]; then + gh issue comment "$EXISTING" --body "$BODY" + echo "Commented on existing issue #${EXISTING}" + else + gh issue create --title "$TITLE" --body "$BODY" --label "$LABEL" + fi - name: Upload result if: always() From e50ae907ce081301bce1244eddc9ce40a90f20bd Mon Sep 17 00:00:00 2001 From: Peter Amiri Date: Tue, 1 Dec 2026 00:38:16 -0800 Subject: [PATCH 6/6] fix(ci): make the Adobe watcher's issue surfacing and empty-resolve work `gh issue list --jq` does not accept jq's `--arg`, so the existing-issue probe aborted under `set -e` and the create/comment branch never ran; the observation job is continue-on-error, so the run stayed green with no issue. Pipe the JSON to `jq -r --arg t "$TITLE"` instead, and keep the exact-title match. Reject an empty resolved matrix and validate the `engine` input, so a typo or an upstream listing with no candidate is a red run rather than a green run that observed nothing. Re-add the paths-limited pull_request trigger so an edit to the observer or its known-bad list is validated by a real run (a new workflow cannot be dispatched before it exists on the default branch), and correct the doc line that claimed every job is continue-on-error. Signed-off-by: Peter Amiri --- .ai/wheels/testing/adobe-engine-pins.md | 13 +++++++------ .github/workflows/adobe-patch-watch.yml | 23 ++++++++++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.ai/wheels/testing/adobe-engine-pins.md b/.ai/wheels/testing/adobe-engine-pins.md index de31434662..12454338b2 100644 --- a/.ai/wheels/testing/adobe-engine-pins.md +++ b/.ai/wheels/testing/adobe-engine-pins.md @@ -27,12 +27,13 @@ broken — that is how the CF-4234761 replacement-escape change reached users (weekly, Mondays 09:00 UTC, also `workflow_dispatch`) resolves the newest `2023.x.y+` and `2025.x.y+` from ForgeBox, builds each image at that patch with `--build-arg CFENGINE=...`, runs the core SQLite suite, and - reports the build it actually started. Its jobs are `continue-on-error` and it - is a separate workflow, so a red result cannot fail a PR or the release gate. - Every matrix summary links to it. It runs on its schedule and on - `workflow_dispatch` only (no `pull_request` trigger: `gh workflow run - adobe-patch-watch.yml --ref ` validates edits after merge without - spending two Adobe builds on every PR that touches these files). Use + reports the build it actually started. The observation jobs are `continue-on-error`; the resolve job is not. + It is a separate workflow, so a red result cannot fail a PR or the + release gate. + Every matrix summary links to it. It runs on its schedule, on + `workflow_dispatch`, and on a paths-limited `pull_request` when the observer + or its known-bad list changes (so an edit validates itself; ordinary PRs + never run it). Use `-f engine=adobe2023 -f version=2023.0.26+331018` to recheck one known-bad entry against the real registry version. A red *unknown* patch is labelled "not a known-bad patch; treat as Adobe-changed-or-Wheels-broke"; a patch in diff --git a/.github/workflows/adobe-patch-watch.yml b/.github/workflows/adobe-patch-watch.yml index 1de6613bad..f38e8c54f0 100644 --- a/.github/workflows/adobe-patch-watch.yml +++ b/.github/workflows/adobe-patch-watch.yml @@ -17,14 +17,18 @@ name: Adobe current-patch watch # suppressing the failure (the observation goes red and opens/updates an issue), # so an old pin cannot stay explained forever. # -# No pull_request trigger: after merge, `gh workflow run -# adobe-patch-watch.yml --ref ` validates edits to this file or the -# known-bad list, without spending two 5-10 minute Adobe builds on every PR that -# touches them and without putting an unrelated red observer check on such PRs. +# It also runs on pull_request, but only when THIS workflow or the known-bad +# list changes: an observer edit must be validated by its own run, and a brand +# new workflow cannot be dispatched before it exists on the default branch. The +# paths filter keeps ordinary PRs (and their cost) untouched. on: schedule: - cron: '0 9 * * 1' # Mondays 09:00 UTC + pull_request: + paths: + - .github/workflows/adobe-patch-watch.yml + - tools/docker/adobe-patch-known-bad.json workflow_dispatch: inputs: engine: @@ -57,10 +61,14 @@ jobs: import json, os, re, sys, urllib.request want = os.environ.get("WANT", "").strip() exact = os.environ.get("EXACT", "").strip() + if want and want not in ("adobe2023", "adobe2025"): + sys.exit(f"::error::engine must be adobe2023, adobe2025, or blank; got '{want}'") if exact and not re.fullmatch(r"\d{4}\.\d+\.\d+\+\d+", exact): sys.exit(f"::error::version '{exact}' is not a vX.Y.Z+build patch id") if exact and not want: sys.exit("::error::version requires engine (adobe2023 or adobe2025)") + if exact and want not in ("adobe2023", "adobe2025"): + sys.exit("::error::version requires engine (adobe2023 or adobe2025)") with urllib.request.urlopen("https://forgebox.io/api/v1/entry/adobe/versions?maxRows=200") as r: versions = [v["version"] for v in json.load(r)["data"]] def key(v): @@ -75,6 +83,10 @@ jobs: cand = [v for v in versions if re.fullmatch(major + r"\.\d+\.\d+\+\d+", v)] if cand: include.append({"engine": engine, "version": max(cand, key=key)}) + # A typo or an upstream listing with no usable candidate must be a red + # run, not a green job that observed nothing. + if not include: + sys.exit("::error::resolved no Adobe patch candidates; refusing to run an empty matrix") print("matrix=" + json.dumps({"include": include})) PY @@ -259,7 +271,8 @@ jobs: This is either an Adobe patch change or a Wheels break — it is not a current known-bad entry (or that entry's recheck date expired). See \`.ai/wheels/testing/adobe-engine-pins.md\` for the refresh/known-bad process." EXISTING=$(gh issue list --label "$LABEL" --state open --limit 100 \ - --json number,title --jq --arg t "$TITLE" '.[] | select(.title == $t) | .number' | head -1) + --json number,title \ + | jq -r --arg t "$TITLE" '.[] | select(.title == $t) | .number' | head -1) if [ -n "$EXISTING" ]; then gh issue comment "$EXISTING" --body "$BODY" echo "Commented on existing issue #${EXISTING}"