The SSG page cache keys on .stx files but not on the Crosswind config, so editing config/crosswind.ts produces a stale build with no warning and exit code 0. Every page reports Cached, the emitted stylesheet keeps its old content hash, and the new CSS is silently absent.
This is worse than an ordinary stale cache because the config is where preflights live. A rule added there applies to every page, so the one edit that can least afford to be dropped is the one the cache key ignores.
Reproduce
stx 0.2.188, buddy build --views (SSG).
# 1. warm cache
rm -rf storage/framework/stx/ssg-cache && ./buddy build --views
# 2. add a sentinel rule to any registered preflight in config/crosswind.ts
# e.g. inside a `const SOMETHING: string = ` ... ` ` block that is listed
# in the `preflights: [...]` array
# .stx-cache-repro { color: red; }
# 3. rebuild WITHOUT clearing the cache
./buddy build --viewsObserved:
Success: 24
Cached: 24
css: _stx/crosswind.327d6386.css sentinel present: 0 <-- hash unchangedClearing the cache and rebuilding the identical source proves the config itself is fine:
rm -rf storage/framework/stx/ssg-cache && ./buddy build --views
css: _stx/crosswind.84314cf2.css sentinel present: 1Expected: a change to config/crosswind.ts invalidates the SSG cache for every page, the same way a change to a .stx file invalidates that page.
Why it bites
I hit this adding a preflight rule for an attribute-driven state. The rule was correct and registered, the build was green, and the style simply did not exist in the output. I only caught it because I was asserting the computed border-color in a browser — a build that exits 0 and reports 24/24 success gives no signal at all. Anyone changing a theme token, a preflight, or the safelist and then checking the page will conclude their CSS is wrong and start debugging the wrong file.
The safelist has the same exposure: adding an entry to safelist: [...] after a warm cache should emit new utilities and won't.
Suggested fix
Fold the resolved Crosswind config into the SSG cache key — either mtime/hash of config/crosswind.ts (plus anything it imports), or a hash of the serialised config object after it is loaded, which also covers configs assembled from several files. Failing that, buddy build could skip the cache whenever the config file is newer than the cache directory.