fix(deploy): stop hydrating content/data from empty publish branch (#627) - #628
Merged
Conversation
) PR #623 added content/data/ to the deploy "Hydrate generated content from publish" step. The publish branch does not yet carry those observatory pages, so the step's `rm -rf` followed by a failing `git checkout ... || true` left content/data/ empty at deploy time. The committed embed page content/embeds/fastest-growing-ai-repositories-chart/ (not hydrated) then referenced a missing data page, and the errorf guards in embeds/single.html and shortcodes/observatory-chart.html aborted the build. CI never reproduces the publish-hydration, so it stayed green. Interim fix (Path B): omit content/data/ from the deploy hydration list so the committed pages ship until the crawl repopulates publish. Keep content/data/ in the crawl-and-publish transaction and update the provenance invariant test accordingly. Documents the incident and follow-up in the PRD (NFR-011/012, R-08, Q-03) and adds an RPI handoff plan covering regeneration onto publish, restoring hydration, and a CI deploy-parity guard.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR unblocks GitHub Pages deploys by preventing the deploy workflow from deleting committed Observatory data pages when hydrating from an out-of-date publish branch, and aligns the pipeline provenance test + documentation with that interim exception (issue #627).
Changes:
- Stop
deploy-site.ymlfrom hydratingcontent/data/frompublish(temporary exception to avoid wiping required pages). - Update
tests/test_pipeline.pyprovenance invariant to excludecontent/data/from deploy hydration while still requiring it in the publish transaction. - Record the incident + interim mitigation in the PRD and add a remediation plan document for follow-up work.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/deploy-site.yml |
Removes content/data/ from deploy hydration list to prevent build-breaking deletions when publish is missing those pages. |
tests/test_pipeline.py |
Adjusts pipeline invariant expectations so deploy hydration intentionally excludes content/data/. |
docs/prds/claracle-data-observatory-relaunch.md |
Documents deploy/CI parity requirements and records the incident/fix in v1.2. |
.copilot-tracking/plans/2026-07-31/claracle-deploy-hydration-remediation-plan.instructions.md |
Adds a structured follow-up plan for regenerating publish, restoring hydration, and adding CI parity guards. |
Suppressed comments (1)
.github/workflows/deploy-site.yml:99
- The new explanatory comment doesn’t name the omitted path, which makes it harder to understand what needs to be re-added later. Calling out
content/data/explicitly will reduce the chance of reintroducing issue #627.
# The observatory data-page directory is intentionally omitted here:
# those pages are not yet present on publish, so hydrating an empty
# source would delete the committed pages that the chart embeds depend
# on and break the build (see issue #627). Re-add it once the crawl
# publishes those pages.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
tests/test_pipeline.py:652
deploy_hydrate_entriescheck only asserts the exact linecontent/data/is absent. If someone later addscontent/data(without the trailing slash) toGENERATED_PATHS, deploy would still delete the directory (because the script normalizes with${path%/}), but this test would not catch the regression. Normalize trailing slashes (or assert both variants) before checking membership.
deploy_hydrate_entries = {line.strip() for line in deploy_hydrate.splitlines()}
self.assertNotIn("content/data/", deploy_hydrate_entries)
This was referenced Jul 31, 2026
jmservera
added a commit
that referenced
this pull request
Aug 1, 2026
…loy (#633) (#637) Apply the guarded hydration pattern from #632 to the two remaining loops: - deploy-site.yml and generate-data-pages.yml now only wipe+restore a path when it exists on publish; otherwise main's committed version is preserved. This removes the last instances of the hydration-wipes-committed-file bug class. - Re-add content/data/ to the deploy hydration list. The crawl now publishes the observatory data pages to publish, and the guard makes hydration safe even when a path is temporarily absent, so the #628 interim exception is no longer needed. Restore the provenance-invariant test to require content/data/ across the whole publish transaction (including deploy hydration) and add assertions that both loops use the git ls-tree guard. Closes #633. Co-authored-by: jmservera <jmservera@users.noreply.github.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.
Fixes #627.
Root cause
PR #623 added
content/data/to the deploy "Hydrate generated content from publish" step in.github/workflows/deploy-site.yml. Thepublishbranch (last updated 2026-07-27, pre-#623) does not carry the observatory data pages, so the step'srm -rf "$path"followed by a failinggit checkout origin/publish -- "$path" 2>/dev/null || trueleftcontent/data/empty at deploy time.The committed embed page
content/embeds/fastest-growing-ai-repositories-chart/(not in the hydration list) then referenced the now-missing/data/fastest-growing-ai-repositories-this-year/, and theerrorfguards inlayouts/embeds/single.htmlandlayouts/shortcodes/observatory-chart.htmlaborted the build:Why CI didn't catch it
CI's Site Preview and Production site jobs build the repository content as committed on the branch, where
content/data/exists and the embed resolves. Onlydeploy-site.ymlruns the publish-hydration step, so themain(code + embeds) ↔publish(generated data) divergence is structurally invisible to CI.Fix (Path B — interim unblock)
Omit
content/data/from the deploy hydration list so the committed pages ship until the crawl repopulatespublish.content/data/is still carried through thecrawl-and-publishtransaction; the provenance-invariant test is updated to reflect the intentional deploy exclusion.Validation
pytest tests/test_pipeline.py— 28 passedzizmor .github/workflows/deploy-site.yml— no findingshugo --minify— clean build (exit 0); the embed and its data page renderruff check .— cleanFollow-up (RPI handoff)
source_pagemust resolve), R-08 (hydration wipes committed pages), Q-03 (when to restore hydration), changelog v1.2..copilot-tracking/plans/2026-07-31/claracle-deploy-hydration-remediation-plan.instructions.mdcovering:publish(run the crawl/generation actions)