[infra][P1] post-deploy verification scripts — WASM, books refresh, embedder, AI grounding, demo seed, auth flow #55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
After a
service_install_alldeploy, "all services running" does not equal "demo flows actually work." Today's demo prep surfaced six classes of gap that aren't currently checked anywhere — they're caught (or not) by an operator manually clicking through and noticing something's off. That's not a runbook, it's a coping strategy.This issue tracks adding a
scripts/verify/directory with six focused checks plus a master orchestrator. Each is small, idempotent, and exit-code-honest. Tonight (2026-05-01) we'll execute manual versions to ensure tomorrow's demo works; the captured commands become the seed for these scripts as PRs in the days after.Drop these into
hero_demo/scripts/verify/. Master runs all six in order; each is independently invokable.Why this needs to exist
Architecture
hero_demo/scripts/verify/:Run via
make verifyfromhero_demo/Makefile, or directly:bash scripts/verify/00_orchestrator.sh.Each script:
--continueA. WASM currency check (
10_wasm_currency.nu)Goal: Skip the 25-min WASM rebuild when the bundle is current. Force it when stale. Never silently use a stale bundle.
Mechanism: Stamp
.build_shainto the WASM bundle dir at build time; compare to current hero_os HEAD on next deploy.To make this useful, also add to
service_os.nu: after a successfulmake install-assets-release, writegit rev-parse HEAD > /home/driver/hero/share/hero_os/public/.build_sha. This is the missing primitive — without it, the comparison can't work.Caveats:
B. hero_books refresh (
20_books_refresh.sh)Goal: Force every registered library to git-pull + re-extract Q&A for changed pages + re-embed. Must run after every deploy because
service_books restartdoes NOT reliably auto-pull libraries today (observed today:~/hero/var/books/hero/mtime stayed at Apr 23 across multiple restarts).The
.ai/<page>.tomlhash gate already exists — running this script multiple times is bounded by actual content changes. Subsequent runs are fast.Caveats:
pull: trueparam onbooks.scanis what we BELIEVE the API to be — verify against the actual hero_books OpenRPC during manual run tonight. If not present, fall back togit -C ~/hero/var/books/<lib> pulldirectly + then callbooks.reindex.C. embedder health (
30_embedder_health.sh)Goal: Confirm hero_embedderd is reachable, models are loaded, a real embed call returns a real vector. Specifically catch the "Embedder for quality 1 (Fast) not available" condition we hit today.
Caveats:
health,embed,namespace.list) — verify against hero_embedder OpenRPC. Thequalityparam matches the investigation notes from session 52.D. AI grounding smoke (
40_ai_grounding_smoke.sh)Goal: Verify the AI Assistant has the LATEST docs_hero indexed by asking known questions and checking which page is cited. If we just merged session 52's Tier A pages, asking "what is agent_run?" must cite
service_router.md— if it cites old content, hero_books didn't re-extract.Caveats:
agent.chatnotsearch.query. A future iteration can add an end-to-endagent.chattest that exercises the LLM provider too. For now, search.query is the first place stale content shows up.E. demo content seed (
50_demo_content_seed.sh)Goal: Copy the demo PDFs into hero_foundry's webdav for every registered context, idempotent on sha256.
Caveats:
seed/office/. Long-term (b) is right; short-term (a) is fine.driver, so files must be owned bydriver:driverto be readable.Photos/andVideos/later — same script shape, different source dir.F. auth flow (
60_auth_flow.sh)Goal: Verify basic-auth gate, post-auth desktop loads, X-Hero-Context header propagates correctly to per-context endpoints.
Caveats:
/hero_osis_business/rpcmay need to be verified against current routing.count=0. A stricter test would seed a known contact in each context and verify it appears.00. Master orchestrator (
00_orchestrator.sh)Hookup into the runbook
In
hero_demo/docs/ops/DEPLOYMENT.md, add a new section after §4 (Install hero services):Also adds to
hero_demo/Makefile:Rollout
This issue is a META — each script lands as a separate small PR. Order:
50_demo_content_seed.sh— easy, no service-side changes, immediate value tonight (seeding PDFs)30_embedder_health.sh— read-only, low risk40_ai_grounding_smoke.sh— read-only, immediate signal on docs_hero currency20_books_refresh.sh— needs verifying the hero_books RPC method names; may surface a small server-side gap (e.g. ifbooks.scandoesn't takepull: true, file a separate hero_books issue)60_auth_flow.sh— depends on getting clean URL paths via hero_router/hero_proxy10_wasm_currency.nu— depends on amending service_os to write.build_sha. Slight ordering: PR the .build_sha write FIRST, then the verify script.Once 1-6 land, master orchestrator (00) is one more PR.
Tonight's manual run as the seed
Tonight (2026-05-01) we'll execute the equivalent commands manually after install_all run 4 finishes, against herodemo, capturing every command + output. By tomorrow morning the team has:
The post-demo PRs land each script with the manual-run commands as the seed.
Cross-refs