v0.151.0 — the Megosztás page stops reloading, and says how to connect

S-1: /sharing/status coerced idle->running on the PHASE channel, so the first
poll of every steady-state page load reported a terminal job that never ran and
the client's repaint-reload fired ~1.2s apart, forever. The coercion's real duty
(liveness must never be contradicted) belongs to the 'running' LEVEL field
beside it, and is now pinned by its own regression test.

S-4 core: a terminal 'running' is served exactly once, so a REAL bring-up cannot
re-arm the reload on the page it just caused. failed/needs_password/in-flight
are never consumed. Unified async-job feedback stays the ROADMAP item.

S-2/S-5: new connect card with the Windows form, the Mac form and the direct
smb://<IP>, read from the SAMBA container's netns (the controller is on a docker
bridge and would answer 172.x). Derived per render, cached nowhere - the address
is a DHCP lease. Underivable => the line is omitted.

sharing.html's <script> block is byte-identical to v0.150.0. Red-proofed three
ways. 23/23 packages green.
This commit is contained in:
2026-07-20 10:46:21 +02:00
parent 8db9232dea
commit badf17bebd
13 changed files with 663 additions and 14 deletions
+9 -3
View File
@@ -30,6 +30,12 @@ type SambaData struct {
// SambaHouseholdUser is the single household SMB account name (matches the entrypoint's unix user).
const SambaHouseholdUser = "felhom"
// SambaHostInterface is the guest's LAN interface, and the single source of truth for it: smb.conf's
// `interfaces =` line, the container's FELHOM_IFACE env, and the controller's LAN-address read
// (stacks.SambaLANAddress, v0.151.0) must all name the SAME nic or the service and the address the
// page prints drift apart.
const SambaHostInterface = "eth0"
// SambaContainerName is the fixed container name the compose render pins. It is THE single source of
// truth for it: the renderer below interpolates this constant, stacks.sambaContainer aliases it for
// the exec paths, monitor's effective-protected set watches it (R-7b liveness), and the backup
@@ -62,7 +68,7 @@ func RenderSambaConfig(d SambaData) string {
b.WriteString(" server min protocol = SMB2\n")
b.WriteString(" disable netbios = no\n")
b.WriteString(" bind interfaces only = yes\n")
b.WriteString(" interfaces = lo eth0\n")
fmt.Fprintf(&b, " interfaces = lo %s\n", SambaHostInterface)
b.WriteString(" smb ports = 445\n")
b.WriteString(" load printers = no\n")
b.WriteString(" printing = bsd\n")
@@ -117,7 +123,7 @@ services:
network_mode: host
environment:
- FELHOM_SERVER_NAME=%[3]s
- FELHOM_IFACE=eth0
- FELHOM_IFACE=%[8]s
- FELHOM_UID=%[4]d
- FELHOM_GID=%[4]d
volumes:
@@ -126,5 +132,5 @@ services:
%[7]s
volumes:
%[5]s:
`, SambaContainerName, SambaImage, d.ServerName, d.UID, SambaPassdbVolume, SambaPassdbMount, binds.String())
`, SambaContainerName, SambaImage, d.ServerName, d.UID, SambaPassdbVolume, SambaPassdbMount, binds.String(), SambaHostInterface)
}