Skip to content

scripts: small relay networks have a repeatable production lifecycle test - #26

Merged
FelineStateMachine merged 2 commits into
mainfrom
feat/relay-network-test
Sep 5, 2026
Merged

scripts: small relay networks have a repeatable production lifecycle test#26
FelineStateMachine merged 2 commits into
mainfrom
feat/relay-network-test

Conversation

@FelineStateMachine

Copy link
Copy Markdown
Owner

Motivation

Small relays need a reproducible production check of their relationships: equal peers, a node following larger external sources, a personal relay and an agent hub. The exercise needs to leave results without leaving live test infrastructure.

Change

npm run test:network -- run creates five relays with fresh identities, exercises reciprocal sync, catch-up, filtered personal/agent flows and access boundaries, extracts signed fixtures, job results and tenant usage, then deletes the run-owned relays. External reads sample at most three profile authors per source from relay.damus.io and nos.lol. Internal profile forwarding is asserted separately from external availability.

The offline plan command describes the scenario. A private manifest precedes every claim, and cleanup <directory> recovers interrupted or ambiguous operations after verifying ownership. The exercise uses finite one-shot jobs and has no recurring automation. Documentation explains commands, boundaries and recovery.

No deployed service behavior changes. Final production observations: 0 sats charged, 2,269,184 aggregate SQLite bytes before teardown, 123,918 ms of aggregate exercise awake time and 157 recorded row writes after provisioning. Tenant counters are not the provider invoice and exclude teardown from their final snapshot.

Testing Completed

  • Typecheck and generated-file/configuration checks pass.
  • Eleven focused unit tests pass, covering cleanup ownership, ambiguous replies, malformed ownership responses, narrow retries and read-only WebSocket sampling.
  • Final production run: 11/11 assertions pass; all five relays deleted. Every relay from the earlier exploratory runs was also deleted.
  • nos.lol supplied three public profiles, imported through query fallback and forwarded to the hub through NIP-77. The report preserves best-effort history coverage.
  • relay.damus.io returned HTTP 503 from the sampling client; its result is explicitly inconclusive.
  • Repeating cleanup after completion is a no-op. Diff whitespace checks pass.

Responsible AI

Codex implemented and reviewed the harness with subagent assistance. Validation used synthetic identities and events; third-party relays received read-only requests. Private run keys and execution artifacts remain outside the repository.

@FelineStateMachine
FelineStateMachine merged commit 0795bb5 into main Sep 5, 2026
1 check passed
@FelineStateMachine
FelineStateMachine deleted the feat/relay-network-test branch September 5, 2026 16:36
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