Skip to content

Commit 2d9c078

Browse files
authored
Merge branch 'main' into aea-6571-remove-app-name-filtring
2 parents b6beea0 + 2654608 commit 2d9c078

32 files changed

Lines changed: 1293 additions & 922 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"args": {
77
"DOCKER_GID": "${env:DOCKER_GID:}",
88
"IMAGE_NAME": "node_24_python_3_12",
9-
"IMAGE_VERSION": "v1.4.8",
9+
"IMAGE_VERSION": "v1.4.9",
1010
"USER_UID": "${localEnv:USER_ID:}",
1111
"USER_GID": "${localEnv:GROUP_ID:}"
1212
},

.github/config/blocked_ods_codes_int.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ FTH09
413413
FTJ10
414414
FTJ17
415415
FTK88
416+
FTL60
416417
FTM51
417418
FTM61
418419
FTP38

.github/config/blocked_ods_codes_prod.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ FTH09
413413
FTJ10
414414
FTJ17
415415
FTK88
416+
FTL60
416417
FTM51
417418
FTM61
418419
FTP38

.github/config/ods_codes_int.txt

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,137 @@ FVR25
171171
FWD53
172172
FL139
173173
FAK27
174+
FLF99
175+
FVL96
176+
FF431
177+
FYJ85
178+
FWW91
179+
FX918
180+
FRC16
181+
FD681
182+
FHJ91
183+
FKC39
184+
FJ513
185+
FLH77
186+
FJD36
187+
FX156
188+
FWF13
189+
FQR31
190+
FQD59
191+
FQW07
192+
FA183
193+
FVX64
194+
FTX59
195+
FRJ31
196+
FE038
197+
FCH29
198+
FAV46
199+
FQA59
200+
FWN32
201+
FVM25
202+
FJA94
203+
FRH84
204+
FC013
205+
FN030
206+
FQA52
207+
FA031
208+
FA078
209+
FA200
210+
FA247
211+
FA550
212+
FA565
213+
FA679
214+
FA883
215+
FA886
216+
FAC02
217+
FAD32
218+
FAD48
219+
FAF65
220+
FAF67
221+
FAJ92
222+
FAK48
223+
FAL58
224+
FAM93
225+
FAR04
226+
FAT07
227+
FAT84
228+
FAV44
229+
FAW81
230+
FAX69
231+
FC001
232+
FC049
233+
FC084
234+
FC133
235+
FC265
236+
FC312
237+
FC561
238+
FC576
239+
FC832
240+
FC896
241+
FCG07
242+
FCG37
243+
FCG77
244+
FCH75
245+
FCK24
246+
FCQ16
247+
FCT22
248+
FCV80
249+
FD019
250+
FD120
251+
FD255
252+
FD357
253+
FD502
254+
FD562
255+
FD643
256+
FD700
257+
FD871
258+
FDE36
259+
FDK88
260+
FDP62
261+
FDR65
262+
FDR86
263+
FDV36
264+
FDW00
265+
FDW12
266+
FDW17
267+
FDW41
268+
FDW87
269+
FE009
270+
FE127
271+
FE213
272+
FE297
273+
FE310
274+
FE319
275+
FE323
276+
FE353
277+
FE394
278+
FE396
279+
FE436
280+
FE438
281+
FE452
282+
FE534
283+
FE733
284+
FE736
285+
FE813
286+
FE991
287+
FEC26
288+
FEC34
289+
FEC64
290+
FED09
291+
FED64
292+
FEF48
293+
FEF70
294+
FEF86
295+
FEK57
296+
FEP39
297+
FEQ00
298+
FEQ63
299+
FEQ64
300+
FEQ79
301+
FEQ90
302+
FET61
303+
FET87
304+
FF077
305+
FF136
306+
FF346
307+
FF521

.github/config/ods_codes_prod.txt

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,137 @@ FVR25
171171
FWD53
172172
FL139
173173
FAK27
174+
FLF99
175+
FVL96
176+
FF431
177+
FYJ85
178+
FWW91
179+
FX918
180+
FRC16
181+
FD681
182+
FHJ91
183+
FKC39
184+
FJ513
185+
FLH77
186+
FJD36
187+
FX156
188+
FWF13
189+
FQR31
190+
FQD59
191+
FQW07
192+
FA183
193+
FVX64
194+
FTX59
195+
FRJ31
196+
FE038
197+
FCH29
198+
FAV46
199+
FQA59
200+
FWN32
201+
FVM25
202+
FJA94
203+
FRH84
204+
FC013
205+
FN030
206+
FQA52
207+
FA031
208+
FA078
209+
FA200
210+
FA247
211+
FA550
212+
FA565
213+
FA679
214+
FA883
215+
FA886
216+
FAC02
217+
FAD32
218+
FAD48
219+
FAF65
220+
FAF67
221+
FAJ92
222+
FAK48
223+
FAL58
224+
FAM93
225+
FAR04
226+
FAT07
227+
FAT84
228+
FAV44
229+
FAW81
230+
FAX69
231+
FC001
232+
FC049
233+
FC084
234+
FC133
235+
FC265
236+
FC312
237+
FC561
238+
FC576
239+
FC832
240+
FC896
241+
FCG07
242+
FCG37
243+
FCG77
244+
FCH75
245+
FCK24
246+
FCQ16
247+
FCT22
248+
FCV80
249+
FD019
250+
FD120
251+
FD255
252+
FD357
253+
FD502
254+
FD562
255+
FD643
256+
FD700
257+
FD871
258+
FDE36
259+
FDK88
260+
FDP62
261+
FDR65
262+
FDR86
263+
FDV36
264+
FDW00
265+
FDW12
266+
FDW17
267+
FDW41
268+
FDW87
269+
FE009
270+
FE127
271+
FE213
272+
FE297
273+
FE310
274+
FE319
275+
FE323
276+
FE353
277+
FE394
278+
FE396
279+
FE436
280+
FE438
281+
FE452
282+
FE534
283+
FE733
284+
FE736
285+
FE813
286+
FE991
287+
FEC26
288+
FEC34
289+
FEC64
290+
FED09
291+
FED64
292+
FEF48
293+
FEF70
294+
FEF86
295+
FEK57
296+
FEP39
297+
FEQ00
298+
FEQ63
299+
FEQ64
300+
FEQ79
301+
FEQ90
302+
FET61
303+
FET87
304+
FF077
305+
FF136
306+
FF346
307+
FF521

.github/instructions/languages/cdk.instructions.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,40 @@ This file provides instructions for generating, reviewing, and maintaining AWS C
2323
- Suppress warnings with `nagSuppressions.ts` only when justified and documented
2424
- Use `bin/` for entrypoint apps, `constructs/` for reusable components, and `stacks/` for stack definitions
2525
- Prefer `props` interfaces for construct configuration
26+
- For Step Functions definitions, prefer a chain-centric style where states are defined inline within `Chain.start(...).next(...)` so the execution flow reads top-to-bottom in one place. Avoid mixing a chain with many separately declared state `const`s; instead embed calls to helper functions directly in the chain when needed.
27+
- For Step Functions chain formatting, place `.start`, `.next`, `.when`, and `.otherwise` on their own lines, and give helper calls such as `.jsonata(...)` the same line-break weight so nested flow blocks are visually aligned and easy to scan.
28+
- For construct props that group resources (for example lambda functions or state machines), prefer explicit named object shapes (e.g. `{status: TypescriptLambdaFunction}`) over generic index signatures or broad maps so consumers are strongly typed to only the supported resources.
29+
- For construct props that consume grouped resources, prefer inline explicit object shapes in the props contract (for example `functions: { status: TypescriptLambdaFunction }`) over `Pick<...>` or generic map types.
30+
31+
### Good Example - Inline Explicit Shape
32+
33+
```typescript
34+
interface ApisProps {
35+
readonly functions: {
36+
readonly status: TypescriptLambdaFunction
37+
}
38+
readonly stateMachines: {
39+
readonly getMyPrescriptions: ExpressStateMachine
40+
}
41+
}
42+
```
43+
44+
### Bad Example - Hidden Contract via Pick
45+
46+
```typescript
47+
interface ApisProps {
48+
readonly functions: Pick<FunctionResources, "status" | "capabilityStatement">
49+
}
50+
```
51+
52+
### Bad Example - Generic Map
53+
54+
```typescript
55+
interface ApisProps {
56+
functions: {[key: string]: TypescriptLambdaFunction}
57+
stateMachines: {[key: string]: ExpressStateMachine}
58+
}
59+
```
2660

2761
## Code Standards
2862

@@ -33,6 +67,7 @@ This file provides instructions for generating, reviewing, and maintaining AWS C
3367
- Variables: camelCase
3468
- Stacks: Suffix with `Stack` (e.g., `CptsApiAppStack`)
3569
- Entry points: Suffix with `App` (e.g., `CptsApiApp.ts`)
70+
- CDK app entry points must follow `<app acronym><Api|Ui>[Sandbox]App` naming (e.g., `PsuApiApp`, `PsuApiSandboxApp`)
3671

3772
### File Organization
3873

@@ -88,11 +123,26 @@ export class CptsApiAppStack extends Stack {
88123
- Prefer VPC endpoints for private connectivity
89124
- Minimize resource creation in test environments
90125

126+
## Unit Testing
127+
128+
- Write unit tests for CDK stacks and constructs using synthesis-based assertions.
129+
- Prefer in-process tests that instantiate CDK `App` and `Stack` objects directly and assert on synthesized templates.
130+
- Keep assertions light-touch and stable, such as resource counts and a small number of important properties.
131+
- Avoid mocking AWS resources or writing tests that attempt to exercise live AWS behaviour.
132+
- CDK constructs suitable for reuse should be placed in `eps-cdk-utils` repo.
133+
- Do not test AWS implementation details owned by the CDK library. Test the resources and properties your code is responsible for declaring.
134+
135+
### Recommended Test Styles
136+
137+
- Smoke tests for `bin/` files: execute the entrypoint and assert that synthesis completes without throwing.
138+
- In-process synth tests for stacks and constructs: instantiate the stack directly and assert resource counts or key CloudFormation properties with `Template.fromStack(...)`.
139+
91140

92141
## Validation and Verification
93142

94143
- Build: `make cdk-synth`
95144
- Lint: `npm run lint --workspace packages/cdk`
145+
- Test: `npm test --workspace packages/cdk`
96146

97147
## Maintenance
98148

.github/instructions/languages/typescript.instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This document provides instructions for generating, reviewing, and maintaining T
2323
- Use destructuring for objects and arrays to improve readability.
2424
- Avoid magic numbers and hardcoded values; use named constants.
2525
- Keep functions pure and side-effect free when possible.
26+
- Do not use the `void` operator to silence unused-value warnings; prefer code that makes usage explicit.
2627

2728
## Code Standards
2829

@@ -92,6 +93,7 @@ This document provides instructions for generating, reviewing, and maintaining T
9293
### Type Safety
9394

9495
- Prefer interfaces and types. You MUST NOT use `any`.
96+
- Prefer `Array<T>` over `T[]` for array type annotations.
9597
- Use type guards and assertions when necessary.
9698
- Example:
9799

0 commit comments

Comments
 (0)