Skip to content

RES-647: Repair scientific contracts and qualify native longitudinal research - #4

Merged
Litju merged 22 commits into
mainfrom
codex/res-647-longitudinal-research
Nov 13, 2026
Merged

Litju merged 22 commits into
mainfrom
codex/res-647-longitudinal-research

Conversation

@Litju

@Litju Litju commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Research-first longitudinal workstation

Repairs the existing Squad/athlete implementation within one persistent research workspace, preserving Direction E and the Python-native scientific engine. Stacked on RES-644 / PR #3; keep this PR draft and unmerged.

  • Scientific separation: both scenario pathways save HYPOTHETICAL / NOT_QUALIFIED definitions. Unsupported numerical futures and projected flag crossings are removed. No forecast, probability or athlete-risk model is qualified.
  • Flags and history: descriptive researcher-defined rules retain exact values, units, inputs/revisions, rule versions, timestamps, missingness and QC eligibility. Unavailable data are not normal observations. Record-based ratios are explicitly not calendar ACWR. Events distinguish saved evaluations from retrospective current-rule history.
  • Persistence: execution-time investigation versions and linked measurement sources are retained. Original frozen reports and earlier scientific runs remain unchanged. Cross-participant/revision callbacks are guarded; RES-644 append recovery and real-v1 migration checks are integrated without rewriting history.
  • Ingestion: CMJ and monitoring stay separate. Mixed files have targeted family selection and separate import/link recovery; multiple monitoring axes require an explicit choice. No manufacturer adapter or silent statistical pooling.
  • Native UI: primary Research Workbench access, participant search, separate measurements/rules/investigations, visible primary controls and keyboard focus/shortcuts. Current pages, comparison tables, trajectories and scenario actions fit actual Windows work areas at 100%, 125% and 150%.

Verified evidence

314 passed, 0 failed, 0 skipped in 396.75 s in the clean final Python/Qt/scientific suite, including existing R-reference comparisons. A concurrent run's two legacy Qt failures and successful isolated/serial reruns are retained rather than counted as passes. Windows PR CI is now configured for fixtures, static hygiene, migration/integration/Qt/scientific regression and JUnit evidence.

Current native and portable walkthroughs pass at 100/125/150%, including imports, cohort/individual analysis, protocols, hypothetical scenarios, Events, comparisons, three report exports and true external process restarts. Each retains one workspace, two revisions and five runs. Independent numerical checks match 15 packaged runs, 63 session/cohort points and nine trial-noise estimates. The trial-noise SE is not total longitudinal uncertainty or an individual response threshold.

Qualified application source: e748962a8a0c3fc264959549cb10dc967e779c25; application tree 47e9b7f82fde12395207f5dee0ce89da7c0b3b74. Delivery head 46c9d0cc4fcb4d42391905deba718b5f4e101b79 adds evidence only. Embedded code for 54 modules plus the entry point matches checkout source.

Portable EXE SHA-256: e43bb87faa0f0b70c5bee3b7461172cfe1c6fd4ecdfc58a05d066105ff7db9ce.

Complete independent review, atomic commits, limitations, screenshots and receipts.

Protected file contents are unchanged. Read-only source-copy tests refreshed only the operational SQLite SHM timestamp; its hash, the DB/WAL hashes and the owner manifest hash remain identical. No owner installation was replaced. Legacy runs without captured investigation versions cannot retrospectively prove execution-time protocol context; new runs capture it. RES-619/590 forecasting gates and owner acceptance remain separate. No merge authorized or performed.

Litju and others added 8 commits November 12, 2026 09:44
…led reports

Individual investigations are versioned rows of the existing investigations
table inside the persistent workspace; runs record their cohort/individual
scope against the exact data revision. Adds the descriptive METH-U-INDIVIDUAL
trajectory method, scope-aware eligibility, protocol timelines that separate
observational tracking from N-of-1 designs, HYPOTHETICAL scenarios that stay
NOT QUALIFIED without a qualified forecasting model, cohort comparison and
combined reports with separate frozen sections. No schema or numerical
routine changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Research context bar (workspace, revision, scope, investigation), searchable
Individuals explorer, Individual Research tab with data, analysis, results,
protocol, scenarios and cohort comparison, scope-aware export, combined
report and history. Persisted context is restored on reopen; stale and
cross-participant completions are discarded. Deterministic 12-participant,
six-occasion study tests the complete backend and native workflow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Full regression 294 passed. Source-native Windows journeys at 100%, 125%
and 150% cover the 14 acceptance steps, including a separate-process
restart; receipts, screenshots and exported reports are retained.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rules are defined by the user: their own categories (e.g. In danger, Doing
great), tone, AND/OR conditions over any measured metric using latest value,
% vs baseline or previous test, squad SD, rolling mean, acute:chronic ratio
or missed tests. Each hit carries the evidence that fired it. Simulations
project best/expected/worst user assumptions (outcome trend, driver changes
and their assumed effects) from each athlete's latest observation, labeled
HYPOTHETICAL, and report which athletes would cross the user's rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ations

Squad is now a full-window perspective and the workspace home: every athlete
as a tile grouped by the researcher's own flag categories, trend or roster
attribute, with Flag rules and Simulate squad editors. Tapping an athlete
opens their page (key metrics, the rules that fired with their values, own
trajectory vs squad mean) with individual research as branches on the right.
Replaces the toolbar scope pickers and the separate Individuals dialog; the
research workbench returns to its five workspaces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
New ATHLETE_MONITORING import family: training load (sRPE/AU), sleep
duration and quality, wellness, fatigue, soreness, stress and mood, with a
required date/day/week axis (ISO dates only; never assumed) and a position
roster attribute for any family. Admission QC checks identity, the time
axis, duplicate athlete-day records and plausible ranges.

Workspaces gain a Link mode: a different measurement kind joins the current
revision as its own table for the same confirmed participants (never
pooled), and later monitoring batches append with overlap protection while
every existing table is carried forward. Flag rules, simulations and the
squad board work across all linked measures, with a metric picker,
position grouping and a readable date axis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Events is a main screen beside Squad. It lists, newest first, each data
revision, every athlete entering or leaving one of the researcher's flag
categories (current rules re-read across consecutive revisions, with the
values that fired), saved analyses and saved simulations. Athletes in a
concern category without a follow-up branch are pinned under Needs
attention with Open athlete and Start follow-up, which creates the branch
and opens it on the athlete page. Rules on measures a revision does not
hold are skipped for that revision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Compact-mode screens now open at their top instead of a stale scroll
position, simulation results get their own tab so they are never pushed
off a small screen, and rule pickers are compact with full names on hover.
Adds the scaling script, receipts and screenshots; all windows and dialogs
fit 1093x576 and 911x480 work areas. Full regression 300 passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 986787c8-7df4-4318-95f2-8df73a0d9058
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Litju commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

RES-647 independent review — stacked draft PR #4 (2026-11-12)

Disposition: keep draft and unmerged. GitHub PR #3 (RES-644) is independently open/mergeable into main, eight commits; PR #4 is an eight-commit draft stacked on #3. No CI checks are configured. PR #4 has 300 passing reported local source tests and screenshots, but no packaged application qualification, while its walkthrough script still drives the superseded first UI.

Priority scientific consistency finding: longitudinal.py:save_scenario correctly stores HYPOTHETICAL specifications with numerical_result=None / NOT_QUALIFIED; the later squad.py:simulate instead computes best/expected/worst numerical projected outcomes at a chosen horizon using user-entered percentages, then computes future flag crossings and saves their summary. Although labeled "hypothetical, not a prediction," this conflicts with the approved RES-647 limit that numerical forecasts are unavailable until a specifically qualified method exists under RES-619/590. Required owner/science disposition: either (A) keep only scenario definitions and omit athlete-specific numerical futures/flag-crossing conclusions from the research evidence UI, or (B) explicitly scope a separate illustrative arithmetic sandbox with method version/assumptions/bounds and unavoidable EXPLORATORY/HYPOTHETICAL/non-evidence labels, not a qualified forecast. The current mixed status must not ship as scientific authority.

Research-first UX: The new full-window Squad home/tile groups/"In danger" flags and Events are useful for triage but shift the interface toward practitioner monitoring; inspect how researchers access the core Direction E analysis, repeat-measure timeline, uncertainty and versioned investigations. The categorical concern flag is researcher-defined, not a validated physiological or injury-risk classification; enforce visible metric/threshold/revision provenance and avoid alarm-like definitive language.

Time-axis/flag semantics: squad.py:_measure acute/chronic ratio and rolling mean use the last N records, not validated 7/28 calendar-day workload windows; show this exact definition, check observation density, denominators and missingness, do not imply temporal ACWR or individualized risk when intervals differ. Subject-averaging by occasion likewise requires consistent sorting, units and QC handling.

Engineering readiness: Refresh the native walkthrough to exercise the current Squad, athlete branch, Events, flags, and simulation UI. Independently verify history/identity isolation, old-run immutability, compact 125/150% navigation and accessibility. Build and exercise a source-matched portable Qt app; establish CI/regression checks or equivalent exact-head gates. Do not merge or close RES-647 based on 300 local tests alone.

No changes requested to RES-644 branch within this review. Audit PR #3 separately and merge it only after owner approval; preserve stacked PR #4 as a draft and keep it separate from RES-619/590 scientific qualification.

@Litju Litju changed the title RES-647: Cohort and individual longitudinal research (stopped, exploratory) RES-647: Repair scientific contracts and qualify native longitudinal research Nov 12, 2026

Litju commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Independent qualification is complete for the repaired source and tested native workflows. Delivery head: 46c9d0cc4fcb4d42391905deba718b5f4e101b79; qualified application source: e748962a8a0c3fc264959549cb10dc967e779c25 (the delivery commit changes evidence only).

  • Clean local scientific/Python/Qt suite: 314 passed, zero failed/skipped.
  • Windows PR CI passed at the delivery head: 296 passed, 18 skipped, zero failures/errors. The skipped private-data/reference cases all passed locally; CI is not substituted for their independent evidence.
  • Native and portable workflows pass at 100/125/150%, including fully external process restarts. Independent checks match 15 packaged runs, 63 points and nine trial-noise estimates. The portable EXE and 54 embedded Python modules plus entry point match the frozen source.
  • EXE SHA-256: e43bb87faa0f0b70c5bee3b7461172cfe1c6fd4ecdfc58a05d066105ff7db9ce.
  • Local portable ZIP was CRC-verified; SHA-256: d726ccc11263a97f9f0c13eb5a9a8090288670e39a7bc825c12fcdc540ecb80a.

Complete review, atomic commits, screenshots, numerical receipts and limitations.

No numerical forecasting model or risk classification was qualified. Defined scenarios remain hypothetical and non-evidence. Existing legacy runs cannot retrospectively acquire missing execution-time investigation metadata; new runs capture it. An abrupt OS kill may leave an unreferenced derived directory. The owner manifest and operational DB/WAL/SHM hashes are preserved; SQLite read-only copying refreshed the SHM timestamp only.

PR #4 remains draft and stacked on PR #3. Neither PR has been merged; owner scientific/design acceptance and merge authorization remain separate.

@Litju
Litju changed the base branch from codex/res-644-persistent-workspace to main November 13, 2026 01:54
@Litju
Litju marked this pull request as ready for review November 13, 2026 01:55
@Litju
Litju merged commit 4a4be76 into main Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant