|
| 1 | +# Update Channel Contract Tests Validation |
| 2 | + |
| 3 | +PR: `PR_26152_089-update-channel-contract-tests` |
| 4 | + |
| 5 | +## Scope |
| 6 | + |
| 7 | +- Added Update Channel contract definition under `src/shared/contracts`. |
| 8 | +- Added Update Channel fixture scenarios. |
| 9 | +- Added Update Channel targeted contract test suite. |
| 10 | +- Added Update Channel contract specification document. |
| 11 | +- No database, authentication, payment, installer, updater, download, UI, HTML, CSS, or runtime implementation changes. |
| 12 | + |
| 13 | +## Commands |
| 14 | + |
| 15 | +| Command | Result | |
| 16 | +| --- | --- | |
| 17 | +| `node --check src/shared/contracts/updateChannelContract.js` | PASS | |
| 18 | +| `node --check tests/shared/UpdateChannelContract.test.mjs` | PASS | |
| 19 | +| `node tests/shared/UpdateChannelContract.test.mjs` | PASS | |
| 20 | +| `node tests/shared/InstallReceiptContract.test.mjs` | PASS | |
| 21 | +| `node tests/shared/LibraryItemContract.test.mjs` | PASS | |
| 22 | +| `node tests/shared/DownloadGrantContract.test.mjs` | PASS | |
| 23 | +| `node tests/shared/EntitlementContract.test.mjs` | PASS | |
| 24 | +| `node tests/shared/MarketplaceListingContract.test.mjs` | PASS | |
| 25 | +| `node tests/shared/PublishContract.test.mjs` | PASS | |
| 26 | +| `node tests/shared/ReleaseContract.test.mjs` | PASS | |
| 27 | +| `node tests/shared/ProjectContract.test.mjs` | PASS | |
| 28 | +| `node tests/shared/IdentityPermissionsContract.test.mjs` | PASS | |
| 29 | +| `git diff --name-only -- '*.css' '*.html'` | PASS - no CSS or HTML changes | |
| 30 | +| `git diff --check` | PASS | |
| 31 | +| `npm run codex:review-artifacts` | PASS | |
| 32 | + |
| 33 | +## Contract Coverage |
| 34 | + |
| 35 | +Validated Update Channel rules: |
| 36 | + |
| 37 | +- Update Channel requires owner. |
| 38 | +- Update Channel requires project. |
| 39 | +- Update Channel requires valid channel type. |
| 40 | +- Allowed channel types are `stable`, `beta`, `alpha`, and `preview`. |
| 41 | +- Update Channel requires assigned Release. |
| 42 | +- Update Channel requires assigned Publish record. |
| 43 | +- Update Channel requires Library Item linkage. |
| 44 | +- Update Channel requires Install Receipt linkage. |
| 45 | +- Update Channel requires `assignedAt`. |
| 46 | +- `libraryItem.ownerId` and `installReceipt.ownerId` must match `ownerId`. |
| 47 | +- `assignedRelease.projectId`, `assignedPublish.projectId`, `libraryItem.projectId`, and `installReceipt.projectId` must match `projectId`. |
| 48 | +- `assignedPublish.releaseId` must match `assignedRelease.releaseId`. |
| 49 | +- `libraryItem.releaseId` and `installReceipt.releaseId` must match `assignedRelease.releaseId`. |
| 50 | +- `libraryItem.publishId` and `installReceipt.publishId` must match `assignedPublish.publishId`. |
| 51 | +- `installReceipt.libraryItemId` must match `libraryItem.libraryItemId`. |
| 52 | +- Promotion moves toward the stable channel in the order `preview` -> `alpha` -> `beta` -> `stable`. |
| 53 | +- Promotion cannot move backward or target the same channel. |
| 54 | +- Promotion requires `promotesFrom` and `promotedAt` together. |
| 55 | +- Update Channel access remains owner-private unless platform administration permission applies. |
| 56 | + |
| 57 | +Validated forbidden leakage: |
| 58 | + |
| 59 | +- Payment state rejected. |
| 60 | +- Auth session state rejected. |
| 61 | +- Runtime state rejected. |
| 62 | +- ToolState data rejected. |
| 63 | +- Installer state rejected. |
| 64 | +- Updater implementation details rejected. |
| 65 | +- Download state rejected. |
| 66 | + |
| 67 | +## Samples Decision |
| 68 | + |
| 69 | +SKIP. This PR only changes shared contract definitions, contract fixtures, contract tests, docs/specs, and reports. Samples are not in scope. |
| 70 | + |
| 71 | +## Playwright |
| 72 | + |
| 73 | +Playwright impacted: No. This PR has no UI, runtime, tool behavior, rendering, or page changes. |
| 74 | + |
| 75 | +## Manual Validation |
| 76 | + |
| 77 | +1. Review `docs/dev/specs/UPDATE_CHANNEL_CONTRACT.md`. |
| 78 | +2. Review `src/shared/contracts/updateChannelContract.js`. |
| 79 | +3. Confirm Update Channel links to Project, Release, Publish, Library Item, Install Receipt, and owner records. |
| 80 | +4. Confirm Update Channel promotion only moves from `preview` toward `stable`. |
| 81 | +5. Confirm Update Channel does not carry payment, auth session, runtime, toolState, installer, updater, or download state. |
| 82 | +6. Confirm `docs/dev/reports/codex_review.diff` and `docs/dev/reports/codex_changed_files.txt` exist for review. |
0 commit comments