|
| 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` |
0 commit comments