diff options
| author | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-11-11 17:52:58 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-11-11 13:43:57 -0600 |
| commit | 0f114b1f9fbf4cf4a2d7957961f0503eff3442db (patch) | |
| tree | cee87f0157725b2b1722d8d5b62657aacd61a0fa /docs | |
| parent | cc279bf596b138e66d1c75f26d48b4062e310b1c (diff) | |
| download | gn-uploader-0f114b1f9fbf4cf4a2d7957961f0503eff3442db.tar.gz | |
docs: update tasks for immutable jobs, normalisation and cleanup
Co-authored-by: pi coding agent <pi@pi.dev>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/WIP/geno-uploads-tasks-and-todos.md | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/docs/WIP/geno-uploads-tasks-and-todos.md b/docs/WIP/geno-uploads-tasks-and-todos.md index 4405f3d..a3ce68f 100644 --- a/docs/WIP/geno-uploads-tasks-and-todos.md +++ b/docs/WIP/geno-uploads-tasks-and-todos.md @@ -57,14 +57,15 @@ implementation notes. - ✅ Seed `dot_geno_fields.unk` into the missing-value symbols. - ⬜ Revisit the Stage 02 UI's three-character symbol limit: symbols may be longer and need not be single characters (low priority). -- ✅ Capture the confirmed encoding/study design for downstream stages (stored - in the collector job metadata, key `stage02`). +- ✅ Capture the confirmed encoding/study design for downstream stages (carried + in the QC job metadata at launch, key `stage02`; the collector job is left + untouched). ## Stage 03 — Final QC -- ⬜ Untranspose transposed files as the first action of Stage 03: write a - canonical `work_file`, keep the original immutable, skip `#`/`@`, validate - ragged rows (see "Untransposing transposed files"). +- ✅ Untranspose transposed files as the first action of Stage 03: write a + canonical `<stem>__work<suffix>`, keep the original immutable, skip `#`/`@`, + validate ragged rows (see "Untransposing transposed files"). - ✅ Perform value-level QC parameterised by Stage 01/02 results: every sample value must be an encoding or missing-value symbol; empty values are errors and matching is case-sensitive. @@ -72,7 +73,7 @@ implementation notes. confirmed encoding/missing symbols; absent symbols are not required). - ⬜ Apply the sample/individual/case ordering rules and present the order for user review and reordering (see design notes). -- ⬜ Sort/verify records by chromosome (ascending), then cM (ascending), then Mb +- ⬜ Sort/verify records by chromosome (ascending), then Mb (ascending), then cM (ascending) — placeholder ordering with a warning/TODO until the appropriate ordering is known. @@ -88,11 +89,11 @@ implementation notes. ## Untransposing transposed files - ✅ Decide placement: first step of Stage 03, before QC. -- ⬜ Implement normalisation at the start of the Stage 03 job: write a canonical - `work_file`, keep the original immutable, skip `#`/`@`, validate ragged rows, - and record `work_file` in the collector job metadata. -- ⬜ Run Stage 03 QC (and later stages) against `work_file` with - `transposed=False`; simplify the QC/orientation code accordingly. +- ✅ Implement normalisation at the start of the Stage 03 job: write a canonical + `<stem>__work<suffix>`, keep the original immutable, skip `#`/`@`, validate + ragged rows. The path is deterministic, so it is not recorded. +- ✅ Run Stage 03 QC against the work file with `transposed=False`; QC handles + only the normal orientation. ## Refactoring / technical debt @@ -108,11 +109,17 @@ implementation notes. the phenotypes `load_data_to_database`/`load_phenotypes_success_handler` pattern): proceed on success, and stop/report diagnostics on failure (see design notes). -- ✅ Schedule the Stage 03 QC job from Stage 02 and record `stage03_job_id` for - idempotency. +- ✅ Completed jobs are immutable: Stage 02 state is carried in the QC job + metadata at launch, not written back to the collector job. +- ✅ Reuse an existing next-stage job via `jobs_by_metadata` with namespaced + keys (`genotype_collector_job_id` + `job-type`). - ⬜ Make stage transitions idempotent: revisiting a completed job's status URL must not re-run a non-idempotent stage; present the previously entered information instead (see design notes). +- ⬜ Unique claim / serialised transition for non-idempotent stages (deferred). +- ⬜ Add a cleanup daemon/service that periodically calls + `delete_expired_jobs` (script in gn-libs; scheduling in gn-machines). It only + cares about expired jobs, not users. - 💭 Consider preventing a return to / resumption of earlier jobs once a later stage has started (see design notes). - 💭 Decide whether genotype upload stays "one script == one job" or becomes |
