A hosted child keeps its parent's scheme and port: a child of http://forge.lan:8080 is http://kid--forge.lan:8080, not https://kid--forge.lan #47
No reviewers
Labels
No labels
agent-work
agent-working
ultracode
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
trevato-apps/forge!47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "grokbot/forge:fix/child-public-url-scheme-port"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
childPublicUrlbuilt every child's address ashttps://<name>--<host>from a host with its port stripped. Behind the platform (https on 443) that
is right. For any parent on plain http or another port it was wrong in two
ways: the child was told an https address nothing serves, and it lost the
port. Its config
url, the ledger,/spawnanswers, the claim link, andits apps'
FORGE_URLall pointed nowhere.parentOrigin(config)inspawn/placement.tsnames the parent's publicorigin once: its canonical
urlwhen it has one, otherwisehttp://<host>:<port>asmain.tsnames itself. It replacesparentHostOfinactions/spawn.ts, which was a copy ofchildHost.childPublicUrl(name, parent)takes that origin and keeps its scheme andport (a scheme's default port drops, as
URLdoes). A bare host still meanshttps with no port, so the platform's
https://<name>--forge.open-platform.shand every existing caller and test are unchanged.
and ledger seeding (
door.ts),liveChildUrl, the child app's ownurl(
host.ts), and its apps' forge URL (child-apps.ts). Matching a Host to achild (
parseHostedChildName) already ignored the port and is unchanged, asis
childHostfor those host-only uses.Tests:
childPublicUrlandparentOriginacross http/https, explicit,default and missing ports. End to end, a parent at
http://forge.lan:8080spawns
kidand the spawn result,liveChildUrl,childUrlOfand theopened child's own
config.urlare allhttp://kid--forge.lan:8080. On mainthe same parent gives
https://kid--forge.lan.Overlap: #2419 (a new or spawned forge starts with signup = invite) changes
the child's signup setting, not its address. No open pull touches these files
for it, so neither rebases on the other. #41 (first-admin) does not touch
placement.
Note: the single-label shape is unchanged, so a child of
http://localhost:3000is
http://kid--localhost:3000, which needs a hosts entry or wildcard DNS toresolve, the same as before but now on the right scheme and port.
Tests run by hand (bun 1.3.14, CI env)
bun install --frozen-lockfile,bun scripts/gate.ts,tsc --noEmitandbun scripts/hollow.tsare clean.Before, on main:
childPublicUrl("kid", "forge.lan:8080")gavehttps://kid--forge.lan.bun test test/spawn-placement.test.ts test/spawn-host.test.ts:Every spawn suite and every suite that spawns, places or opens a child (
test/spawn*.test.ts, client-home, client-list, first-login, following, new-forge, tui-newforge, usage-count-child, apps-adversarial, hollow, openapi; 27 files): 311 tests, 0 fail.Validation
pipeline/validateona7daea4d: baseline in 479s — bun 1.3.14, CI-shaped env (scrubbed vars, runner PATH), exact check.yml shard + forge.json commands.bun install --frozen-lockfileforge.json check.fastcheck.yml gate (1) pull_requestcheck.yml gate (2) pull_requestcheck.yml gate (3) pull_requesttest output (failures, totals)