Skip to content

PR_26180_OWNER_019b-move-browser-shared-schemas-to-www#299

Open
ToolboxAid wants to merge 1 commit into
PR_26180_OWNER_019a-contracts-schemas-obsolescence-auditfrom
PR_26180_OWNER_019b-move-browser-shared-schemas-to-www
Open

PR_26180_OWNER_019b-move-browser-shared-schemas-to-www#299
ToolboxAid wants to merge 1 commit into
PR_26180_OWNER_019a-contracts-schemas-obsolescence-auditfrom
PR_26180_OWNER_019b-move-browser-shared-schemas-to-www

Conversation

@ToolboxAid

Copy link
Copy Markdown
Owner

Summary

Moves the PR019a-audited active browser/runtime shared contract and tool schema files from root src/shared/ into www/src/shared/.

This preserves public browser route compatibility because the local/static web root serves www/, so URLs such as /src/shared/schemas/tools/palette-browser.schema.json still resolve to www/src/shared/schemas/tools/palette-browser.schema.json.

Stack Context

  • Workstream: Repository Architecture Simplification
  • Previous dependency: PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit
  • Base branch: PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit
  • Source branch: PR_26180_OWNER_019b-move-browser-shared-schemas-to-www
  • Next dependency: remaining server/API and dev-owned src/ retirement PRs

Scope

  • Moved 1 replay browser/runtime contract and 22 browser/runtime tool schema JSON files into www/src/shared/.
  • Updated active validation/test path assumptions for moved browser tool schemas.
  • Updated Project Instructions version/state/canonical structure/backlog to record the browser schema/contract ownership split.
  • Did not move API/server-owned files, validation-only files, protected developer workspace files, UI pages, database files, or product behavior.

Validation

  • node --check dev/scripts/validate-json-contracts.mjs PASS
  • node --check dev/tests/tools/ToolManifestBoundary.test.mjs PASS
  • node --check dev/tests/tools/ObjectVectorStudioV2DeleteCleanup.test.mjs PASS
  • node ./dev/scripts/run-node-test-files.mjs dev/tests/tools/ToolManifestBoundary.test.mjs dev/tests/dev-runtime/StaticWebRootCompatibility.test.mjs PASS
  • Direct static schema URL checks PASS
  • Browser import/reference scan PASS
  • node ./node_modules/@playwright/test/cli.js test dev/tests/playwright/tools/StaticWebRootCompatibility.spec.mjs --config=dev/config/playwright.config.cjs --project=playwright --workers=1 --reporter=list PASS
  • npm run validate:canonical-structure PASS
  • git diff --check PASS

Artifacts

  • Reports: dev/reports/
  • ZIP: dev/workspace/zips/PR_26180_OWNER_019b-move-browser-shared-schemas-to-www_delta.zip

@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

"$id": "src/shared/schemas/tools/palette-browser.schema.json",

P2 Badge Preserve schema URLs for repo-root serving

For local validation with GAMEFOUNDRY_LOCAL_WEB_ROOT=repo-root, resolveStaticRouteTarget searches only the repository root, so /src/shared/schemas/tools/palette-browser.schema.json no longer resolves after the root copy was deleted and only this www/ copy exists. That configuration is still documented as the prior root-serving mode, so tools that fetch schema URLs under /src/shared/schemas/tools/... will 404 in that environment unless a root compatibility copy or route mapping is kept.


export const SHARED_REPLAY_MODEL_CONTRACT_ID = "toolbox.shared.replay.model";

P2 Badge Preserve the root replay contract guard

Moving replayContracts.js only into www/src/shared/contracts leaves dev/tests/shared/ContractIndexValidation.test.mjs unchanged: it still lists replayContracts.js as a legacy shared helper and asserts that src/shared/contracts/replayContracts.js exists. As a result node ./dev/scripts/run-node-test-files.mjs dev/tests/shared/ContractIndexValidation.test.mjs now fails; update that guard/list for the new browser-owned location or keep a root compatibility module.

ℹ️ 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".

const REPORT_DIR = path.join(ROOT, "docs", "dev", "reports");
const SCHEMA_ROOT = path.join(ROOT, "tools", "schemas");
const SCHEMA_ROOTS = [
path.join(ROOT, "www", "src", "shared", "schemas"),

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 Keep JSON-contract CI from failing on moved schemas

When callers use --ci (for example dev/scripts/PS/validate-tool-schemas.ps1 -Ci), adding the moved www/src/shared/schemas tree to the schema index makes this script evaluate all 22 payload schemas with the old failure criteria: strictness inventory rows count as CI failures, and validateToolSchemas still requires root tool/version fields these schemas do not declare. node dev/scripts/validate-json-contracts.mjs --mode tools --ci now reports all 22 tool schemas invalid and exits 1, so the JSON-contract validation path is broken unless the CI criteria are updated for these moved schemas.

Useful? React with 👍 / 👎.

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.

2 participants