refactor(ai-stack)!: derive the rule's ports #32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/ai-stack-derive-ports"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
ai-stack's port file opened
ai_stack_ports(default[3000, 8080]), while compose publishedai_stack_localai_portandai_stack_localagi_port. Changing a publish port left the firewall rule on the old one unlessai_stack_portschanged in step.What changed
ai_stack_portsis removed. The rule listsai_stack_localagi_portandai_stack_localai_portitself, with the same defaults.refactor(ai-stack)!: derive the rule's ports.Verification
make checkpassed. Itsfirewall_rendergate renders the changed port file.[3000, 8080]with the defaults and follows overridden publish ports.make test(no podman in the agent sandbox). The firewall-apply scenarios assert{ 3000, 8080 }, which is unchanged with the defaults.Risks and follow-ups
ai_stack_ports(same values) and corrects itsai_stack_sourcesnote. It can merge in either order relative to this one.ai_stack_localrecall_port published LocalRecall (default 8082) for warden's jail sessions; ai_stack_network_subnet pinned ai-net so warden's rule could admit it; attachable let warden's jails join ai-net. With warden gone all three serve nothing, and the publish put LocalRecall on the LAN wherever a host kept the default, because Docker publishes past the castrum table. LocalRecall now publishes no port, and ai-net is a plain bridge; only localagi reaches LocalRecall, through LOCALAGI_LOCALRECALL_URL. The published-service assert checks LocalAI and LocalAGI only. The compose and env templates lose their escalation-path comments; the README, defaults, port-file comment, ADVANCED_USAGE's ai_mainframes row and the migration doc follow (step 1 records the old ports, step 6 probes them). The molecule scenario asserts that localrecall has no ports and ai-net no other key. A local render with the role's defaults differs from main only in the header comment, attachable and localrecall's ports. On the one ai_mainframes host, which already set the port empty, ai-net loses attachable. Compose recreates a network whose config-hash label changed, restarting the stack once, but may reuse one an older Compose created without that label. After the live run, docker network inspect ai-stack_ai-net --format '{{.Attachable}}' prints false once ai-net was recreated. If it prints true, or compose refuses, run `docker compose down` in ai_stack_root, then the play. BREAKING CHANGE: ai_stack_localrecall_port and ai_stack_network_subnet are removed; LocalRecall is no longer published and ai-net is no longer attachable.