Skip to content

fix(web): retain Forgejo PR detail across custom ports - #861

Merged
rynfar merged 2 commits into
pylonfrom
fix/forgejo-pr-cache-port-20260926
Sep 27, 2026
Merged

rynfar merged 2 commits into
pylonfrom
fix/forgejo-pr-cache-port-20260926

Conversation

@rynfar

@rynfar rynfar commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Forgejo pull request links can include a custom web port, such as forgejo.example.com:3000. After reopening a PR panel, cached detail failed its host check because URL.hostname drops the explicit port. A second entry path, including SSH-backed thread links, can carry only forgejo.example.com; those references must continue to accept a cached URL on that host even when its web server uses a custom port.

For Forgejo, compare the full URL authority when the reference names a port. Compare the hostname when the reference has no port. This preserves explicit port isolation and the existing portless thread-link behavior. GitHub and GitLab continue to use hostname matching. Focused regressions cover matching and mismatched Forgejo ports, portless references, another host, and ordinary providers.

Adapted from upstream d612d12b8bb278af97b0029f8d48b2403a5f9ee6 (#12168) for Pylon's existing cache path. The portless-reference case was added after adversarial review of this PR.

Validation at c00f1cc60fb10f92385ebab0eb2b7b81040f90bd: vp test run apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts (126 passed); vp run -F @t3tools/web typecheck; vp check on both changed files. Isolated browser before/after evidence is attached in the PR comment. The same synthetic Forgejo :3000 snapshot is discarded on base pylon and retained on this head while the unconfigured live Forgejo CLI read fails. No live Forgejo account was used.

Model: GPT-6 Sol (low), with independent GPT-6 Sol (low) adversarial review. Harness: Pylon Codex.

Adapt upstream d612d12b8bb278af97b0029f8d48b2403a5f9ee6 for Pylon cache display. Forgejo reference authorities include their web port, while ordinary providers remain hostname keyed.
@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
pylon-marketing Ignored Ignored Preview Sep 27, 2026 3:03am UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 14.0 KiB 14.0 KiB −21 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.3 KiB 7.3 KiB −1 B (−0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.8 KiB 6.7 KiB −20 B (−0.3%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB −44 B (−0.1%) 66.4 KiB ✅
Codex Live turn messages 10 9 −1 (−10.0%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB +7 B (+0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.3 KiB 7.3 KiB +10 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.7 KiB 6.7 KiB −3 B (−0.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: cd8a5f9 · PR result: c00f1cc · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.7 KiB
  • Claude decoded thread snapshot: 116.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar

rynfar commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator Author

Isolated browser evidence for #861 at final head c00f1cc60fb10f92385ebab0eb2b7b81040f90bd. Both runs used the same synthetic Forgejo PR snapshot, project, explicit forgejo.example.com:3000 reference, and disconnected live Forgejo CLI. On the base pylon commit, the detail panel discarded the valid cached snapshot and showed an error. On this PR, the cached title and details stayed visible while the live read failed. No Forgejo account was configured and no remote account was changed.

pr861-before pr861-after

@rynfar
rynfar marked this pull request as ready for review September 27, 2026 03:19
@rynfar
rynfar merged commit 69f26bc into pylon Sep 27, 2026
29 of 30 checks passed
@rynfar
rynfar deleted the fix/forgejo-pr-cache-port-20260926 branch September 27, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant