@futdevpro/fsm-dynamo 1.20.2 → 1.20.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/README.md +28 -8
  2. package/__documentations/2026-08-22-angular-20-phase1-release.md +39 -39
  3. package/__documentations/2026-08-23-atomic-rollback-manifest-contract.md +52 -0
  4. package/build/_modules/deployment/_collections/atomic-rollback-manifest.util.d.ts +9 -0
  5. package/build/_modules/deployment/_collections/atomic-rollback-manifest.util.d.ts.map +1 -0
  6. package/build/_modules/deployment/_collections/atomic-rollback-manifest.util.js +354 -0
  7. package/build/_modules/deployment/_collections/atomic-rollback-manifest.util.js.map +1 -0
  8. package/build/_modules/deployment/_models/atomic-rollback-manifest.interface.d.ts +54 -0
  9. package/build/_modules/deployment/_models/atomic-rollback-manifest.interface.d.ts.map +1 -0
  10. package/build/_modules/deployment/_models/atomic-rollback-manifest.interface.js +3 -0
  11. package/build/_modules/deployment/_models/atomic-rollback-manifest.interface.js.map +1 -0
  12. package/build/_modules/deployment/index.d.ts +3 -0
  13. package/build/_modules/deployment/index.d.ts.map +1 -0
  14. package/build/_modules/deployment/index.js +6 -0
  15. package/build/_modules/deployment/index.js.map +1 -0
  16. package/package.json +10 -1
  17. package/src/_modules/crypto/_services/artifact-signature.control-service.spec.ts +2 -2
  18. package/src/_modules/crypto/_services/artifact-signature.control-service.ts +10 -10
  19. package/src/_modules/deployment/_collections/atomic-rollback-manifest.util.spec.ts +221 -0
  20. package/src/_modules/deployment/_collections/atomic-rollback-manifest.util.ts +455 -0
  21. package/src/_modules/deployment/_models/atomic-rollback-manifest.interface.ts +59 -0
  22. package/src/_modules/deployment/index.ts +2 -0
package/README.md CHANGED
@@ -401,9 +401,28 @@ const decrypted = DyFM_Crypto.decrypt(encrypted, 'my-secret-key');
401
401
  For publication authenticity, `DyFM_ArtifactSignature_ControlService` signs exact caller-provided bytes with a
402
402
  PKCS#8 private key and verifies them with a public P-256 JWK. Private material belongs in the consuming server's
403
403
  FDP Keystore configuration and is never returned in signature evidence or sent to a browser. The verifier works
404
- through Web Crypto in secure browser contexts and supported Node.js runtimes.
405
-
406
- ### 9. Custom Data Module
404
+ through Web Crypto in secure browser contexts and supported Node.js runtimes.
405
+
406
+ ### Deployment Contract Module
407
+
408
+ **Import:** `@futdevpro/fsm-dynamo/deployment`
409
+
410
+ Shared, content-free deployment target contracts for FDP operational tooling.
411
+
412
+ **Key Features:**
413
+ - Strict `fdp-atomic-rollback-manifest/1` parsing with unknown-field rejection
414
+ - Canonical, order-independent target checksum generation
415
+ - Immutable image reference, digest and mutable promotion-target validation
416
+ - Configuration revision, compatibility-policy and authority-evidence validation
417
+ - Safe post-check endpoint validation and bounded gap-code evidence
418
+
419
+ The module validates only operational metadata. Application data, workbook content, secrets and credentials do not
420
+ belong in the manifest and are rejected when supplied as additional fields.
421
+
422
+ Use `DyFM_AtomicRollbackManifest_Util.validate(value)` for strict parsing and
423
+ `DyFM_AtomicRollbackManifest_Util.computeTargetChecksum(manifest)` for canonical target checksums.
424
+
425
+ ### 9. Custom Data Module
407
426
 
408
427
  **Import:** `@futdevpro/fsm-dynamo/custom-data`
409
428
 
@@ -649,9 +668,10 @@ import { ... } from '@futdevpro/fsm-dynamo/data-handler';
649
668
  import { ... } from '@futdevpro/fsm-dynamo/location';
650
669
  import { ... } from '@futdevpro/fsm-dynamo/messaging';
651
670
  import { ... } from '@futdevpro/fsm-dynamo/socket';
652
- import { ... } from '@futdevpro/fsm-dynamo/pipe';
653
- import { ... } from '@futdevpro/fsm-dynamo/crypto';
654
- import { ... } from '@futdevpro/fsm-dynamo/custom-data';
671
+ import { ... } from '@futdevpro/fsm-dynamo/pipe';
672
+ import { ... } from '@futdevpro/fsm-dynamo/crypto';
673
+ import { ... } from '@futdevpro/fsm-dynamo/deployment';
674
+ import { ... } from '@futdevpro/fsm-dynamo/custom-data';
655
675
  import { ... } from '@futdevpro/fsm-dynamo/test';
656
676
  import { ... } from '@futdevpro/fsm-dynamo/usage';
657
677
  import { ... } from '@futdevpro/fsm-dynamo/ci-tools';
@@ -661,10 +681,10 @@ For detailed API documentation, refer to the [Dynamo FSM Documentation](https://
661
681
 
662
682
  ## Requirements
663
683
 
664
- - **TypeScript**: 5.5.4 or higher
684
+ - **TypeScript**: 5.9.3 or higher
665
685
  - **Node.js**: Compatible with Node.js LTS versions
666
686
  - **Peer Dependencies**:
667
- - `rxjs`: 7.8.1
687
+ - `rxjs`: 7.8.2
668
688
 
669
689
  ## Support & Contributing
670
690
 
@@ -1,39 +1,39 @@
1
- # Angular 20 fleet Phase 1 release evidence
2
-
3
- Date: 2026-08-22
4
- Scope: `@futdevpro/fsm-dynamo` 1.20 generation bootstrap for BFR-CTM-006
5
-
6
- ## Outcome
7
-
8
- The package is aligned with the fleet Angular 20 shared-runtime baseline without changing its public API:
9
-
10
- - package generation normalized from `01.16.x` to `1.20.x`;
11
- - TypeScript upgraded to `~5.9.3`;
12
- - RxJS peer upgraded to `~7.8.2`;
13
- - `tslib`, Node types and UUID aligned with the fleet version matrix;
14
- - TypeScript 5.9's `Uint8Array<ArrayBufferLike>` Web Crypto incompatibility was resolved by preserving
15
- the concrete `ArrayBuffer` backing type at every cryptographic boundary.
16
-
17
- The typed-array change is compile-time precision only. Signing, verification, checksum comparison,
18
- private-key zeroing and content-free error codes retain their existing runtime behavior.
19
-
20
- ## Verification
21
-
22
- - clean dependency installation completed with pnpm 11.22.0;
23
- - TypeScript 5.9 build completed successfully;
24
- - build completeness: all 326 source TypeScript files have emitted JavaScript;
25
- - Jasmine: 1563 specifications, 0 failures, 72 explicitly pending;
26
- - production dependency audit: no known vulnerabilities;
27
- - no public export was removed and the `./ngx-models` subpath remains present.
28
-
29
- ## Bootstrap note
30
-
31
- The pre-release install reports one temporary peer finding through the old
32
- `@futdevpro/dynamo-eslint@1.15.x` development dependency: that package still pulls
33
- `@futdevpro/fsm-dynamo@1.15.21`, whose peer is RxJS 7.8.1. Phase 2 replaces that lint package with the
34
- 1.20 generation immediately after this publish. The final post-Phase-2 verification must therefore
35
- repeat a fresh install and peer check before the Angular package is released.
36
-
37
- The legacy import and naming validators also expose existing repository-wide debt and a flat-config
38
- runtime incompatibility in the 1.15 lint package. These findings are not attributed to the TypeScript
39
- or RxJS change; the flat-config runtime failure is a Phase 2 release gate.
1
+ # Angular 20 fleet Phase 1 release evidence
2
+
3
+ Date: 2026-08-22
4
+ Scope: `@futdevpro/fsm-dynamo` 1.20 generation bootstrap for BFR-CTM-006
5
+
6
+ ## Outcome
7
+
8
+ The package is aligned with the fleet Angular 20 shared-runtime baseline without changing its public API:
9
+
10
+ - package generation normalized from `01.16.x` to `1.20.x`;
11
+ - TypeScript upgraded to `~5.9.3`;
12
+ - RxJS peer upgraded to `~7.8.2`;
13
+ - `tslib`, Node types and UUID aligned with the fleet version matrix;
14
+ - TypeScript 5.9's `Uint8Array<ArrayBufferLike>` Web Crypto incompatibility was resolved by preserving
15
+ the concrete `ArrayBuffer` backing type at every cryptographic boundary.
16
+
17
+ The typed-array change is compile-time precision only. Signing, verification, checksum comparison,
18
+ private-key zeroing and content-free error codes retain their existing runtime behavior.
19
+
20
+ ## Verification
21
+
22
+ - clean dependency installation completed with pnpm 11.22.0;
23
+ - TypeScript 5.9 build completed successfully;
24
+ - build completeness: all 326 source TypeScript files have emitted JavaScript;
25
+ - Jasmine: 1563 specifications, 0 failures, 72 explicitly pending;
26
+ - production dependency audit: no known vulnerabilities;
27
+ - no public export was removed and the `./ngx-models` subpath remains present.
28
+
29
+ ## Bootstrap note
30
+
31
+ The pre-release install reports one temporary peer finding through the old
32
+ `@futdevpro/dynamo-eslint@1.15.x` development dependency: that package still pulls
33
+ `@futdevpro/fsm-dynamo@1.15.21`, whose peer is RxJS 7.8.1. Phase 2 replaces that lint package with the
34
+ 1.20 generation immediately after this publish. The final post-Phase-2 verification must therefore
35
+ repeat a fresh install and peer check before the Angular package is released.
36
+
37
+ The legacy import and naming validators also expose existing repository-wide debt and a flat-config
38
+ runtime incompatibility in the 1.15 lint package. These findings are not attributed to the TypeScript
39
+ or RxJS change; the flat-config runtime failure is a Phase 2 release gate.
@@ -0,0 +1,52 @@
1
+ # Atomic rollback manifest contract release evidence
2
+
3
+ Date: 2026-08-23
4
+ Scope: `@futdevpro/fsm-dynamo/deployment` 1.20.5 for BFR-CTM-022
5
+
6
+ ## Outcome
7
+
8
+ The reusable, content-free atomic rollout and rollback target contract is now owned by Dynamo FSM instead of a
9
+ single application or deployment host:
10
+
11
+ - `fdp-atomic-rollback-manifest/1` describes the exact environment, authority evidence, source revision,
12
+ configuration revision and checksum, compatibility policy, immutable image targets, mutable promotion targets,
13
+ expected digests and post-deployment probes;
14
+ - strict parsing rejects unknown fields, invalid cardinalities, duplicated services or checks, non-targeted checks,
15
+ unsafe endpoints and all image, configuration, authority or checksum substitutions;
16
+ - canonical target checksums are stable when image and post-check sets arrive in a different order;
17
+ - validation evidence is bounded and content-free: it never returns registry references, endpoints, arbitrary input
18
+ fields or their values;
19
+ - the feature is additive and available only through the new `@futdevpro/fsm-dynamo/deployment` secondary entry
20
+ point; no existing export was removed or changed.
21
+
22
+ The wire-level contract and gap-code namespace deliberately remain `FDP|ATOMIC_ROLLBACK|...` because the same
23
+ manifest crosses the FDP CLI, FDP DevOps and deployment-host boundaries. TypeScript symbols follow the Dynamo FSM
24
+ `DyFM_` prefix.
25
+
26
+ ## Cross-runtime checksum evidence
27
+
28
+ The representative two-service Company Toolmaker target has this fixed SHA-256 checksum:
29
+
30
+ `2b416434a8d36c5b3305383eb1f2ecebae4057d30d2f46d986d04728225b58df`
31
+
32
+ The new CryptoJS-backed Dynamo implementation and the original Node `crypto` implementation produced the exact
33
+ same value. The fixed vector is asserted in the shared contract test so a future canonicalization drift fails the
34
+ release gate.
35
+
36
+ ## Verification
37
+
38
+ - TypeScript 5.9 build completed successfully;
39
+ - build completeness verified: all 329 source TypeScript files have emitted JavaScript;
40
+ - focused Jasmine contract suite: 7 specifications, 0 failures;
41
+ - full Jasmine regression suite: 1570 specifications, 0 failures, 72 explicitly pending legacy specifications;
42
+ - deployment-module ESLint: 0 errors and 0 warnings;
43
+ - production dependency audit: no known vulnerabilities;
44
+ - package manifest JSON and the new secondary export resolve from the emitted build;
45
+ - `git diff --check` found no source or package whitespace errors.
46
+
47
+ ## Consumer migration gate
48
+
49
+ FDP DevOps and FDP CLI must consume this exact secondary entry point before their local copies or partial validators
50
+ are removed. BFR-CTM-022 remains active until the Company Toolmaker test environment completes the required
51
+ preflight and induced-failure compensation rehearsal; publishing this contract alone does not claim that deployment
52
+ evidence.
@@ -0,0 +1,9 @@
1
+ import { DyFM_AtomicRollbackLocalValidation_Interface, DyFM_AtomicRollbackManifest_Interface } from '../_models/atomic-rollback-manifest.interface';
2
+ /** Canonical manifest checksum and strict content-free local validation. */
3
+ export declare class DyFM_AtomicRollbackManifest_Util {
4
+ /** Calculates the canonical SHA-256 target checksum for a typed manifest. */
5
+ static computeTargetChecksum(manifest: DyFM_AtomicRollbackManifest_Interface): string;
6
+ /** Validates an unknown manifest without reflecting rejected content. */
7
+ static validate(value: unknown): DyFM_AtomicRollbackLocalValidation_Interface;
8
+ }
9
+ //# sourceMappingURL=atomic-rollback-manifest.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-rollback-manifest.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/deployment/_collections/atomic-rollback-manifest.util.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,4CAA4C,EAC5C,qCAAqC,EAEtC,MAAM,+CAA+C,CAAC;AA0UvD,4EAA4E;AAC5E,qBAAa,gCAAgC;IAC3C,6EAA6E;WAC/D,qBAAqB,CAAC,QAAQ,EAAE,qCAAqC,GAAG,MAAM;IAI5F,yEAAyE;WAC3D,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,4CAA4C;CA0GrF"}
@@ -0,0 +1,354 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyFM_AtomicRollbackManifest_Util = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const CryptoJS = tslib_1.__importStar(require("crypto-js"));
6
+ const dyfm_exactManifestKeys = [
7
+ 'authority',
8
+ 'configuration',
9
+ 'contractVersion',
10
+ 'environment',
11
+ 'images',
12
+ 'operationId',
13
+ 'postChecks',
14
+ 'sourceRevision',
15
+ 'targetChecksum',
16
+ ].join(',');
17
+ const dyfm_exactAuthorityKeys = 'evidenceId,principalId';
18
+ const dyfm_exactConfigurationKeys = 'compatibilityVersion,policyChecksum,revision,sha256';
19
+ const dyfm_exactImageKeys = 'digest,immutableReference,mutableReference,service,version';
20
+ const dyfm_exactPostCheckKeys = 'checkId,endpoint,expectedProbeContract,service';
21
+ const dyfm_revisionPattern = /^[0-9a-f]{40}$/u;
22
+ const dyfm_sha256Pattern = /^[0-9a-f]{64}$/u;
23
+ const dyfm_digestPattern = /^sha256:[0-9a-f]{64}$/u;
24
+ const dyfm_operationPattern = /^rollback_[0-9a-f]{32}$/u;
25
+ const dyfm_safeIdPattern = /^[a-z0-9][a-z0-9._-]{0,127}$/u;
26
+ const dyfm_versionPattern = /^[0-9A-Za-z][0-9A-Za-z._-]{0,63}$/u;
27
+ const dyfm_compatibilityPattern = /^[a-z0-9][a-z0-9-]{1,63}\/[1-9][0-9]{0,8}$/u;
28
+ const dyfm_contractPattern = /^[a-z0-9][a-z0-9-]{1,63}\/[1-9][0-9]{0,8}$/u;
29
+ const dyfm_imageReferencePattern = /^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*(?::[0-9]+)?\/)+[a-z0-9]+(?:[._-][a-z0-9]+)*:[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;
30
+ /** Determines whether an unknown value is a non-array object. */
31
+ function dyfm_isRecord(value) {
32
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
33
+ }
34
+ /** Compares an object's sorted keys with one exact key signature. */
35
+ function dyfm_hasExactKeys(value, expected) {
36
+ return Object.keys(value).sort().join(',') === expected;
37
+ }
38
+ /** Narrows a value to a deployment environment supported by the contract. */
39
+ function dyfm_isEnvironment(value) {
40
+ return value === 'test' || value === 'production';
41
+ }
42
+ /** Allows bounded HTTPS probes and service-local HTTP probes without credentials or query data. */
43
+ function dyfm_isSafePostCheckEndpoint(value, service) {
44
+ if (value.length > 2048) {
45
+ return false;
46
+ }
47
+ try {
48
+ const endpoint = new URL(value);
49
+ if (endpoint.username
50
+ || endpoint.password
51
+ || endpoint.search
52
+ || endpoint.hash
53
+ || !/^\/[A-Za-z0-9/_-]{0,127}$/u.test(endpoint.pathname)) {
54
+ return false;
55
+ }
56
+ if (endpoint.protocol === 'https:') {
57
+ return true;
58
+ }
59
+ return endpoint.protocol === 'http:'
60
+ && [service, '127.0.0.1', 'localhost'].includes(endpoint.hostname);
61
+ }
62
+ catch {
63
+ return false;
64
+ }
65
+ }
66
+ /** Parses bounded deployment authority evidence without returning rejected content. */
67
+ function dyfm_parseAuthority(value, gapCodes) {
68
+ if (!dyfm_isRecord(value) || !dyfm_hasExactKeys(value, dyfm_exactAuthorityKeys)) {
69
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|AUTHORITY_SHAPE_INVALID');
70
+ return undefined;
71
+ }
72
+ if (typeof value.principalId !== 'string' || !dyfm_safeIdPattern.test(value.principalId)) {
73
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|AUTHORITY_PRINCIPAL_INVALID');
74
+ }
75
+ if (typeof value.evidenceId !== 'string' || !dyfm_sha256Pattern.test(value.evidenceId)) {
76
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|AUTHORITY_EVIDENCE_INVALID');
77
+ }
78
+ if (typeof value.principalId !== 'string'
79
+ || typeof value.evidenceId !== 'string'
80
+ || gapCodes.some((code) => code.startsWith('FDP|ATOMIC_ROLLBACK|AUTHORITY_'))) {
81
+ return undefined;
82
+ }
83
+ return { principalId: value.principalId, evidenceId: value.evidenceId };
84
+ }
85
+ /** Parses an exact configuration and compatibility target. */
86
+ function dyfm_parseConfiguration(value, gapCodes) {
87
+ if (!dyfm_isRecord(value) || !dyfm_hasExactKeys(value, dyfm_exactConfigurationKeys)) {
88
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|CONFIGURATION_SHAPE_INVALID');
89
+ return undefined;
90
+ }
91
+ if (typeof value.revision !== 'string' || !dyfm_revisionPattern.test(value.revision)) {
92
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|CONFIGURATION_REVISION_INVALID');
93
+ }
94
+ if (typeof value.sha256 !== 'string' || !dyfm_sha256Pattern.test(value.sha256)) {
95
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|CONFIGURATION_CHECKSUM_INVALID');
96
+ }
97
+ if (typeof value.compatibilityVersion !== 'string'
98
+ || !dyfm_compatibilityPattern.test(value.compatibilityVersion)) {
99
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|CONFIGURATION_COMPATIBILITY_INVALID');
100
+ }
101
+ if (typeof value.policyChecksum !== 'string' || !dyfm_sha256Pattern.test(value.policyChecksum)) {
102
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|CONFIGURATION_POLICY_CHECKSUM_INVALID');
103
+ }
104
+ if (typeof value.revision !== 'string'
105
+ || typeof value.sha256 !== 'string'
106
+ || typeof value.compatibilityVersion !== 'string'
107
+ || typeof value.policyChecksum !== 'string'
108
+ || gapCodes.some((code) => code.startsWith('FDP|ATOMIC_ROLLBACK|CONFIGURATION_'))) {
109
+ return undefined;
110
+ }
111
+ return {
112
+ revision: value.revision,
113
+ sha256: value.sha256,
114
+ compatibilityVersion: value.compatibilityVersion,
115
+ policyChecksum: value.policyChecksum,
116
+ };
117
+ }
118
+ /** Parses the complete immutable image promotion set. */
119
+ function dyfm_parseImages(value, gapCodes) {
120
+ if (!Array.isArray(value) || value.length < 1 || value.length > 16) {
121
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|IMAGE_SET_CARDINALITY_INVALID');
122
+ return [];
123
+ }
124
+ const images = [];
125
+ for (const candidate of value) {
126
+ if (!dyfm_isRecord(candidate) || !dyfm_hasExactKeys(candidate, dyfm_exactImageKeys)) {
127
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|IMAGE_SHAPE_INVALID');
128
+ continue;
129
+ }
130
+ const service = typeof candidate.service === 'string' ? candidate.service : undefined;
131
+ const version = typeof candidate.version === 'string' ? candidate.version : undefined;
132
+ const immutableReference = typeof candidate.immutableReference === 'string'
133
+ ? candidate.immutableReference
134
+ : undefined;
135
+ const mutableReference = typeof candidate.mutableReference === 'string'
136
+ ? candidate.mutableReference
137
+ : undefined;
138
+ const digest = typeof candidate.digest === 'string' ? candidate.digest : undefined;
139
+ if (!service || !dyfm_safeIdPattern.test(service)) {
140
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|IMAGE_SERVICE_INVALID');
141
+ continue;
142
+ }
143
+ if (!version || !dyfm_versionPattern.test(version)) {
144
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|IMAGE_VERSION_INVALID|${service}`);
145
+ continue;
146
+ }
147
+ if (!immutableReference
148
+ || immutableReference.length > 512
149
+ || !dyfm_imageReferencePattern.test(immutableReference)
150
+ || !immutableReference.endsWith(`/${service}:release-${version}`)) {
151
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|IMAGE_IMMUTABLE_REFERENCE_INVALID|${service}`);
152
+ continue;
153
+ }
154
+ if (!mutableReference
155
+ || mutableReference.length > 512
156
+ || !dyfm_imageReferencePattern.test(mutableReference)
157
+ || !mutableReference.endsWith(`/${service}:release`)) {
158
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|IMAGE_MUTABLE_REFERENCE_INVALID|${service}`);
159
+ continue;
160
+ }
161
+ if (immutableReference.slice(0, immutableReference.lastIndexOf(':'))
162
+ !== mutableReference.slice(0, mutableReference.lastIndexOf(':'))) {
163
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|IMAGE_REPOSITORY_MISMATCH|${service}`);
164
+ continue;
165
+ }
166
+ if (!digest || !dyfm_digestPattern.test(digest)) {
167
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|IMAGE_DIGEST_INVALID|${service}`);
168
+ continue;
169
+ }
170
+ images.push({
171
+ service: service,
172
+ version: version,
173
+ immutableReference: immutableReference,
174
+ mutableReference: mutableReference,
175
+ digest: digest,
176
+ });
177
+ }
178
+ const services = images.map((image) => image.service);
179
+ if (new Set(services).size !== services.length) {
180
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|IMAGE_SERVICE_DUPLICATED');
181
+ }
182
+ return images;
183
+ }
184
+ /** Parses bounded post-deployment checks targeting manifest services only. */
185
+ function dyfm_parsePostChecks(value, gapCodes) {
186
+ if (!Array.isArray(value) || value.length < 1 || value.length > 32) {
187
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|POST_CHECK_SET_CARDINALITY_INVALID');
188
+ return [];
189
+ }
190
+ const postChecks = [];
191
+ for (const candidate of value) {
192
+ if (!dyfm_isRecord(candidate) || !dyfm_hasExactKeys(candidate, dyfm_exactPostCheckKeys)) {
193
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|POST_CHECK_SHAPE_INVALID');
194
+ continue;
195
+ }
196
+ const checkId = typeof candidate.checkId === 'string' ? candidate.checkId : undefined;
197
+ const service = typeof candidate.service === 'string' ? candidate.service : undefined;
198
+ const endpoint = typeof candidate.endpoint === 'string' ? candidate.endpoint : undefined;
199
+ const expectedProbeContract = typeof candidate.expectedProbeContract === 'string'
200
+ ? candidate.expectedProbeContract
201
+ : undefined;
202
+ if (!checkId || !dyfm_safeIdPattern.test(checkId)) {
203
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|POST_CHECK_ID_INVALID');
204
+ continue;
205
+ }
206
+ if (!service || !dyfm_safeIdPattern.test(service)) {
207
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|POST_CHECK_SERVICE_INVALID|${checkId}`);
208
+ continue;
209
+ }
210
+ if (!endpoint || !dyfm_isSafePostCheckEndpoint(endpoint, service)) {
211
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|POST_CHECK_ENDPOINT_INVALID|${checkId}`);
212
+ continue;
213
+ }
214
+ if (!expectedProbeContract || !dyfm_contractPattern.test(expectedProbeContract)) {
215
+ gapCodes.push(`FDP|ATOMIC_ROLLBACK|POST_CHECK_CONTRACT_INVALID|${checkId}`);
216
+ continue;
217
+ }
218
+ postChecks.push({
219
+ checkId: checkId,
220
+ service: service,
221
+ endpoint: endpoint,
222
+ expectedProbeContract: expectedProbeContract,
223
+ });
224
+ }
225
+ if (new Set(postChecks.map((check) => check.checkId)).size
226
+ !== postChecks.length) {
227
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|POST_CHECK_ID_DUPLICATED');
228
+ }
229
+ return postChecks;
230
+ }
231
+ /** Creates the exact, insertion-order-independent JSON value hashed by every producer and consumer. */
232
+ function dyfm_canonicalTarget(manifest) {
233
+ return JSON.stringify({
234
+ contractVersion: manifest.contractVersion,
235
+ operationId: manifest.operationId,
236
+ environment: manifest.environment,
237
+ authority: {
238
+ principalId: manifest.authority.principalId,
239
+ evidenceId: manifest.authority.evidenceId,
240
+ },
241
+ sourceRevision: manifest.sourceRevision,
242
+ configuration: {
243
+ revision: manifest.configuration.revision,
244
+ sha256: manifest.configuration.sha256,
245
+ compatibilityVersion: manifest.configuration.compatibilityVersion,
246
+ policyChecksum: manifest.configuration.policyChecksum,
247
+ },
248
+ images: [...manifest.images].sort((left, right) => left.service
249
+ .localeCompare(right.service)).map((image) => ({
250
+ service: image.service,
251
+ version: image.version,
252
+ immutableReference: image.immutableReference,
253
+ mutableReference: image.mutableReference,
254
+ digest: image.digest,
255
+ })),
256
+ postChecks: [...manifest.postChecks].sort((left, right) => left
257
+ .checkId.localeCompare(right.checkId)).map((check) => ({
258
+ checkId: check.checkId,
259
+ service: check.service,
260
+ endpoint: check.endpoint,
261
+ expectedProbeContract: check.expectedProbeContract,
262
+ })),
263
+ });
264
+ }
265
+ /** Canonical manifest checksum and strict content-free local validation. */
266
+ class DyFM_AtomicRollbackManifest_Util {
267
+ /** Calculates the canonical SHA-256 target checksum for a typed manifest. */
268
+ static computeTargetChecksum(manifest) {
269
+ return CryptoJS.SHA256(dyfm_canonicalTarget(manifest)).toString();
270
+ }
271
+ /** Validates an unknown manifest without reflecting rejected content. */
272
+ static validate(value) {
273
+ if (!dyfm_isRecord(value) || !dyfm_hasExactKeys(value, dyfm_exactManifestKeys)) {
274
+ return {
275
+ contractVersion: 'fdp-atomic-rollback-local-validation/1',
276
+ valid: false,
277
+ environment: 'invalid',
278
+ operationId: 'invalid',
279
+ targetChecksum: 'invalid',
280
+ serviceCount: 0,
281
+ postCheckCount: 0,
282
+ gapCodes: ['FDP|ATOMIC_ROLLBACK|MANIFEST_SHAPE_INVALID'],
283
+ };
284
+ }
285
+ const gapCodes = [];
286
+ if (value.contractVersion !== 'fdp-atomic-rollback-manifest/1') {
287
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|CONTRACT_VERSION_INVALID');
288
+ }
289
+ if (typeof value.operationId !== 'string' || !dyfm_operationPattern.test(value.operationId)) {
290
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|OPERATION_ID_INVALID');
291
+ }
292
+ if (!dyfm_isEnvironment(value.environment)) {
293
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|ENVIRONMENT_INVALID');
294
+ }
295
+ if (typeof value.sourceRevision !== 'string' || !dyfm_revisionPattern.test(value.sourceRevision)) {
296
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|SOURCE_REVISION_INVALID');
297
+ }
298
+ const authority = dyfm_parseAuthority(value.authority, gapCodes);
299
+ const configuration = dyfm_parseConfiguration(value.configuration, gapCodes);
300
+ const images = dyfm_parseImages(value.images, gapCodes);
301
+ const postChecks = dyfm_parsePostChecks(value.postChecks, gapCodes);
302
+ const imageServices = new Set(images.map((image) => image.service));
303
+ if (postChecks.some((check) => !imageServices.has(check.service))) {
304
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|POST_CHECK_SERVICE_NOT_TARGETED');
305
+ }
306
+ if (typeof value.targetChecksum !== 'string' || !dyfm_sha256Pattern.test(value.targetChecksum)) {
307
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|TARGET_CHECKSUM_INVALID');
308
+ }
309
+ let manifest;
310
+ if (!gapCodes.length
311
+ && typeof value.operationId === 'string'
312
+ && dyfm_isEnvironment(value.environment)
313
+ && authority
314
+ && typeof value.sourceRevision === 'string'
315
+ && configuration
316
+ && images.length > 0
317
+ && postChecks.length > 0
318
+ && typeof value.targetChecksum === 'string') {
319
+ manifest = {
320
+ contractVersion: 'fdp-atomic-rollback-manifest/1',
321
+ operationId: value.operationId,
322
+ environment: value.environment,
323
+ authority: authority,
324
+ sourceRevision: value.sourceRevision,
325
+ configuration: configuration,
326
+ images: images,
327
+ postChecks: postChecks,
328
+ targetChecksum: value.targetChecksum,
329
+ };
330
+ if (this.computeTargetChecksum(manifest) !== value.targetChecksum) {
331
+ gapCodes.push('FDP|ATOMIC_ROLLBACK|TARGET_CHECKSUM_MISMATCH');
332
+ manifest = undefined;
333
+ }
334
+ }
335
+ const normalizedGapCodes = [...new Set(gapCodes)].sort();
336
+ return {
337
+ contractVersion: 'fdp-atomic-rollback-local-validation/1',
338
+ valid: !normalizedGapCodes.length,
339
+ environment: dyfm_isEnvironment(value.environment) ? value.environment : 'invalid',
340
+ operationId: !normalizedGapCodes.length && typeof value.operationId === 'string'
341
+ ? value.operationId
342
+ : 'invalid',
343
+ targetChecksum: !normalizedGapCodes.length && typeof value.targetChecksum === 'string'
344
+ ? value.targetChecksum
345
+ : 'invalid',
346
+ serviceCount: images.length,
347
+ postCheckCount: postChecks.length,
348
+ gapCodes: normalizedGapCodes,
349
+ ...(manifest ? { manifest: manifest } : {}),
350
+ };
351
+ }
352
+ }
353
+ exports.DyFM_AtomicRollbackManifest_Util = DyFM_AtomicRollbackManifest_Util;
354
+ //# sourceMappingURL=atomic-rollback-manifest.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-rollback-manifest.util.js","sourceRoot":"","sources":["../../../../src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AAC,CAAC,KAAK,CAAC,cAAc;gBACtB,CAAC,CAAC,SAAS;YACb,YAAY,EAAE,MAAM,CAAC,MAAM;YAC3B,cAAc,EAAE,UAAU,CAAC,MAAM;YACjC,QAAQ,EAAE,kBAAkB;YAC5B,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5C,CAAC;IACJ,CAAC;CACF;AAjHD,4EAiHC"}
@@ -0,0 +1,54 @@
1
+ /** Deployment environments accepted by the shared atomic rollback contract. */
2
+ export type DyFM_AtomicRollbackEnvironment_Type = 'test' | 'production';
3
+ /** Content-free authority reference supplied by the deployment control plane. */
4
+ export interface DyFM_AtomicRollbackAuthority_Interface {
5
+ principalId: string;
6
+ evidenceId: string;
7
+ }
8
+ /** Exact version-controlled configuration and database compatibility target. */
9
+ export interface DyFM_AtomicRollbackConfiguration_Interface {
10
+ revision: string;
11
+ sha256: string;
12
+ compatibilityVersion: string;
13
+ policyChecksum: string;
14
+ }
15
+ /** One immutable image target and its mutable release promotion destination. */
16
+ export interface DyFM_AtomicRollbackImage_Interface {
17
+ service: string;
18
+ version: string;
19
+ immutableReference: string;
20
+ mutableReference: string;
21
+ digest: string;
22
+ }
23
+ /** One bounded post-deployment probe tied to a service in the image set. */
24
+ export interface DyFM_AtomicRollbackPostCheck_Interface {
25
+ checkId: string;
26
+ service: string;
27
+ endpoint: string;
28
+ expectedProbeContract: string;
29
+ }
30
+ /** Complete versioned target for an atomic multi-service rollout or rollback. */
31
+ export interface DyFM_AtomicRollbackManifest_Interface {
32
+ contractVersion: 'fdp-atomic-rollback-manifest/1';
33
+ operationId: string;
34
+ environment: DyFM_AtomicRollbackEnvironment_Type;
35
+ authority: DyFM_AtomicRollbackAuthority_Interface;
36
+ sourceRevision: string;
37
+ configuration: DyFM_AtomicRollbackConfiguration_Interface;
38
+ images: DyFM_AtomicRollbackImage_Interface[];
39
+ postChecks: DyFM_AtomicRollbackPostCheck_Interface[];
40
+ targetChecksum: string;
41
+ }
42
+ /** Bounded content-free validation evidence for an unknown manifest value. */
43
+ export interface DyFM_AtomicRollbackLocalValidation_Interface {
44
+ contractVersion: 'fdp-atomic-rollback-local-validation/1';
45
+ valid: boolean;
46
+ environment: DyFM_AtomicRollbackEnvironment_Type | 'invalid';
47
+ operationId: string | 'invalid';
48
+ targetChecksum: string | 'invalid';
49
+ serviceCount: number;
50
+ postCheckCount: number;
51
+ gapCodes: string[];
52
+ manifest?: DyFM_AtomicRollbackManifest_Interface;
53
+ }
54
+ //# sourceMappingURL=atomic-rollback-manifest.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-rollback-manifest.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/deployment/_models/atomic-rollback-manifest.interface.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,MAAM,mCAAmC,GAAG,MAAM,GAAG,YAAY,CAAC;AAExE,iFAAiF;AACjF,MAAM,WAAW,sCAAsC;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,gFAAgF;AAChF,MAAM,WAAW,0CAA0C;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,gFAAgF;AAChF,MAAM,WAAW,kCAAkC;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4EAA4E;AAC5E,MAAM,WAAW,sCAAsC;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,iFAAiF;AACjF,MAAM,WAAW,qCAAqC;IACpD,eAAe,EAAE,gCAAgC,CAAC;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,mCAAmC,CAAC;IACjD,SAAS,EAAE,sCAAsC,CAAC;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,0CAA0C,CAAC;IAC1D,MAAM,EAAE,kCAAkC,EAAE,CAAC;IAC7C,UAAU,EAAE,sCAAsC,EAAE,CAAC;IACrD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,8EAA8E;AAC9E,MAAM,WAAW,4CAA4C;IAC3D,eAAe,EAAE,wCAAwC,CAAC;IAC1D,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,mCAAmC,GAAG,SAAS,CAAC;IAC7D,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,qCAAqC,CAAC;CAClD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=atomic-rollback-manifest.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-rollback-manifest.interface.js","sourceRoot":"","sources":["../../../../src/_modules/deployment/_models/atomic-rollback-manifest.interface.ts"],"names":[],"mappings":""}