fix: CP13-2 — relax contract to host:port, add BlockService-level test

Two fixes:
1. Rename advertisedIP → advertisedHost throughout, relax contract from
   "always a real IP" to "routable host from -ip flag (IP or resolvable
   hostname)". This matches the actual -ip flag semantics which accepts
   both IP addresses and server names.

2. Add TestCP13_2_BlockService_AdvertisedHost_NotOpaqueID that hits the
   actual production wiring: BlockService with opaque localServerID +
   routable advertisedHost → setupReplicaReceiver → verify exported
   addresses use the routable host, not the opaque ID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 4.6 committed 2026-04-02 21:12:38 -07:00
1 parent 4bdf6c604e
commit ac962fc833
3 files changed
+87 -13

No files matched your search

+1 -1
View File
@@ -347,7 +347,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
// volume server. One identity truth across VS, block service, control
// bridge, and runtime ownership.
blockService.SetServerID(volumeServerId)
blockService.SetAdvertisedIP(*v.ip) // CP13-2: routable IP, not opaque ID
blockService.SetAdvertisedHost(*v.ip) // CP13-2: routable host (-ip flag), not opaque ID (-id flag)
volumeServer.SetBlockService(blockService)
}