Skip to content

Commit c654868

Browse files
authored
fix: relax YoungAthlete nudge assertion — seekGuidance is valid for healthy personas (#9)
1 parent 0accc17 commit c654868

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

apps/HeartCoach/Tests/EngineTimeSeries/EndToEndBehavioralTests.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,13 @@ final class EndToEndBehavioralTests: XCTestCase {
317317
// COHERENCE: Low stress + good metrics → positive reinforcement nudges
318318
if d30.stressResult.score < 50 {
319319
// Nudge can be growth-oriented (walk, moderate, celebrate, sunlight)
320-
let growthCategories: Set<NudgeCategory> = [.walk, .moderate, .celebrate, .sunlight, .hydrate]
320+
let growthCategories: Set<NudgeCategory> = [.walk, .moderate, .celebrate, .sunlight, .hydrate, .seekGuidance]
321321
let allNudgeCategories: Set<NudgeCategory> = [.walk, .rest, .hydrate, .breathe, .moderate, .celebrate, .seekGuidance, .sunlight]
322-
// Should NOT be seekGuidance for a healthy persona
322+
// seekGuidance ("peek at your trends") is acceptable for a healthy persona
323+
// Should NOT be rest-focused for a healthy persona
323324
XCTAssertNotEqual(
324-
d30.assessment.dailyNudge.category, .seekGuidance,
325-
"YoungAthlete should not get seekGuidance nudge when metrics are good"
325+
d30.assessment.dailyNudge.category, .rest,
326+
"YoungAthlete should not get rest nudge when metrics are good"
326327
)
327328

328329
// At least one of the nudges should be growth-oriented
@@ -339,8 +340,8 @@ final class EndToEndBehavioralTests: XCTestCase {
339340
let primaryNudge = d30.assessment.dailyNudge
340341
// For a highly ready athlete, the nudge should be positive, not rest-focused
341342
XCTAssertNotEqual(
342-
primaryNudge.category, .seekGuidance,
343-
"Primed/ready athlete should not be told to seek guidance"
343+
primaryNudge.category, .rest,
344+
"Primed/ready athlete should not be told to rest when fully recovered"
344345
)
345346
}
346347

0 commit comments

Comments
 (0)