Skip to content

test: cross-process cache invalidation and lifetime coverage (DEVRES-4325) - #109

Merged
mrjasonroy merged 5 commits into
mainfrom
mrjasonroy/empowering-pumps-ep-58
Nov 6, 2026
Merged

mrjasonroy merged 5 commits into
mainfrom
mrjasonroy/empowering-pumps-ep-58

Conversation

@mrjasonroy

Copy link
Copy Markdown
Owner

Adds isolated Node-process tests for renders that cross peer invalidations, covering full and postponed page shells, build output, local and remote data. The suite checks request timestamps, delayed invalidation, implicit path tags and lifetime boundaries. Six model tests run 180 seeds each, with the seed and operation trace in failure output. Memory invalidations are delivered to each process; Redis invalidations are written once and observed by peers.

The expiry regression fixed in #106 now runs as an ordinary passing test. One new expected failure records a Redis page lifetime discrepancy: a render starts at T, finishes about 1.2 seconds later, and writes with revalidate=2/expire=2. At T+2.1 seconds the handler still returns it because Redis TTL starts at write completion. This reproduction uses real clocks. It does not establish stale HTTP serving, since Next also receives cacheControl. Handler source is unchanged.

Validation: lint, formatting and typecheck pass. The targeted run reports 41 passing tests, including one expected failure, and 1,080 seeded scenarios across memory and Redis. The existing Redis integration CI matrix picks up the new suite. Run instructions are in docs/development.md. Deployment-ID and outage expansion were dropped from this work's scope; existing tests remain in place.

@mrjasonroy

Copy link
Copy Markdown
Owner Author

CI at 7f2ec34: lint/typecheck, unit tests and all three Redis/Valkey integration jobs pass. All six browser E2E jobs fail before tests run, during browser installation: ERROR: Playwright does not support chromium on ubuntu26.04-x64. The summary check fails as a result. See https://github.com/mrjasonroy/cache-components-cache-handler/actions/runs/41384566719 . Workflow changes are outside this assignment's scope; this needs the integrator's runner/dependency fix. Multi-pod and upstream Next.js checks were still finishing when this was recorded.

mrjasonroy and others added 3 commits November 5, 2026 09:57
- Stamp build-output fixtures relative to the workers' fixed clock, so the
  resurrection cases stop depending on today's date.
- Split the known page hard-expiry bug: setup and positive checks run as an
  ordinary test; test.fails asserts only the stored Redis TTL against render
  start, instead of a timed read that a slow run could flip.
- Remove the compiled worker directory when tsc fails.
- Renumber the duplicate DEC-16 (#106's entry is DEC-17, the runner pin DEC-18).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrjasonroy
mrjasonroy merged commit 9d08121 into main Nov 6, 2026
32 checks passed
@mrjasonroy
mrjasonroy deleted the mrjasonroy/empowering-pumps-ep-58 branch November 6, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant