Skip to content

Commit 37b5550

Browse files
committed
Rename Restore Request contract to Restore Snapshot for backup/restore naming consistency - PR_26152_093-restore-snapshot-contract-rename
1 parent 5f41d1e commit 37b5550

9 files changed

Lines changed: 807 additions & 763 deletions

docs/dev/reports/restore_request_contract_tests_validation.md

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Restore Snapshot Contract Rename Validation
2+
3+
PR: PR_26152_093-restore-snapshot-contract-rename
4+
5+
## Scope
6+
7+
- Renamed the restore contract module to `src/shared/contracts/restoreSnapshotContract.js`.
8+
- Renamed the restore contract test to `tests/shared/RestoreSnapshotContract.test.mjs`.
9+
- Renamed restore fixtures to `tests/fixtures/restore-snapshots/restore-snapshot-scenarios.json`.
10+
- Renamed restore spec/report references to Restore Snapshot terminology.
11+
- Kept Backup Snapshot and Restore Snapshot as separate contract, fixture, spec, test, and report surfaces.
12+
13+
## Lanes Executed
14+
15+
- contract - restore snapshot syntax and targeted contract validation.
16+
- dependent contract - backup snapshot and migration plan validation to verify rename compatibility.
17+
18+
## Lanes Skipped
19+
20+
- runtime - no runtime behavior changed.
21+
- UI/CSS/HTML - no UI, CSS, or HTML files changed.
22+
- samples - samples are out of scope for contract rename validation.
23+
- repo-wide tests - explicitly out of scope.
24+
25+
## Commands
26+
27+
- PASS: `node --check src/shared/contracts/restoreSnapshotContract.js`
28+
- PASS: `node --check tests/shared/RestoreSnapshotContract.test.mjs`
29+
- PASS: `node tests/shared/RestoreSnapshotContract.test.mjs`
30+
- PASS: `node tests/shared/BackupSnapshotContract.test.mjs`
31+
- PASS: `node tests/shared/MigrationPlanContract.test.mjs`
32+
33+
## Reference Check
34+
35+
- PASS: Active restore source/test/fixture/spec/report references use Restore Snapshot terminology.
36+
- PASS: Backup Snapshot remains separate and was not consolidated with Restore Snapshot.
37+
38+
## Expected PASS Behavior
39+
40+
- Restore Snapshot contract exports, validation names, fixture keys, test names, and documentation references resolve under Restore Snapshot terminology.
41+
- Backup Snapshot contract tests and Migration Plan contract tests continue to pass.
42+
43+
## Expected WARN Behavior
44+
45+
- None.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Restore Snapshot Contract Tests Validation
2+
3+
PR: PR_26152_092-backup-restore-contract-tests
4+
5+
## Scope
6+
7+
- Added `src/shared/contracts/restoreSnapshotContract.js`.
8+
- Added `tests/shared/RestoreSnapshotContract.test.mjs`.
9+
- Added `tests/fixtures/restore-snapshots/restore-snapshot-scenarios.json`.
10+
- Added `docs/dev/specs/RESTORE_SNAPSHOT_CONTRACT.md`.
11+
- Restore Snapshot contract remains metadata-only and does not contain runtime state, toolState, file bytes, auth session state, installer state, updater implementation details, or storage implementation details.
12+
13+
## Lanes Executed
14+
15+
- contract - restore snapshot contract syntax and targeted fixture validation.
16+
- contract dependencies - migration plan, version compatibility, update channel, install receipt, library item, project, and identity/permissions contract compatibility.
17+
18+
## Lanes Skipped
19+
20+
- runtime - no runtime behavior changed.
21+
- UI/CSS/HTML - no UI, CSS, or HTML files changed.
22+
- samples - samples are out of scope for contract-only validation.
23+
- repo-wide tests - explicitly out of scope.
24+
25+
## Commands
26+
27+
- PASS: `node --check src/shared/contracts/restoreSnapshotContract.js`
28+
- PASS: `node --check tests/shared/RestoreSnapshotContract.test.mjs`
29+
- PASS: `node tests/shared/RestoreSnapshotContract.test.mjs`
30+
- PASS: `node tests/shared/MigrationPlanContract.test.mjs`
31+
- PASS: `node tests/shared/VersionCompatibilityContract.test.mjs`
32+
- PASS: `node tests/shared/UpdateChannelContract.test.mjs`
33+
- PASS: `node tests/shared/InstallReceiptContract.test.mjs`
34+
- PASS: `node tests/shared/LibraryItemContract.test.mjs`
35+
- PASS: `node tests/shared/ProjectContract.test.mjs`
36+
- PASS: `node tests/shared/IdentityPermissionsContract.test.mjs`
37+
38+
## Expected PASS Behavior
39+
40+
- Valid restore snapshot fixtures pass.
41+
- Invalid restore snapshot fixtures reject missing owner/project/link records, mismatched backup/release/compatibility linkage, blocked or incompatible compatibility gates, invalid timestamps, and forbidden runtime/tool/file/auth/installer/updater/storage fields.
42+
- Existing dependent contract tests remain compatible.
43+
44+
## Expected WARN Behavior
45+
46+
- None.
47+

docs/dev/specs/RESTORE_REQUEST_CONTRACT.md renamed to docs/dev/specs/RESTORE_SNAPSHOT_CONTRACT.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Restore Request Contract
1+
# Restore Snapshot Contract
22

33
## Purpose
44

5-
Restore Request records describe a metadata-only request to restore from a Backup Snapshot into a target Release context.
5+
Restore Snapshot records describe a metadata-only restore point created from a Backup Snapshot into a target Release context.
66

77
The record links the restore owner, project, backup snapshot, target release, and version compatibility records. It does not store restore payload data, runtime state, toolState, file bytes, auth session state, installer state, updater implementation details, or storage implementation details.
88

99
## Ownership
1010

11-
- Every Restore Request requires `ownerId`.
12-
- The Restore Request owner must match `backupSnapshot.ownerId`.
13-
- The Restore Request owner must match `versionCompatibility.ownerId`.
11+
- Every Restore Snapshot requires `ownerId`.
12+
- The Restore Snapshot owner must match `backupSnapshot.ownerId`.
13+
- The Restore Snapshot owner must match `versionCompatibility.ownerId`.
1414

1515
## Required Linkage
1616

17-
- `projectId` links the request to the persisted Project container.
17+
- `projectId` links the restore snapshot to the persisted Project container.
1818
- `backupSnapshot` identifies the Backup Snapshot selected for restore.
1919
- `targetRelease` identifies the published or retired Release target.
2020
- `versionCompatibility` identifies the compatibility gate for the target restore path.
@@ -31,7 +31,7 @@ The record links the restore owner, project, backup snapshot, target release, an
3131

3232
## Boundaries
3333

34-
Restore Request records must not contain:
34+
Restore Snapshot records must not contain:
3535

3636
- runtime state
3737
- toolState or tool payloads
@@ -45,7 +45,6 @@ Restore Request records must not contain:
4545

4646
Targeted validation lives in:
4747

48-
- `src/shared/contracts/restoreRequestContract.js`
49-
- `tests/shared/RestoreRequestContract.test.mjs`
50-
- `tests/fixtures/restore-requests/restore-request-scenarios.json`
51-
48+
- `src/shared/contracts/restoreSnapshotContract.js`
49+
- `tests/shared/RestoreSnapshotContract.test.mjs`
50+
- `tests/fixtures/restore-snapshots/restore-snapshot-scenarios.json`

0 commit comments

Comments
 (0)