PR_26179_ALPHA_008-team-aware-bootstrap#247
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 864fc5ad97
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,44 @@ | |||
| const TEAM_PORTS = Object.freeze({ | |||
| owner: Object.freeze({ apiPort: 5501, webPort: 5500 }), | |||
| alpha: Object.freeze({ apiPort: 5511, webPort: 5510 }), | |||
There was a problem hiding this comment.
Support documented Alfa spelling
The current ProjectInstructions state lists the active team as Alfa, but this config only accepts alpha; normalizeBootstrapTeam("Alfa") lowercases to alfa and then resolveTeamPortConfig throws. For Team Alfa developers using the documented team name, npm run dev:bootstrap -- --team Alfa fails instead of selecting the intended 5510/5511 ports, so this needs an alfa alias or canonical spelling alignment.
Useful? React with 👍 / 👎.
| if (webPath === "/tools" || webPath.startsWith("/tools/")) { | ||
| return `/toolbox${webPath.slice("/tools".length)}`; | ||
| } | ||
| return normalizedPath; |
There was a problem hiding this comment.
Preserve the admin notes route on the web server
When dev:bootstrap starts the separate web server, browser pages are served by this new resolver instead of src/dev-runtime/server/local-api-server.mjs. Only the /tools alias is carried over here, while the existing local server maps /admin/admin-notes.html to /src/dev-runtime/admin/notes.html; as a result that local admin notes URL works under the legacy API-backed server but 404s on the new bootstrap web port. Add the same admin-notes route mapping before falling back to normalizedPath.
Useful? React with 👍 / 👎.
|
|
||
| export function applyTeamBootstrapEnvironment(env, teamConfig) { | ||
| env.GAMEFOUNDRY_LOCAL_API_HOST = teamConfig.host; | ||
| env.GAMEFOUNDRY_LOCAL_API_PORT = String(teamConfig.apiPort); |
There was a problem hiding this comment.
Preserve explicit local API port overrides
When a developer starts the legacy alias with an explicit GAMEFOUNDRY_LOCAL_API_PORT to avoid an occupied default port, this assignment overwrites it with the selected team port before spawning start-local-api-server.mjs. That makes GAMEFOUNDRY_LOCAL_API_PORT=5598 npm run dev:local-api still bind to the owner/team port instead of the requested port, so the legacy API-only path can fail whenever that team port is already in use.
Useful? React with 👍 / 👎.
| if (options.openBrowser) { | ||
| openBrowser(options.startWeb ? teamConfig.webUrl : teamConfig.apiUrl); |
There was a problem hiding this comment.
Delay browser launch until API config is reachable
When --open is used with the default combined startup, the browser is launched immediately after spawning the API child, not after the child is listening. If the static page loads before /api/public/config is reachable, the browser config client caches the missing-config same-origin fallback and subsequent API calls stay pointed at the static web port even after the API starts; wait for the API config/health endpoint before opening the web URL.
Useful? React with 👍 / 👎.
|
Governance cleanup: closing as superseded by #250 (PR_26171_ALFA_009-team-aware-bootstrap). Verification: #250 carries the team-aware bootstrap outcome on the current canonical dev/scripts path, includes dev:bootstrap/dev:api/dev:web wiring, team port configuration, focused tests, and passing platform-validation. Differences from this PR are intentional current-governance corrections, especially canonical Alfa/Golf team naming and current dev workspace placement. No branch changes were made. |
PR_26179_ALPHA_008-team-aware-bootstrap
Purpose
Implement team-aware local bootstrap commands using the new
dev/bootstrap/structure.Summary
npm run dev:bootstrapas the primary local bootstrap command.npm run dev:local-apias a legacy API-only alias through the new bootstrap orchestrator.npm run dev:apiandnpm run dev:webstartup commands.dev/bootstrap/start-dev.mjsto load.env, resolve team ports, print diagnostics, start requested API/web processes, and optionally launch a browser.dev/bootstrap/team-port-config.mjswith owner/default, alpha, bravo, charlie, gamma, and beta port mappings.dev/bootstrap/is an approved development workspace folder.Scope Boundary
Branch Validation
PASS - Branch
PR_26179_ALPHA_008-team-aware-bootstrapcreated from clean syncedmain.Manual Validation Notes
Manual startup was not left running. CLI behavior is covered by targeted Node tests and syntax checks. Optional browser launch is implemented through
--openand defaults to disabled.