GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(id): multiple web listeners by flag and config (#2145) by dezren39 · Pull Request #4118 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Implements the #2145 bindings model designed in triage task 3155 (design comment on #2145). Queue task 5191.

What

  • Bindings resolution (pkgs/id/src/commands/serve.rs): ServeOptions gains web_listen: Vec<SocketAddr> plus bind_explicit/port_explicit; resolve_web_bindings resolves the listener set once at startup:
    1. repeatable --web-listen <IP:PORT> flags win entirely;
    2. else the new [web_bindings] section of defaults.conf;
    3. else one binding synthesized from legacy --bind/--port (unchanged defaults).
      --web-listen combined with an explicitly-set --bind or --port is a startup error naming the conflicting flag (clap defaults do not count — main.rs reads clap value sources).
  • Config (pkgs/id/crates/id-core): parse_defaults collects [web_bindings] lines raw into Defaults.web_bindings; parsing happens at serve startup so a malformed line fails startup naming the line. The embedded defaults.conf documents the section with commented examples only — default behavior unchanged.
  • Startup: ALL listeners bind early, before the lock write; any bind failure aborts with web: failed to bind listener <addr>: <err> — no partial start. Startup prints web: <n> listener(s) plus one web: http://host:port line per listener in binding order with actual ports. Each listener serves the same Explorer web_router with its own WebSecurity::for_bind; the non-loopback no-token warning fires per listener naming addr:port.
  • Lock file: ServeInfo gains web_bindings: Vec<String> (#[serde(default)], so pre-id(serve): a bindings model — multiple listeners by flag and config #2145 lock files still parse); web_port keeps meaning first-listener port.

Out of scope (per design): per-listener distinct tokens and program content (#2146), runtime per-user config file.

Tests

Laptop (cargo test, pkgs/id):

  • id-core lib: 57 passed — incl. new test_parse_defaults_web_bindings, test_parse_defaults_no_web_bindings_section.
  • id lib: serve filter 51 passed (default features) and 51 passed with --features web; web_bindings filter 10 passed default / 12 passed with web — incl. resolve_web_bindings precedence (flags win over config), legacy fallback, conflict errors naming --bind/--port, malformed config line named, pre-id(serve): a bindings model — multiple listeners by flag and config #2145 lock JSON still parses; web_listen CLI parse: 1 passed (repeatable + malformed rejected); serve_info: 5 passed.
  • Live smoke (laptop, --features web build): serve --ephemeral --web --web-listen 127.0.0.1:18099 --web-listen 127.0.0.1:18100 printed web: 2 listener(s) + one web: http://localhost:<port> line per listener; both listeners answered HTTP 200; lock file: "web_port": 18099, "web_bindings": ["127.0.0.1:18099", "127.0.0.1:18100"]. Occupied-port launch aborts with web: failed to bind listener 127.0.0.1:18099: Address already in use; --web-listen + --port aborts naming the conflict.
  • Smoke-driven fix included here: building one web_router per listener fails on the second identity-store open (redb is exclusive), so all listeners now share one AppState via the new web::web_routers (state built once, cloned per listener, finished with each listener's own WebSecurity).

Closes #2145


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
feat(id): multiple web listeners by flag and config (#2145)
7ac8f8a
Bindings model from triage task 3155: ServeOptions resolves its web
listener set once at startup -- repeatable --web-listen flags win,
else the new [web_bindings] section in defaults.conf, else the legacy
--bind/--port pair. --web-listen with an explicitly-set --bind/--port
is a startup error naming the flag. All listeners bind early; any
bind failure aborts naming the listener. Startup prints a listener
count plus one line per listener; ServeInfo gains web_bindings
(serde default) with web_port kept as the first listener port.
Routers share one AppState (identity store opens exclusively) with
per-listener WebSecurity via web::web_routers.

Queue task 5191.
@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 01:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T12:08:32.858718Z 1934206 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de4805bc-087a-4dd8-8356-082ca91c0229
Commits

Reviewing files that changed from the base of the PR and between fb0824a and 1934206.

Files selected for processing: 8
  • doc/2026-11-02T11-47-29Z_design_web_listeners/2026-11-02T11-47-29Z_design_web_listeners.md
  • pkgs/id/crates/id-core/src/defaults.conf
  • pkgs/id/crates/id-core/src/discovery.rs
  • pkgs/id/src/cli.rs
  • pkgs/id/src/commands/serve.rs
  • pkgs/id/src/main.rs
  • pkgs/id/src/web/mod.rs
  • pkgs/id/tests/cli_integration.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 2, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ac8f8ae3e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/commands/serve.rs Outdated
Comment on lines +1373 to +1374
let web_routers = crate::web::web_routers(
store_handle.clone(),

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip router initialization when the web interface is disabled

In builds with the web feature, invoking serve without --web now calls web_routers with an empty security list. That function constructs AppState before iterating the list, opening both the local-events directory and .identity.redb. Consequently, a corrupt, inaccessible, or externally locked web database can now abort an otherwise web-disabled P2P server, and normal startup unnecessarily creates web persistence files. Preserve the previous web-enabled guard around state construction.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/cli.rs
Comment on lines +366 to +367
#[arg(long = "web-listen", value_name = "IP:PORT")]
web_listen: Vec<SocketAddr>,

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add integration tests for the new listener CLI behavior

pkgs/id/AGENTS.md explicitly requires integration tests in tests/cli_integration.rs for CLI behavior, but this change adds only unit tests and leaves that integration suite unchanged. Searching the repository tests found no coverage for web-listen, web_listen, or web_bindings. Add executable-level coverage for repeated listeners and explicit --bind/--port conflicts so the argument-source wiring in main.rs and actual multi-listener startup are checked, rather than only parsing and resolution in isolation.

AGENTS.md reference: pkgs/id/AGENTS.md:L152-L152

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/commands/serve.rs
Comment on lines +386 to +392
/// (#2145 bindings model, designed in triage task 3155):
///
/// 1. `--web-listen` flags, when given at least once, win entirely.
/// Combining them with an explicitly-set `--bind` or `--port` is an
/// error naming the conflicting flag (clap defaults do not count).
/// 2. Else the `[web_bindings]` section of `defaults.conf`, parsed here
/// so a malformed line fails startup naming the line.

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Record the listener design in the required dated document

This introduces a new serving interface and listener-precedence semantics without the dated design record required by pkgs/id/AGENTS.md. Repository-wide Markdown searches, including the pkgs/id/docs symlink target, found no corresponding multi-listener design document; the commit instead references an external issue comment. Add the prescribed dated folder and matching Markdown recording the request, design, and decisions so this interface change has the required repository architecture record.

AGENTS.md reference: pkgs/id/AGENTS.md:L168-L168

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/commands/serve.rs Outdated
Comment on lines +418 to +420
.map(|addr| WebBinding {
bind: addr.ip(),
port: addr.port(),

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 2, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the interface scope of IPv6 listener addresses

For a scoped link-local IPv6 listener such as --web-listen '[fe80::1%3]:3000', parsing succeeds, but extracting only addr.ip() and addr.port() discards the IPv6 scope ID. WebBinding::socket_addr() then reconstructs the address with scope zero, so binding cannot select the requested interface and startup fails even when the original scoped address is valid. The config-binding path performs the same lossy conversion. Retain the full SocketAddr through resolution and binding, deriving its IP separately for the security policy.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39 dezren39 mentioned this pull request Nov 2, 2026
id(serve): a bindings model — multiple listeners by flag and config #2145
Closed
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · parked

  • Agent: queue worker (repo-worker-code), lane D shift
  • Session / ID: task 5191
  • Found via: queue claim (resume of parked task 5191)
  • Task: shepherd PR feat(id): multiple web listeners by flag and config (#2145) #4118 (issue id(serve): a bindings model — multiple listeners by flag and config #2145 bindings model) — address Codex findings, CI green, merge
  • Expectation: merge only with every Codex finding dispositioned and checks green, per the fleet Codex gate
  • Links: fresh verification 2026-11-02T04:15Z — PR feat(id): multiple web listeners by flag and config (#2145) #4118 OPEN at head 7ac8f8a (unchanged), no hard-stop labels on PR feat(id): multiple web listeners by flag and config (#2145) #4118 or issue id(serve): a bindings model — multiple listeners by flag and config #2145; checks basic: guard PR check list and native arm64: world snapshot determinism still PENDING. All four Codex findings remain unresolved and undispositioned: comment 4438313823 (P2, skip router/state initialization when --web disabled), comment 4438313830 (P1, add CLI integration tests for repeated listeners/conflicts), comment 4438313834 (P1, add the dated design document required by pkgs/id/AGENTS.md), comment 4438313842 (P2, preserve scoped IPv6 SocketAddr scope IDs). Blocker this shift: laptop load 113.84 / 100.28 / 67.39 — Rust fix-and-test work is not safe at that load. Parking task 5191; resume when load is favorable: address all four findings on the canonical branch queue/5191-2145-web-bindings, run focused id tests, push, Codex re-review, merge when clean and green.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned dezren39 Nov 2, 2026
dezren39 added 2 commits November 2, 2026 06:01
@dezren39
fix(id): address web listener review findings
b271572
@dezren39
style(id): use local imports in listener test
1934206
@dezren39
dezren39 merged commit 086474e into main Nov 2, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/5191-2145-web-bindings branch November 2, 2026 14:34
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

id(serve): a bindings model — multiple listeners by flag and config

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.