Skip to content

Fetch and verify Git LFS assets before Hugo builds - #274

Closed
NValsan with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-homepage-video-issue
Closed

NValsan with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-homepage-video-issue

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The homepage explainer video (docs/assets/video/drasi-explainer-30s.mp4, added in #271) is tracked with Git LFS. In environments that clone without an LFS checkout, the file on disk is a 132-byte pointer; Hugo's resources.Get publishes it without error, so the build succeeds while the site serves unplayable text.

The failure is silent — the only real fix is to guarantee LFS objects are materialized before Hugo runs, and to fail loudly when they aren't.

New check

scripts/verify-lfs-assets.sh fails if any LFS-tracked file is still a pointer, using the checkout marker from git lfs ls-files:

eae3da3135 * docs/assets/video/drasi-explainer-30s.mp4   # real object
eae3da3135 - docs/assets/video/drasi-explainer-30s.mp4   # pointer -> exit 1

It requires no network and reports remediation steps.

CI

  • website.yaml: added a verification step after checkout (which already sets lfs: true), before any Hugo step.
  • test.yaml: checkout was missing lfs: true even though the job runs hugo — added, plus the verification step.

Local / devcontainer

  • Makefile: new lfs (install + pull + verify) and check-lfs (offline verify) targets. serve, preview-tutorials, preview-docs and build now depend on check-lfs, so they fail fast with instructions instead of rendering a broken video. Deliberately not depending on lfs, to keep offline iteration working.
  • .devcontainer/devcontainer.json: postCreateCommand pulls and verifies LFS objects before the submodule init.
  • readme.md: Git LFS listed as a prerequisite, with setup and verification steps.

The video shortcode and asset are untouched; this only changes how builds obtain the asset. Since #271 is not yet merged, the check is generic over all LFS-tracked files and starts covering the MP4 as soon as that PR lands.

Verified against #271's content: Hugo builds and public/video/drasi-explainer-30s.mp4 is the real 1,513,496-byte MP4 (sha256 matches the pointer oid); with the pointer in place, Hugo still "succeeds" but publishes 132 bytes, while the new check exits 1.

Copilot AI lite review requested due to automatic review settings September 11, 2026 23:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI and others added 3 commits September 11, 2026 23:53
Co-authored-by: NValsan <15096090+NValsan@users.noreply.github.com>
…aces

Co-authored-by: NValsan <15096090+NValsan@users.noreply.github.com>
Co-authored-by: NValsan <15096090+NValsan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix homepage explainer video build playback issue Fetch and verify Git LFS assets before Hugo builds Sep 11, 2026
Copilot AI requested a review from NValsan September 11, 2026 23:57
@NValsan NValsan closed this Sep 14, 2026
@NValsan
NValsan deleted the copilot/fix-homepage-video-issue branch September 14, 2026 22:32
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.

3 participants