From 98bc88113baecb7faba9ca394229096463a35a66 Mon Sep 17 00:00:00 2001 From: Russ Laher Date: Tue, 24 Nov 2026 08:45:06 -0800 Subject: [PATCH] datasets: a dataset is a row of datasets, and run create refuses a name it does not hold A misspelt --dataset used to found an empty object catalog and a live binding of its own. The ruling (Russ Laher, 2026-11-24) adds the datasets table (name, description), the foreign key from runs.dataset, and rapidpipe dataset create / dataset list; foundation, tool and datasets pages follow it. Co-Authored-By: Claude Opus 5.5 --- system/datasets.md | 5 ++++- system/decisions.md | 3 +++ system/foundation.md | 10 +++++++++- system/tool.md | 4 +++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/system/datasets.md b/system/datasets.md index 0e215f0..2ef158c 100644 --- a/system/datasets.md +++ b/system/datasets.md @@ -5,7 +5,10 @@ A dataset is the set of inputs whose objects are shared: flight is one dataset, each simulation is one, each injected variant is one, and a trial or a test takes a dataset name of its own (Ben, 2026-11-14 07:17 -UTC). Dataset is in every scientific key ([foundation](foundation)), so +UTC). A dataset is registered once, as a row of the `datasets` table +(`rapidpipe dataset create`), before its first run, and `run create` +refuses a name the table does not hold ({ref}`ruling `). +Dataset is in every scientific key ([foundation](foundation)), so a difference job matches the objects of every run of its dataset and no other's. A night of flight processing is the live run of `flight` admitting new files; a new run starts when the settings or the image diff --git a/system/decisions.md b/system/decisions.md index 1b1abcc..4e3fa0b 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -42,6 +42,9 @@ A ruling that closes one goes under Rulings and its line leaves. ## Rulings +(decision-datasets-table)= +**A dataset is a row of `datasets`, and `run create` refuses a name the table does not hold**: `datasets` holds each dataset's `name` (the dataset every scientific key carries) and a `description`, and `runs.dataset` references `datasets.name`. `rapidpipe dataset create --name --description` registers one and `rapidpipe dataset list` prints them; `run create` under a name the table does not hold exits 64, naming the registered datasets, and records nothing. Why: the dataset is the boundary within which objects are shared ({ref}`ruling `), and until now it came into being as free text at `run create`, so a misspelt `--dataset` silently founded an empty object catalog and a live binding of its own. The dataset holds no survey or overlay: a run records its own (`runs.survey`, and the overlay in `runs.layers`), since flight's runs span programs and surveys and every flight trial takes a name of its own under `flight.toml`. `schema.sql` registers `flight`; `database/2026-11-24-datasets.sql` brings SMDC to it, registering every dataset its runs name before it adds the foreign key. (Russ Laher, 2026-11-24) + (decision-operators-promote)= **Any Operator promotes**: `release-hooks/promote `, the one step that moves `rapid-rebuild-production` ({ref}`ruling `), is run by any Operator from their own `rapid-power` session, on a build a scratch run has checked. Why: the `rapid-batch` stack's service role registers the job definition, so an administrator's session is not needed; the power-user role is allowed every call the hook makes by policy simulation, and the first promotion run that way is its proof. (Ben, 2026-11-20; rapid_systems `cloudformation/release-hooks/README.md`) diff --git a/system/foundation.md b/system/foundation.md index af0a657..5cc81fe 100644 --- a/system/foundation.md +++ b/system/foundation.md @@ -59,6 +59,13 @@ the one survey and dataset the run is for. There is no settings table and no resolution of settings at run time: a stage reads its own table from the run's body. +The dataset is a row of `datasets`: its name and a description, registered once by `rapidpipe dataset create` before its +first run. `runs.dataset` references it, so `run create` refuses a name +the table does not hold (exit 64, naming the registered datasets) and a +misspelt `--dataset` cannot found an object catalog of its own. The +run, not the dataset, records the survey and overlay +({ref}`ruling `). + `run create` resolves the body from three layers, low to high. The shipped defaults, `rapidpipe/settings/foundation-thin.toml`, hold `dev`'s values and `dev`'s behaviour, with the measured value and its @@ -571,7 +578,8 @@ and `dev`'s per-object forced-photometry store. | Verb | Does | |---|---| -| `rapidpipe run create --who --why --revision [--settings FILE] [--overlay FILE] [--set TABLE.key=VALUE ...] --survey --dataset` | resolves the three layers, records a run with its body and layers, and prints its id | +| `rapidpipe run create --who --why --revision [--settings FILE] [--overlay FILE] [--set TABLE.key=VALUE ...] --survey --dataset` | resolves the three layers, records a run with its body and layers, and prints its id; refuses a dataset `datasets` does not hold | +| `rapidpipe dataset create --name --description`, `rapidpipe dataset list` | registers a dataset, or prints the registered datasets as JSON | | `rapidpipe official change --group FILE --who --why` | applies a change group from a JSON list of `close` and `open` items; refuses naming the binding | | `rapidpipe official undo --who --why` | applies a group's inverse under the same rule | | `rapidpipe run show `, `rapidpipe job show ` | print a run with its live binding and jobs, or a job with its inputs and bindings, as JSON | diff --git a/system/tool.md b/system/tool.md index 0692d69..b12a6ef 100644 --- a/system/tool.md +++ b/system/tool.md @@ -17,7 +17,9 @@ in this repository's history. | Command | Does | |---|---| -| `run create [--who] --why [--revision] [--settings FILE] [--overlay FILE] [--set TABLE.key=VALUE ...] --survey --dataset` | Records a run with its body resolved from the three layers and prints its id; `--who` defaults to the login name (`root` is refused as a default), `--revision` to `RAPID_SOURCE_REVISION`, the commit of the code running here, which the image and `scripts/dev.sh` set, and is required where it is unset | +| `run create [--who] --why [--revision] [--settings FILE] [--overlay FILE] [--set TABLE.key=VALUE ...] --survey --dataset` | Records a run with its body resolved from the three layers and prints its id; `--who` defaults to the login name (`root` is refused as a default), `--revision` to `RAPID_SOURCE_REVISION`, the commit of the code running here, which the image and `scripts/dev.sh` set, and is required where it is unset. The dataset must be registered (`dataset create`): a name `datasets` does not hold exits 64, naming the registered datasets, and records nothing ({ref}`ruling `) | +| `dataset create --name --description` | Registers a dataset, printing its name. A name already registered exits 1 and changes nothing | +| `dataset list` | Prints every registered dataset (`name`, `description`, `created`) as JSON, ordered by name | | `run show [--toml FILE]` | Prints one run, its live binding and its jobs as JSON; with `--toml` writes the run's stored settings body to FILE as TOML instead, which `run create --settings FILE` stores as the same body with the same `settings_hash` | | `run stop --run N [--who] --why` | Records the run as stopped and asks Batch to cancel or terminate every job of it that has not ended; from then on `loop`, `job local`, `job submit` and `job run` refuse the run (exit 1), saying who stopped it and why. A stopped run is not started again; a new run takes the work on. Repeat it to ask Batch again | | `run cleanup --run N [--delete]` | For a stopped run whose every job has ended, lists as JSON the attempt directories under `RAPIDPIPE_OUTPUTS_ROOT` that belong to its jobs and hold no published or official product, with file counts; refuses, naming the job, while a job is not shown to have ended. `--delete` removes the listed files, checking each attempt again as it reaches it, and keeps and names any that was published meanwhile (exit 1) |