Skip to content

feat(workflow): persist .opencheck-cache + Playwright browsers between runs - #19

Open
omerhochman wants to merge 1 commit into
mainfrom
claude/add-cache-steps-workflow-Bx42S
Open

omerhochman wants to merge 1 commit into
mainfrom
claude/add-cache-steps-workflow-Bx42S

Conversation

@omerhochman

@omerhochman omerhochman commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Every CI run re-downloads ~/.cache/ms-playwright (~150 MB of Playwright browser binaries) and re-derives every step via the LLM because .opencheck-cache is .gitignored — the cached-replay value prop is lost in CI.

Fix

Add two actions/cache steps gated by a new cache: true input (backward compatible).

  • Why this approach, not others: node_modules / bun caches are owned by the consumer's composite action; actions/cache at the workflow layer is the only place we can fix this without stomping consumer strategies.
  • Root cause, not patch: the re-derivation cost is intrinsic to reusable workflows without persistence — fixing it once at the workflow layer beats asking every consumer to copy an actions/cache stanza.
  • Evidence of error: oven-sh/setup-bun doesn't cache Playwright browsers, @playwright/mcp's postinstall re-fetches if missing, and .opencheck-cache is .gitignored so it never persists between runs.
  • Future users: opt-in by default, cache: false reverts exactly to today's behavior, cache-key-extra lets consumers append app-source hashes (e.g. hashFiles('src/**')).
  • No regression: cache: false produces zero cache steps in the run log; restore-key fallback prevents 100% cold-miss after first warm run; cache-key-extra is the documented escape hatch for opencheck's LLM self-healing routing past real regressions on stale UI.

…n runs

Add opt-in (on by default) actions/cache integration to the reusable
workflow. Skipping LLM re-derivation when nothing material has changed
brings warm runs from ~minutes to ~seconds, and avoids re-downloading
the ~150 MB Playwright browser bundle on every invocation.

New inputs (both backward-compatible):
- cache: boolean = true  — gates both cache steps
- cache-key-extra: string = ""  — appended to step-cache key so
  consumers can wire in app-source invalidation (e.g.
  hashFiles('src/**')), guarding against opencheck's LLM self-healing
  routing past real regressions when the cache outlives a UI change

Playwright cache key is OS-only (reusable workflow can't see consumer
lockfile); step-cache key includes runner.os, hashFiles(config), and
cache-key-extra with restore-key fallbacks.
@omerhochman
omerhochman force-pushed the claude/add-cache-steps-workflow-Bx42S branch from 9f44531 to 0a57853 Compare May 16, 2026 14:48
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.

2 participants