toru/dev-notes/data invariants.md

21 lines
730 B
Markdown
Raw Permalink Normal View History

# Data Invariants
This file contains notes on invariants which must be upheld across running toru commands for the vault and configuration.
2022-08-30 09:57:52 +00:00
### tasks::Task
- name cannot be purely numeric
- ID must be unique
2022-08-30 09:57:52 +00:00
### tasks::Duration
- minutes should be less than 60
2022-08-30 09:57:52 +00:00
### state::State (in state.toml)
- the `next_id` should always be greater than the ID of any task within the vault
2022-08-30 09:57:52 +00:00
### index::Index (in state.toml)
- the index of name to ID map should be correct given the names and IDs of all vaults
2022-08-30 09:57:52 +00:00
### graph::Graph (in state.toml)
- should always have dependencies the same as specified in each task file
- no circular dependencies should be allowed to exist between tasks (and by extension should not exist in the state file)