Skip to content

Commit 7f03c45

Browse files
committed
Clarify external environment file ownership
1 parent c84d23b commit 7f03c45

11 files changed

Lines changed: 214 additions & 74 deletions

.env.example

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
# Official environment model:
55
# Local (VS Code) -> DEV -> IST -> UAT -> PROD
66
#
7-
# Official copy-source file names:
7+
# Only this .env.example file is committed to the repository.
8+
# Real .env files are user/environment-owned and must live outside
9+
# the repo clone or be injected by deployment.
10+
#
11+
# Official external copy-source names when a copy-source file is used:
812
# - .env.local
913
# - .env.dev
1014
# - .env.ist
@@ -13,6 +17,16 @@
1317
# Legacy technical debt only:
1418
# - .env.prd
1519
#
20+
# Example external layout:
21+
# - /env/local/.env
22+
# - /env/dev/.env
23+
# - /env/ist/.env
24+
# - /env/uat/.env
25+
# - /env/prod/.env
26+
# - /GFS/ repo clone
27+
#
28+
# The app/runtime reads .env values supplied by the target environment.
29+
#
1630
# Environment invariance:
1731
# Use an identical deployable artifact in every environment.
1832
# Only .env values and environment-managed secret values differ.

docs_build/dev/BUILD_PR.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ This `BUILD_PR.md` and the user request are the source of truth for `PR_26177_OW
3131
- Document one shared API/service contract.
3232
- Document feature flags cannot create permanent environment-specific behavior.
3333
- Review `.env.example` comments/placeholders only.
34+
- Clarify that only `.env.example` is committed to the repository.
35+
- Clarify that real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
36+
- Document the external `/env/<target>/.env` layout next to the `/GFS/` repo clone.
3437
- Do not change runtime behavior.
3538
- Create required Codex reports under `docs_build/dev/reports/`.
3639
- Create repo-structured delta ZIP under `tmp/`.
@@ -61,6 +64,7 @@ This `BUILD_PR.md` and the user request are the source of truth for `PR_26177_OW
6164
- No engine core changes.
6265
- No `start_of_day` folder changes.
6366
- No actual `.env`, `.env.local`, `.env.dev`, `.env.ist`, `.env.uat`, `.env.prod`, or `.env.prd` secret/value file edits.
67+
- No committed real `.env.*` copy-source files.
6468
- No API implementation changes.
6569
- No storage implementation changes.
6670
- No database migration or DDL changes.

docs_build/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,28 @@ Required Cloudflare R2 top-level prefixes:
520520

521521
Derived R2 paths for projects, backups, exports, or future storage lanes must stay under the matching top-level prefix for the active environment.
522522

523-
The following files are copy-source files only:
523+
Only `.env.example` is committed to the repository.
524+
525+
Real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
526+
527+
Official external environment file names when a copy-source file is used outside the repo clone:
524528
- `.env.local`
525529
- `.env.dev`
526530
- `.env.ist`
527531
- `.env.uat`
528532
- `.env.prod`
529533

530-
`.env.prd` is legacy technical debt only. New environment governance uses `.env.prod` and the `PROD` environment name.
534+
Example external layout:
535+
- `/env/local/.env`
536+
- `/env/dev/.env`
537+
- `/env/ist/.env`
538+
- `/env/uat/.env`
539+
- `/env/prod/.env`
540+
- `/GFS/` repo clone
541+
542+
The app/runtime reads `.env` values supplied by the target environment. It must not require real `.env` files to be committed inside the repo clone.
543+
544+
`.env.prd` is legacy technical debt only. New environment governance uses `.env.prod` for external PROD copy-source naming and the `PROD` environment name.
531545

532546
Allowed `GAMEFOUNDRY_ENVIRONMENT` values:
533547
- `local`

docs_build/dev/ProjectInstructions/addendums/environment_configuration_standards.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,30 @@ Deployable artifacts must not contain environment-specific application code, run
2525

2626
## Official Environment Files
2727

28-
Official environment copy-source file names:
28+
Only `.env.example` is committed to the repository.
29+
30+
Real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
31+
32+
Official external environment copy-source file names when a copy-source file is used outside the repo clone:
2933

3034
- `.env.local`
3135
- `.env.dev`
3236
- `.env.ist`
3337
- `.env.uat`
3438
- `.env.prod`
3539

36-
Runtime startup still loads `.env` only. The official flow is to copy the selected source file to `.env` before validation/startup.
40+
Example external layout:
41+
42+
- `/env/local/.env`
43+
- `/env/dev/.env`
44+
- `/env/ist/.env`
45+
- `/env/uat/.env`
46+
- `/env/prod/.env`
47+
- `/GFS/` repo clone
48+
49+
The app/runtime reads `.env` values supplied by the target environment.
50+
51+
Runtime startup still reads `.env` values only. The official flow is for each environment to supply those values from outside the repo clone or through deployment injection before validation/startup.
3752

3853
`.env.prd` is legacy technical debt only. Do not introduce new references to `.env.prd` except when documenting migration or historical compatibility.
3954

docs_build/dev/reports/PR_26177_OWNER_051-environment-configuration-standards.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ Status: PASS
88
## Summary
99

1010
- Built on OWNER_050 by adding official environment configuration standards.
11-
- Standardized official copy-source file names: `.env.local`, `.env.dev`, `.env.ist`, `.env.uat`, and `.env.prod`.
11+
- Clarified that only `.env.example` is committed to the repository.
12+
- Clarified that real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
13+
- Documented external environment layout: `/env/local/.env`, `/env/dev/.env`, `/env/ist/.env`, `/env/uat/.env`, `/env/prod/.env`, and `/GFS/` repo clone.
14+
- Standardized official external copy-source file names: `.env.local`, `.env.dev`, `.env.ist`, `.env.uat`, and `.env.prod`.
1215
- Documented `.env.prd` as legacy technical debt only.
16+
- Clarified that `.env.prod` remains the official PROD naming when a copy-source file is used outside the repo.
1317
- Added allowed `GAMEFOUNDRY_ENVIRONMENT` values: `local`, `dev`, `ist`, `uat`, and `prod`.
1418
- Clarified that `GAMEFOUNDRY_ENVIRONMENT_LABEL` is display-only.
1519
- Preserved the identical deployable artifact rule and the rule that only `.env` values and environment-managed secret values may differ.

docs_build/dev/reports/PR_26177_OWNER_051-environment-configuration-standards_branch-validation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
- No runtime files changed: PASS.
2020
- No UI files changed: PASS.
2121
- No engine core files changed: PASS.
22-
- No actual `.env.*` secret/value files changed: PASS.
22+
- Only `.env.example` was changed; no actual `.env.*` secret/value files changed: PASS.
23+
- Real `.env` files are documented as external or deployment-injected, not repo-owned: PASS.
2324

2425
## Result
2526

docs_build/dev/reports/PR_26177_OWNER_051-environment-configuration-standards_instruction-compliance-checklist.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- [x] Avoided engine core changes.
1414
- [x] Avoided `start_of_day` changes.
1515
- [x] Avoided actual `.env.*` secret/value file edits.
16+
- [x] Clarified only `.env.example` is committed.
17+
- [x] Clarified real `.env` files are external or deployment-injected.
1618
- [x] Did not run Playwright because no runtime files changed.
1719
- [x] Created required Codex reports under `docs_build/dev/reports/`.
1820
- [x] Created repo-structured delta ZIP under `tmp/`.

docs_build/dev/reports/PR_26177_OWNER_051-environment-configuration-standards_manual-validation-notes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ Manual validation was limited to governance/documentation review because this PR
44

55
## Notes
66

7-
- Confirmed official environment file names are `.env.local`, `.env.dev`, `.env.ist`, `.env.uat`, and `.env.prod`.
7+
- Confirmed only `.env.example` is committed to the repository.
8+
- Confirmed real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
9+
- Confirmed external layout documents `/env/local/.env`, `/env/dev/.env`, `/env/ist/.env`, `/env/uat/.env`, `/env/prod/.env`, and `/GFS/` repo clone.
10+
- Confirmed official external copy-source names are `.env.local`, `.env.dev`, `.env.ist`, `.env.uat`, and `.env.prod`.
811
- Confirmed `.env.prd` is documented as legacy technical debt only.
12+
- Confirmed `.env.prod` remains the official PROD naming when a copy-source file is used outside the repo.
913
- Confirmed allowed `GAMEFOUNDRY_ENVIRONMENT` values are `local`, `dev`, `ist`, `uat`, and `prod`.
1014
- Confirmed `GAMEFOUNDRY_ENVIRONMENT_LABEL` is display-only.
1115
- Confirmed only `.env` values and environment-managed secret values may differ by environment.

docs_build/dev/reports/PR_26177_OWNER_051-environment-configuration-standards_requirement-checklist.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22

33
- [x] Keep scope governance/documentation only.
44
- [x] Build on OWNER_050 environment model.
5-
- [x] Standardize `.env.local`.
6-
- [x] Standardize `.env.dev`.
7-
- [x] Standardize `.env.ist`.
8-
- [x] Standardize `.env.uat`.
9-
- [x] Standardize `.env.prod`.
5+
- [x] Clarify only `.env.example` is committed to the repository.
6+
- [x] Clarify real `.env` files are user/environment-owned and must live outside the repo clone or be injected by deployment.
7+
- [x] Document `/env/local/.env`.
8+
- [x] Document `/env/dev/.env`.
9+
- [x] Document `/env/ist/.env`.
10+
- [x] Document `/env/uat/.env`.
11+
- [x] Document `/env/prod/.env`.
12+
- [x] Document `/GFS/` repo clone layout.
13+
- [x] Standardize external copy-source `.env.local`.
14+
- [x] Standardize external copy-source `.env.dev`.
15+
- [x] Standardize external copy-source `.env.ist`.
16+
- [x] Standardize external copy-source `.env.uat`.
17+
- [x] Standardize external copy-source `.env.prod`.
1018
- [x] Treat `.env.prd` as legacy technical debt only.
19+
- [x] Keep `.env.prod` as the official PROD naming when a copy-source file is used outside the repo.
1120
- [x] Define `GAMEFOUNDRY_ENVIRONMENT=local`.
1221
- [x] Define `GAMEFOUNDRY_ENVIRONMENT=dev`.
1322
- [x] Define `GAMEFOUNDRY_ENVIRONMENT=ist`.
@@ -24,6 +33,7 @@
2433
- [x] Document no Local API vs Public API split.
2534
- [x] Document feature flags cannot create permanent environment-specific behavior.
2635
- [x] Review and update `.env.example` comments/placeholders only.
36+
- [x] Remove wording that implies `.env.local`, `.env.dev`, `.env.ist`, `.env.uat`, or `.env.prod` are repo files.
2737
- [x] Do not change runtime behavior.
2838
- [x] Produce PR-specific report.
2939
- [x] Produce branch validation report.

docs_build/dev/reports/PR_26177_OWNER_051-environment-configuration-standards_validation-lane.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Documentation/governance lane.
1717
- Database migration validation skipped: no DDL, migration, or runtime database implementation changed.
1818
- Storage runtime validation skipped: no storage implementation changed.
1919
- Feature flag runtime validation skipped: no feature flag implementation changed.
20+
- External environment file layout validation is documentation-only: no filesystem or deployment changes were made.
2021

2122
## Result
2223

0 commit comments

Comments
 (0)