{ "decision": "STOP", "semantics": [ "Two incompatible stress concepts exist. Observation check-ins use the categorical values low, moderate, high, and unknown; general/manual events use an optional integer intensity 0..3 or missing/unknown.", "The observation-check-in scale has no explicit zero and does not define low as either zero stress, mild stress, or merely the lowest reported category.", "The generic event UI permits intensity 0, but labels it only as \"0\"; unlike symptom capture, it does not define zero as \"none\" or \"documented zero\" for stress.", "Missingness is technically distinguishable: observation check-ins use unknown; capture entries use unknown before persistence; patient general events use null when omitted. However, these representations are not unified into one subjective-stress contract.", "The legacy event.stress path is presence-based rather than an intensity series. association_engine.event_days classifies every stress row as an event without reading intensity, so synthetic rows with intensity 0 and NULL both count as stress-event days.", "Observation-check-in stress is self-reported and day-keyed, but it is scoped to an active personal observation and cannot be captured as an independent longitudinal stress series.", "observation_engine.evaluate_observation converts only moderate and high check-ins into stress factors; low and unknown are omitted. That is an existing evaluative threshold, not a neutral rendering of all reported categories.", "The repository explicitly documents that no sufficiently supported subjective stress/well-being series exists and that stress must not be derived from HRV, pulse, or sleep.", "The requested label \"Anspannung / Stress – persönliche Einschätzung\" is compatible as presentation copy only after a canonical scale and source contract are approved; the current contracts do not establish that meaning.", "No interpolation can be guaranteed for stress because no dedicated stress series provider exists. Existing Explorer infrastructure supports explicit missingness, but stress currently appears only as events/check-in factors, not as a gap-preserving self-reported series." ], "files": [ "scripts/health/dashboard_v5/observation_contract.py: STRESS, OBSERVATION_INFLUENCES, TEMPLATES, validate_action(observation_checkin)", "scripts/health/dashboard_v5/sprint6f_c_schema.py: TABLES, DDL for personal_observation_checkins", "scripts/health/dashboard_v5/observation_engine.py: observation_detail, evaluate_observation", "scripts/health/dashboard_v5/capture_contract.py: EVENT_CATEGORIES, validate_capture_payload(event)", "scripts/health/assets/health-assets/dashboard-v5-capture.js: renderFields(event)", "scripts/health/dashboard_v5/render.py: observation-checkin-dialog and general-event-dialog", "scripts/health/health_dashboard_server.py: validate_observation_submission, validate_patient_action", "scripts/health/health_dashboard_action_worker.py: validate_patient_payload, apply_patient_action, apply_observation_action", "scripts/health/dashboard_v5/patient_action_schema.py: REQUIRED_PATIENT_ACTION_COLUMNS", "scripts/health/dashboard_v5/association_engine.py: EVENTS, HEALTH_EVENT_CATEGORIES, event_days, catalog presets", "scripts/health/dashboard_v5/comparison_contract.py: HEALTH_METRICS, INFLUENCES, catalog, _legacy_health_events", "scripts/health/dashboard_v5/read_api.py: dispatch_api observation and Explorer-comparison routes", "scripts/health/assets/health-assets/dashboard-v5-observations.js: init, renderDetail, comparison handoff", "docs/sprint7c-c-observation-plan-inventory.md: Legacy- und Konfliktinventar", "database/schema.sql: health_events, tagebuch, and legacy stress references", "scripts/health/migrate_patient_action_schema.py: existing occurred_at/intensity migration", "scripts/health/migrate_sprint6f_c_schema.py: existing personal-observation migration", "tests/test_dashboard_v5_sprint6f_c.py", "tests/test_dashboard_v5_sprint7c_c.py", "tests/test_dashboard_v5_sprint6g_b2.py", "tests/test_dashboard_v5_sprint6h_b.py", "tests/browser/dashboard_v5_sprint6f_a.spec.js", "tests/browser/dashboard_v5_sprint6h_b.spec.js", "tests/browser/dashboard_v5_sprint7c_c.spec.js" ], "existing_support": [ "Migration-free storage primitives already exist: personal_observation_checkins.stress stores low/moderate/high/unknown, while health_events.intensity stores nullable integers and supports stress as a category.", "The observation form, server boundary, queue validator, and worker all preserve the categorical check-in value and revalidate it against the same allowlist.", "General-event and mobile-capture paths accept stress and preserve explicit integer zero separately from omitted/unknown intensity.", "The read API returns observation check-ins, including their stress field, through observation_detail.", "The Explorer comparison catalog already computes per-metric availability and the observation UI already consumes that catalog, providing a reusable mechanism for hiding a future metric until observations exist.", "Existing comparison infrastructure is explicitly non-causal and includes missingness warnings; observation-plan UI already hands supported plans to the existing comparison view.", "Focused synthetic tests executed without productive data: 24 tests passed; three unrelated tests could not run because the disposable environment lacked scipy or pillow_heif.", "A synthetic in-memory probe confirmed check-in acceptance of exactly low/moderate/high/unknown, capture acceptance of unknown and 0..3, and event.stress treating both zero-intensity and missing-intensity rows as event days." ], "gaps": [ "There is no canonical subjective-stress scale: low/moderate/high cannot be safely mapped to 0..3, and the meaning of event intensity 0 is not defined for stress.", "There is no approved canonical source. personal_observation_checkins is plan-scoped and unique by observation_id/day, whereas health_events is event-oriented and may contain multiple stress entries per day.", "No rule defines how multiple same-day stress events would become one daily series point.", "No dedicated metric identifier, metadata, unit/scale disclosure, provider, /api/v1/series support, or Explorer health-series entry exists for subjective stress.", "Stress is absent from the three safe observation templates and from OBSERVATION_INFLUENCES; Sprint 7C-C intentionally excludes it.", "Current observation-plan availability is not data-gated for stress because stress is not a selectable plan metric at all.", "Existing event.stress semantics discard intensity and count explicit zero as an event, making that path unsafe as a subjective intensity series.", "Existing observation evaluation suppresses low and promotes moderate/high to known factors; legacy association presets also evaluate event.stress against symptoms. These semantics conflict with the requested neutral, non-evaluative series.", "Tests cover unknown check-in persistence and generic event persistence, but do not test low/moderate/high ordering, stress-specific zero meaning, zero-versus-missing stress rendering, multiple entries per day, availability after first datum, gap preservation, or exclusion from evaluation.", "The repository's own inventory states that the stress field currently has no entries and that no sufficiently supported standalone subjective stress series exists; no productive values were opened to independently reassess that statement." ], "minimal_path": [ "Do not implement or expose the series under the current contract.", "First approve one explicit canonical contract: source table, self-report wording, allowed scale, exact meaning of zero, missing/unknown representation, and same-day aggregation or uniqueness rule.", "If health_events.intensity 0..3 is selected and its semantics are explicitly approved, the existing columns likely permit a migration-free implementation; otherwise a new schema may be required rather than silently reinterpreting legacy rows.", "Add a dedicated identifier such as subjective.stress with the optional UI label \"Anspannung / Stress – persönliche Einschätzung\", explicit provenance \"self-reported\", and no physiological derivation.", "Add a read-only provider that emits only observed dated points, preserves zero, omits or null-marks missing days, performs no interpolation, and does not feed association scoring, baseline evaluation, or moderate/high factor thresholds.", "Expose the identifier in the metric and Explorer comparison catalogs only when a bounded existence/count query finds at least one canonical observation; apply the same availability gate to observation-plan selection.", "Keep event.stress as a separate legacy occurrence track unless an explicit reviewed reconciliation policy is created.", "Add synthetic contract, API, worker, and browser tests for every scale value, zero versus unknown, gaps, duplicate-day handling, first-datum availability, neutral labels, no interpolation, and absence from all evaluative/statistical paths." ] }