Robert Bond
c84ff3fff9
Merged PR 2399: Adds characterization coverage and documentation for CRM query field profile
...
Related work items: #23754
2026-06-18 08:04:36 +00:00
Robert Bond
a6941a8a06
Merged PR 2398: amends to appeal policy
...
Related work items: #23754
2026-06-18 05:17:10 +00:00
Robert Bond
475aa965b4
Merged PR 2395: helpers for dashboard domain layer
...
Related work items: #23754
2026-06-17 16:06:09 +00:00
Robert Bond
0b66a0e1d4
Merged PR 2394: adjusting reps domain logic
...
Related work items: #23754
2026-06-17 10:55:32 +00:00
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
Robert Bond
9595ad86df
Merged PR 2374: addeding domain layer extrraction
...
# Summary
This PR introduces a **Case Lifecycle Domain Boundary** to centralize lifecycle decision logic and reduce coupling within the appeals application.
The work is **behaviour-preserving** and introduces no intentional changes to business rules, CRM integrations, translations, dashboards, API routes, or user-facing functionality.
## What was added
New lifecycle boundary:
```text
lib/domain/case-lifecycle/
```
Key responsibilities extracted:
- Specialist process normalization
- Appeal type mapping
- Specialist process stage override mapping
- Stage case-type resolution
- Stage catalogue lookup
- Closed-case status recognition
- Lifecycle stage index resolution
- Lifecycle stage status assignment
## Behaviour preserved
Characterization tests were added before each extraction to preserve:
- Appeal type mapping and aliases
- Specialist process handling
- Lifecycle stage progression
- Closed-case handling
- Status assignment (`complete`, `in-progress`, `not-started`)
- Existing ROW behaviour
- Existing `statuscode` lifecycle semantics
Closed-case recognition remains unchanged for:
```text
1000
5
6
846040013
846040059
846040060
```
## Documentation
Added:
```text
lib/domain/case-lifecycle/README.md
```
Documenting:
- Boundary ownership
- Non-goals
- Lifecycle invariants
- Known architectural constraints
- Future extraction roadmap
## Testing
Added lifecycle characterization coverage for:
- Stage wrapper behaviour
- Specialist process normalization
- Appeal type mapping
- Specialist process stage mapping
- Stage case-type resolution
- Stage catalogue lookup
- Progress behaviour
- Closed-case status handling
- Stage index resolution
- Stage status assignment
## Validation
- Lifecycle characterization tests passed
- `npm run lint` passed with no errors
## Out of Scope
No changes to:
- Stage catalogue ownership
- Representation eligibility
- Dashboard calculations
- CRM/OData queries
- API routes
- Redux state
- EN/CY translations
- Event visibility logic
## Risk
**Low risk**
The refactor was delivered through small, characterization-first slices with no functional changes intended.
Related work items: #23527
2026-06-08 09:34:30 +00:00
Robert Bond
c2ae6964f9
Merged PR 2318: auth stabilisation: extract shared myportal auth guard helper
...
auth stabilisation: extract shared myportal auth guard helper
ntroduces a small shared SSR helper (resolveMyPortalAuthContext) to standardize common myportal auth/session guards (session presence, session user identity, and pinsUser cookie) with preserved reason-coded diagnostics and signin redirect behavior. Migrates exactly two loaders (pages/myportal/searchresults.js, pages/myportal/addresssearchresults.js) to use the helper while keeping loader-specific UPSTREAM_FAILURE and CONTACT_LOOKUP_FAILED logic unchanged.
Related work items: #23020
2026-05-14 10:38:45 +00:00
Robert Bond
4fb62a6773
Merged PR 2317: Auth stabilisation: add reason-coded guards to MyPortal loaders
...
Adds incremental auth/session hardening across myportal loader paths (loadMyPortalAppealPage, searchresults, addresssearchresults) with explicit guard ordering and reason-coded diagnostics for missing session, missing session identity, missing cookie identity, contact/account lookup failures, and upstream dependency failures. Includes targeted Phase22 loader guard tests and keeps redirect behaviour policy unchanged.
Related work items: #23020
2026-05-14 10:27:12 +00:00
Robert Bond
d0b2fd077a
Merged PR 2315: Auth stabilistatiion and hardening
...
Related work items: #23020
2026-05-14 08:55:49 +00:00
Robert Bond
46a0e0b185
Merged PR 2291: reps array refactor and update and tests
...
reps array refactor and update and tests
Related work items: #22873
2026-05-05 10:16:27 +00:00
robbond
ac74782030
fix(breadcrumbs): restore static and viewall label crumb resolution
2026-04-09 16:26:44 +01:00
robbond
7d195ad906
refactor(breadcrumbs): remove stale /newappeal inline no-op branch
2026-04-09 15:22:36 +01:00
robbond
61254e3942
test(breadcrumbs): cover missing representation route map fallback
2026-04-09 15:19:40 +01:00
robbond
d3f4dda8af
refactor(breadcrumbs): extract representation route-state renderer group
2026-04-09 15:16:01 +01:00
robbond
7a60e64a84
test(breadcrumbs): assert strict null on non-exact route map lookups
2026-04-09 15:06:41 +01:00
robbond
cebd47bf1c
refactor(breadcrumbs): map step-back route branches into renderer group
2026-04-09 15:03:19 +01:00
robbond
0b905f9374
refactor(breadcrumbs): extract callback route renderers into mapped groups
2026-04-09 14:57:47 +01:00
robbond
0cd78e6f46
22541 harden breadcrumb mapped route resolver against invalid entries
2026-04-09 14:45:12 +01:00
robbond
2a84056a76
22541 extract new appeal breadcrumb branch into mapped renderer group
2026-04-09 14:39:30 +01:00
robbond
17795f20c7
22541 extract deterministic case breadcrumb branches into factory maps
2026-04-09 14:33:54 +01:00
robbond
8edd23d621
22541 compose mapped breadcrumb groups in factory and add null fallback guard
2026-04-09 14:30:03 +01:00
robbond
96946ed205
Extract additional routes in to shared renderer factory
2026-04-09 13:56:17 +01:00
robbond
062cd23463
Refactor breadcrumbs to use factory-based route renderers
2026-04-09 12:08:36 +01:00
robbond
5f6dde782a
22541 extract breadcrumb route-map helpers and add precedence guard tests
2026-04-09 10:25:47 +01:00
robbond
78d62c541f
22541 consolidate breadcrumb mapped route maps into grouped constants
2026-04-09 10:21:09 +01:00
robbond
ee3f3eae74
22541 map myportal results pair routes through unified breadcrumb resolver
2026-04-09 10:16:45 +01:00
robbond
786f906ab8
22541 unify breadcrumb mapped-route resolver and widen route-map coverage
2026-04-09 10:02:02 +01:00
robbond
04dc8fd2b9
22541 extract simple link-text breadcrumb route map and add structure tests
2026-04-09 09:58:22 +01:00
robbond
f447aa19ea
22541 add bundled case breadcrumb state resolver
2026-04-09 09:28:54 +01:00
robbond
59d3ed287c
22541 expand breadcrumb route-state helpers for label and dns path reuse
2026-04-09 09:26:19 +01:00
robbond
1c06ef1639
22541 extract breadcrumb route-state helper and align phase22 auth locale test
2026-04-09 09:23:22 +01:00
robbond
58e1eef1f5
TASK22269: add phase22 azurestorage helper contract tests
2026-03-26 11:11:24 +00:00
robbond
1b7e6009aa
TASK22269: normalize document hash-suffix route composition
2026-03-25 14:13:53 +00:00
robbond
4e964ad1ad
TASK22269: group migrate remaining account/portal signed GET flows
2026-03-25 14:06:18 +00:00
robbond
85cc7d165e
TASK22269: delegate fileClient signed get/post to signedRequestClient
2026-03-25 13:47:46 +00:00
robbond
811655c8d2
TASK22269: add signed request client and migrate portal deleteWatchedCases pilot
2026-03-25 13:37:49 +00:00
robbond
70d2ee175d
test(phase22): add auth redirect safety and i18n route parity checks
2026-03-25 12:15:06 +00:00
robbond
10f221af38
test(portal): add phase22 behavioural closure and route harmonization
2026-03-25 12:04:11 +00:00
robbond
6b66ad6d8f
test(phase22): add case service behavioural coverage
2026-03-25 11:58:58 +00:00
robbond
05f26ff12c
refactor(case): normalize route composition with fileRouteBuilder
2026-03-25 11:49:19 +00:00
robbond
65003bb08c
refactor(document): extract file route builder and normalize query composition
2026-03-25 11:31:39 +00:00
robbond
ad855fec88
refactor(document): complete signed post flows via fileClient
2026-03-25 11:14:57 +00:00
robbond
391040b5ac
test(phase7): lock downloadBlob file-client delegation
2026-03-25 11:08:52 +00:00
robbond
e4bd8ab9b6
test(harness): add fileClient default helper injections
2026-03-25 11:04:57 +00:00
robbond
a66d55af80
refactor(actions): extract fileClient with phase22 coverage
2026-03-25 10:59:20 +00:00
robbond
93eb19d028
test(phase22): add client utility behaviour coverage
2026-03-25 10:49:37 +00:00
robbond
64201a6591
test(phase22): add aggregate phase runner entrypoint
2026-03-25 10:43:38 +00:00
robbond
7553f992b7
test(phase22): align runner export/guard parity for core token suite
2026-03-25 10:34:34 +00:00
robbond
d7874686a1
test(core): add bounded regression coverage for token request client
2026-03-25 10:30:39 +00:00
robbond
a715e5fac7
test(harness): continue bounded risk-reduction with shared service harness
2026-03-25 10:13:01 +00:00