fix(ci): sanitize commas out of the feature-matrix cache key

fix(ci): sanitize commas out of the feature-matrix cache key

#9 in tonybierman/arium — merged 2026-05-25

What

The feature-matrix jobs each emit a red [failure] annotation:

ValidationError: Key ... v0-rust-features-arium-leptos-ssr,sqlite-... cannot contain commas

Cause: Swatinem/rust-cache@v2 rejects cache keys containing commas, but the shared-key interpolated matrix.features verbatim (e.g. server,sqlite). Result on all 18 combos: cache restore fails (annotation) and the build runs fully uncached.

The jobs still passed, so it was invisible in the check status — just noisy annotations and slow, cache-less matrix builds.

Fix

GitHub Actions expressions have no replace(), so sanitize in a step — expand ${FEATURES//,/-} into a step output and use that as the cache key:

- name: Compute cache key
  id: cache_key
  env:
    FEATURES: ${{ matrix.features }}
  run: echo "key=features-${{ matrix.package }}-${FEATURES//,/-}" >> "$GITHUB_OUTPUT"
- uses: Swatinem/rust-cache@v2
  with:
    shared-key: ${{ steps.cache_key.outputs.key }}

Each feature combo keeps its own cache (e.g. features-arium-leptos-ssr-sqlite); the annotations disappear and the matrix builds are cached again.

Pre-existing issue, unrelated to the access-control gate in #8 — splitting it out as its own change.

🤖 Generated with Claude Code

Last updated 2026-05-26