Repository navigation
perf(qa): reuse cached non-target content on QA slug-targeted rebuilds despite feed drift - #2057
Merged
Merged
Conversation
…s despite feed drift
QA rebuilds ran ~10min (vs prod ~90s) for a single-slug preview. Root
cause: the content-cache fast path (decideFastPath) disables on a feed
fingerprint mismatch (catalog/tag-labels), forcing a full regen of all
~2100 tutorials. QA rebuilds are infrequent while prod republishes on
every merge, so by each QA run the catalog has drifted and the
fingerprint almost always mismatches — chronically defeating the fast
path. (The slug-filter Phase-2 scoping already works on QA; the full
regen, not discovery, was the cost.)
Add decideFastPath({ allowFeedDrift }) and set it for channel === 'qa'
only. On QA slug-targeted runs the fast path now reuses cached
non-target pages despite feed drift (the target slug is always
regenerated). Trades slightly-stale nav/tags on OTHER preview pages
(corrected on the next full QA rebuild) for a ~90s targeted preview.
Prod keeps strict feed-freshness (allowFeedDrift defaults false).
Tests: +4 decideFastPath cases (allowFeedDrift eligible on drift; still
requires sidecar + slug-targeted). 18 content-cache tests pass.
This was referenced Aug 27, 2026
Merged
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.
Problem
QA slug-targeted rebuilds take ~10 min vs prod's ~90s for the same single-tutorial change. Investigation of run 33103082513 (per-step timing + full log):
[slug-filter] scoped Phase 2 to 1 repo(s)); discovery is not the cost.[content-cache] fast path disabled — feed fingerprint changed. The fingerprint hashescatalog+tag-labels(fetch-tutorials.ts:864). QA rebuilds run rarely while prod republishes on every merge, so by each QA run the catalog has drifted and the fingerprint almost always mismatches → the content-cache fast path is chronically defeated on QA.Fix
Add
decideFastPath({ allowFeedDrift })and setallowFeedDrift: channel === 'qa'. On QA slug-targeted runs the fast path now reuses cached non-target pages despite feed drift (the target slug is always regenerated — its cache is busted upstream). Prod is unchanged (defaults false → strict feed-freshness).Tradeoff (approved)
Non-target QA preview pages may show slightly stale nav/tags until the next full QA rebuild. Acceptable for an author-preview channel; buys ~90s single-slug previews.
Tests
+4
decideFastPathcases (eligible on drift withallowFeedDrift; still requires a sidecar + slug-targeted run). 18 content-cache tests pass. Change is type-clean (only pre-existing baseline@types/nodenoise in these files).