Robert Bond
c39e4bcc9a
Merged PR 2375: update representation policy
## Summary
Introduces a new `representation-policy` domain boundary and incrementally extracts low-risk representation entry policy logic while preserving existing behaviour.
This PR intentionally stops before extracting ROW and Advert entry rules because characterization uncovered behavioural differences between consumers that require a separate business decision.
## What Changed
Added:
```text
lib/domain/representation-policy/
```
Including:
- `resolveRepresentationWindow(...)`
- `isRepresentationWindowOpen(...)`
- `isRepresentationWindowClosed(...)`
- `canShowRepresentationButtonForAppealType(...)`
- `canStartHouseholderRepresentation(...)`
- `canStartCpoRepresentation(...)`
Updated consumers:
```text
components/case/summary/utils/representationEntry.js
components/search/repsonresults.js
```
## Extracted Behaviour
### Representation Window Calculation
Centralised shared representation window logic and adopted it in both consumers.
### Appeal Type Entry Gating
Centralised excluded appeal-type logic while preserving existing behaviour.
### Householder Rule
Centralised Householder (`846040004`) entry rule.
Preserved behaviour:
```text
Householder representations can only be started by LPAs.
```
### CPO Rule
Centralised CPO (`846040019`) entry rule.
Preserved behaviour using:
```text
pinswg_startdate
pinswg_statementduedate
```
No fallback date broadening introduced.
## Characterization Added
### ROW (`846040015`)
Documented:
- hearing vs non-hearing behaviour
- specialist-process field behaviour
- date gating
- appeal-type coercion behaviour
### Advert (`846040018`)
Documented:
- LPA/non-LPA behaviour
- specialist-process behaviour
- appeal-type coercion behaviour
## Important Findings
### ROW Divergence
Summary and Search consumers currently behave differently when only:
```text
pinswg_speacialistcaseprocess
```
exists.
### Advert Divergence
Summary and Search consumers currently use different specialist-process resolution paths.
### CRM Compatibility
Both fields remain in production use and must be preserved:
```text
pinswg_specialistcaseprocess
pinswg_speacialistcaseprocess
```
## Documentation
Added:
```text
lib/domain/representation-policy/README.md
```
Documenting:
- ownership
- non-goals
- CRM compatibility requirements
- ROW divergence
- Advert divergence
- future extraction constraints
## Validation
Executed during the slice series:
```bash
node tests/phase22/representation-window.test.cjs
node tests/phase22/representation-appeal-type-entry-gating.test.cjs
node tests/phase22/representation-householder-entry-rule.test.cjs
node tests/phase22/representation-cpo-entry-rule.test.cjs
node tests/phase22/representation-row-entry-rule.test.cjs
node tests/phase22/representation-advert-entry-rule.test.cjs
npm run lint
```
All passing.
## Out of Scope
No changes to:
- submission/finalisation
- uploads
- dashboards
- CRM/OData queries
- API routes
- Redux state
- translations
- blocked-message rendering
- CTA l...
2026-06-08 10:51:02 +00:00
..
2026-05-11 10:47:39 +00:00
2026-05-29 16:35:27 +00:00
2026-06-08 10:51:02 +00:00
2024-09-05 12:25:43 +01:00
2024-06-19 06:32:38 +01:00
2026-04-08 10:00:01 +01:00
2024-11-29 07:44:17 +00:00
2026-03-18 14:11:37 +00:00
2026-03-13 06:24:38 +00:00
2026-05-14 08:55:49 +00:00
2026-05-11 10:47:39 +00:00
2026-03-30 12:35:41 +01:00
2026-06-08 10:51:02 +00:00
2024-06-19 06:32:38 +01:00
2026-05-14 08:55:49 +00:00
2025-04-14 18:00:30 +01:00
2026-06-02 08:34:51 +00:00
2024-06-19 06:32:38 +01:00
2024-06-19 06:32:38 +01:00
2024-06-19 06:32:38 +01:00
2026-04-23 04:59:06 +00:00
2024-10-31 09:48:38 +00:00
2024-06-19 06:32:38 +01:00
2026-04-09 16:26:44 +01:00
2026-02-04 11:19:35 +00:00
2024-06-19 06:32:38 +01:00
2024-06-19 06:32:38 +01:00
2024-09-05 12:25:43 +01:00
2024-06-19 06:32:38 +01:00
2024-06-19 06:32:38 +01:00
2025-08-12 07:18:51 +01:00
2024-06-19 06:32:38 +01:00
2026-01-22 12:18:03 +00:00
2026-05-14 08:55:49 +00:00
2024-06-19 06:32:38 +01:00
2026-02-04 11:19:35 +00:00
2026-05-14 08:55:49 +00:00
2024-06-19 06:32:38 +01:00
2024-06-19 06:32:38 +01:00
2021-11-29 17:35:52 +00:00
2026-04-28 12:00:12 +00:00
2025-03-21 17:40:11 +00:00
2024-06-19 06:32:38 +01:00
2026-02-04 11:19:35 +00:00
2021-07-07 12:53:07 +01:00
2024-06-19 06:32:38 +01:00
2024-06-19 06:32:38 +01:00