feat(cinny-deploy): fail and alert when a deployed page references missing files #39

Merged
jared merged 1 commits from fix/deploy-asset-check into main 2026-10-20 02:38:06 -04:00
Owner

Follow-up to #38: catch the next "page points at files that aren't there" problem at deploy time, instead of by people's calls failing.

After the copy, lotus_deploy.sh now:

  • reads every script and stylesheet (src/href ending in .js/.css) that both index.html and public/element-call/index.html reference, and checks each one exists in the webroot (absolute paths from the webroot, relative ones from the page's own directory, external URLs skipped);
  • if any is missing, logs them, posts an alert using the Matrix credentials the upstream checker already has (/etc/cinny-monitor.env, root-only; best effort), and exits 1.

Tested

  • On copies of the live production pages (61 references): a complete webroot passes, and with the call page's entry script removed (tonight's failure) it reports ./assets/index-CLdjwY1J.js, alerts and fails.
  • The alert path against the local homeserver posts the message to a lab room. The production room got nothing from testing.
  • bash -n and shellcheck are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Follow-up to #38: catch the next "page points at files that aren't there" problem at deploy time, instead of by people's calls failing. After the copy, `lotus_deploy.sh` now: - reads every script and stylesheet (`src`/`href` ending in `.js`/`.css`) that **both** `index.html` and `public/element-call/index.html` reference, and checks each one exists in the webroot (absolute paths from the webroot, relative ones from the page's own directory, external URLs skipped); - if any is missing, logs them, **posts an alert** using the Matrix credentials the upstream checker already has (`/etc/cinny-monitor.env`, root-only; best effort), and **exits 1**. **Tested** - On copies of the live production pages (61 references): a complete webroot passes, and with the call page's entry script removed (tonight's failure) it reports `./assets/index-CLdjwY1J.js`, alerts and fails. - The alert path against the local homeserver posts the message to a lab room. The production room got nothing from testing. - `bash -n` and shellcheck are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-20 02:28:54 -04:00
feat(cinny-deploy): fail and alert when a deployed page references missing files
Lint / No secrets in webhook configs (pull_request) Successful in 24s
Lint / Landing page is rendered (matrix (pull_request) Successful in 18s
Lint / Python (ruff) (pull_request) Successful in 10s
Lint / Python deps (pip-audit) (pull_request) Successful in 1m0s
Lint / Secret scan (gitleaks) (pull_request) Successful in 8s
Lint / Shell (shellcheck) (push) Successful in 15s
Lint / JS (eslint) (push) Successful in 16s
Lint / No secrets in webhook configs (push) Successful in 10s
Lint / Landing page is rendered (matrix (push) Successful in 9s
Lint / Python (ruff) (push) Successful in 10s
Lint / Python deps (pip-audit) (push) Successful in 1m17s
Lint / Shell (shellcheck) (pull_request) Successful in 13s
Lint / JS (eslint) (pull_request) Successful in 7s
Lint / Secret scan (gitleaks) (push) Successful in 5s
8aea38fc67
After copying, check every script/stylesheet the app and call pages
reference (src/href in both index.html files) exists in the webroot. If
any is missing, log it, post an alert with the upstream checker's Matrix
credentials (/etc/cinny-monitor.env, best effort) and exit 1. This would
have caught the 2026-10-20 call-page outage at deploy time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 4bb2dd4449 into main 2026-10-20 02:38:06 -04:00
Sign in to join this conversation.