Adapt the port allocation option from #583 by xigua761 without its commercial licensing changes. Serialize forward, chain, peer runtime, cleanup and import reservations across SQLite/PostgreSQL instances.
Co-authored-by: xigua761 <xigua1166@outlook.com>
* fix(relay): authenticate endpoints and fail closed on missing routes
* fix(tunnel): retain chains until receiver replacement is acknowledged
* docs: record final relay security review and validation
- Extract database layer into model and repo packages
- Split repository into focused modules (control, federation, flow, groups, mutations)
- Remove monolithic db.go and sqlite/repository.go
- Update handlers to use new repository structure
- Migrate contract tests to new patterns
- Add migration plan documentation