8000 [Feature] Deterministic metabolic observations and evidence model · Issue #90 · shroominic/OpenGlucose · GitHub
[go: up one dir, main page]

Skip to content

[Feature] Deterministic metabolic observations and evidence model #90

Open

Description

@shroominic

Outcome

Build the deterministic analytics and evidence contract that explains meal, workout, sleep, and glucose patterns before any AI narration is introduced.

Scope

Create pure-Dart, coverage-aware analyses for:

  • meal response: baseline, peak rise, time to peak, return toward baseline, observed area;
  • workout response: pre/during/post windows;
  • overnight profile aligned to qualified sleep intervals;
  • qualified night-to-night comparisons;
  • repeated meal and similar-workout comparisons;
  • day-part stability and variability.

Every result must produce a typed evidence object containing:

  • observation key and safe display text inputs;
  • exact time window and referenced event/sample IDs;
  • source and provenance summary;
  • reading/sample count, active span, cadence/gaps, and qualification result;
  • deterministic metric values and versioned calculation method.

Parallelization

Core work is ready now using synthetic fixtures and existing normalized model interfaces.

Production repository adapters depend on #89. Meal integration depends on the journal feature; sleep/workout integration depends on platform imports. Keep the analytics package pure Dart so these teams can work independently.

Acceptance criteria

  • Known-answer fixtures cover every metric and comparison.
  • Sparse, gapped, future, duplicated, out-of-order, DST, and mixed-source data fail or qualify deterministically.
  • Every surfaced claim maps to evidence IDs and exact source windows.
  • No result claims causality, diagnosis, treatment, dosing, or emergency significance.
  • Missing signals produce explicit unavailability reasons, not zero values.
  • Calculation versions and target/window definitions are preserved.
  • Public APIs are platform- and UI-independent.
  • Performance is measured with dense 24-hour and multi-week fixtures.
  • R2 independent review and safety-copy review pass.

Dependencies

Out of scope

  • Generative text.
  • Final dashboard rendering.
  • Alerts or autonomous actions.

Repository-owner recreation of the legacy issue at #37. The original discussion remains available there.

Activity

  1. added this to the 0.3 Body Timeline milestone on Sep 1, 2026
  2. added
    enhancementNew feature or request
    risk:R2Health data, persistence, integration, AI, accessibility, or native risk
    priority:P1Next product-value delivery
    area:analyticsDeterministic metrics, correlations, and evidence
    parallel:readyCan begin independently in the current wave
    on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:analyticsDeterministic metrics, correlations, and evidenceenhancementNew feature or requestparallel:readyCan begin independently in the current wavepriority:P1Next product-value deliveryrisk:R2Health data, persistence, integration, AI, accessibility, or native risk

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0