Repository navigation
nuxt-cloudflare: ESLint result cache in the Fast lane; record why the skipped Fast name stays - #176
Merged
Merged
Conversation
… skipped Fast name cannot be prettied Fast lint ran cold every time. A preload (NODE_OPTIONS --require, set for the Run fast scripts step only) appends --cache --cache-strategy content to any eslint CLI process the caller's fast-scripts start, however deep in pnpm --filter / turbo / a wrapper. Cache dir is beside the checkout, keyed by lockfile hash: persistent on self-hosted, restored everywhere and saved on the default branch only on GitHub-hosted. New input eslint-cache (default true). Fast lanes only: the full gate stays cold because a content cache cannot see cross-file type changes. Task 1 finding: a skipped job's name is not evaluated whatever contexts it reads (probed), and a static Fast would be a passing ci / Fast, so the names are unchanged; the comment at NAMING IS THE GATE records the probe. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Task 2 (done): ESLint result cache in the
Fastlane. New inputeslint-cache(defaulttrue).A preload (
NODE_OPTIONS=--require, exported only inside theRun fast scriptsstep) appends--cache --cache-location <dir>/ --cache-strategy contentto any process whose entry script is eslint's ownbin/eslint.js, however it was reached (pnpm --filter web run lint,turbo run lint, a wrapper).It leaves everything else alone: other programs,
--print-config(the typegen script),--version, and aneslint that already passes
--cache*. A caller whose lint script is not eslint is untouched.lintscripts are wrappers (pnpm --filter web run lint,turbo run lint,node scripts/lint-budget-guard.mjs ...), so appending flags to the script is wrong (turbo run lint --cacheis turbo's own flag), and ESLint has no env var for its cache. NODE_OPTIONS is the one variable turbo's strict
env mode passes to tasks (checked against turbo 2.10.4); any other env var is dropped.
<workspace>/../.ci-cache/eslint/<lockfile hash>, beside the checkout. Persistent self-hosted runner:the directory is the cache, no save/restore. GitHub-hosted:
actions/cache/restoreeverywhere,saveonly on thedefault branch, both guarded
runner.environment == 'github-hosted'(R8). A new lockfile is a cold cache.actions/cache/saverejects any pattern containing..(
Relative pathing '.' and '..' is not allowed), so the dependency cache's../.ci-cache/...form cannot be copied.Fastonly (fastandfast-escalable; they share one step list).Build,Checks,Extra gateandthe escalated
Fastlint cold: ESLint's cache keys on a file's own content and config and does not see a typechange in another file, so a type-aware rule (
@typescript-eslint/no-floating-promises, in narduk-libs' serverpack) can pass a cached, unchanged file that a changed file just broke. The cold full gate is the net.
eslint-cache: falseturns it off forFasttoo.narduk-lint(narduk-libs lint-budget wrapper) takes--cachebut no--cache-strategy, so thecontent strategy cannot be injected there.
Task 1 (not changed, with proof): static
Fastnames. The brief's preferred fix does not work on GitHub.Probed on a skipped job inside a reusable workflow (run 36654444065 and 36654519725): a skipped job's name is its
literal template whatever contexts the expression reads.
inputs.*,github.*,vars.*andneeds.*names allrender raw, and text mixed with an expression keeps its
${{ ... }}. Only a static name renders cleanly, and astatic
Faston a skipped job is a skipped check, which passes the org rulesettier-t1-ci-fast(required contextci / Fast): exactly the false green the current design prevents. So the three names are unchanged, and the commentat NAMING IS THE GATE and the README now record the probe. Getting clean names needs a decision outside this file:
an always-running job named
Fast(a runner seat per run) or a ruleset that requires a differently named context.Proof
actionlint -no-color .github/workflows/*.yml: clean.scripts/lint_callables.py: 0 findings.scripts/test_eslint_cache.py(inci.yml): executes the shipped step and preload against a stub eslint binand asserts the wiring. Also run:
test_fast_path.py,test_e2e_reuse.py,test_cache_paths.py,test_store_placement.py,test_required_gate.py,test_permission_ceiling.py: all pass.eslint 9.39.4 fixture whose
lintscript is a node wrapper that runspnpm exec eslint src.Run 36657596231 (cold): flag injected through the wrapper, 400 misses,
Cache saved.Run 36657695538 (next commit):
Cache restored from key eslint-cache-v1-..., 0 misses, 400 stores.The fixture is too small for a meaningful timing (about 1.6 s cold vs 1.0 s warm); real numbers come from the
first app re-pin. The temporary probe allowed the save on the branch; the default-branch rule is unit-asserted.
Not done / risks
../.ci-cacheis under the per-listener_workon the transient volume, so a hit needs the same listener.Save dependency cacheuses the same relative../.ci-cache/...path that
actions/cache/saverejected in this probe, so it may never have saved since fix(ci): keep the hosted dependency store beside the checkout #174.🤖 Generated with Claude Code