Skip to content

Add WebHarbor reset and smoke verification script#47

Open
Lxr-max wants to merge 1 commit into
aiming-lab:mainfrom
Lxr-max:add-reset-smoke-check
Open

Add WebHarbor reset and smoke verification script#47
Lxr-max wants to merge 1 commit into
aiming-lab:mainfrom
Lxr-max:add-reset-smoke-check

Conversation

@Lxr-max

@Lxr-max Lxr-max commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • adds scripts/check_reset_smoke.py to verify WebHarbor control-plane resets, per-site homepage smoke checks, and local runtime-vs-seed DB MD5 parity
  • adds scripts/test_check_reset_smoke.py with standard-library coverage for MD5 checks, site filtering, strict mode, JSON output, and local HTTP reset/homepage behavior
  • adds a short README usage section for the new reset/smoke checker

Why this helps WebHarbor review

  • gives contributors and reviewers a single repo-level command to sanity-check /reset/<site> behavior
  • makes it easier to spot broken homepages and missing/dirty local DB state before opening a website PR
  • supports both Docker-backed runs and local dry-runs where DB files may be missing or the control server is offline

CLI usage

python scripts/check_reset_smoke.py --site amazon
python scripts/check_reset_smoke.py --control-url http://localhost:8101
python scripts/check_reset_smoke.py --base-host localhost
python scripts/check_reset_smoke.py --timeout 10
python scripts/check_reset_smoke.py --json
python scripts/check_reset_smoke.py --strict

Checks included

  • site discovery from websyn_start.sh and control_server.py
  • control server health check via GET /health
  • per-site POST /reset/<site> checks, or optional --reset-all
  • homepage smoke checks via the registered site port
  • local instance/*.db vs instance_seed/*.db MD5 comparison when visible
  • graceful skip/warning behavior when local DB files are not available

Test commands and results

  • py -m py_compile scripts/check_reset_smoke.py
  • py -m py_compile scripts/test_check_reset_smoke.py
  • py scripts/test_check_reset_smoke.py ✅ (7 tests passed)
  • py scripts/check_reset_smoke.py --help
  • py scripts/check_reset_smoke.py --json --site amazon --timeout 0.5 ✅ output is valid JSON; on a machine without a running control server it reports clear connection/timeout failures instead of crashing

Notes about running with/without Docker

  • with Docker or a local WebHarbor control server running, the script performs live reset and homepage checks
  • without Docker or without the control server, the script still runs and reports clear reset/homepage connection failures
  • when local sites/<site>/instance/*.db and sites/<site>/instance_seed/*.db are not present, MD5 checks are reported as skipped warnings rather than fatal errors by default

Notes

  • this is not a website contribution
  • no HF assets are involved
  • .assets-revision was not modified
  • no existing site implementation was changed

Known limitations

  • live reset checks intentionally depend on a running local control server and may fail with clear connection errors when none is available
  • MD5 comparison only runs when the relevant DB files are locally visible from the current checkout

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.

1 participant