|
| 1 | +# RushTI — Domain Context |
| 2 | + |
| 3 | +This file captures the canonical vocabulary used in RushTI. Terms here are |
| 4 | +load-bearing: they appear in code, docs, settings, and user-facing messages. |
| 5 | +When a term feels ambiguous in conversation, anchor it to a definition here. |
| 6 | + |
| 7 | +> Scope: single context. No `CONTEXT-MAP.md` — the whole repository shares |
| 8 | +> this vocabulary. |
| 9 | +
|
| 10 | +--- |
| 11 | + |
| 12 | +## Core terms |
| 13 | + |
| 14 | +### Taskfile |
| 15 | +The structured input that drives a `rushti run`. Materialised as either: |
| 16 | +- a **JSON task file** (`.json`) parsed by `parse_json_taskfile`, OR |
| 17 | +- a **TXT task file** (`.txt`) converted on read by `convert_txt_to_json`, OR |
| 18 | +- a **TM1 cube taskfile** read by `read_taskfile_from_tm1` (an MDX query |
| 19 | + against the `rushti` cube using the `Input` element of `rushti_run_id`). |
| 20 | + |
| 21 | +The in-memory shape is the `Taskfile` dataclass (`taskfile.py`) — a container |
| 22 | +with `version`, `metadata`, `settings`, and `tasks`. Always prefer |
| 23 | +**"taskfile"** (one word, lowercase) in docs; **"JSON task file"** is also |
| 24 | +acceptable when the format matters. |
| 25 | + |
| 26 | +Do **not** call it `workflow.json` — that name implies the file *is* a |
| 27 | +workflow, which conflates the container with one of its metadata fields. |
| 28 | + |
| 29 | +### Workflow |
| 30 | +The logical identifier for a run, stored in `metadata.workflow` of a taskfile |
| 31 | +and as an element of the `rushti_workflow` dimension. A taskfile contains |
| 32 | +tasks *for* one workflow. |
| 33 | + |
| 34 | +Use **"workflow"** as an adjective for scope ("workflow-level setting", |
| 35 | +"per-workflow override") rather than as a synonym for "taskfile". |
| 36 | + |
| 37 | +### Task |
| 38 | +A single TI process execution inside a taskfile. Each task has: |
| 39 | +- `id` — a positive integer string, used as an element name in |
| 40 | + `rushti_task_id`. |
| 41 | +- `instance` — **the TM1 instance where this task executes** (task-level). |
| 42 | +- `process` — the TI process name on that instance. |
| 43 | +- `parameters`, `predecessors`, `stage`, `timeout`, etc. |
| 44 | + |
| 45 | +### TM1 instance |
| 46 | +A named TM1 server defined in `config.ini`. Three roles can apply |
| 47 | +contextually — context disambiguates, not the name: |
| 48 | + |
| 49 | +| Role | Meaning | Where it shows up | |
| 50 | +|---|---|---| |
| 51 | +| **Source** | Where a taskfile is read *from* (cube source) | `rushti run --tm1-instance X` | |
| 52 | +| **Execution target** | Where a task executes | task-level `instance` field | |
| 53 | +| **Results target** | Where execution results are pushed | settings.ini or taskfile `tm1_instance`; also CLI `--tm1-instance` as fallback | |
| 54 | + |
| 55 | +The canonical setting key for the results target is `tm1_instance` (in both |
| 56 | +`settings.ini [tm1_integration]` and the taskfile `settings` block). The |
| 57 | +deprecated alias is `default_tm1_instance`. |
| 58 | + |
| 59 | +There is no separate "source TM1 instance" override — `--tm1-instance` is |
| 60 | +both the source and (in absence of higher-precedence overrides) the results |
| 61 | +target for a `run` invocation. |
| 62 | + |
| 63 | +### Source vs target — naming convention |
| 64 | +RushTI does not prefix instance names with `source_` or `target_`. The |
| 65 | +*command* or the *config section* makes the role obvious: |
| 66 | +- `rushti run --tm1-instance X` — X is the source for cube-read, and the |
| 67 | + fallback results target if nothing else is set. |
| 68 | +- `rushti tasks push --tm1-instance X` — X is the target of the push |
| 69 | + (canonical form). The legacy alias `--target-tm1-instance` is deprecated. |
| 70 | +- `[tm1_integration].tm1_instance` — the section header makes "target" clear. |
| 71 | + |
| 72 | +This convention is intentional: prefixes don't scale across surfaces and |
| 73 | +fight against contextual disambiguation. See |
| 74 | +[[adr/0001-tm1-instance-resolution]] for the full rationale. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Settings precedence |
| 79 | + |
| 80 | +The effective value for a settings-driven knob is resolved in this order |
| 81 | +(highest wins): |
| 82 | + |
| 83 | +1. **CLI arguments** — e.g. `--max-workers`, `--tm1-instance`. |
| 84 | +2. **Taskfile settings block** — e.g. `{"settings": {"max_workers": 8}}` |
| 85 | + in JSON. Applied via `_apply_json_settings` inside |
| 86 | + `get_effective_settings` *after* the taskfile is parsed. |
| 87 | +3. **`settings.ini`** — the canonical defaults file at |
| 88 | + `config/settings.ini`. |
| 89 | +4. **Built-in defaults** — the dataclass field defaults in |
| 90 | + `settings.py`. |
| 91 | + |
| 92 | +Three knobs are *not* settings-driven and don't follow this chain: |
| 93 | +- Per-task `instance` and `process` — taskfile-only, no fallback. |
| 94 | +- TM1 connection parameters — `config.ini` only. |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Files of record |
| 99 | + |
| 100 | +| File | Purpose | |
| 101 | +|---|---| |
| 102 | +| `config/settings.ini` | Execution defaults (user-editable). | |
| 103 | +| `config/settings.ini.template` | Documented example, shipped in repo. | |
| 104 | +| `config/config.ini` | TM1 connection parameters per instance. | |
| 105 | +| `archive/{workflow}/{run_id}.json` | Snapshot of the taskfile actually executed, for audit + DAG reconstruction. | |
| 106 | +| `data/rushti_stats.db` | Local SQLite stats database (when `[stats] enabled = true`). | |
0 commit comments