Repository navigation
Conversation
Adds an opt-in peer network, disabled by default, that lets AltMount instances exchange signed release records and health attestations. Foundation: - node identity (Ed25519), mutual TLS 1.3 on a dedicated peer listener - open network with user-entered peers and peer exchange - private networks with a host, single-use invites, 48-hour membership certificates and a signed revocation list - per-network exposure levels (off, receive only, share metadata; share bundles is reserved and not available yet) - release and file content IDs with a background index - settings UI, status API and documentation Metadata sharing: - signed, canonical release records and health attestations (2 KB cap) - pull and push record exchange with cursors, quotas, per-relayer caps, fair eviction, rate limits and back-off - publishing from healthy local checks, with category and indexer exclusions; passwords embedded in NZB names are never published - network evidence can shorten one scheduled health check, or skip one in a private network; it never writes a health status - library streams matched by exact release ID are labelled when they are healthy on the network Peer data is advisory and every peer input is treated as hostile.
7 of 12 tasks
This branch has not been deployed
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.
Summary
Adds an opt-in peer network, disabled by default, that lets AltMount instances exchange signed release records and health attestations. This is the first PR of a stack; bundles (sharing the finished import itself) follow in a second PR on top.
Design:
docs/superpowers/specs/2026-11-12-peer-network-design.mdUser docs:
docs/docs/3. Configuration/peer-network.mdFoundation
Metadata sharing
Security model
Peer data is advisory and every peer input is treated as hostile. Peer strings are length-capped, sanitised and rendered as text only; no peer input reaches a path, a template, a command or SQL text. Outbound connections refuse loopback always and private addresses unless a private network enables them, never follow redirects, and send nothing until the other side has completed mutual TLS as the expected node.
Changes outside the feature
internal/health: optional observer and adviser hooks (nil by default), check statistics on health events,checker.gosplit into smaller files. No behaviour change when the feature is off.internal/providerbackbone: the backbone dataset cache moved out of the API handler so it can be shared.internal/nzbname: the importer's password-in-name patterns moved to a shared package.internal/metadata: optional file observer and aRenameDirectorymethod.Test plan
go build ./...,go vet ./...go test -race ./...(see note oninternal/par2repairbelow)internal/databasetests against PostgreSQL 16, migrations applied from emptygolangci-lintclean on the new packages (run per package)Notes for reviewers
internal/par2repairTestRunJobPrefetchSpansFileBoundariesfails intermittently under-race. This PR does not touch that package.golangci-lintrun fails to loadinternal/encryptionwith the current toolchain, independent of this PR.