Skip to content

PR_26179_ALPHA_008-team-aware-bootstrap#247

Closed
ToolboxAid wants to merge 1 commit into
mainfrom
PR_26179_ALPHA_008-team-aware-bootstrap
Closed

PR_26179_ALPHA_008-team-aware-bootstrap#247
ToolboxAid wants to merge 1 commit into
mainfrom
PR_26179_ALPHA_008-team-aware-bootstrap

Conversation

@ToolboxAid

Copy link
Copy Markdown
Owner

PR_26179_ALPHA_008-team-aware-bootstrap

Purpose

Implement team-aware local bootstrap commands using the new dev/bootstrap/ structure.

Summary

  • Added npm run dev:bootstrap as the primary local bootstrap command.
  • Kept npm run dev:local-api as a legacy API-only alias through the new bootstrap orchestrator.
  • Added npm run dev:api and npm run dev:web startup commands.
  • Added dev/bootstrap/start-dev.mjs to load .env, resolve team ports, print diagnostics, start requested API/web processes, and optionally launch a browser.
  • Added dev/bootstrap/team-port-config.mjs with owner/default, alpha, bravo, charlie, gamma, and beta port mappings.
  • Added targeted tests for team mapping, unknown team validation, CLI modes, environment loading, diagnostics, and package scripts.
  • Updated canonical Project Instructions state/structure docs so dev/bootstrap/ is an approved development workspace folder.

Scope Boundary

  • No production pages changed.
  • No API/database contract changes.
  • No browser storage changes.
  • Existing local API runtime server behavior is preserved; the new bootstrap orchestrator passes selected local ports through environment variables before startup.

Branch Validation

PASS - Branch PR_26179_ALPHA_008-team-aware-bootstrap created from clean synced main.

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 --open and defaults to disabled.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +160 to +163
if (webPath === "/tools" || webPath.startsWith("/tools/")) {
return `/toolbox${webPath.slice("/tools".length)}`;
}
return normalizedPath;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +337 to +338
if (options.openBrowser) {
openBrowser(options.startWeb ? teamConfig.webUrl : teamConfig.apiUrl);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@ToolboxAid

Copy link
Copy Markdown
Owner Author

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.

@ToolboxAid ToolboxAid closed this Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant