Skip to content

Read and edit a database's own parameters, and restate what reads them - #684

Merged
ccomb merged 2 commits into
mainfrom
database-parameters
Oct 17, 2026
Merged

ccomb merged 2 commits into
mainfrom
database-parameters

Conversation

@ccomb

@ccomb ccomb commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Read and edit a database's own parameters, and restate what reads them

A database's own parameters, the ones every process reads unless it
defines its own of the same name, can now be read with
GET /db/{db}/parameters and set or removed with
POST /db/{db}/parameters (setParameters, removeParameters).

Every process that reads an edited parameter, directly or through a
calculated one, is restated as an edit of that process would restate it,
and the answer lists the processes that moved. Example: the database has
salt_kg = 0.01 and salt_g = salt_kg * 1000, and a flour process has a
line salt_g / 100 (0.1 kg). Setting salt_kg to 0.02 moves that line
to 0.2 kg, and salt_g shows 20.

Refused, with the reason: the checks of an activity's parameters (a name
that is not one word of the language, a second spelling, a value that is
not finite, a formula that does not read or loops); removing a parameter
that a formula still reads, naming the readers; an edit that leaves a
process without a value, or a calculated parameter read by no process
newly without one; a change that moves an allocation share.

Journal op parameters. REST, the assistant's get_database_parameters
and edit_database_parameters, pyvolca database_parameters() and
edit_database_parameters(). Reading them needs the licence to read the
inventory. Wire revision 74.

ccomb added 2 commits October 17, 2026 12:09
A database's own parameters, the ones every process reads unless it
defines its own of the same name, can now be read with
`GET /db/{db}/parameters` and set or removed with
`POST /db/{db}/parameters` (`setParameters`, `removeParameters`).

Every process that reads an edited parameter, directly or through a
calculated one, is restated as an edit of that process would restate it,
and the answer lists the processes that moved. Example: the database has
`salt_kg = 0.01` and `salt_g = salt_kg * 1000`, and a flour process has a
line `salt_g / 100` (0.1 kg). Setting `salt_kg` to 0.02 moves that line
to 0.2 kg, and `salt_g` shows 20.

Refused, with the reason: the checks of an activity's parameters (a name
that is not one word of the language, a second spelling, a value that is
not finite, a formula that does not read or loops); removing a parameter
that a formula still reads, naming the readers; an edit that leaves a
process without a value, or a calculated parameter read by no process
newly without one; a change that moves an allocation share.

Journal op `parameters`. REST, the assistant's `get_database_parameters`
and `edit_database_parameters`, pyvolca `database_parameters()` and
`edit_database_parameters()`. Reading them needs the licence to read the
inventory. Wire revision 74.
… infinite, and let a removal ignore formulas removed with it

Restating takes the process before the edit as a record of its own, so the
before and after cannot be swapped. A calculated parameter of the database
that the edit leaves without a finite number is refused, as one of a process
is: with per_salt = 1 / salt_kg, setting salt_kg to 0 is refused. Removing a
parameter is no longer held back by a formula the same edit removes, so the
order of the removals does not matter.
@ccomb ccomb added the agent-reviewed pr-cycle ran label Oct 17, 2026
@ccomb
ccomb merged commit 350de40 into main Oct 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-reviewed pr-cycle ran

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant