|
| 1 | +# Release Contract Tests Validation |
| 2 | + |
| 3 | +PR: `PR_26152_082-release-contract-tests` |
| 4 | + |
| 5 | +## Scope |
| 6 | + |
| 7 | +- Added `src/shared/contracts/releaseContract.js`. |
| 8 | +- Added `tests/shared/ReleaseContract.test.mjs`. |
| 9 | +- Added `tests/fixtures/releases/release-scenarios.json`. |
| 10 | +- Added `docs/dev/specs/RELEASE_CONTRACT.md`. |
| 11 | + |
| 12 | +No database, authentication, UI, CSS, HTML, runtime page, or samples changes were made. |
| 13 | + |
| 14 | +## Contract Rules Validated |
| 15 | + |
| 16 | +- Release requires owner. |
| 17 | +- Release requires project. |
| 18 | +- Release requires source manifest. |
| 19 | +- Release cannot bypass ownership, visibility, or permissions. |
| 20 | +- Published releases are immutable unless policy allows patching. |
| 21 | +- Retired releases remain historically referenceable. |
| 22 | +- Release version must be valid. |
| 23 | +- Release visibility must be valid. |
| 24 | + |
| 25 | +## Validation Commands |
| 26 | + |
| 27 | +- `node --check src/shared/contracts/releaseContract.js` - PASS |
| 28 | +- `node --check tests/shared/ReleaseContract.test.mjs` - PASS |
| 29 | +- `node tests/shared/ReleaseContract.test.mjs` - PASS |
| 30 | +- `node tests/shared/GameManifestContract.test.mjs` - PASS |
| 31 | +- `node tests/shared/ProjectContract.test.mjs` - PASS |
| 32 | +- `node tests/shared/ProjectWorkspaceRuntimeContract.test.mjs` - PASS |
| 33 | +- `node tests/shared/ToolStateContract.test.mjs` - PASS |
| 34 | +- `node tests/shared/IdentityPermissionsContract.test.mjs` - PASS |
| 35 | +- `$files = Get-ChildItem tests/shared/tools -Filter *.test.mjs | Sort-Object Name; foreach ($file in $files) { node $file.FullName; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } }` - PASS, 36 tool contract tests ran |
| 36 | +- `git diff --name-only -- '*.css' '*.html'` - PASS, no output |
| 37 | +- `rg -n "\s+$" src/shared/contracts/releaseContract.js tests/shared/ReleaseContract.test.mjs tests/fixtures/releases/release-scenarios.json docs/dev/specs/RELEASE_CONTRACT.md` - PASS, no trailing whitespace |
| 38 | +- `git diff --cached --name-only` - PASS, no staged files |
| 39 | + |
| 40 | +## Validation Lanes |
| 41 | + |
| 42 | +- Lanes executed: contract validation for Release, Manifest, Project Type, Project Workspace, Project, Tool State, Tool contracts, and Identity/Permissions. |
| 43 | +- Lanes skipped: runtime, integration, engine, samples, and recovery/UAT because this PR does not change runtime behavior, handoff contracts, engine surfaces, samples, or recovery behavior. |
| 44 | +- Samples decision: SKIP because this PR is limited to contract/docs/test surfaces. |
| 45 | +- Playwright impacted: No. This PR is contract/docs/test only and does not change UI or browser runtime behavior. |
| 46 | + |
| 47 | +## Expected PASS Behavior |
| 48 | + |
| 49 | +- Valid Release contract records are accepted. |
| 50 | +- Missing owner, missing project, missing source manifest, invalid source manifest, invalid version, invalid visibility, and missing published timestamp are rejected. |
| 51 | +- Release source manifest references are validated against the Game Manifest reference shape. |
| 52 | +- Release access remains bound to Project and Identity/Permissions contracts. |
| 53 | +- Published releases cannot be edited unless policy allows patching. |
| 54 | +- Retired releases remain historically referenceable. |
| 55 | + |
| 56 | +## Expected WARN Behavior |
| 57 | + |
| 58 | +- No WARN behavior was observed in the targeted validation lane. |
0 commit comments