Document node.hostname config option (must be a bare hostname) - #632
Document node.hostname config option (must be a bare hostname)#632dawsontoth wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds documentation for the new node configuration block and its hostname option in reference/configuration/options.md. The feedback suggests removing direct links to internal GitHub issues and pull requests to maintain clean, user-facing documentation, and recommends using the <VersionBadge> format to properly document the behavior change regarding startup warnings for invalid hostnames.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-632 This preview will update automatically when you push new commits. |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-632 This preview will update automatically when you push new commits. |
The node section was missing from the "all top-level sections" config reference. Add it, documenting that node.hostname must be a bare hostname (no scheme, no port) because it becomes this node's TLS certificate common name and the host replication advertises and dials; a scheme or port silently corrupts both (harper#2218). Cross-links the startup-warning PR (harper#2223). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the (see harper#2218 / harper#2223) links from the rendered node.hostname bullet to keep the user-facing reference clean; the requirement and rationale stand on their own. PR-to-PR cross-links remain in both PR descriptions for team traceability. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
harper#2223 merged as a boot-time rejection, not a warning: an invalid node.hostname or replication.hostname now fails config validation and Harper does not start. Update both bullets accordingly, note that an IP literal (unbracketed IPv6 included) is valid, list the rejected shapes, and give the full identity fallback chain down to 127.0.0.1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
d37512e to
b4c8fe0
Compare
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-632 This preview will update automatically when you push new commits. |
Tag both hostname bullets with a changed-in-v5.3.0 badge, and add the 5.3 release-notes page documenting the breaking change: an install whose node.hostname or replication.hostname is a URL, host:port, or non-string will fail to start until corrected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-632 This preview will update automatically when you push new commits. |
Documents the
nodeconfiguration section, which was missing from Configuration Options even though that page bills itself as covering allharper-config.yamltop-level sections, and records the node-identity behavior change that shipped in HarperFast/harper#2223.node.hostnameis this node's identity, not a URL: it becomes the node's TLS certificate common name and the host replication advertises to peers and dials to reach the node. A URL orhost:portvalue silently corrupted both — a node configured ashttp://host:9926advertised and dialed a host literally namedhttp(HarperFast/harper#2218).Companion to HarperFast/harper#2223, which is now merged. That PR landed as a loud rejection at the config boundary, not the warn-only change it was originally scoped as, so this docs PR was rewritten to match what actually shipped.
What this documents
## nodesection in the config reference, placed immediately before## replication(identity is defined right before the section that consumes it).[::1], or non-string value is rejected and Harper fails to start.replication.hostnametoo — harper#2223 put it under the same constraint (it previously acceptedstring|number), so its bullet was updated rather than left alone.replication.hostname→ host inreplication.url→ certificate common name → Operations API host →127.0.0.1, skipping unusable derived sources.release-notes/v5-lincoln/5.3.md— a new page carrying the breaking-change entry, since an install with a URL/host:porthostname will fail to boot after upgrading.For the human reviewer
Two calls here are the author's judgment and are the places to push back:
v5.3.0is an assumption, not a derived fact. harper#2223 is merged tomainbut no tag contains it (latest isv5.2.4), so the ship version is not yet knowable from the repo.v5.3.0was chosen on the reasoning that a breaking change won't ship in a patch. If it actually ships asv5.2.5, both<VersionBadge>values and the release-notes filename need renaming before release.5.3release-notes page before5.3exists. The release-notes sidebar is autogenerated from the directory, so merging adds a visible "5.3" entry for an unreleased version. That is deliberate (it is where the breaking change belongs) but it does surface early — worth a second opinion on whether to hold this file until the release is cut.Smaller notes:
5.2.mdlinks harper#2049 the same way.node.urlis left undocumented. It exists in the new Joi schema, butnode_urlappears only inhdbTerms.tswith no consumer, so documenting it would advertise dead surface.replication.routesentries are explicitly called out as still accepting URLs in the release notes, because the route schema is not bare-host constrained and readers will otherwise over-apply the new rule.Verification
npm run build— succeeds; document count 403 → 404 (the new 5.3 page). The two broken-anchor warnings it prints are pre-existing on unrelated pages (backups/overview,release-notes/v5-lincoln/5.1); the new#node/#replicationanchors and the release-notes link into/reference/v5/configuration/options#nodeall resolve.npm run format:writethennpm run format:check— clean.main(12 commits) with no conflicts.08531e344, not the PR description:utility/nodeIdentity.ts(bareHostViolation— the exact accept/reject set),validation/configValidator.ts(bareHostConstraintson bothnode.hostnameandreplication.hostname, and that route hostnames are unconstrained), andserver/nodeName.ts(getThisNodeNamefallback order).Review coverage
Authored by Claude Opus 4.8, revised by Claude Opus 5 after harper#2223 merged with different behavior. Accuracy verified by reading the merged core implementation directly. gemini-code-assist reviewed the earlier revision; its two comments were addressed (in-doc issue links removed; its suggested
v5.2.0badge was declined as already-shipped and replaced with thev5.3.0badge above, with the caveat in item 1).