fix: keep local URLs consistent with development port overrides #288

Merged
erik merged 1 commit from fix/task-1d40907b-dev-port-origin into main 2026-10-04 14:23:28 -05:00
Owner

Summary

Fix the remaining localhost-to-localhost port mismatch; listener override support and the earlier public-request-origin fix already existed.

Task

Task: #task-1d40907b. Task requirements were updated with a current-main HTTP reproduction and Erik approved this focused plan.

Changes

  • Share listener-port parsing with runtime-only loopback URL resolution.
  • Thread configured environments through public, API, and federation config reads; preserve explicit public/federation origins and all production site URLs.
  • Do not rewrite stored site URLs or derive federation identity from request hosts.
  • Leave ActivityPub public origin unset in development examples; document migration from older explicitly pinned .env settings.
  • Make the local CLI dev-config endpoint honor APP_PORT from .env.
  • Add regression and generated-template coverage plus docs/dev-port-overrides.md.

Testing

  • Unit tests added/updated: six new cases failed before the fix; all regressions now pass.
  • Manual testing performed: an isolated standalone template ran through make dev at ports 3000 and 3010, changing only its APP_PORT line between runs. Canonical feed links, profile handles, actor IDs, and WebFinger subjects matched both ports. An isolated Garage project/ports avoided existing machine services; test services were stopped.

Checklist

  • ./scripts/pre-pr.sh passes: CSS, formatting, lint, types, complete workspace tests, 315 CLI tests and 530 template-site tests.
  • Documentation updated with precedence and environment-only workflow.
  • No unrelated site repository changes, package releases, or deployment.

Human gate

Await green CI and independent review. No merge, release, or deployment without explicit human approval.

## Summary Fix the remaining localhost-to-localhost port mismatch; listener override support and the earlier public-request-origin fix already existed. ## Task Task: #task-1d40907b. Task requirements were updated with a current-main HTTP reproduction and Erik approved this focused plan. ## Changes - Share listener-port parsing with runtime-only loopback URL resolution. - Thread configured environments through public, API, and federation config reads; preserve explicit public/federation origins and all production site URLs. - Do not rewrite stored site URLs or derive federation identity from request hosts. - Leave ActivityPub public origin unset in development examples; document migration from older explicitly pinned .env settings. - Make the local CLI dev-config endpoint honor APP_PORT from .env. - Add regression and generated-template coverage plus docs/dev-port-overrides.md. ## Testing - [x] Unit tests added/updated: six new cases failed before the fix; all regressions now pass. - [x] Manual testing performed: an isolated standalone template ran through make dev at ports 3000 and 3010, changing only its APP_PORT line between runs. Canonical feed links, profile handles, actor IDs, and WebFinger subjects matched both ports. An isolated Garage project/ports avoided existing machine services; test services were stopped. ## Checklist - [x] ./scripts/pre-pr.sh passes: CSS, formatting, lint, types, complete workspace tests, 315 CLI tests and 530 template-site tests. - [x] Documentation updated with precedence and environment-only workflow. - [x] No unrelated site repository changes, package releases, or deployment. ## Human gate Await green CI and independent review. No merge, release, or deployment without explicit human approval.
fix: align local URL defaults with development port overrides
All checks were successful
CI / build-lint-test (pull_request) Successful in 2m14s
e6c9a15d63
Task: #task-1d40907b
Author
Owner

Independent review — task-1d40907b

  • PR: erik/slugkit#288, open; reviewed head e6c9a15 against the task's seven updated criteria.
  • Summary: focused Slugkit/template fix shares existing listener parsing and resolves local defaults at runtime. No source changes made during review.

Acceptance criteria

  1. met — Environment-only APP_PORT reaches the generated listener and shared local URL resolver; isolated standalone make dev evidence records both ports without application edits.
  2. met — Port-3010 route tests assert feed canonical/site links and full handle; federation uses configured fallback origin and actor URLs. Recorded live probes also verify actor IDs and WebFinger subjects.
  3. met — Default-3000 listener/resolver and route tests preserve the unchanged default.
  4. met — Public and production site URLs bypass local rewriting; explicit federation origins retain package precedence. Config reads do not write stored URLs. Request-origin website substitution is preserved separately from federation identity, with arbitrary-host coverage.
  5. met — Runtime, persisted-config, API and public-route regressions cover default/non-default ports, precedence, explicit public/local federation origins and non-mutation; generated-template assertions cover environment defaults.
  6. met — Both environment examples remove the port-3000 federation pin; READMEs and docs/dev-port-overrides.md explain one-variable workflow, precedence and legacy .env migration. Root CLI dev-config honors .env and Make overrides.
  7. met — Reproduction/live verification recorded in docs/dev-port-overrides.md; inspected /tmp/slugkit-dev-port-pre-pr.log confirms complete checks, 315 CLI and 530 template-site tests passed. Forgejo fj actions tasks -r erik/slugkit confirms run #486 for e6c9a15d63 succeeded. Independent review is recorded here and on the task.

Findings and verdict

  • Blocking issues: 0. Warnings: 0. No correctness, scope or safety issue found in the relevant diff and supporting code/artifacts.
  • Verdict: approved — 7/7 criteria met; pipeline green. Local/manual checks were assessed from existing evidence, not rerun by this reviewer.
  • Next: wait for explicit human merge approval. No merge, deployment, release or task closure performed.
### Independent review — task-1d40907b - PR: erik/slugkit#288, open; reviewed head `e6c9a15` against the task's seven updated criteria. - Summary: focused Slugkit/template fix shares existing listener parsing and resolves local defaults at runtime. No source changes made during review. ### Acceptance criteria 1. **met** — Environment-only `APP_PORT` reaches the generated listener and shared local URL resolver; isolated standalone `make dev` evidence records both ports without application edits. 2. **met** — Port-3010 route tests assert feed canonical/site links and full handle; federation uses configured fallback origin and actor URLs. Recorded live probes also verify actor IDs and WebFinger subjects. 3. **met** — Default-3000 listener/resolver and route tests preserve the unchanged default. 4. **met** — Public and production site URLs bypass local rewriting; explicit federation origins retain package precedence. Config reads do not write stored URLs. Request-origin website substitution is preserved separately from federation identity, with arbitrary-host coverage. 5. **met** — Runtime, persisted-config, API and public-route regressions cover default/non-default ports, precedence, explicit public/local federation origins and non-mutation; generated-template assertions cover environment defaults. 6. **met** — Both environment examples remove the port-3000 federation pin; READMEs and `docs/dev-port-overrides.md` explain one-variable workflow, precedence and legacy `.env` migration. Root CLI dev-config honors `.env` and Make overrides. 7. **met** — Reproduction/live verification recorded in `docs/dev-port-overrides.md`; inspected `/tmp/slugkit-dev-port-pre-pr.log` confirms complete checks, 315 CLI and 530 template-site tests passed. Forgejo `fj actions tasks -r erik/slugkit` confirms run #486 for `e6c9a15d63` succeeded. Independent review is recorded here and on the task. ### Findings and verdict - Blocking issues: **0**. Warnings: **0**. No correctness, scope or safety issue found in the relevant diff and supporting code/artifacts. - Verdict: **approved** — 7/7 criteria met; pipeline **green**. Local/manual checks were assessed from existing evidence, not rerun by this reviewer. - Next: wait for explicit human merge approval. No merge, deployment, release or task closure performed.
erik merged commit fc0eb3d4c8 into main 2026-10-04 14:23:28 -05:00
erik deleted branch fix/task-1d40907b-dev-port-origin 2026-10-04 14:23:28 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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
erik/slugkit!288
No description provided.