Skip to content

refactor: rename exit_id → name and peer_id → peer throughout#14

Merged
maxholman merged 10 commits into
block65:mainfrom
maxholman:refactor/rename-peer-to-name
Feb 20, 2026
Merged

refactor: rename exit_id → name and peer_id → peer throughout#14
maxholman merged 10 commits into
block65:mainfrom
maxholman:refactor/rename-peer-to-name

Conversation

@maxholman

Copy link
Copy Markdown
Contributor

TASK.md

Title

refactor: rename exit_id → name and peer_id → peer throughout

Type

refactor

Scope

Protobuf definitions, CLI, API, validation, and docs

Out of scope

Behaviour changes of any kind

Why

exit_id and peer_id leak implementation detail into user-facing interfaces.
name and peer are simpler, more consistent with how the docs already refer
to these concepts, and less confusing for users of the CLI and REST API.

maxholman and others added 10 commits February 20, 2026 11:42
WhatsApp crops OG images to a centre square (~630x630). The previous
left-aligned layout with an accent bar left the centre of the image
empty, looking broken in WhatsApp previews.

- Centre all content vertically and horizontally
- Constrain description width to 700px with text-wrap: balance
- Add og:image:secure_url and og:image:type meta tags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This prevents host build scripts (linked against modern GLIBC) from
clobbering the cross-compilation environment used by 'cross'.

By using a separate target directory, we ensure 'cross' build scripts
are always compiled and run within the container's environment.
Removes implementation-detail terminology from all user-facing surfaces.
`--exit-id` becomes `--name` (short: `-n`) on the CLI, `exit_id` becomes
`name` in the ExitNodeHello protobuf message, `peer_id` becomes `peer`
in route table entries, REST API request/response bodies, SSE events,
and the control protobuf. Wire-breaking change; both proto files updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Finish the rename started in the previous commit: update remaining
internal variable names, validation constants, proto fields, bench
scripts, and the demo tape.

- rename MAX_PEER_ID_LEN -> MAX_PEER_NAME_LEN and validate_peer_id -> validate_peer_name
- rename peer_ids() -> peer_names(), PeerInfo.id -> PeerInfo.name in peers.rs
- update control.proto: PeerInfo.id -> name
- update entry.rs and exit.rs internal vars (exit_id/peer_id -> name/peer)
- update repl_common.rs PeerRow.id -> PeerRow.name
- update handler.rs to use p.name (was p.id after struct rename)
- update bench/{conftest,diag.sh,lib/constants.py,tests/*}: EXIT_ID -> PEER_NAME, -i -> --name
- update range/demo.tape: --exit-id -> --name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The field held the remote socket address (IP:port), not a peer name.
Rename for clarity: peer_ident -> peer_addr, client_ident() -> peer_addr().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The list_routes handler was hardcoding added_at_secs: 0. Thread the
Instant through node_api::RouteEntry so the real value is returned.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- TODO.md: update stale peer_id/exit_id references to peer/name
- handlers.rs: rename Path(peer) -> Path(name) to match /peers/{name} route

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@maxholman maxholman merged commit c3da71e into block65:main Feb 20, 2026
4 checks passed
maxholman added a commit that referenced this pull request Feb 23, 2026
session.rs was not declared in lib.rs — completely unreachable dead code.
OutputFormat::Json printed the literal string "{ json_output }" — removed
the variant and the stub. Closes oopsies #14 and #15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant