Inherits all behavior from /AGENTS.md at the monorepo root. Local rules extend or override the root file for this repository.
This repository is the static status page for HagiCode sites (status.hagicode.com), built with Astro 7 (static output) and deployed on Cloudflare via wrangler.jsonc assets, publishing alongside dist/ on gh-pages. A scheduled GitHub Actions workflow probes each configured site, keeps a bounded history as a run artifact (checkpoint.json), and the page renders the latest validated snapshot plus /status.json. It also serves a release-hash sync check at /release-hashes/ and /release-hash.json, comparing each registered repository's main head against its published commit.
Run commands from repos/upp/.
pnpm install
pnpm run dev
pnpm run build
pnpm test
pnpm run monitor # probe enabled sites, write .monitor-data/
pnpm run release-check # compare registered repos' main head vs published commitpnpm run build with no .monitor-data/status.json renders every site in the explicit no-data state and makes no network requests; only pnpm run monitor probes sites. pnpm test runs node --test over tests/**/*.test.mjs.
src/lib/: status/release-hash domain logic (status.mjs,load-status.mjs,release-hash.mjs,load-release-hash.mjs,paths.mjs,present.mjs,wall.mjs,wall-charts.mjs)src/pages/:index.astro(status wall),status.json.ts,release-hashes.astro,release-hash.json.tssrc/components/status/,src/components/wall/: Astro/UI componentssrc/data/release-repositories.json: registry of repositories compared by the release-hash checkscripts/monitor/: probing (run.mjs,check.mjs,history.mjs,config.mjs)scripts/release-hash/:run.mjs,fetch.mjs.upptimerc.yml: site manifest (Upptime-layoutsites:list); path overridable viaUPP_SITE_MANIFEST.github/workflows/monitor.yml: scheduled probe (3/5 * * * *,mainonly), budgets viaUPP_RUN_BUDGET_MS/UPP_RELEASE_CHECK_BUDGET_MS.github/workflows/deploy-gh-pages.yml: downloads the monitor run's validateddist/artifact and publishes it togh-pages(no rebuild/re-probe)
- Any manifest key not in the documented set (
name,url,slug,expectedStatusCodes,method,headers,timeoutMs,maxAttempts,enabled,__dangerous__body_down_if_text_missing) is rejected before probing. - A site's identity is its
slug, or one derived fromname; renaming without settingslugstarts new history. status.json/release-hash.jsonare built only from a validated snapshot; a malformed or incomplete snapshot fails the build rather than producing a partial page.- Response bodies are read only for configured body-text checks and are never stored; secrets referenced by
headers.secretare read from environment variables, never written to output. - Keep
@hagicode/hagilightand@hagicode/hagilight-corepinned to the same exact version. - To add a release-hash target, append an entry to
src/data/release-repositories.jsonwith a uniqueidand an exact HTTPSorigin(no path/query/credentials), then runpnpm run release-checklocally withGITHUB_TOKENset.
README.md
- The repository uses pnpm, pinned in
package.jsonpackageManager. Runcorepack enableonce, thenpnpm install.pnpm-lock.yamlis the only lockfile; do not commitpackage-lock.json. - Settings live in
pnpm-workspace.yaml.allowBuildslists the dependencies whose install scripts may run (reviewed individually,falsemeans reviewed and denied); review any new dependency that has an install script and add it there. - A local registry mirror belongs in
~/.npmrconly. Never commit aregistry=line or a mirror URL;pnpm run check:registry(also run in CI) fails on any non-registry.npmjs.orgtarballin the lockfile and on mirror hosts in tracked files. - Undeclared imports fail under pnpm's strict layout: declare the package instead of hoisting it.