A skill that answers "is the cache dependency actually working?" by reading a session, rather than by reasoning about the code.
Why a skill
The failure is a set-intersection that nobody can see: a parent is stored under the tags of the children it embeds, a write invalidates some tags, and if the two sets do not meet, the parent keeps serving stale content. Nothing throws. docs/reading-the-log.md states the rule; this skill applies it.
Procedure
- Install
DevQueryRepositoryLogModule (recording is off by default), then exercise the flow: read the parent, write the child, read the parent again.
- Read the resulting sessions and check, in order:
- the cold read recorded
depends_on edges for every embedded child — a missing edge is the bug, before any tag comparison
- the parent's
save_* tags include each child's URI tag
- the write's session contains an
invalidate that is not marker-preceded (a pre_write_cleanup immediately before it makes it the writer clearing its own entry, not a bust)
- that
invalidate's tags intersect the parent's stored tags
- the second parent read is a
cache_miss, not a hit
- Report the first link that breaks, with the two tag sets side by side.
Acceptance
- Distinguishes the four ways this fails, because the fix differs: no dependency edge recorded; edge recorded but the tag absent from the parent's save; a bust that only cleaned up before its own write; tags that never intersect.
- Distinguishes
cdn: skipped (no purger configured) from purged and failed — a local pass with a failed CDN purge is still stale at the edge.
- Says explicitly when the log cannot answer: with
ProdQueryRepositoryLogModule the healthy read that stored the parent may have been dropped by the retention policy, leaving only the purge side of the intersection.
Notes
demo/run-dependency.php is a working example of the whole flow and its expected log; tests/CACHE_DEPENDENCY_TESTS.md documents what the test suite already pins.
A skill that answers "is the cache dependency actually working?" by reading a session, rather than by reasoning about the code.
Why a skill
The failure is a set-intersection that nobody can see: a parent is stored under the tags of the children it embeds, a write invalidates some tags, and if the two sets do not meet, the parent keeps serving stale content. Nothing throws.
docs/reading-the-log.mdstates the rule; this skill applies it.Procedure
DevQueryRepositoryLogModule(recording is off by default), then exercise the flow: read the parent, write the child, read the parent again.depends_onedges for every embedded child — a missing edge is the bug, before any tag comparisonsave_*tagsinclude each child's URI taginvalidatethat is not marker-preceded (apre_write_cleanupimmediately before it makes it the writer clearing its own entry, not a bust)invalidate'stagsintersect the parent's storedtagscache_miss, not a hitAcceptance
cdn: skipped(no purger configured) frompurgedandfailed— a local pass with a failed CDN purge is still stale at the edge.ProdQueryRepositoryLogModulethe healthy read that stored the parent may have been dropped by the retention policy, leaving only the purge side of the intersection.Notes
demo/run-dependency.phpis a working example of the whole flow and its expected log;tests/CACHE_DEPENDENCY_TESTS.mddocuments what the test suite already pins.