Skip to content

feat(rebuild): generated-content fast path — Workstream C wiring (flag-gated, draft) - #2020

Merged
jung-thomas merged 1 commit into
DEVfrom
feat/content-cache-wiring
Aug 25, 2026
Merged

feat(rebuild): generated-content fast path — Workstream C wiring (flag-gated, draft)#2020
jung-thomas merged 1 commit into
DEVfrom
feat/content-cache-wiring

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

What

Wires the slug-targeted fast path on top of the #2019 helpers. On a slug-targeted run with content-cache=true, fetch-tutorials reuses the previously-generated .md + sidecar nav/author rows for the ~1,400 unchanged tutorials, skipping composeTutorial/fetchRulesVr/AI-quiz/writeHugoPage — the bulk of the ~56s Phase 3 cost.

Correctness (two gates, both required, else full regen)

  1. actions/cache KEY = parser-source hash — a parser change misses the cache; nothing is restored; the per-slug existsSync(generatedFile) guard falls through to recompose.
  2. Runtime feed fingerprint over CAP catalog + tag-labels (the deterministic drivers of non-target frontmatter: prev/next/mission/displayTags). Co-completions excluded — empty on warm-cache runs (fetched only on a cold cache) and recommendations are client-hydrated, so they can't make a cached page's static output wrong.

Sidecar (navEntries + authorRows + fingerprint) → .content-cache/, cached by the same parser-hashed key as hugo/content/tutorials + image_dimensions.json. Fail-open everywhere; flag defaults OFF → default behavior byte-identical to today.

Verification

  • Helper unit tests green (15).
  • DEV A/B in progress on this branch (content-cache=true): priming run (cold cache → full regen + writes sidecar), then a warm run to observe [reused] for non-target slugs + correct target output.
  • Draft until: the warm-run reuse is confirmed and a byte-identical diff-verify (task 3.6) passes. Then flip the default.

Design/tasks: #2017. Foundation: #2019 (merged).

…ated off)

On a slug-targeted run with CONTENT_CACHE_FAST_PATH=true, fetch-tutorials
reuses the previously-generated .md + sidecar nav/author rows for non-target
slugs, skipping composeTutorial/fetchRulesVr/AI-quiz/writeHugoPage — the bulk
of Phase 3's ~56s. Two gates, both required, else full regen:
  - actions/cache KEY = parser-source hash (a parser change → cache miss → the
    per-slug existsSync guard falls through to recompose)
  - runtime feed fingerprint over CAP catalog + tag-labels (nav/mission/tags);
    co-completions excluded (empty on warm-cache runs, recommendations are
    client-hydrated)
Sidecar (navEntries + authorRows + fingerprint) written to .content-cache/,
cached by the same parser-hashed key as hugo/content/tutorials +
image_dimensions.json. Fail-open throughout; flag defaults OFF so default
behavior is byte-identical to today.

Enabling on DEV (input content-cache=true) + a byte-identical diff-verify
(task 3.6) is the follow-up before flipping the default.

Helper unchanged behavior; content-cache tests green (15).
@jung-thomas
jung-thomas marked this pull request as ready for review August 25, 2026 01:37
@jung-thomas
jung-thomas merged commit 8b62905 into DEV Aug 25, 2026
5 checks passed
@jung-thomas
jung-thomas deleted the feat/content-cache-wiring branch August 25, 2026 10:29
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