test(meshcore): Phase 3 — repeater remote-admin login + telemetry poll system-test - #4248
Conversation
…em-tests Phase 3 of the MeshCore system-tests epic. Appends after Test 12 (Yeraze Repeater DM auto-ack) in the same bash process, reusing the already-resolved REPEATER_PK global plus the existing cookie/CSRF session: - Test 13: remote-admin login into the Yeraze Repeater via MESHCORE_REPEATER_ADMIN_PASSWORD. Skips (exit-0) when the secret is unset/empty; when set, guards REPEATER_PK is 64-hex, then hard- asserts HTTP 200 + success:true from POST .../meshcore/admin/login. - Test 14: repeater-only telemetry poll (type:"status" against REPEATER_PK on SRC_A_ID). 429-aware retry loop honoring retryAfterSecs/Retry-After (expected right after Tests 12/13's mesh TX), hard-asserts data.written>=1 within a bounded attempt budget (MESHCORE_TELEMETRY_ATTEMPTS x MESHCORE_TELEMETRY_INTERVAL). Companion<->companion telemetry is intentionally omitted per the 2026-07-20 near-field finding (see Phase 2's companion DM demotion) -- repeater-only per user decision. Extends the end-of-run summary with login/telemetry outcome lines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158hFzsVbodeJK246qAE1dY
Scopes MESHCORE_REPEATER_ADMIN_PASSWORD to the "Run system tests" step so Phase 3's Test 13 (remote-admin login) can exercise a real login on the hardware runner once the repo secret is configured. Absent secret keeps Test 13 at its default skip-if-unset behavior, so the suite stays green either way. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158hFzsVbodeJK246qAE1dY
…iation Telemetry targets the Yeraze Repeater (status, 16 records validated live) rather than the near-field-blocked other companion; login skips without the secret. Epic complete — all three phases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158hFzsVbodeJK246qAE1dY
|
Claude finished @Yeraze's task —— View job PR Review: Phase 3 MeshCore System TestsTasks:
Overall this is clean, well-structured test infrastructure. The skip-when-unset pattern for the secret is the right call, and the 429-aware retry is solid. A few items worth flagging: Security
-d "{\"publicKey\":\"$REPEATER_PK\",\"password\":$(printf '%s' "$MESHCORE_REPEATER_ADMIN_PASSWORD" | jq -R .)}"This is the correct approach —
if ! printf '%s' "$REPEATER_PK" | grep -Eiq '^[0-9a-f]{64}$'; thenThis correctly prevents a malformed key from reaching the API (which would return 400 and be confusing). However, the Potential Bugs / IssuesTest 14:
Summary banner lines 809–810 Code Quality / Best Practices429 retry uses RA=$(jq -r '.retryAfterSecs // empty' "$TELE_BODY" 2>/dev/null); RA=${RA:-$TELE_INTERVAL}The CLAUDE.md envelope spec says
No product code changes — confirmed, only test infrastructure. ✓ YAML workflow indentation — the Minor Nits
SummaryThis is solid work. The skip-when-unset guard, 429-aware retry, proper JSON escaping, and temp-file cleanup are all handled correctly. The main thing worth a follow-up (not a blocker) is clarifying whether |
System Test ResultsMeshMonitor System Test ResultsTest Run: 2026-07-20 23:21:21 EDT Test Summary
✅ Overall Result: PASSEDAll deployment configurations are working correctly! Test DetailsConfiguration Import:
Quick Start Test:
Security Test:
V1 API Test:
Reverse Proxy Test:
Reverse Proxy + OIDC Test:
Virtual Node CLI Test:
Backup & Restore Test:
Database Migration Test:
DB Backing Consistency Test:
|
…comment, header Non-blocking review nits (PR #4248): register LOGIN_BODY/TELE_BODY in cleanup() (covers a signal between mktemp and rm -f); comment that HTTP 200 + written=0 is a no-data round (not the 429 TX-gate); '.data.sources // "[]"' in the display; and update the file header to Phases 1-3. Behavior-preserving. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0158hFzsVbodeJK246qAE1dY
|
Thanks for the thorough review. Verified + addressed in c84a44a:
All non-blocking polish — the substantive items were confirmations. Telemetry hard assertion was validated on the live rig (16 records, |
|
Claude finished @Yeraze's task —— View job PR Review: Phase 3 MeshCore System Tests (Post-Polish Pass)Tasks:
This is the follow-up review after the author's polish commit c84a44a addressed the prior round's feedback. The implementation is clean and well-structured. Here's the full assessment: Prior Review Items — Resolved ✓All substantive items from the previous review were addressed:
Current Code: ObservationsSecurity — still correct The Test 13 control flow — clean The skip-when-unset guard (line 739) is correct. The One observation: on the Test 14 control flow — correct
Workflow change — correct and minimal Adding No product code changes — confirmed, only Minor Nits (non-blocking)
SummaryThe implementation is solid. The polish commit addressed every actionable item from the previous review. The skip-when-unset guard, 429-aware retry, proper JSON escaping, and temp-file signal safety are all correct. This is ready to merge. |
System Test ResultsMeshMonitor System Test ResultsTest Run: 2026-07-20 23:44:14 EDT Test Summary
✅ Overall Result: PASSEDAll deployment configurations are working correctly! Test DetailsConfiguration Import:
Quick Start Test:
Security Test:
V1 API Test:
Reverse Proxy Test:
Reverse Proxy + OIDC Test:
Virtual Node CLI Test:
Backup & Restore Test:
Database Migration Test:
DB Backing Consistency Test:
|
Summary
Phase 3 (final phase) of the MeshCore system-tests epic — adds remote-admin
login and remote telemetry assertions to
tests/test-meshcore.sh, plus wires theCI secret. No product code changes; test infrastructure + one workflow edit only.
What it verifies
POST .../meshcore/admin/loginwith
{publicKey, password}(password fromMESHCORE_REPEATER_ADMIN_PASSWORD,jq -R-escaped). Success = HTTP 200 +.success==true. SKIPs (exit 0) when theenv var is unset (so local runs and CI-without-secret stay green); hard-fails on
401 when set.
POST .../nodes/:pk/telemetry/poll{"type":"status"}against the repeater; success =data.written >= 1. 429-awareretry that honors the per-source 60s mesh-TX gate. Validated live: 16 records
(
["status:16"]).Telemetry target — a deviation worth noting
The interview called for polling telemetry from the other companion, but that
predates Phase 2's near-field finding: remote telemetry is a request→response
round-trip to the target, so companion→companion telemetry fails the same way the
companion↔companion DM did (the two nodes are ~3in apart). The Yeraze Repeater, by
contrast, answers
type:"status"(a 16-field stats blob, no login needed) and isreachable. Per the maintainer's call, Test 14 polls the repeater only.
CI secret
Adds a step-scoped
env: MESHCORE_REPEATER_ADMIN_PASSWORD: ${{ secrets.* }}to the"Run system tests" step. If the repo secret is absent, login SKIPs and the suite
stays green — the secret must be added in repo settings for CI to exercise login.
Validation
Validated end-to-end on the live rig: connect + channel + repeater DM auto-ack +
telemetry (16 records) all pass; login SKIPs locally (no password). Full Vitest suite
green (3194 suites, 0 failures — test-only changes);
typecheckclean; YAML valid.Operational note
Like Phases 1-2, the MeshCore phase needs exclusive access to the companion serial
ports on the CI hw runner while the
system-test-labeled job runs.🤖 Generated with Claude Code
https://claude.ai/code/session_0158hFzsVbodeJK246qAE1dY