#812 follow-up: detect-platform.sh host-match conflates SSH transport port with HTTP(S) provider port + asymmetric default-web-port normalization #850

Closed
opened 2026-07-20 06:26:30 +00:00 by jason.woltje · 0 comments
Owner

Carved from #812 per the round-4 anti-spiral stop. DEFERRED — NOT fixed in the #812 core PR. This issue records a distinct, same-surface residual so the bounded #812 core can ship without chasing infinite portability.

Defect

packages/mosaic/framework/tools/git/detect-platform.sh (host-match block, ~lines 88-102) compares the port from every remote authority directly against the configured HTTP(S) API URL port. This conflates an SSH transport port with the HTTP(S) provider port and normalizes default web ports asymmetrically.

Repros (both reproduced directly at head 571b65d336af7236692e1ed3883d5570767d696e; independently confirmed by Codex at 0.96)

  1. SSH transport port — remote ssh://git@git.example:2222/owner/repo.git resolves host git.example:2222; with configured API base https://git.example, host-match FAILS although both identify the same Gitea host.
  2. Explicit default web port — remote https://git.example:443/owner/repo.git FAILS host-match against configured https://git.example, while the inverse (implicit vs explicit) form passes.

Impact / priority

Prevents token/base-URL resolution (and therefore durable comment persistence) for remotes of those shapes. Does NOT affect the root-mount implicit-443 HTTPS deployment shape, so there is no ship-pressure. Priority p3.

Acceptance criteria

  • Port comparison normalized by scheme: ignore the SSH transport port for HTTP(S) API host-match; treat implicit and explicit default web ports (:443 for https, :80 for http) as equal on both sides.
  • Red-first regression for each repro (red at 571b65d3, green at the fix head).
  • No regression to the subpath-slug / non-default-HTTP-port / SSH normal-form / root-mount cases already covered by #812.

Provenance

Found during #812 round-3 focused re-review (Reviewer-of-Record, detached exact-head). The RoR flagged this as a new same-surface edge and STOPPED per the standing anti-spiral bound; the coordinator ruled carve+ship for the #812 core.

Carved from #812 per the round-4 anti-spiral stop. **DEFERRED — NOT fixed** in the #812 core PR. This issue records a distinct, same-surface residual so the bounded #812 core can ship without chasing infinite portability. ## Defect `packages/mosaic/framework/tools/git/detect-platform.sh` (host-match block, ~lines 88-102) compares the port from every remote authority directly against the configured HTTP(S) API URL port. This conflates an SSH **transport** port with the HTTP(S) **provider** port and normalizes default web ports asymmetrically. ## Repros (both reproduced directly at head `571b65d336af7236692e1ed3883d5570767d696e`; independently confirmed by Codex at 0.96) 1. **SSH transport port** — remote `ssh://git@git.example:2222/owner/repo.git` resolves host `git.example:2222`; with configured API base `https://git.example`, host-match **FAILS** although both identify the same Gitea host. 2. **Explicit default web port** — remote `https://git.example:443/owner/repo.git` **FAILS** host-match against configured `https://git.example`, while the inverse (implicit vs explicit) form passes. ## Impact / priority Prevents token/base-URL resolution (and therefore durable comment persistence) for remotes of those shapes. Does **NOT** affect the root-mount implicit-443 HTTPS deployment shape, so there is no ship-pressure. Priority p3. ## Acceptance criteria - Port comparison normalized by scheme: ignore the SSH transport port for HTTP(S) API host-match; treat implicit and explicit default web ports (`:443` for https, `:80` for http) as equal on both sides. - Red-first regression for each repro (red at `571b65d3`, green at the fix head). - No regression to the subpath-slug / non-default-HTTP-port / SSH normal-form / root-mount cases already covered by #812. ## Provenance Found during #812 round-3 focused re-review (Reviewer-of-Record, detached exact-head). The RoR flagged this as a new same-surface edge and STOPPED per the standing anti-spiral bound; the coordinator ruled carve+ship for the #812 core.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#850