Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 42 additions & 9 deletions VA_BACKLOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Street Support VA: Implementation Backlog

**Purpose:** Track what we should be considering working on next.
**Last updated:** 21 May 2026
**Last updated:** 16 June 2026

---

Expand All @@ -28,18 +28,30 @@
- `VA_BACKLOG.md` included in commit
- `__PROFESSIONAL` entries deferred to PR #20

### PR #20: Openawaiting James review
**Status:** Raised against main 14 May 2026. 102/102 tests passing on staging at dd40a7f. Review responded 19 May 2026; awaiting approval.
### PR #20: Merged2 June 2026
**Status:** Merged to main 2 June 2026 (mergedAt 2026-06-02T09:20:22Z; base `main`). Raised against main 14 May 2026; review responded 19 May 2026; approved and merged 2 June 2026. 102/102 tests passing on staging at dd40a7f.
**URL:** https://github.com/StreetSupport/street-support-va/pull/20
**Delivered:** Item 57 (under-16 exit — supporter and professional pathway). Cross-referenced against the merged commit list; Item 57 is the only backlog item the commits close. See Item 57 for the full chain.
**Scope:**
- userType propagation through phrasebank selector (13 sites)
- buildUnder16Exit refactor: inline → phrasebank
- Under-16 v1.1 supporter and 6 __PROFESSIONAL phrasebank entries
- DV/SA v1.1 supporter and 9 __PROFESSIONAL entries; SA 999 line
- Self-harm v1.1 entries added but not wired (deferred to Item 72)
- Orphan cleanup: unsuffixed SELF_HARM_EXIT and UNDER_16_EXIT removed (UNDER_16_EXIT__SUPPORTER orphan retained for separate handling — Item 73)
- Post-review tidy-ups: Item 72 backlog note added (bfed14c); cases 6 and 7 in crisis.ts threaded to session.userType for visual consistency with cases 1 to 5 (dd40a7f)
**Deferred to follow-ups:** Item 71 (B2_WHO_FOR duplication), Item 72 (self-harm wiring), Item 73 (UNDER_16_EXIT__SUPPORTER orphan delete), Item 74 (CHILD_AT_RISK_EXIT v1.1 wiring)
- Post-review tidy-ups: Item 72 backlog note added (bfed14c); cases 6 and 7 in crisis.ts threaded to session.userType for visual consistency with cases 1 to 5 (dd40a7f); DV __SUPPORTER 999 line locked by test (6b61ebf)
**Deferred to follow-ups (surfaced by PR #20 / its review, NOT closed by it):** Item 71 (B2_WHO_FOR duplication), Item 72 (self-harm wiring), Item 73 (UNDER_16_EXIT__SUPPORTER orphan delete), Item 74 (CHILD_AT_RISK_EXIT v1.1 wiring), Item 75 (SELF DV/SA 999 parity), Item 76 (PROFESSIONAL under-16 abrupt ending), Item 77 (PROFESSIONAL Male/LGBTQ+ DV/SA regression tests), Item 78 (under-16 NSPCC SELF guard hardening).

### PR #21: Open — raised 16 June 2026
**Status:** Open. Raised against main 16 June 2026. Awaiting James review. 110/110 tests passing on staging; tsc clean.
**URL:** TBC
**Scope:**
- Item 75 — 999 line added to the nine SELF DV and SA base exits for parity (behavioural change — flagged for James in the PR description)
- Item 74 — `session.userType` threaded through the `CHILD_AT_RISK_EXIT` call site (no behaviour change; completes safeguarding-pathway selector coverage)
- Item 77 — four Male and LGBTQ+ professional regression tests for DV and SA exits
**Test count:** 102 → 110, all green. `tsc --noEmit` clean.
**Commits:** f274f2a, be11c58, bb73d03, plus this backlog refresh.
**Behavioural change flagged for James:** Item 75 adds a 999 emergency line to the SELF (direct-experience) DV and SA exits, so a person disclosing for themselves now sees the same emergency line their supporter does. Called out explicitly in the PR description.

---

Expand Down Expand Up @@ -774,15 +786,15 @@ Endpoint surfacing: cards alongside the conversation (not a terminal page), coll

### 74. CHILD_AT_RISK_EXIT: supporter and professional pathway wiring
**Priority:** Medium (safeguarding-adjacent)
**Status:** Surfaced 19 May 2026 in PR #20 review. Not started.
**Status:** Complete — PR #21, 16 June 2026. Surfaced 19 May 2026 in PR #20 review.
**Issue:** `safeguardingExit('CHILD_AT_RISK_EXIT', ...)` in `lib/handlers/prevention.ts` still passes `session.isSupporter` as a boolean and is not in the "13 selector calls wired" count delivered by PR #20. Behaviour is unchanged today because there is no `__PROFESSIONAL` variant for this key, so `phrase()` produces the same output. Wiring needs picking up to complete the safeguarding-pathway selector coverage.
**Required:** Thread `session.userType` through the `safeguardingExit('CHILD_AT_RISK_EXIT', ...)` call. If a `CHILD_AT_RISK_EXIT__PROFESSIONAL` variant is wanted, write it in phrasebank as part of this item. Run tests.
**Files:** `lib/handlers/prevention.ts`, possibly `lib/phrasebank.ts`
**Note:** Out of scope for PR #20 to keep v1.1 wiring tight. Confirmed with James in 19 May PR review response.

### 75. SELF DV and SA exits: 999 line parity
**Priority:** Medium (safeguarding)
**Status:** Surfaced 19 May 2026 in PR #20 review. Not started.
**Status:** Complete — PR #21, 16 June 2026. Surfaced 19 May 2026 in PR #20 review.
**Issue:** PR #20 added the 999 line to DV and SA `__SUPPORTER` exits. SELF (direct-experience) DV and SA exits still have no 999 line, so a person directly experiencing DV or SA gets less emergency information than their supporter does.
**Required:** Add 999 line to SELF DV and SA exits mirroring the `__SUPPORTER` pattern, with regression tests.
**Files:** `lib/phrasebank.ts`, `__tests__/safeguarding.test.ts`
Expand All @@ -796,11 +808,29 @@ Endpoint surfacing: cards alongside the conversation (not a terminal page), coll

### 77. `__PROFESSIONAL` Male and LGBTQ+ DV/SA variants: regression tests
**Priority:** Medium (test coverage)
**Status:** Surfaced 19 May 2026 in PR #20 review. Not started.
**Status:** Complete — PR #21, 16 June 2026. Surfaced 19 May 2026 in PR #20 review.
**Issue:** PR #20 added `__PROFESSIONAL` Male and LGBTQ+ variants for DV and SA exits. Female `__PROFESSIONAL` variants have regression tests; Male and LGBTQ+ don't. Asymmetric coverage on safeguarding-adjacent entries.
**Required:** Add regression tests for Male and LGBTQ+ `__PROFESSIONAL` variants on both DV and SA exits.
**Files:** `__tests__/safeguarding.test.ts`

### 78. Under-16 NSPCC adult-helpline guard for SELF: harden against fallback-by-omission
**Priority:** Medium (safeguarding-adjacent)
**Status:** Open. Follow-up from James's PR #20 approval (2 June 2026). Not started.
**Issue:** The under-16 exit suppresses the adult NSPCC helpline line for SELF (direct-experience) users by fallback-by-omission. In `buildUnder16Exit` (`lib/handlers/shared.ts:97`) the guard is `if (session.userType !== 'PROFESSIONAL')`, so SELF users enter the block; the line is then dropped only because `UNDER16_EXIT_NSPCC_FOR_ADULT` has no base/SELF entry (only `UNDER16_EXIT_NSPCC_FOR_ADULT__SUPPORTER`, `phrasebank.ts:2105`), so `getPhrase(...)` returns null and `?.text || ''` yields an empty string. Output is correct today, but the guard is implicit and fragile — adding a base entry or changing the selector could silently reintroduce the adult helpline line into a child's exit. No SELF test asserts its absence.
**Required (codebase audit first, tests after — safeguarding adjacency):**
- (a) Tighten the guard to an explicit condition — `if (session.userType === 'SUPPORTER')` — so only SUPPORTER receives the NSPCC adult line, matching Under-16 Design Note v1.1 §1.4. (Confirm this preserves the PROFESSIONAL exclusion already in place.)
- (b) Add a SELF regression assertion that the under-16 exit does NOT contain the adult NSPCC helpline line.
**Files:** `lib/handlers/shared.ts`, `lib/phrasebank.ts`, `__tests__/safeguarding.test.ts`
**Source:** James Cross, PR #20 approval follow-up (2 June 2026).

### 79. SA supporter 999 test asymmetry: extend to Male and LGBTQ+
**Priority:** Low (test-only)
**Status:** Open. Surfaced 16 June 2026 codebase audit. Not started.
**Issue:** The SA `__SUPPORTER` 999 test checks the Female variant only, while the DV `__SUPPORTER` 999 test loops all six variants. Asymmetric coverage on the SA supporter 999 line.
**Required:** Extend the SA supporter 999 test to Male and LGBTQ+ for symmetric coverage with the DV supporter test.
**Files:** `__tests__/safeguarding.test.ts`
**Note:** Originally raised as "Item 78" in the 16 June 2026 instruction; renumbered to 79 because 78 was already taken by the under-16 NSPCC SELF guard item (collision-renumbering convention, cf. items 60/61 → 67/68).

---

### 55. Financial category: constrain unconstrained `support` mapping
Expand All @@ -813,7 +843,7 @@ Endpoint surfacing: cards alongside the conversation (not a terminal page), coll

### 57. Under-16 exit: supporter and professional pathway review
**Priority:** High (safeguarding)
**Status:** Code complete 14 May 2026. PR #20 raised against main, awaiting James review.
**Status:** Delivered — PR #20 merged to main 2 June 2026 (mergedAt 2026-06-02T09:20:22Z). Code complete 14 May 2026; approved and merged 2 June 2026. Follow-ups split out as Items 72–78.

**PR #20 commits on staging (chain from b1f4ee4):**
- b1f4ee4 — userType propagation through phrasebank selector (13 safeguarding-pathway call sites)
Expand All @@ -826,6 +856,8 @@ Endpoint surfacing: cards alongside the conversation (not a terminal page), coll
- bfed14c — docs: note phrasebank dormant entries on Item 72 (19 May 2026)
- dd40a7f — refactor(crisis): pass session.userType for cases 6 and 7 (19 May 2026)

**Also merged in PR #20** (post-19-May staging work that rode the same merge, confirmed against the GitHub PR commit list): c5ada99 (backlog refresh, ahead of b1f4ee4), ce37922 (backlog: PR #19 merged, Item 74 added), fc5b28b (merge main into staging), 6b61ebf (test: lock DV __SUPPORTER 999 line), 773197a (backlog: Items 75–77, Item 57 DV 999 annotation). Merge tip on main: 75186c1.

**Test count:** 96 → 102 across the chain, all green.

**Behaviours now implemented:**
Expand Down Expand Up @@ -1200,3 +1232,4 @@ When enriched eligibility data is in use, confidence levels must influence langu
| 2026-04-30 | Item 57 in progress. B2_WHO_FOR audit: userType stored as SUPPORTER/PROFESSIONAL but collapsed to isSupporter boolean downstream — distinction unused. GATE0 case 2 safeguardingTriggered fix built. Phrasebank selector widened to support __PROFESSIONAL variant. Supporter and Professional Language Review v1.0 produced — with James for sign-off. PR #19 ready to commit (mechanical changes). PR #20 will follow once language approved. Items 46, 55, 56, 3 (governance docs) all marked complete. Backlog fully audited and updated. |
| 2026-05-14 | Supporter and Professional Language Review v1.1 signed off by James 8 May 2026. PR #20 codebase audit complete, three structural pieces confirmed: (1) add v1.1 phrasebank entries, (2) refactor buildUnder16Exit from inline strings to phrasebank composition, (3) wire userType through to phrasebank selector at call sites — critical structural piece without which new __PROFESSIONAL entries would be dead code. Adjacent findings: orphaned SELF_HARM_EXIT and UNDER_16_EXIT phrasebank entries to delete in PR #20 (audit-first confirmation), SA exits gain 999 line (behavioural change to flag in PR description). Item 57 status updated; Item 71 added (B2_WHO_FOR handler duplication, not in PR #20 scope). PR #20 ready to build. Pipeline repo work today is on a separate workstream — see PIPELINE_BACKLOG.md in ssn-enrichment-pipeline. |
| 2026-05-14 (afternoon) | PR #20 (under-16 + DV + SA + self-harm supporter/professional language) work complete on staging, awaiting James review. Six commits: b1f4ee4 (userType propagation through selector), b5e5d49 (buildUnder16Exit refactor to phrasebank composition), fe0fef6 (under-16 v1.1 wording + professional variants, PROFESSIONAL excludes NSPCC/sign-off), a567860 (DV/SA v1.1 wording + professional variants, SA 999 behavioural change), 4185c9e (self-harm entries placed but not wired pending Item 72 decision), a1526ec (orphan cleanup of unsuffixed SELF_HARM_EXIT and UNDER_16_EXIT). Plus 7th commit refreshing this backlog. Test count 96 → 102, all green throughout. Item 57 status updated. Item 72 added (self-harm wiring follow-up — governance decision needed on Mind Infoline and warm sign-off). Item 73 added (UNDER_16_EXIT__SUPPORTER orphan cleanup, low priority). |
| 2026-06-16 | Recorded PR #20 merge to main (2 June 2026) in changelog. PR #21 raised against main (items 75, 74, 77): 999 line added to the nine SELF DV/SA base exits (behavioural change flagged for James), `session.userType` threaded through the CHILD_AT_RISK_EXIT call site (no behaviour change), four Male/LGBTQ+ professional regression tests for DV and SA. Commits f274f2a, be11c58, bb73d03 plus this backlog refresh. Test count 102 → 110, all green, tsc clean. Items 75, 74, 77 marked Complete (PR #21). Item 79 added (SA supporter 999 test asymmetry, low priority test-only; requested as "Item 78" but renumbered — 78 already taken). |
126 changes: 126 additions & 0 deletions __tests__/safeguarding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,36 @@
expect(result.text).toContain('999');
});

test('DV Male __PROFESSIONAL exit fires when userType is PROFESSIONAL', () => {
const session = sessionAt('DV_CHILDREN_ASK', {
dvGender: 'Male',
isSupporter: true,
userType: 'PROFESSIONAL',
});
const result = select(session, 1);
expect(result.text).toContain('Here are the specialist contacts');
expect(result.text).toContain("You'll know your next steps from here");
expect(result.text).not.toContain("You don't have to work this out on your own");
// Male DV variant routes to ManKind, not the National DA Helpline.
expect(result.text).toContain('0808 800 1170');
expect(result.text).toContain('999');
});

test('DV LGBTQ+ __PROFESSIONAL exit fires when userType is PROFESSIONAL', () => {
const session = sessionAt('DV_CHILDREN_ASK', {
dvGender: 'Non-binary or other',
isSupporter: true,
userType: 'PROFESSIONAL',
});
const result = select(session, 1);
expect(result.text).toContain('Here are the specialist contacts');
expect(result.text).toContain("You'll know your next steps from here");
expect(result.text).not.toContain("You don't have to work this out on your own");
// LGBTQ+ DV variant routes to Galop.
expect(result.text).toContain('0800 999 5428');
expect(result.text).toContain('999');
});

test('DV __SUPPORTER exits all end with the 999 line (behavioural change per v1.1)', () => {
// Pre-v1.1 DV __SUPPORTER exits ended at the Shelter housing advice URL.
// v1.1 adds a 999 line to every safeguarding exit. Locking in the
Expand Down Expand Up @@ -368,6 +398,30 @@
expect(endings.filter((e) => !e.ends999)).toEqual([]);
});

test('DV SELF base exits all include the 999 line (parity with supporter variants)', () => {
// The SELF base DV exits previously had no 999 line, unlike their
// __SUPPORTER counterparts. Parity added so a person disclosing for
// themselves sees the emergency line too. Parallel to the SELF SA 999
// test in 'Sexual Violence Disclosure'.
const NINE_NINE_NINE = "If you're in immediate danger, call 999.";
const cases: Array<[string, number]> = [
['Female', 1], ['Female', 2],
['Male', 1], ['Male', 2],
['Non-binary or other', 1], ['Non-binary or other', 2],
];
const missing = cases.filter(([dvGender, childrenOption]) => {
const session = sessionAt('DV_CHILDREN_ASK', {
dvGender,
isSupporter: false,
userType: 'SELF',
});
const result = select(session, childrenOption);
return !result.text.includes(NINE_NINE_NINE);
});
// Every DV SELF exit must include the 999 line.
expect(missing).toEqual([]);
});

});

// =============================================================================
Expand Down Expand Up @@ -402,6 +456,78 @@
expect(result.text).toContain('999');
});

test('SA Male __PROFESSIONAL exit fires when userType is PROFESSIONAL', () => {
const session = sessionAt('SA_GENDER_ASK', {
isSupporter: true,
userType: 'PROFESSIONAL',
});
const result = select(session, 2); // Male
expect(result.text).toContain('Here are the specialist contacts');
expect(result.text).toContain("You'll know your next steps from here");
expect(result.text).not.toContain("You don't have to work this out on your own");
// Male SA variant routes to SurvivorsUK, not Rape Crisis.
expect(result.text).toContain('020 3598 3898');
expect(result.text).toContain('999');
});

test('SA LGBTQ+ __PROFESSIONAL exit fires when userType is PROFESSIONAL', () => {
const session = sessionAt('SA_GENDER_ASK', {
isSupporter: true,
userType: 'PROFESSIONAL',
});
const result = select(session, 3); // Non-binary or other
expect(result.text).toContain('Here are the specialist contacts');
expect(result.text).toContain("You'll know your next steps from here");
expect(result.text).not.toContain("You don't have to work this out on your own");
// LGBTQ+ SA variant lists both SurvivorsUK and Galop.
expect(result.text).toContain('020 3598 3898');
expect(result.text).toContain('0800 999 5428');
expect(result.text).toContain('999');
});

test('SA SELF base exits all include the 999 line (parity with supporter variants)', () => {
// The SELF base SA exits previously had no 999 line, unlike their
// __SUPPORTER counterparts. Parity added so a person disclosing for
// themselves sees the emergency line too. Parallel to the SELF DV 999
// test in 'Domestic Abuse Disclosure'.
const NINE_NINE_NINE = "If you're in immediate danger, call 999.";
// SA_GENDER_ASK options: 1=Female, 2=Male, 3=Non-binary or other
const genderOptions = [1, 2, 3];
const missing = genderOptions.filter((genderOption) => {
const session = sessionAt('SA_GENDER_ASK', {
isSupporter: false,
userType: 'SELF',
});
const result = select(session, genderOption);
return !result.text.includes(NINE_NINE_NINE);
});
// Every SA SELF exit must include the 999 line.
expect(missing).toEqual([]);
});

});

// =============================================================================
// CHILD AT RISK - userType wiring must resolve to a valid exit in every register
// =============================================================================

describe('Child At Risk Exit', () => {

test('CHILD_AT_RISK_EXIT resolves to base entry with 999 line for SELF and PROFESSIONAL', () => {
// The call site passes session.userType (not a boolean). There is only a
// base CHILD_AT_RISK_EXIT entry — no __SUPPORTER or __PROFESSIONAL variant.
// Both registers must fall through to the base entry and still surface the
// 999 line. Guards the wiring so adding a variant later can't silently
// break either register.
const NINE_NINE_NINE = 'If a child is in immediate danger, call 999.';
for (const userType of ['SELF', 'PROFESSIONAL'] as const) {
// B7D_4A option 4 = Child safety -> CHILD_AT_RISK_EXIT
const session = sessionAt('B7D_4A_PREVENTION_SAFEGUARDING_FOLLOW_UP', { userType });
const result = select(session, 4);
expect(result.text).toContain(NINE_NINE_NINE);
}
});
Comment on lines +516 to +529

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test loops ['SELF', 'PROFESSIONAL'] and the comment says "Both registers must fall through to the base entry". There are actually three registers, and SUPPORTER is the one not asserted. It resolves to base by the same path, so behaviour is correct, but since the point of the test is to guard the wiring against a future variant being added, adding 'SUPPORTER' to the loop would lock all three registers rather than two. One-word change to the array.


});

// =============================================================================
Expand Down Expand Up @@ -1139,16 +1265,16 @@

// Find the safeguarding-trigger log call
const safeguardingCalls = logSpy.mock.calls.filter(
(c) => typeof c[0] === 'string' && c[0].includes('SAFEGUARDING_TRIGGER')

Check warning on line 1268 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access [0] on an `any` value

Check warning on line 1268 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access [0] on an `any` value

Check warning on line 1268 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access [0] on an `any` value

Check warning on line 1268 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access [0] on an `any` value
);
expect(safeguardingCalls.length).toBeGreaterThan(0);

const payload = JSON.parse(safeguardingCalls[0][1]);

Check warning on line 1272 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access [1] on an `any` value

Check warning on line 1272 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe argument of type `any` assigned to a parameter of type `string`

Check warning on line 1272 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe assignment of an `any` value

Check warning on line 1272 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access [1] on an `any` value

Check warning on line 1272 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe argument of type `any` assigned to a parameter of type `string`

Check warning on line 1272 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe assignment of an `any` value
expect(payload.type).toBe('AGE_NUMERIC');

Check warning on line 1273 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .type on an `any` value

Check warning on line 1273 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .type on an `any` value
expect(payload.code).toBe('AGE_NUMERIC_14');

Check warning on line 1274 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .code on an `any` value

Check warning on line 1274 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .code on an `any` value
expect(payload.sessionId).toBe('test-session-abc-123');

Check warning on line 1275 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .sessionId on an `any` value

Check warning on line 1275 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .sessionId on an `any` value
expect(payload.timestamp).toMatch(/^\d{4}-\d{2}-\d{2}T/);

Check warning on line 1276 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .timestamp on an `any` value

Check warning on line 1276 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .timestamp on an `any` value
expect(payload.event).toBe('UNDER_16_DETECTED');

Check warning on line 1277 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .event on an `any` value

Check warning on line 1277 in __tests__/safeguarding.test.ts

View workflow job for this annotation

GitHub Actions / test

Unsafe member access .event on an `any` value
expect(payload.pathwayChange).toBe('TERMINATED_TO_UNDER_16_EXIT');

// Verify NO log call across the whole spy contains the raw user text
Expand Down
2 changes: 1 addition & 1 deletion lib/handlers/prevention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export function handleB7D4APreventionSafeguardingFollowUp(
sessionEnded: true
};
case 4: // Child safety
return safeguardingExit('CHILD_AT_RISK_EXIT', session.isSupporter, 'CHILD_AT_RISK');
return safeguardingExit('CHILD_AT_RISK_EXIT', session.userType, 'CHILD_AT_RISK');
default: // Continue to terminal
const result2 = buildTerminalServices(session);
const additionalNeeds = getPhrase('TERMINAL_ADDITIONAL_NEEDS', session.isSupporter);
Expand Down
Loading
Loading