|
| 1 | +# Version Compatibility Contract Tests Validation |
| 2 | + |
| 3 | +PR: `PR_26152_090-version-compatibility-contract-tests` |
| 4 | + |
| 5 | +## Scope |
| 6 | + |
| 7 | +- Added Version Compatibility contract definition under `src/shared/contracts`. |
| 8 | +- Added Version Compatibility fixture scenarios. |
| 9 | +- Added Version Compatibility targeted contract test suite. |
| 10 | +- Added Version Compatibility contract specification document. |
| 11 | +- No database, authentication, installer, updater, migration, file delivery, download, UI, HTML, CSS, or runtime implementation changes. |
| 12 | + |
| 13 | +## Commands |
| 14 | + |
| 15 | +| Command | Result | |
| 16 | +| --- | --- | |
| 17 | +| `node --check src/shared/contracts/versionCompatibilityContract.js` | PASS | |
| 18 | +| `node --check tests/shared/VersionCompatibilityContract.test.mjs` | PASS | |
| 19 | +| `node tests/shared/VersionCompatibilityContract.test.mjs` | PASS | |
| 20 | +| `node tests/shared/UpdateChannelContract.test.mjs` | PASS | |
| 21 | +| `node tests/shared/InstallReceiptContract.test.mjs` | PASS | |
| 22 | +| `node tests/shared/LibraryItemContract.test.mjs` | PASS | |
| 23 | +| `node tests/shared/DownloadGrantContract.test.mjs` | PASS | |
| 24 | +| `node tests/shared/EntitlementContract.test.mjs` | PASS | |
| 25 | +| `node tests/shared/MarketplaceListingContract.test.mjs` | PASS | |
| 26 | +| `node tests/shared/PublishContract.test.mjs` | PASS | |
| 27 | +| `node tests/shared/ReleaseContract.test.mjs` | PASS | |
| 28 | +| `node tests/shared/ProjectContract.test.mjs` | PASS | |
| 29 | +| `node tests/shared/IdentityPermissionsContract.test.mjs` | PASS | |
| 30 | +| `git diff --name-only -- '*.css' '*.html'` | PASS - no CSS or HTML changes | |
| 31 | +| `git diff --check` | PASS | |
| 32 | +| `npm run codex:review-artifacts` | PASS | |
| 33 | + |
| 34 | +## Contract Coverage |
| 35 | + |
| 36 | +Validated Version Compatibility rules: |
| 37 | + |
| 38 | +- Version Compatibility requires owner. |
| 39 | +- Version Compatibility requires project. |
| 40 | +- Version Compatibility requires source Release linkage. |
| 41 | +- Version Compatibility requires source Publish linkage. |
| 42 | +- Version Compatibility requires Update Channel linkage. |
| 43 | +- Version Compatibility requires Library Item linkage. |
| 44 | +- Version Compatibility requires Install Receipt linkage. |
| 45 | +- `updateChannel.ownerId`, `libraryItem.ownerId`, and `installReceipt.ownerId` must match `ownerId`. |
| 46 | +- `sourceRelease.projectId`, `sourcePublish.projectId`, `updateChannel.projectId`, `libraryItem.projectId`, and `installReceipt.projectId` must match `projectId`. |
| 47 | +- `sourcePublish.releaseId`, `updateChannel.releaseId`, `libraryItem.releaseId`, and `installReceipt.releaseId` must match `sourceRelease.releaseId`. |
| 48 | +- `updateChannel.publishId`, `libraryItem.publishId`, and `installReceipt.publishId` must match `sourcePublish.publishId`. |
| 49 | +- `installReceipt.libraryItemId` must match `libraryItem.libraryItemId`. |
| 50 | +- `minimumVersion`, `maximumVersion`, `targetVersion`, and `supportedSchemaVersion` must be positive integers. |
| 51 | +- `minimumVersion` must be less than or equal to `maximumVersion`. |
| 52 | +- `targetVersion` must be inside the supported range. |
| 53 | +- `targetVersion` must match `sourceRelease.version`. |
| 54 | +- Compatibility state is limited to `incompatible`, `compatible`, `deprecated`, and `blocked`. |
| 55 | +- Version Compatibility access remains owner-private unless platform administration permission applies. |
| 56 | + |
| 57 | +Validated forbidden leakage: |
| 58 | + |
| 59 | +- Runtime state rejected. |
| 60 | +- ToolState data rejected. |
| 61 | +- Installer state rejected. |
| 62 | +- Updater implementation details rejected. |
| 63 | +- Migration implementation details rejected. |
| 64 | +- File bytes 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/VERSION_COMPATIBILITY_CONTRACT.md`. |
| 78 | +2. Review `src/shared/contracts/versionCompatibilityContract.js`. |
| 79 | +3. Confirm Version Compatibility links to Project, Release, Publish, Update Channel, Library Item, Install Receipt, and owner records. |
| 80 | +4. Confirm version range validation covers `minimumVersion`, `maximumVersion`, `targetVersion`, and `supportedSchemaVersion`. |
| 81 | +5. Confirm compatibility states are limited to `incompatible`, `compatible`, `deprecated`, and `blocked`. |
| 82 | +6. Confirm Version Compatibility does not carry runtime, toolState, installer, updater, migration, file bytes, or download state. |
| 83 | +7. Confirm `docs/dev/reports/codex_review.diff` and `docs/dev/reports/codex_changed_files.txt` exist for review. |
0 commit comments