Skip to content

Commit 62ebb31

Browse files
authored
PR_26177_OWNER_050-environment-governance-model
Merge OWNER_050 environment governance model.
2 parents f237619 + 3ef2f91 commit 62ebb31

17 files changed

Lines changed: 1335 additions & 187 deletions

.env.example

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
1-
# Game Foundry Studio local development environment
1+
# Game Foundry Studio environment-managed configuration example
22
# ENVIRONMENT
33

4-
# Configure the runtime auth and database connections here.
4+
# Official environment model:
5+
# Local (VS Code) -> DEV -> IST -> UAT -> PROD
6+
#
7+
# Environment invariance:
8+
# Use an identical deployable artifact in every environment.
9+
# Only .env values and environment-managed secret values differ.
10+
#
11+
# Approved guest seed data for all tools belongs in every environment.
12+
# Do not store guest seed payloads in .env.
13+
#
14+
# Required services in every environment:
15+
# - Supabase Auth
16+
# - Supabase Postgres
17+
# - Cloudflare R2
18+
#
19+
# Configure runtime auth, database, and storage connections here.
520
# Missing connection configuration reports diagnostics instead of falling back.
621

722
# Browser-safe public site configuration exposed through the server API.
823
# These values may be sent to browser pages. Do not place secrets here.
924
GAMEFOUNDRY_SITE_URL=
1025
GAMEFOUNDRY_API_URL=
1126
# Valid environment banner labels:
27+
# - Local Development Environment
1228
# - Development Environment
1329
# - Integration Testing Environment
1430
# - User Acceptance Testing Environment
1531
# - Production
16-
GAMEFOUNDRY_ENVIRONMENT_LABEL="Development Environment"
32+
GAMEFOUNDRY_ENVIRONMENT_LABEL="Local Development Environment"
1733

1834
# Database SSL mode is required and authoritative.
1935
# Supported values:
@@ -33,13 +49,14 @@ GAMEFOUNDRY_DATABASE_URL=
3349

3450
# Server-only Postgres backup storage.
3551
# Copy this file to .env and keep the active deployment target's prefix:
52+
# LOCAL /local/backups/postgres/
3653
# DEV /dev/backups/postgres/
3754
# IST /ist/backups/postgres/
3855
# UAT /uat/backups/postgres/
39-
# PRD /prd/backups/postgres/
56+
# PROD /prod/backups/postgres/
4057
# R2 object prefixes are created by object upload; no manual folder creation is required.
4158
GAMEFOUNDRY_DB_BACKUP_STORAGE_PROVIDER=r2
42-
GAMEFOUNDRY_DB_BACKUP_PREFIX=/dev/backups/postgres/
59+
GAMEFOUNDRY_DB_BACKUP_PREFIX=/local/backups/postgres/
4360

4461
# Optional temporary server-side pg_dump staging override.
4562
# Leave blank to use the OS temp directory. Do not point this at repo tmp/.
@@ -50,17 +67,25 @@ GAMEFOUNDRY_DB_BACKUP_DIR=
5067

5168
# Server-only project asset storage configuration.
5269
# Browser uploads must go through the server API and must not receive these secrets.
70+
# Official Cloudflare R2 top-level prefixes:
71+
# LOCAL /local/
72+
# DEV /dev/
73+
# IST /ist/
74+
# UAT /uat/
75+
# PROD /prod/
76+
#
5377
# Approved GAMEFOUNDRY_STORAGE_PROJECTS_PREFIX values:
78+
# LOCAL /local/projects/
5479
# DEV /dev/projects/
5580
# IST /ist/projects/
5681
# UAT /uat/projects/
57-
# PRD /prod/projects/
82+
# PROD /prod/projects/
5883
GAMEFOUNDRY_STORAGE_ENDPOINT=
5984
GAMEFOUNDRY_STORAGE_ACCESS_KEY_ID=
6085

6186
GAMEFOUNDRY_STORAGE_SECRET_ACCESS_KEY=
6287
GAMEFOUNDRY_STORAGE_BUCKET=
63-
GAMEFOUNDRY_STORAGE_PROJECTS_PREFIX=
88+
GAMEFOUNDRY_STORAGE_PROJECTS_PREFIX=/local/projects/
6489

6590
# Environment-specific service limit placeholders.
6691
# Leave empty when live usage/limit reporting is not configured.

docs_build/dev/BUILD_PR.md

Lines changed: 49 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,76 @@
1-
# PR_26175_ALFA_047-theme-v2-svg-icon-registry
1+
# PR_26177_OWNER_050-environment-governance-model
22

33
## Purpose
4-
Create a shared Theme V2 SVG icon asset registry and authoritative validation specification so toolbox and platform UI can use approved standalone SVG files from one repo-owned source instead of page-local SVG, ad hoc CSS drawings, Font Awesome glyphs, conversation screenshots, vague row references, CSS-only generation, or a JS-only registry.
4+
5+
Establish the official Game Foundry Studio environment governance model and align the active configuration example comments/placeholders with that model.
56

67
## Source Of Truth
7-
This `BUILD_PR.md` is the source of truth for `PR_26175_ALFA_047-theme-v2-svg-icon-registry`.
8+
9+
This `BUILD_PR.md` and the user request are the source of truth for `PR_26177_OWNER_050-environment-governance-model`.
810

911
## Exact Scope
10-
- Remove the incorrect JS-only icon registry implementation from the ALFA_047 delta.
11-
- Use the user-authored SVG files already present under `assets/theme-v2/svg/` as the authoritative source.
12-
- Do not regenerate, redesign, simplify, optimize, or redraw any SVG icon artwork in this PR.
13-
- Required SVG files:
14-
- `gfs-chevron-left.svg`
15-
- `gfs-chevron-right.svg`
16-
- `gfs-chevron-up.svg`
17-
- `gfs-chevron-down.svg`
18-
- `gfs-add.svg`
19-
- `gfs-subtract.svg`
20-
- `gfs-trash.svg`
21-
- `gfs-close.svg`
22-
- `gfs-warning.svg`
23-
- `gfs-error.svg`
24-
- `gfs-success.svg`
25-
- `gfs-info.svg`
26-
- `gfs-fullscreen.svg`
27-
- `gfs-exit-fullscreen.svg`
28-
- `gfs-menu.svg`
29-
- `gfs-search.svg`
30-
- `gfs-settings.svg`
31-
- Validate each required SVG is well-formed XML.
32-
- Validate each SVG uses `viewBox="0 0 24 24"`, `fill="none"`, `stroke="currentColor"`, `stroke-linecap="round"`, and `stroke-linejoin="round"`.
33-
- Do not create `expand` or `collapse` icon naming.
34-
- Do not create `delete` icon naming.
35-
- Do not replace the standalone SVG assets with a JS-only icon registry.
36-
- Do not replace the standalone SVG assets with CSS-only icon generation.
37-
- Create `docs_build/design/theme-v2-icons/theme-v2-icon-style-guide.md` as the authoritative specification for all future Theme V2 SVG icons.
38-
- Create or update `assets/theme-v2/svg/README.md` as the registry documentation for the authoritative SVG asset pack.
39-
- Document the approved validation rules and the no-regeneration/no-redesign policy.
40-
- If any required SVG is missing, report validation failure instead of generating a replacement.
41-
- Do not convert existing UI controls in this PR.
12+
13+
- Documentation/governance only unless `.env.example` comment or placeholder updates are required.
14+
- Establish `Local (VS Code) -> DEV -> IST -> UAT -> PROD` as the official environment model.
15+
- Define the environment invariance rule: the deployable artifact is identical across all environments; only `.env` values and environment-managed secret values differ.
16+
- Define one shared API/service contract across all environments.
17+
- Define Supabase Auth, Supabase Postgres, and Cloudflare R2 as required for every environment.
18+
- Define R2 top-level prefixes:
19+
- `/local/`
20+
- `/dev/`
21+
- `/ist/`
22+
- `/uat/`
23+
- `/prod/`
24+
- Define that all environments receive approved guest seed data for all tools.
25+
- State SQLite is deprecated/retired and is not an active runtime database.
26+
- Review `.env.example` and update comments/placeholders to match the official model.
27+
- Create required Codex reports under `docs_build/dev/reports/`.
28+
- Create repo-structured delta ZIP under `tmp/`.
4229

4330
## Exact Targets
31+
4432
- `docs_build/dev/BUILD_PR.md`
45-
- `assets/theme-v2/svg/gfs-chevron-left.svg`
46-
- `assets/theme-v2/svg/gfs-chevron-right.svg`
47-
- `assets/theme-v2/svg/gfs-chevron-up.svg`
48-
- `assets/theme-v2/svg/gfs-chevron-down.svg`
49-
- `assets/theme-v2/svg/gfs-add.svg`
50-
- `assets/theme-v2/svg/gfs-subtract.svg`
51-
- `assets/theme-v2/svg/gfs-trash.svg`
52-
- `assets/theme-v2/svg/gfs-close.svg`
53-
- `assets/theme-v2/svg/gfs-warning.svg`
54-
- `assets/theme-v2/svg/gfs-error.svg`
55-
- `assets/theme-v2/svg/gfs-success.svg`
56-
- `assets/theme-v2/svg/gfs-info.svg`
57-
- `assets/theme-v2/svg/gfs-fullscreen.svg`
58-
- `assets/theme-v2/svg/gfs-exit-fullscreen.svg`
59-
- `assets/theme-v2/svg/gfs-menu.svg`
60-
- `assets/theme-v2/svg/gfs-search.svg`
61-
- `assets/theme-v2/svg/gfs-settings.svg`
62-
- `assets/theme-v2/svg/README.md`
63-
- `docs_build/design/theme-v2-icons/theme-v2-icon-style-guide.md`
64-
- `tests/playwright/tools/ThemeV2SvgIconRegistry.spec.mjs`
65-
- `docs_build/dev/reports/PR_26175_ALFA_047-theme-v2-svg-icon-registry_report.md`
66-
- `docs_build/dev/reports/PR_26175_ALFA_047-theme-v2-svg-icon-registry_validation-lane.md`
67-
- `docs_build/dev/reports/PR_26175_ALFA_047-theme-v2-svg-icon-registry_requirements-checklist.md`
68-
- `docs_build/dev/reports/PR_26175_ALFA_047-theme-v2-svg-icon-registry_manual-validation-notes.md`
33+
- `docs_build/dev/PROJECT_INSTRUCTIONS.md`
34+
- `docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md`
35+
- `docs_build/dev/ProjectInstructions/README.txt`
36+
- `docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md`
37+
- `docs_build/dev/ProjectInstructions/addendums/postgres_only.md`
38+
- `docs_build/dev/ProjectInstructions/addendums/release_gate.md`
39+
- `docs_build/dev/admin-notes/index.txt`
40+
- `.env.example`
41+
- `docs_build/dev/reports/PR_26177_OWNER_050-environment-governance-model.md`
42+
- `docs_build/dev/reports/PR_26177_OWNER_050-environment-governance-model_branch-validation.md`
43+
- `docs_build/dev/reports/PR_26177_OWNER_050-environment-governance-model_requirement-checklist.md`
44+
- `docs_build/dev/reports/PR_26177_OWNER_050-environment-governance-model_validation-lane.md`
45+
- `docs_build/dev/reports/PR_26177_OWNER_050-environment-governance-model_manual-validation-notes.md`
46+
- `docs_build/dev/reports/PR_26177_OWNER_050-environment-governance-model_instruction-compliance-checklist.md`
6947
- `docs_build/dev/reports/codex_review.diff`
7048
- `docs_build/dev/reports/codex_changed_files.txt`
7149

72-
## Evidence Sources
73-
- `docs_build/pr/PLAN_PR_26175_ALFA_047-theme-v2-svg-icon-registry.md`
74-
- `assets/theme-v2/images/gfs-chevron-down.svg`
75-
- `assets/theme-v2/images/gfs-chevron-up.svg`
76-
7750
## Out Of Scope
78-
- No chevron conversion.
79-
- No status/action icon conversion.
80-
- No layout utility icon conversion.
81-
- No JS-only icon registry.
82-
- No CSS-only icon generation.
83-
- No Theme V2 CSS changes.
84-
- No runtime UI conversion.
85-
- No accordion conversion.
86-
- No Font Awesome removal.
87-
- No broad visual redesign.
88-
- No page-local CSS.
89-
- No inline styles.
90-
- No style blocks.
91-
- No browser-owned product data as source of truth.
92-
- No API/service/repository contract changes.
51+
52+
- No runtime code changes.
53+
- No UI changes.
9354
- No engine core changes.
9455
- No `start_of_day` folder changes.
56+
- No `.env`, `.env.dev`, `.env.ist`, `.env.uat`, or `.env.prd` secret/value edits.
57+
- No API implementation changes.
58+
- No storage implementation changes.
59+
- No database migration or DDL changes.
9560

9661
## Validation
62+
9763
Run exactly:
9864

9965
```powershell
100-
npx playwright test tests/playwright/tools/ThemeV2SvgIconRegistry.spec.mjs --workers=1
101-
rg -n "<[s]tyle|[s]tyle=" docs_build/design/theme-v2-icons/theme-v2-icon-style-guide.md tests/playwright/tools/ThemeV2SvgIconRegistry.spec.mjs
66+
git status
67+
git diff --check
10268
```
10369

10470
## Artifact
71+
10572
Create repo-structured delta ZIP:
10673

10774
```text
108-
tmp/PR_26175_ALFA_047-theme-v2-svg-icon-registry_delta.zip
75+
tmp/PR_26177_OWNER_050-environment-governance-model_delta.zip
10976
```

docs_build/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,13 @@ Toolbox and Admin tool metadata must use a shared DB-backed tool metadata source
441441

442442
## DATABASE DIRECTION
443443

444-
SQLite is deprecated.
445-
Postgres is authoritative.
444+
Postgres is the authoritative active runtime database.
445+
446+
SQLite is deprecated/retired and is not an active runtime database for Local (VS Code), DEV, IST, UAT, or PROD.
446447

447448
Rules:
448449
- New database work must target Postgres.
449-
- Local API -> Postgres is the required direction.
450+
- Local (VS Code) API -> Postgres is the required direction.
450451
- New PRs must not introduce SQLite persistence.
451452
- Do not add new SQLite services.
452453
- Do not add new SQLite DDL.
@@ -478,17 +479,58 @@ Rules:
478479

479480
Runtime startup loads `.env` only.
480481

482+
Official environment model:
483+
- `Local (VS Code)`
484+
- `DEV`
485+
- `IST`
486+
- `UAT`
487+
- `PROD`
488+
489+
Promotion order:
490+
- `Local (VS Code) -> DEV -> IST -> UAT -> PROD`
491+
492+
Environment invariance rule:
493+
- The deployable artifact is identical across every environment.
494+
- Only `.env` values and environment-managed secret values differ between environments.
495+
- Application code, runtime code, API/service code, database runtime scripts, migrations, and bundles must not fork by environment name.
496+
497+
Shared API/service contract:
498+
- One shared API/service contract is required across Local (VS Code), DEV, IST, UAT, and PROD.
499+
- Browser/UI/runtime code must consume the same contract in every environment.
500+
- Environment-specific endpoints, keys, buckets, and prefixes are configuration values only.
501+
- Do not create environment-specific API/service contracts.
502+
503+
Required services in every environment:
504+
- Supabase Auth
505+
- Supabase Postgres
506+
- Cloudflare R2
507+
508+
Guest seed data rule:
509+
- All environments receive approved guest seed data for all tools.
510+
- Guest seed data is shared environment setup data, not an environment-specific behavior fork.
511+
- Guest seed data must be applied through the shared data/service contract and must not require per-environment application code.
512+
513+
Required Cloudflare R2 top-level prefixes:
514+
- Local (VS Code): `/local/`
515+
- DEV: `/dev/`
516+
- IST: `/ist/`
517+
- UAT: `/uat/`
518+
- PROD: `/prod/`
519+
520+
Derived R2 paths for projects, backups, exports, or future storage lanes must stay under the matching top-level prefix for the active environment.
521+
481522
The following files are copy-source files only:
482523
- `.env.dev`
483524
- `.env.ist`
484525
- `.env.uat`
485-
- `.env.prd`
526+
- `.env.prd` is the legacy copy-source filename for PROD values; new environment governance uses the `PROD` environment name.
486527

487-
Valid deployment targets are:
528+
Valid environment stages are:
529+
- `Local (VS Code)`
488530
- `DEV`
489531
- `IST`
490532
- `UAT`
491-
- `PRD`
533+
- `PROD`
492534

493535
Manual deployment-target flow:
494536
1. Copy the selected `.env.<target>` file to `.env`.
@@ -501,11 +543,12 @@ Runtime environment parameters are prohibited.
501543
Do not introduce runtime parameters such as:
502544
- `--env`
503545
- `--environment`
546+
- `ENVIRONMENT=LOCAL`
504547
- `ENVIRONMENT=DEV`
505548
- `ENVIRONMENT=UAT`
506-
- `ENVIRONMENT=PRD`
549+
- `ENVIRONMENT=PROD`
507550

508-
`DEV`, `IST`, `UAT`, and `PRD` are deployment targets, not application behaviors.
551+
`Local (VS Code)`, `DEV`, `IST`, `UAT`, and `PROD` are environment stages, not application behaviors.
509552

510553
Application code, runtime code, API/service code, and DB runtime scripts must not branch behavior by deployment target name.
511554

docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The Project Instructions operating system provides additive governance for:
1616
- deprecation workflow
1717
- archive and history preservation
1818
- recognized project instruction/reference files
19+
- environment governance
1920

2021
## Preservation
2122

@@ -34,6 +35,10 @@ Existing Project Instructions remain preserved in their current locations. This
3435

3536
`docs_build/dev/ProjectInstructions/addendums/project_reference_files.md` defines additional valid project instruction/reference files that must be included in future Project Instructions reviews when present in `ProjectInstructions.zip`, the active project instruction directory, or `docs_build/dev/admin-notes/`.
3637

38+
## Environment Governance
39+
40+
`docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md` defines the official environment model, environment invariance rule, shared API/service contract rule, required Supabase/Postgres/R2 services, required R2 prefixes, and SQLite retired status.
41+
3742
## Merge Control
3843

3944
No PR in this operating system is merged without explicit owner approval.

docs_build/dev/ProjectInstructions/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ Addendum index:
4949
- Codex Artifact and Reporting Standard: project-instructions/addendums/codex-artifact-and-reporting-standard.md
5050
- Codex Project Instructions Startup: project-instructions/addendums/codex-project-instructions-startup.md
5151
- Project Reference Files Governance: docs_build/dev/ProjectInstructions/addendums/project_reference_files.md
52+
- Environment Governance Model: docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md

0 commit comments

Comments
 (0)