fix: Change default port from 9998 to 9988 per hero_sockets spec #23

Closed
opened 2026-04-08 11:00:18 +00:00 by mahmoud · 2 comments
Owner

Problem

hero_router currently defaults to port 9998 (in main.rs and buildenv.sh), but the hero_sockets skill spec defines the default hero_router port as 9988.

Fix

  • crates/hero_router/src/main.rs line 52: default_value_t = 9998default_value_t = 9988
  • buildenv.sh: PORTS="9998"PORTS="9988"
  • Update docs and README
  • hero_sockets skill: "Default port for hero_router: 9988"
  • hero_compute#83 — multi-node connectivity references this port
## Problem hero_router currently defaults to port 9998 (in main.rs and buildenv.sh), but the hero_sockets skill spec defines the default hero_router port as **9988**. ## Fix - `crates/hero_router/src/main.rs` line 52: `default_value_t = 9998` → `default_value_t = 9988` - `buildenv.sh`: `PORTS="9998"` → `PORTS="9988"` - Update docs and README ## Related - hero_sockets skill: "Default port for hero_router: 9988" - hero_compute#83 — multi-node connectivity references this port
rawan self-assigned this 2026-04-08 11:05:42 +00:00
Member

Implementation Spec for Issue #23

Objective

Update the default listening port for hero_router from 9998 to 9988 to align with the hero_sockets specification. All source code, build configuration, and documentation must be updated consistently.

Requirements

  • Replace the default port value 9998 with 9988 in all CLI argument definitions and runtime fallback logic
  • Update the build environment script so the declared port matches the new default
  • Update the Makefile HTTP_PORT fallback
  • Update all documentation (README, architecture, configuration, setup, and API docs) to reference port 9988
  • Ensure no stale references to port 9998 remain anywhere in the repository

Files to Modify

# File Description
1 crates/hero_router/src/main.rs Update doc comment and clap default_value_t from 9998 to 9988
2 crates/hero_router/src/config.rs Update doc comments and .unwrap_or(9998) fallback to 9988
3 buildenv.sh Change PORTS="9998" to PORTS="9988"
4 Makefile Change HTTP_PORT fallback from 9998 to 9988
5 README.md Update port references
6 docs/configuration.md Update default value in table and CLI example
7 docs/architecture.md Update architecture diagram and example URL
8 docs/setup.md Update CLI example
9 docs/api.md Update all example URLs

Implementation Plan

  1. Source code: Edit main.rs and config.rs to replace 9998 with 9988
  2. Build/infra files: Edit buildenv.sh and Makefile to replace 9998 with 9988
  3. Documentation: Edit README.md, docs/configuration.md, docs/architecture.md, docs/setup.md, and docs/api.md
  4. Verification: Run grep -r 9998 . — must return zero matches
  5. Build check: Run cargo build to confirm clean compilation

Acceptance Criteria

  • grep -rn 9998 returns zero matches across the entire repository
  • cargo build succeeds without errors
  • Running hero_router --help shows 9988 as the default port value
  • All documentation consistently references port 9988
## Implementation Spec for Issue #23 ### Objective Update the default listening port for `hero_router` from **9998** to **9988** to align with the `hero_sockets` specification. All source code, build configuration, and documentation must be updated consistently. ### Requirements - Replace the default port value `9998` with `9988` in all CLI argument definitions and runtime fallback logic - Update the build environment script so the declared port matches the new default - Update the Makefile HTTP_PORT fallback - Update all documentation (README, architecture, configuration, setup, and API docs) to reference port `9988` - Ensure no stale references to port `9998` remain anywhere in the repository ### Files to Modify | # | File | Description | |---|------|-------------| | 1 | `crates/hero_router/src/main.rs` | Update doc comment and clap default_value_t from 9998 to 9988 | | 2 | `crates/hero_router/src/config.rs` | Update doc comments and .unwrap_or(9998) fallback to 9988 | | 3 | `buildenv.sh` | Change PORTS="9998" to PORTS="9988" | | 4 | `Makefile` | Change HTTP_PORT fallback from 9998 to 9988 | | 5 | `README.md` | Update port references | | 6 | `docs/configuration.md` | Update default value in table and CLI example | | 7 | `docs/architecture.md` | Update architecture diagram and example URL | | 8 | `docs/setup.md` | Update CLI example | | 9 | `docs/api.md` | Update all example URLs | ### Implementation Plan 1. **Source code**: Edit main.rs and config.rs to replace 9998 with 9988 2. **Build/infra files**: Edit buildenv.sh and Makefile to replace 9998 with 9988 3. **Documentation**: Edit README.md, docs/configuration.md, docs/architecture.md, docs/setup.md, and docs/api.md 4. **Verification**: Run `grep -r 9998 .` — must return zero matches 5. **Build check**: Run `cargo build` to confirm clean compilation ### Acceptance Criteria - [x] `grep -rn 9998` returns zero matches across the entire repository - [x] `cargo build` succeeds without errors - [x] Running `hero_router --help` shows 9988 as the default port value - [x] All documentation consistently references port 9988
Member

Test Results

  • Build: cargo build succeeded
  • Tests: All tests passed (0 failures)
  • Grep check: Zero occurrences of 9998 remaining in repository

Implementation Summary

Changes Made

All occurrences of port 9998 replaced with 9988:

File Changes
crates/hero_router/src/main.rs Updated doc comment (line 3) and clap default_value_t (line 52)
crates/hero_router/src/config.rs Updated doc comments (lines 8, 20) and .unwrap_or() fallback (line 41)
buildenv.sh Changed PORTS="9998" to PORTS="9988"
Makefile Changed HTTP_PORT fallback from 9998 to 9988
README.md Updated port references in architecture diagram and ports table
docs/configuration.md Updated default value in env var table and CLI example
docs/architecture.md Updated architecture diagram and request flow example
docs/setup.md Updated CLI example
docs/api.md Updated all example URLs
crates/hero_router/Cargo.toml Removed stale rust-version.workspace = true (pre-existing build fix)

Notes

  • The rust-version.workspace = true removal in Cargo.toml was necessary to fix a pre-existing build failure unrelated to the port change.
## Test Results - **Build**: ✅ `cargo build` succeeded - **Tests**: ✅ All tests passed (0 failures) - **Grep check**: ✅ Zero occurrences of `9998` remaining in repository ## Implementation Summary ### Changes Made All occurrences of port `9998` replaced with `9988`: | File | Changes | |------|--------| | `crates/hero_router/src/main.rs` | Updated doc comment (line 3) and clap `default_value_t` (line 52) | | `crates/hero_router/src/config.rs` | Updated doc comments (lines 8, 20) and `.unwrap_or()` fallback (line 41) | | `buildenv.sh` | Changed `PORTS="9998"` to `PORTS="9988"` | | `Makefile` | Changed `HTTP_PORT` fallback from 9998 to 9988 | | `README.md` | Updated port references in architecture diagram and ports table | | `docs/configuration.md` | Updated default value in env var table and CLI example | | `docs/architecture.md` | Updated architecture diagram and request flow example | | `docs/setup.md` | Updated CLI example | | `docs/api.md` | Updated all example URLs | | `crates/hero_router/Cargo.toml` | Removed stale `rust-version.workspace = true` (pre-existing build fix) | ### Notes - The `rust-version.workspace = true` removal in Cargo.toml was necessary to fix a pre-existing build failure unrelated to the port change.
mahmoud added this to the ACTIVE project 2026-04-08 11:33:13 +00:00
mahmoud added this to the now milestone 2026-04-08 11:33:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_router#23
No description provided.