Skip to content

Commit 4ddc854

Browse files
committed
Add DEV R2 project asset storage contract - PR_26167_200-r2-project-assets-dev-storage
1 parent 1e4dd73 commit 4ddc854

10 files changed

Lines changed: 1902 additions & 852 deletions

docs_build/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,60 @@ Rules:
350350
- Local session state must resolve selected users and roles from persisted Memory DB `users`, `roles`, and `user_roles` records.
351351
- Missing users or roles must fail visibly with actionable diagnostics.
352352

353+
## ENVIRONMENT CONFIGURATION GOVERNANCE
354+
355+
Runtime startup loads `.env` only.
356+
357+
The following files are copy-source files only:
358+
- `.env.dev`
359+
- `.env.ist`
360+
- `.env.uat`
361+
- `.env.prd`
362+
363+
Valid deployment targets are:
364+
- `DEV`
365+
- `IST`
366+
- `UAT`
367+
- `PRD`
368+
369+
Manual deployment-target flow:
370+
1. Copy the selected `.env.<target>` file to `.env`.
371+
2. Run validation.
372+
3. Apply DDL/DML migrations.
373+
4. Start runtime.
374+
375+
Runtime environment parameters are prohibited.
376+
377+
Do not introduce runtime parameters such as:
378+
- `--env`
379+
- `--environment`
380+
- `ENVIRONMENT=DEV`
381+
- `ENVIRONMENT=UAT`
382+
- `ENVIRONMENT=PRD`
383+
384+
`DEV`, `IST`, `UAT`, and `PRD` are deployment targets, not application behaviors.
385+
386+
Application code, runtime code, API/service code, and DB runtime scripts must not branch behavior by deployment target name.
387+
388+
## RUNTIME SCRIPT NAMING GOVERNANCE
389+
390+
Active runtime script names should describe capability rather than vendor/provider.
391+
392+
Preferred runtime naming nouns are:
393+
- `auth`
394+
- `database`
395+
- `storage`
396+
- `telemetry`
397+
- `api`
398+
399+
Avoid provider or vendor names in future active runtime script names.
400+
401+
When an active script is renamed, a temporary compatibility wrapper may remain only when needed for command continuity.
402+
403+
Compatibility wrappers must log:
404+
405+
`Deprecated script name. Use <new-name>.`
406+
353407
## ARCHIVED V1/V2 REFERENCE MATERIAL
354408

355409
Deprecated V1/V2 reference material lives under:

docs_build/dev/admin-notes/index.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22
[.] Start the server
33
npm run dev:local-api
44

5+
[x] Deploy DEV, IST, UAT, PRD
6+
node .\scripts\validate-supabase-dev.mjs
7+
node .\scripts\apply-supabase-dev-ddl.mjs
8+
node .\scripts\validate-supabase-dev.mjs
9+
npm run dev:local-api
10+
11+
[x] Users/PSWD
512
- Update DEV Supabase identity seed so only these test identities remain:
613
- User 1, email user1@example.invalid, password GFS1
714
- User 2, email user2@example.invalid, password GFS2
815
- User 3, email user3@example.invalid, password GFS3
916
- DavidQ, email qbytes.dq@gmail.com, password GFS$2026
10-
17+
1118
[x] move
1219
src\assets\fonts\0xProtoNerdFont\ to assets\theme-v2\fonts\
1320
src\assets\fonts\vector_battle\ to assets\theme-v2\fonts\
1421
delete src\assets\
1522

1623

17-
18-
1924
# Admin Notes Ownership
2025

2126
Admin Notes are dev-only documentation artifacts.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# PR_26167_199-env-copy-source-governance
2+
3+
Status: PASS with unrelated worktree note
4+
5+
## Branch Validation
6+
- PASS: Current branch is `main`.
7+
- Expected branch: `main`.
8+
9+
## Summary
10+
- Added targeted Project Instructions governance for `.env` runtime loading, copy-source env files, deployment targets, and script naming.
11+
- Added vendor-neutral active script names:
12+
- `scripts/validate-runtime-connections.mjs`
13+
- `scripts/apply-database-ddl.mjs`
14+
- Kept compatibility wrappers for the old script names with the required deprecation messages.
15+
16+
## Requirement Checklist
17+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before execution.
18+
- PASS: Hard-stop branch check passed on `main`.
19+
- PASS: Documented that runtime loads `.env` only.
20+
- PASS: Documented `.env.dev`, `.env.ist`, `.env.uat`, and `.env.prd` as copy-source files only.
21+
- PASS: Documented manual flow: copy selected target file to `.env`, run validation, apply DDL/DML migrations, start runtime.
22+
- PASS: Documented valid deployment targets: `DEV`, `IST`, `UAT`, `PRD`.
23+
- PASS: Prohibited runtime environment parameters including `--env`, `--environment`, `ENVIRONMENT=DEV`, `ENVIRONMENT=UAT`, and `ENVIRONMENT=PRD`.
24+
- PASS: Stated that deployment targets are not application behaviors.
25+
- PASS: Added script naming governance.
26+
- PASS: Added preferred naming nouns: `auth`, `database`, `storage`, `telemetry`, `api`.
27+
- PASS: Documented avoidance of provider/vendor names in future active runtime script names.
28+
- PASS: Renamed `scripts/validate-supabase-dev.mjs` to `scripts/validate-runtime-connections.mjs`.
29+
- PASS: Renamed `scripts/apply-supabase-dev-ddl.mjs` to `scripts/apply-database-ddl.mjs`.
30+
- PASS: Kept compatibility wrapper `scripts/validate-supabase-dev.mjs`.
31+
- PASS: Kept compatibility wrapper `scripts/apply-supabase-dev-ddl.mjs`.
32+
- PASS: Wrapper output includes `Deprecated script name. Use validate-runtime-connections.mjs.`
33+
- PASS: Wrapper output includes `Deprecated script name. Use apply-database-ddl.mjs.`
34+
35+
## Script Rename Mapping
36+
- `scripts/validate-supabase-dev.mjs` -> `scripts/validate-runtime-connections.mjs`.
37+
- `scripts/apply-supabase-dev-ddl.mjs` -> `scripts/apply-database-ddl.mjs`.
38+
- Added npm alias: `validate:runtime-connections`.
39+
- Kept npm compatibility alias: `validate:supabase-dev`.
40+
41+
## Validation Lane Report
42+
- PASS: `node --check scripts\validate-runtime-connections.mjs`.
43+
- PASS: `node --check scripts\apply-database-ddl.mjs`.
44+
- PASS: `node --check scripts\validate-supabase-dev.mjs`.
45+
- PASS: `node --check scripts\apply-supabase-dev-ddl.mjs`.
46+
- PASS: `node -e` package JSON parse.
47+
- PASS: docs/static governance assertion over `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
48+
- PASS: `node --use-system-ca .\scripts\validate-runtime-connections.mjs`.
49+
- PASS: `node .\scripts\apply-database-ddl.mjs`.
50+
- PASS: `node --use-system-ca .\scripts\validate-supabase-dev.mjs`.
51+
- PASS: `node .\scripts\apply-supabase-dev-ddl.mjs`.
52+
- PASS: `npm run validate:runtime-connections`.
53+
- WARN: Full-worktree `git diff --check` failed on pre-existing unrelated `docs_build/dev/admin-notes/index.txt` trailing whitespace.
54+
- PASS: Scoped PR199 `git diff --check -- docs_build\dev\PROJECT_INSTRUCTIONS.md package.json scripts\validate-runtime-connections.mjs scripts\apply-database-ddl.mjs scripts\validate-supabase-dev.mjs scripts\apply-supabase-dev-ddl.mjs`.
55+
- SKIP: Playwright; not required because this PR changes docs/governance and script naming only.
56+
- SKIP: Full samples smoke; not in scope.
57+
58+
## Manual Validation Notes
59+
- New validator script executed successfully and returned `Overall Result: PASS`.
60+
- New DDL script executed successfully and applied 15 grouped DDL files.
61+
- Compatibility wrappers executed successfully and printed the required deprecation messages before running the new scripts.
62+
- Existing unrelated worktree change `docs_build/dev/admin-notes/index.txt` was not modified or packaged.
63+
64+
## Artifact Output
65+
- PASS: Repo-structured ZIP created at `tmp/PR_26167_199-env-copy-source-governance_delta.zip`.
66+
67+
## Changed Files
68+
- `docs_build/dev/PROJECT_INSTRUCTIONS.md`
69+
- `package.json`
70+
- `scripts/validate-runtime-connections.mjs`
71+
- `scripts/apply-database-ddl.mjs`
72+
- `scripts/validate-supabase-dev.mjs`
73+
- `scripts/apply-supabase-dev-ddl.mjs`
74+
- `docs_build/dev/reports/PR_26167_199-env-copy-source-governance.md`
75+
- `docs_build/dev/reports/codex_review.diff`
76+
- `docs_build/dev/reports/codex_changed_files.txt`
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.env.example
2-
scripts/apply-supabase-dev-ddl.mjs
3-
scripts/start-local-api-server.mjs
1+
docs_build/dev/PROJECT_INSTRUCTIONS.md
2+
package.json
3+
scripts/validate-runtime-connections.mjs
4+
scripts/apply-database-ddl.mjs
45
scripts/validate-supabase-dev.mjs
5-
src/dev-runtime/auth/provider-contract-stubs.mjs
6-
src/dev-runtime/persistence/postgres-connection-client.mjs
7-
docs_build/dev/reports/PR_26167_198-database-ssl-mode-contract.md
6+
scripts/apply-supabase-dev-ddl.mjs
7+
docs_build/dev/reports/PR_26167_199-env-copy-source-governance.md
88
docs_build/dev/reports/codex_review.diff
99
docs_build/dev/reports/codex_changed_files.txt

0 commit comments

Comments
 (0)