Skip to content

Server reads one resolved listen address instead of the raw host string (prefactor + Seam 1 harness) #3

Closed

Description

@Khang5687

Parent

Spec: #1 — Exposure as a set of listen interfaces (bind-hosts lane).

What to build

A behaviour-preserving prefactor that makes the later change easy, plus the test harness the rest of the lane will reuse.

Prefactor. The server derives a single "resolved listen address" exactly once at startup from today's host-string logic (default loopback, explicit IP, wildcard). Every reader consumes that value instead of re-interpreting the raw string: the HTTP server layer's bind, the remote-reachable auth-policy predicate and session-cookie naming, runtime state, and startup output/telemetry. Nothing observable changes.

Seam 1 harness. An in-process harness that starts the server with a given config and an injectable network-interface map, probes real TCP connects to an address:port and observes accept vs. refuse, and reads the auth policy from the public environment descriptor. Its first cases characterize current behaviour so the harness is trusted before any behaviour changes; later tickets only add cases.

Acceptance criteria

  • Exactly one place derives the listen address from config; the readers above consume it. No raw-host string interpretation remains outside that place and CLI parsing.
  • Zero behaviour change: all existing server, CLI, and desktop suites pass without modification.
  • Seam 1 harness exists and is reusable by later tickets (start server + interface map → connect → observe; read descriptor auth policy).
  • Characterization cases pass: default config → 127.0.0.1 accepts, [::1] refused, policy loopback-only; explicit --host 0.0.0.0 → policy remote-reachable.
  • Harness runs under the runtime CI uses; if Bun and Node differ, note how in the PR.
  • New code lives in fork-only modules; upstream files receive call-site edits only.

Blocked by

  • None — can start immediately.

Activity

  1. added
    ready-for-agent
    on Sep 6, 2026
  2. added a commit that references this issue on Sep 6, 2026
  3. Khang5687 commented on Sep 6, 2026

    @Khang5687
    OwnerAuthor

    Merged into fork-main via #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions