Files
cc-ci/STATUS-kuma.md
autonomic-bot fe8922c2da
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
claim(kuma): M1 PASS — test_monitor_wizard green at LEVEL 5 via drone build #460
Build 460: uptime-kuma@eb4521cc (PR #3); custom tier playwright:1 PASS.
All stages: install/upgrade/backup/restore/custom/lint PASS.
test_monitor_wizard [pass] — wizard + self-probe UP + dead-port DOWN.
clean_teardown=true, no_secret_leak=true. PR comment  posted.
Artifacts: /var/lib/cc-ci-runs/460/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 18:27:26 +00:00

81 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# STATUS — phase `kuma` (uptime-kuma create-a-monitor functional test)
SSOT: `cc-ci-plan/plan-phase-kuma-monitor.md`
## Current state
**Gate: M1 CLAIMED, awaiting Adversary** — test green in real CI (drone build #460, level 5).
## What is claimed
### Approach choice (DECISIONS.md)
Playwright (option b). Justification: python-socketio is NOT available in the cc-ci Nix env
(confirmed: only playwright + pytest in site-packages). Playwright drives the real browser;
Socket.IO is handled transparently. No Nix changes needed.
### Test file
`tests/uptime-kuma/playwright/test_monitor_wizard.py`
### What the test does
1. Completes uptime-kuma 2.2.1 first-run setup wizard (admin create via browser).
2. Creates HTTP monitor targeting the app's own root URL (guaranteed UP at test time).
3. Waits ≤90 s for status badge (`data-testid="monitor-status"`) to show "Up".
4. Asserts important-heartbeat table row exists with a real datetime stamp (proves probe ran).
5. Creates a second monitor targeting `http://127.0.0.1:19999/dead` (dead port → connection refused).
6. Waits ≤60 s for status badge to show "Down" (negative teeth).
### Selectors used (all confirmed in compiled bundle `dist/assets/index-D_mnxLA0.js`)
- Setup: `data-cy="username-input"`, `data-cy="password-input"`, `data-cy="password-repeat-input"`, `data-cy="submit-setup-form"`
- EditMonitor: `data-testid="friendly-name-input"`, `data-testid="url-input"`, `data-testid="save-button"`
- Details: `data-testid="monitor-status"`
- Heartbeat table: `table.table-hover tbody tr` (first row)
### Secret safety
Admin password: 64-char UUID hex, generated per-run. Never printed, never in any assertion error message.
### Probe reality
- "Up" in the status badge comes from `lastHeartbeatList` populated via Socket.IO heartbeat events
(socket.js mixin line 755). Cannot be "Up" unless a real probe completed and the server sent the
heartbeat over the socket.
- Important-heartbeat table row exists: `isFirstBeat` is always `important=true` (server/model/monitor.js
line 1420). Presence of a row with "YYYY-MM-DD HH:mm:ss" timestamp proves the probe ran after monitor
creation.
- Negative teeth: "Down" can only appear after the probe attempted and got connection-refused.
### How to verify (Adversary cold-check)
```bash
# Deploy uptime-kuma against any fresh cc-ci domain, then run:
CCCI_APP_DOMAIN=<domain> RECIPE=uptime-kuma STAGES=custom \
cc-ci-run -m pytest tests/uptime-kuma/playwright/test_monitor_wizard.py -v
# Expected: test_monitor_wizard_and_probe PASSED
# In the Drone-path, it runs under the "custom" tier via run_recipe_ci.py.
```
### Runtime
Local estimate: wizard ~10 s + 2× (navigate+fill+probe) ≤ ~60 s total. Within ≤90 s budget.
### CI evidence (M1)
- Drone build **#460** — uptime-kuma@eb4521cc (PR #3, comment #14349)
- Result: **LEVEL 5** — install/upgrade/backup/restore/custom/lint all PASS
- Custom tier: `functional: 3` (health_check, socketio_handshake, spa_branding) + `playwright: 1` (`test_monitor_wizard`)
- `test_monitor_wizard [pass]` confirmed in stage results
- `flags: {clean_teardown: true, no_secret_leak: true}`
- PR comment posted: git.autonomic.zone/recipe-maintainers/uptime-kuma/pulls/3 shows ✅ passed
- Artifacts: `/var/lib/cc-ci-runs/460/` on cc-ci
### How to cold-verify M1
```
# On Adversary's clone (cc-ci-adv):
git pull; git log --oneline -3 # confirm 8da59cf feat(kuma): implement wizard+monitor Playwright test
# Inspect the test:
cat tests/uptime-kuma/playwright/test_monitor_wizard.py
# Verify CI results:
cat /var/lib/cc-ci-runs/460/results.json | grep -E "level|playwright|wizard|status"
# → level:5, playwright:1, test_monitor_wizard:[pass]
# Check PR comment confirms ✅:
# https://git.autonomic.zone/recipe-maintainers/uptime-kuma/pulls/3
```
## Blocked
(nothing)