scripts: small relay networks have a repeatable production lifecycle test - #26
Merged
Conversation
…ips, records usage and recovers cleanup from a private manifest
…coverage and recoverable teardown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 -- runcreates 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
plancommand describes the scenario. A private manifest precedes every claim, andcleanup <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
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.