Skip to content

|| 0 conflates absent with zero in telegram goal progress and meatspace training stats #1161

@atomantic

Description

@atomantic

Severity: MEDIUM · Category: Bugs · Complexity: Simple

Per the sentinel-vs-empty convention, || eats valid falsy values:

  • server/services/telegram.js:534,599targetGoal.progress || 0 can't distinguish "untracked (null)" from "at 0%". Use ?? 0.
  • server/services/meatspacePostTraining.js:39-41questionCount/correctCount/totalMs || 0 same issue for legitimately-zero sessions. Use ?? 0.

Sweep both files for sibling occurrences of the same pattern while there.

Filed by /do:better audit (2026-06-11).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplanTracked by /do:replan

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions