Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion system/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <decision-datasets-table>`).
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
Expand Down
3 changes: 3 additions & 0 deletions system/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ A ruling that closes one goes under Rulings and its line leaves.
(decision-reprocess-verb)=
**`rapidpipe reprocess` processes one L2 file again within its dataset, through intake, difference and packet, or difference and packet with `--skip-intake`**: before it, the only way to process a file again was a new dataset, since the loop plans an intake only for a file no intake job of the dataset has published, and a difference or packet only for a key with no official one. The verb takes the run and the file's stem, and the file must already have an official `l2files` row of the run's dataset read from that stem (exit 64 otherwise: the loop takes a new file in). It records and runs one job per stage in order, each started only once the one before it is published, on Batch with `--job-definition` or here with `--local`, and `--dry-run` prints the jobs without recording any. Each job expects the binding open on its key when it is recorded, so under the live run each one replaces its predecessor's binding as it publishes; under a run that is not live each is published unbound, reads its predecessor's output by job, and a change group binds the chain. The intake expects `l2files` only, so the exposure's row and id stay. A failed job, or a binding refused under the live run, stops the chain with exit 1 and nothing after it is recorded; a job of the run already pending on the file or its key refuses the verb (exit 1). Packets already sent are not recalled, and the later epochs' packets that carry the old detections stay as published; nothing is deleted, and `official undo` of each job's group takes the chain back. An imported L2 row has no stem and is not reprocessed by this verb. (Russ Laher, 2026-11-30)

(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 <decision-objects-across-runs>`), 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 <digest>`, the one step that moves `rapid-rebuild-production` ({ref}`ruling <decision-release-is-a-build>`), 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`)

Expand Down
10 changes: 9 additions & 1 deletion system/foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <decision-datasets-table>`).

`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
Expand Down Expand Up @@ -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 <group> --who --why` | applies a group's inverse under the same rule |
| `rapidpipe run show <id>`, `rapidpipe job show <id>` | print a run with its live binding and jobs, or a job with its inputs and bindings, as JSON |
Expand Down
4 changes: 3 additions & 1 deletion system/tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <decision-datasets-table>`) |
| `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 <id> [--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) |
Expand Down