|
| 1 | +# Install Receipt Contract Tests Validation |
| 2 | + |
| 3 | +PR: `PR_26152_088-install-receipt-contract-tests` |
| 4 | + |
| 5 | +## Scope |
| 6 | + |
| 7 | +- Added Install Receipt contract definition under `src/shared/contracts`. |
| 8 | +- Added Install Receipt fixture scenarios. |
| 9 | +- Added Install Receipt targeted contract test suite. |
| 10 | +- Added Install Receipt contract specification document. |
| 11 | +- No database, authentication, payment, CDN, installer, file delivery, UI, HTML, CSS, or runtime implementation changes. |
| 12 | + |
| 13 | +## Commands |
| 14 | + |
| 15 | +| Command | Result | |
| 16 | +| --- | --- | |
| 17 | +| `node --check src/shared/contracts/installReceiptContract.js` | PASS | |
| 18 | +| `node --check tests/shared/InstallReceiptContract.test.mjs` | PASS | |
| 19 | +| `node tests/shared/InstallReceiptContract.test.mjs` | PASS | |
| 20 | +| `node tests/shared/LibraryItemContract.test.mjs` | PASS | |
| 21 | +| `node tests/shared/DownloadGrantContract.test.mjs` | PASS | |
| 22 | +| `node tests/shared/EntitlementContract.test.mjs` | PASS | |
| 23 | +| `node tests/shared/MarketplaceListingContract.test.mjs` | PASS | |
| 24 | +| `node tests/shared/PublishContract.test.mjs` | PASS | |
| 25 | +| `node tests/shared/ReleaseContract.test.mjs` | PASS | |
| 26 | +| `node tests/shared/ProjectContract.test.mjs` | PASS | |
| 27 | +| `node tests/shared/IdentityPermissionsContract.test.mjs` | PASS | |
| 28 | +| `git diff --name-only -- '*.css' '*.html'` | PASS - no CSS or HTML changes | |
| 29 | +| `git diff --check` | PASS | |
| 30 | + |
| 31 | +## Contract Coverage |
| 32 | + |
| 33 | +Validated Install Receipt rules: |
| 34 | + |
| 35 | +- Install Receipt requires owner. |
| 36 | +- Install Receipt requires project. |
| 37 | +- Install Receipt requires Library Item linkage. |
| 38 | +- Install Receipt requires Entitlement linkage. |
| 39 | +- Install Receipt requires Marketplace Listing linkage. |
| 40 | +- Install Receipt requires source Release linkage. |
| 41 | +- Install Receipt requires source Publish linkage. |
| 42 | +- `libraryItem.ownerId` and `entitlement.ownerId` must match `ownerId`. |
| 43 | +- `libraryItem.projectId` and `entitlement.projectId` must match `projectId`. |
| 44 | +- `libraryItem.entitlementId` must match `entitlement.entitlementId`. |
| 45 | +- `libraryItem.listingId` and `entitlement.listingId` must match `marketplaceListing.listingId`. |
| 46 | +- `libraryItem.releaseId`, `entitlement.releaseId`, and `marketplaceListing.releaseId` must match `sourceRelease.releaseId`. |
| 47 | +- `libraryItem.publishId`, `entitlement.publishId`, and `marketplaceListing.publishId` must match `sourcePublish.publishId`. |
| 48 | +- `sourcePublish.releaseId` must match `sourceRelease.releaseId`. |
| 49 | +- Receipt status is limited to `installed`, `removed`, `failed`, and `superseded`. |
| 50 | +- Installed receipts require `installedAt`. |
| 51 | +- Install Receipt access remains owner-private unless platform administration permission applies. |
| 52 | + |
| 53 | +Validated forbidden leakage: |
| 54 | + |
| 55 | +- Payment state rejected. |
| 56 | +- Auth session state rejected. |
| 57 | +- Runtime state rejected. |
| 58 | +- ToolState data rejected. |
| 59 | +- File bytes rejected. |
| 60 | +- CDN details rejected. |
| 61 | +- Installer implementation details rejected. |
| 62 | + |
| 63 | +## Samples Decision |
| 64 | + |
| 65 | +SKIP. This PR only changes shared contract definitions, contract fixtures, contract tests, docs/specs, and reports. Samples are not in scope. |
| 66 | + |
| 67 | +## Playwright |
| 68 | + |
| 69 | +Playwright impacted: No. This PR has no UI, runtime, tool behavior, rendering, or page changes. |
| 70 | + |
| 71 | +## Manual Validation |
| 72 | + |
| 73 | +1. Review `docs/dev/specs/INSTALL_RECEIPT_CONTRACT.md`. |
| 74 | +2. Review `src/shared/contracts/installReceiptContract.js`. |
| 75 | +3. Confirm Install Receipt links to Library Item, Entitlement, Marketplace Listing, Project, Release, Publish, and owner records. |
| 76 | +4. Confirm Install Receipt does not carry payment, auth session, runtime, toolState, file bytes, CDN details, or installer implementation details. |
| 77 | +5. Confirm `docs/dev/reports/codex_review.diff` and `docs/dev/reports/codex_changed_files.txt` exist for review. |
0 commit comments