Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.

9 downloads

dbbasic-object-server/docs/dron-write-semantics.md
Install on DigitalOcean Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-server.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-server.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-server.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Daniel Quellhorst Changelog for this batch. 65ef78d 3 hours, 18 minutes ago History
dron-write-semantics.md · 36.4 KB · 562 lines

DRON write semantics

What an engine does with one create, one update or one delete of one record, in what order, and what it answers when it refuses. It is written for someone building a second engine: given the same installed declarations and the same request, that engine should reach the same verdict and answer with the same status and code.

It describes the engine in this repository as it is today, including the parts listed under Open questions, which may change. The code is the source of truth; where this page and the code disagree, a test fails. Every numbered statement (S1., S2., ...) is pinned by a test: tests/test_dron_write_semantics.py names the statements each of its tests pins, and statements an older test already pinned are listed with that test in the table at the end. test_every_statement_in_the_document_is_pinned holds the two together.

The requests are the record API: POST /collections/<c>/records, PUT /collections/<c>/records/<id> and DELETE /collections/<c>/records/<id>, with permission enforcement on unless a statement says otherwise. "Storage writers" are in-process callers of object_records (actions, the daemon, imports, the rollup refresh); S55 says which checks they skip.

The DRON declarations involved are in dron.md; the permission model is in permissions-model.md.

1. Values: missing, null, blank

S1. A record body is a JSON object of scalar values. null is stored as the empty string; a string, number or boolean is stored as its text, so JSON true in a text field is "True" and JSON 1.0 is "1.0" (which an integer field refuses). An array or object as a value is refused: 400 Record field value must be scalar or null: <name>. On create, an id that is missing, null or "" is replaced by a new UUID4.

S2. On create, a field's default fills a value that is missing, null or "". A value of spaces is a value and is kept. Defaults never apply on update: an update that sends null or "" stores "".

S3. What counts as blank depends on the check:

CheckBlank meansA value of spaces
requiredmissing, null, "": 400 Record field '<f>' is requiredsatisfies it
validation.required_whenmissing, null, "" or spaces onlyis blank
type, enum, bounds, pattern, relation existence"" is not checked at all (leave it to required)is a value: a number field answers must be a number, a relation answers relation value is not a valid record id
uniquea key field blank after trimming: the row has no key and is exemptis blank
relation.requiresblank after trimming: not askedis blank (and validation then refuses it, row above)
transitionsa blank stored value may move to any value; moving to "" is a move like any other and must be listed

S4. Values are stored as sent, untrimmed and unnormalized (" 5 " in a number field, "+15" in an integer field), except booleans, which are stored as "true" or "false" whatever spelling was accepted. Formulas read the stored text as numbers.

S5. A key the schema does not declare is stored and returned, and no check reads it.

S6. A date value is whatever the host Python's date.fromisoformat accepts, a datetime value whatever datetime.fromisoformat accepts after a trailing Z is read as +00:00. A datetime field accepts a date alone; a date field refuses a time. The compact form 20260101 is accepted on Python 3.11 and later and refused on 3.10 (open question).

2. A create, in order

The first check that refuses ends the request; nothing after it runs.

#StepRefusal
1Parse the body: a non-empty JSON object, field names without surrounding whitespace, scalar values (S1)400, no code
2If the caller is signed in, the schema declares owner_id and the body's is blank: set it to the caller
3Permission to create the record as sent (row filters read it)403 forbidden; 503 if the policy cannot be read (S11); 401 if enforcement is off (S12)
4An owner_id naming someone else needs an admin role or an on_behalf grant403 forbidden, "field": "owner_id"
5Field permissions on every key sent403 forbidden, "denied_fields"
6relation.requires on every pointer with a value400 as if missing, 403 forbidden with "field", 503/500
7hooks.before_write (action create)its 4xx/503 with hook_rejected; 500 hook_failed
8Storage, before the lock: id format, defaults, storable (no NUL, valid UTF-8, size), the created_at stamp, the row's own rollups then formulas, validation field by field in declared order, then required_when, then booleans made canonical400, no code
9Under the lock: the id must be new409, no code
10Under the lock: unique409 unique_violation
11Under the lock: locked_checks409 check_refused (or the check's 4xx), 503 check_unavailable, 500 check_failed
12Write the row, the unique index and the change-log entry; refresh parents' rollups (S74); release the lock; publish the change event; answer 201

S10. A create's body is parsed (step 1) before anyone is asked whether the caller may write, so a malformed body is a 400 even for a caller who would get 403. An update asks the collection-level permission question first (step U1 below), so the same body there is a 403.

S11. Under enforcement, a permission policy that cannot be read refuses every create, update and delete with 503, and nothing is written.

S12. With enforcement off, only the admin token writes; any other caller gets 401 Unauthorized. Under enforcement the admin token is a subject holding the admin role, which every rule allows; the checks after step 3 still apply to it except where S13 says.

S13. Ownership: a signed-in create that leaves owner_id blank is owned by the caller (step 2). An owner_id naming someone else is refused, not rewritten (step 4), unless the caller holds an admin role or an allow with "on_behalf": true covers this create. On update, sending an owner_id that differs from the stored one needs the same (step U5 below); the admin token and a value sent back unchanged are exempt.

S14. Field permissions are asked of the keys a write sends, even unchanged or blank, and only under enforcement. Under enforcement they bind the admin token too (403 forbidden with denied_fields); with enforcement off the same request from the admin token is accepted (open question).

S15. relation.requires reads the target under the same policy for the same caller. A target the caller may not read gets the same 400 Record field '<f>' references a missing record: <c>/<id> a missing target gets (no oracle); one they may read but not update (when requires is update) gets 403 forbidden with "field". A missing target passes this step and is refused by validation (step 8). Only under enforcement.

S16. The pre-write hook runs after every permission question and before validation: it is handed the record as sent (no defaults, no computed values) and its transform is what is then defaulted, computed and validated. A write refused before step 7 never reaches it; a write it lets through can still be refused after it.

S17. Validation walks the declared fields in declaration order. For each: a computed or read-only field that was sent is refused (S73); then required; a blank value stops there (S3); otherwise its type, enum, validation rules and relation existence are checked. required_when is judged after every field has passed. The first failure is the answer.

S18. A duplicate id is found under the lock, after validation: a create with a taken id and a bad value answers 400 for the value; with a taken id alone, 409 Record already exists: <c>/<id> with no code. It is found before unique.

S19. The hook's contract: it may allow (None), transform (return the record) or refuse ({"error": ..., "status": ...}). A refusal's status is relayed when it is a 4xx or 503 and is 400 otherwise, with code: hook_rejected. A hook that is declared but missing, raises, or answers outside the contract fails closed: 500 hook_failed. A transform may not change id, owner_id or read-only fields. On delete a transform is not an answer. Storage writers never run hooks.

3. An update, in order

#StepRefusal
U1Permission to update the collection at all (no record yet)403 forbidden; 503 (S11); 401 (S12)
U2Parse the body (S1)400
U3Look the record up404 Record not found: <c>/<id>, no code
U4Permission to update the stored row; under enforcement, also the row as it would be (stored row plus changes)403 forbidden
U5A changed owner_id (S13)403 forbidden, "field": "owner_id"
U6Field permissions on every key sent403 forbidden, "denied_fields"
U7relation.requires on every pointer whose value changesas create step 6
U8hooks.before_write (action update, with existing and changes)as create step 7
U9Storage: an id in the body that differs from the URL's400 Record id cannot be changed
U10Under the lock: read the row again; gone404
U11Under the lock: If-Match / expected_rev against that row; then that row against the row U4-U8 judged (S52)409 conflict
U12Under the lock: merge the changes, recompute rollups and formulas, validate the whole row (S17, S80)400
U13Under the lock: storable400
U14Under the lock: transitions (S27)400, or 403 forbidden for a guard
U15Under the lock: locked_when409 record_locked, "fields"
U16Under the lock: unique409 unique_violation
U17Under the lock: locked_checksas create step 11
U18Write, index, change log, rollup refresh, release, publish; answer 200 with the record and its _rev

S20. The steps run in the order of the table: a caller with no update grant at all gets 403 for an id that does not exist; a missing record is a 404 whatever the body's values are; a stale revision is a 409 conflict before the body's values are validated; a bad value is refused before a transition, a transition before locked_when, locked_when before unique, and unique before a locked check.

S21. A caller whose grant is row-filtered (for example "own rows") passes U1, so on update and delete they get 404 for an id that does not exist and 403 for one that exists and is someone else's. A read answers 404 for both (open question).

S22. An update that sends {} is 400 Record payload must not be empty. An id equal to the URL's is accepted and ignored.

S27. transitions are checked on update only; a create may start in any value the field's enum allows. On update, a value that does not change is no move, and a blank stored value may move anywhere. Otherwise the new value must be listed under the stored one: an unlisted move is 400 Record field '<f>' cannot move from '<a>' to '<b>' (allowed: <list or none>). A guarded entry {"to", "when"} is allowed only when when matches the STORED row for the caller (the row-filter language, S92); a guard that fails is 403 forbidden ... for this subject (allowed: ...). The admin token is a caller like any other here: a guard that does not match it refuses it. Storage writers are not asked guards, only the map.

4. A delete, in order

S30. A delete runs: permission to delete the collection at all; look the record up (404); permission to delete the stored row (403 forbidden); hooks.before_write with action delete (hook_rejected / hook_failed); then under the lock: the row again (404), the row against the row the permission and the hook judged (409 conflict, S52), locked_when (409 record_locked with "fields": [] unless the rule says allow_delete), the unique index releases the row's keys, locked_checks selected for delete; then the tombstone, the change log, the rollup refresh, the event, and 200 with "deleted": true. Nothing checks whether other rows point at the record (S54).

5. Inside the lock, and which refusal wins

S40. A write takes, in this order: the check locks its plan names (the lock of this collection's checks, of checks that read this collection, and of its rollup parents' checks), in sorted name order, then the collection's file lock. Under the lock, for create: duplicate id, unique, locked_checks. For update: the row again, revision, the judged row (S52), validation, storable, transitions, locked_when, unique, locked_checks. For delete: the row again, the judged row, locked_when, locked_checks. Everything else runs before the lock.

S41. One request gets one refusal: the first step, in the order above, that refuses. Checks never accumulate; a client fixes one thing and may be refused for the next.

S42. A locked check's contract: it is called only for the actions its on selects (S80 for update) and answers None or {} to allow, or {"error", "status"} to refuse: 409 check_refused by default, the 4xx it names, or 503 check_unavailable. Any other answer, a raise, or a write from inside the check is 500 check_failed; a check object that is not installed is 503. Every refusal names the entry in "check". A check lock not acquired within DBBASIC_CHECK_LOCK_TIMEOUT_SECONDS is 503 check_unavailable.

S43. unique: key values are compared trimmed, and case-folded when ignore_case; a blank key is exempt, a blank scope value is a value. Only a key the write newly takes is checked: an update that keeps its own key is never refused, so duplicates that existed before the constraint stay editable. The refusal is 409 unique_violation with "fields" and "scope", never the id of the row holding the key.

S44. locked_when: a rule applies when the STORED row (read under the lock) matches its when. A change is a submitted field whose text would differ; a field sent back unchanged is no change; computed and read-only fields are never frozen; a field the schema does not declare is frozen like any other. except lists what stays editable, fields what is frozen. Every matching rule applies. A delete is refused unless the rule says allow_delete. Nobody is exempt, the admin token included.

6. Locks, and who is checked

S52. The row permission (U4), the owner change (U5), field permissions, requires and the hook are judged on a row read before the lock (they read the policy and other collections and run the package's hook, none of which runs under a collection's lock). The write carries a fingerprint of that row (an unkeyed hash of every stored field; it never leaves the server and is not the _rev a client is given, S56) and, under the lock, refuses when the row there is any other: 409 conflict, Record <c>/<id> changed while this request was being checked; read it again and retry., and nothing is written. So a row given to someone else, or changed by the hook's own writes, between the gates and the write is not written by a request judged on the old row; a retry is judged on the row as it now is. This holds for update and delete through the record API, through the file routes (/api/files, WebDAV) that use the same gates, and for revoking a grant (DELETE /api/share/{id}: its own owner, granter or admin rule stands in for the two permission questions; the hook, this fingerprint, the locks and the change event are the delete's, S30). Storage writers pass no fingerprint. A change to a relation's target (rather than this row) in between is not seen (S54).

S53. locked_when, transitions and the revision are judged on the row read under the lock, for every writer. A storage writer whose edit overlaps an approval is refused as an edit to an approved row (record_locked); a record API request is refused first as a changed row (S52: 409 conflict), and its retry as an edit to an approved row.

S54. A relation's target is checked for existence without the target collection's lock, and deleting a record checks nothing about rows pointing at it. A row can therefore come to point at a deleted record; when it does, every later update of that row is refused (400 ... references a missing record) until the pointer is cleared, whatever the update changes.

S55. Storage writers skip every step before storage: permissions, owner, field permissions, requires, the hook, and transition guards. They do not skip storage: validation, the transition map, locked_when, unique and locked_checks apply to them.

S56. The _rev a caller is given (a record GET, a list's revs, an update's answer) is an HMAC-SHA256 of the collection and the whole stored row under a key only the box holds (<data dir>/record_rev/secret.key, made on first use). It changes when any stored field changes, fields the caller cannot read included, so a partial update with If-Match is refused (409 conflict) after a change its writer could not see: a writer cannot tell whether its edit depended on it, and the field may feed a formula, a locked_when or a transition. That a row changed is all a rev says; it cannot be computed or tested from a guess of a field's value, and two rows never share one. If-Match / expected_rev from a client are compared against it under the lock (U11), never against the unkeyed fingerprint of S52, which a client sending is a stale revision. A row that comes back to exactly an earlier stored state, every field included, gets its earlier _rev back.

7. What a refusal guarantees

S60. A refused write changes no record, no change log, no index, no parent's rollup, and publishes no event. What it may leave: lock files, a permission audit line, and the hook's own execution-log line when the hook ran.

S61. The answers, for a second engine to match:

RefusalStatuscodeOther keys
malformed body, invalid value, read-only sent, required, required_when, missing or unreadable relation target, unlisted transition, id changed400none
not the admin token, enforcement off (S12)401none
not permitted, owner change, field permission, requires not updatable, transition guard403forbiddendenied_fields or field where named
record not found404none
duplicate id409none
stale revision, or the row changed after its gates judged it (S52)409conflict
locked_when409record_lockedfields
unique409unique_violationfields, scope
locked check refuses409 or its 4xxcheck_refusedcheck
hook refusesits 4xx, or 503hook_rejected
hook broken500hook_failed
locked check broken500check_failedcheck
locked check cannot decide, or its lock is busy503check_unavailablecheck
policy unreadable503

Every error body is {"status": "error", "error": <sentence>, ...}.

8. Computed fields, formulas and rollups

S70. A row's own derived values are computed after defaults and the created_at stamp and before validation: rollup fields first (from the child rows as they are then), then formulas (which may read the fresh rollups). An update computes them on the merged row, so every update recomputes them. The hook runs before all of this: on create it sees none of it, and what it returns is what is computed.

S71. Formula arithmetic is exact (integers and decimals, an integer division rounding half up). A formula that cannot be evaluated (a blank or non-numeric operand, a division by zero) stores "" and the write succeeds.

S72. A computed result is validated like a sent value: a formula whose result breaks its own validation refuses the write (400), and a blank result is not checked.

S73. A client may not send a computed or read-only field, even blank: 400 Record field '<f>' is computed or read-only and cannot be written.

S74. After a child's write lands (still under its lock), each parent the old or new row points at has its rollup fields recomputed through an ordinary storage update of the parent (actor system:rollup): the parent's validation, locked_when (which never freezes a rollup), unique and locked_checks apply.

S75. A child's create, update (including a move to another parent) and delete each bring their parents' rollups current, and a parent formula over a rollup sees the new value.

S76. A parent refresh that is refused or fails is dropped: the child's write stands and answers success, and the parent keeps its old value with nothing recorded (open question).

9. A partial update

S80. An update sends some fields. The row it would store is the stored row (read under the lock) with the sent fields replaced, then recomputed. Each check reads that differently:

CheckLooks at
validation (type, bounds, required, relation existence, required_when)every declared field of the whole row: a stored value that breaks a rule tightened since, or a pointer whose target is gone, refuses an update that does not touch it
read-only / computed sentthe keys sent
field permissionsthe keys sent, changed or not
owner changeowner_id when sent and different
relation.requirespointers whose text differs from the stored one
transitionsthe field's stored and new text
locked_whenkeys sent whose text differs (S44)
uniquekeys the update newly takes, compared trimmed and folded (S43)
locked_checksrun when any value of the row, computed ones included, would differ (or, with on.update a list, one of those fields); then handed the whole row
If-Match / expected_revthe whole stored row, fields the writer cannot read included (S56)

10. Clocks and time zones

S90. A schema field named created_at of type date or datetime that a create does not send is stamped from the UTC clock, whatever the server's zone: a datetime as ISO 8601 with Z (microseconds when non-zero), a date as the UTC date. A trusted writer with preserve_read_only may set it.

S91. A rule's valid_from is inclusive and expires_at exclusive, compared with the current UTC time. A bound without an offset, a date alone included, is read as UTC; the server's zone plays no part.

S92. An ordered condition (gte, lte, gt, lt) in a row filter, attention count or list filter compares as numbers when both sides parse as numbers, else as instants when both parse as ISO dates or datetimes, else as text when the bound is plain text (neither a number nor a date). Dates and datetimes are read as S91 reads a rule's window: a trailing Z is UTC, a value without an offset is UTC, and a date alone is UTC midnight; the server's zone plays no part. So a date bound and a created_at stamped with Z (S90) compare: a deny on rows before a date refuses them, and an allow after a date grants them. A transition guard's when takes equality conditions only. eq, ne and in compare text.

S93. older_than_days ages a date alone in calendar days against the server process's local date, and a datetime in elapsed days from the current UTC time (a datetime without a zone is UTC). A blank or unreadable value is never old.

S94. The numeric comparison in S92 is a floating-point comparison: two integers beyond 2^53 that differ can compare equal.

S95. An ordered condition that cannot be judged has no answer of its own; what it means depends on what a match does. It cannot be judged when the row lacks the field, when the bound resolves to nothing or to a set (a $-variable the caller has no value for, $accessible_projects), or when the bound is a number or a date and the stored value is not one of the same kind: blank, spaces, or other text. In an allow rule, an attention count or a list filter it does not match, so it grants, counts and lists nothing. In a deny rule (and the owner_fallback opt-out) it holds, so the deny refuses. The conditions of one filter are ANDed, so a deny whose other condition is plainly false (another owner, a status the deny does not name) still spares the row; a deny that should spare blank rows says so with {"op": "ne", "value": ""} beside its bound.

Open questions

Behaviour found while writing this page that is inconsistent, surprising or unsafe. None is changed here. Each is pinned as it is today, or, where today's outcome is unsafe, by a strict xfail test asserting the safe outcome, so a fix shows up as a test to update together with this page.

  1. Pointers can dangle, and then freeze the row (S54, S80). Relation

existence is read without the target's lock (object_records._validate_field_relation); delete (object_records.delete_collection_record) checks no referrers. Validation then judges every pointer on every update (object_records._validate_record_against_schema), while requires asks only about changed ones (object_access.relation_refusal).

  1. Spaces are blank to some checks and a value to others (S3). required

uses object_records._is_empty (in _validate_record_against_schema); required_when strips (object_records._check_required_when), as do unique (object_records._unique_key) and requires (object_access.relation_refusal). A required text field accepts " ".

  1. **The admin token is exempt from some gates and not others (S12-S14,

S27).** Under enforcement it passes every rule and the owner check (object_server._refuse_owner_change) but is bound by field permissions (object_server._refuse_denied_fields, step 5 of _gated_create and U6 of _gated_update; no admin case in object_field_permissions.denied_write_fields) and by transition guards (object_records._validate_field_transitions waives guards only for a call with no subject). With enforcement off, field permissions are not asked at all.

  1. Writes tell a row-filtered caller which ids exist (S21).

object_server._record_write_denied_before_lookup lets any caller with a row-filtered grant past the collection check; _gated_update (U3, U4) and _gated_delete then answer 404 for a missing id and 403 for someone else's. Reads answer 404 for both.

  1. **Create and update order their first checks differently (S10, S18,

S20).** A create parses its body before asking permission (object_server._gated_create, step 1); an update asks first (object_server._gated_update, U1). A create validates before looking for a duplicate id (object_records.create_collection_record); an update looks the row up first.

  1. Several refusals carry no code (S61). Validation 400s, 404, and

the duplicate-id 409 (object_server._CREATE_STORAGE_ANSWERS) are told apart only by status and sentence, so a client (or a second engine's conformance run) cannot match them by code.

  1. A refused rollup refresh is silent (S76).

object_records._recompute_rollups_for_source drops any exception from the parent update; the parent's total is stale and nothing records it.

  1. "Changed" has five definitions (S80). locked_when compares the sent
fields' text (`object_records._check_record_locks`); `unique` compares
trimmed, folded keys (`object_records._unique_key`, in
`_check_unique_constraints`); `locked_checks` compare every field with
`None` read as `""` (`object_records._check_selected`); `requires` compares
a pointer's exact text (`object_access.relation_refusal`); transitions
compare exact text (`object_records._validate_field_transitions`). Sending `" K1 "` back for `"k1"` is no change
to `unique` and a change to the others.
  1. Two clocks say what "today" is (S90, S93). older_than_days ages a
date against the server's local date (`object_attention.count`,
`_age_days`); a `date` `created_at` is stamped with the UTC date
(`object_records._apply_auto_created_at`). On a server west of UTC, a row created
in the evening carries tomorrow's date.
  1. What is a date depends on the Python running the engine (S6).
`object_records._parse_date` (and `object_permissions._filter_datetime` for
filters) use `fromisoformat`, which accepts compact and week forms from
Python 3.11 on. The same request is accepted on one supported Python and
refused on another. In a filter, a stored compact date is a date on 3.11
and later and, on 3.10, a value a date bound cannot judge (S95).
  1. A lifecycle does not bind a create (S27). The create path
(`object_records.create_collection_record`) never calls
`_validate_field_transitions`, in which a blank stored state may move
anywhere: a client may create a row directly in its
final state unless a field permission or a hook says otherwise.
  1. Rule comparisons are floating point, formulas are exact (S71, S94).
`object_permissions._filter_number` uses `float`.
  1. The hook runs before validation (S16, S60). It is handed unvalidated
input (`object_server._gated_create` step 7, `_gated_update` U8) and its execution log records a
run for a write that validation then refuses.
  1. A rev repeats when a row does (S56). _rev is a keyed hash of the
row's content, not a write counter, so a row whose fields all return to
an earlier state (a hidden `status` going `open`, `held`, `open` while
the visible fields stay put) gets its earlier `_rev` back. A caller who
noted the rev then learns that the hidden fields are as they were then,
without learning what they are. A per-row write token stored beside the
row would close it; it is not built.

Statements pinned by older tests

StatementsTestWhat it shows
S13tests/test_create_owner_id.py::test_a_create_without_owner_id_is_owned_by_the_callerstep 2
S13tests/test_create_owner_id.py::test_a_registered_user_cannot_create_a_row_owned_by_someone_elsestep 4 refuses, never rewrites
S13tests/test_create_owner_id.py::test_an_unconditional_update_grant_cannot_change_the_ownerU5
S13tests/test_create_owner_id.py::test_the_same_grant_still_edits_and_may_send_the_owner_back_unchangedan unchanged owner is no change
S13tests/test_create_owner_id.py::test_an_admin_may_change_the_owneradmin exemption
S14, S80tests/test_field_permission_semantics.py::test_only_submitted_keys_are_checked_and_create_is_checked_toosent keys only, create too
S15tests/test_relation_requires.py::test_the_refusal_is_the_same_answer_a_missing_payment_getsno oracle
S16tests/test_pre_write_hooks.py::test_denied_write_never_reaches_the_hooka refused write never reaches the hook
S19tests/test_pre_write_hooks.py::test_hook_reject_status_is_a_4xx_or_503relayed or clamped status
S19tests/test_pre_write_hooks.py::test_declared_but_missing_or_raising_hook_fails_closed500 hook_failed
S19tests/test_pre_write_hooks.py::test_non_contract_return_fails_closed500 hook_failed
S19tests/test_pre_write_hooks.py::test_hook_transform_persists_and_still_schema_validatesa transform is validated
S19tests/test_pre_write_hooks.py::test_hook_cannot_touch_id_owner_or_read_only_fieldswhat a transform may not change
S19, S30tests/test_delete_hooks.py::test_a_transform_is_not_an_answer_to_a_deletedelete contract
S30, S43tests/test_unique_constraints.py::test_a_key_given_up_by_an_update_or_a_delete_is_free_againa delete releases its keys
S19, S55tests/test_pre_write_hooks.py::test_trusted_server_side_writes_bypass_hooksstorage writers skip hooks
S30, S60tests/test_delete_hooks.py::test_a_refused_delete_writes_no_change_log_entrynothing written
S40tests/test_locked_checks.py::test_a_write_to_a_collection_the_check_reads_waits_for_the_checked_writecheck locks cover what a check reads
S40tests/test_locked_checks.py::test_a_check_lock_is_never_waited_for_under_a_file_lockcheck locks before the file lock
S42tests/test_locked_checks.py::test_a_check_that_cannot_decide_refusescheck_unavailable, check_failed
S42tests/test_locked_checks.py::test_a_check_object_that_is_not_installed_refuses503
S42tests/test_locked_checks.py::test_a_busy_check_lock_is_a_503_after_its_timeout_not_a_hanglock timeout
S42, S80tests/test_locked_checks.py::test_on_selects_which_writes_call_the_checkon
S42, S53tests/test_locked_checks.py::test_an_update_is_judged_against_the_row_under_the_lockthe row under the lock
S43tests/test_unique_constraints.py::test_a_blank_key_is_exempt_but_a_blank_scope_is_a_valueblanks
S43tests/test_unique_constraints.py::test_values_are_compared_trimmed_and_case_only_when_askedtrimming, folding
S43, S80tests/test_unique_constraints.py::test_a_record_may_keep_its_own_key_and_change_everything_elseonly new keys
S43tests/test_unique_constraints.py::test_declaring_a_constraint_over_existing_duplicates_stops_new_ones_onlyexisting duplicates
S43tests/test_unique_constraints.py::test_a_violation_over_http_is_a_409_that_names_the_fields_and_no_other_recordthe 409 body
S44, S80tests/test_locked_when.py::test_sending_a_frozen_field_back_unchanged_is_not_a_changeno change
S44tests/test_locked_when.py::test_fields_the_server_owns_are_never_frozencomputed, read-only
S44tests/test_locked_when.py::test_a_field_the_schema_does_not_declare_is_frozen_tooundeclared fields
S44tests/test_locked_when.py::test_every_condition_of_a_rule_must_hold_and_every_matching_rule_appliesevery rule
S44tests/test_locked_when.py::test_a_rule_may_freeze_fields_and_still_allow_deletionallow_delete
S44tests/test_locked_when.py::test_a_locked_delete_over_http_is_a_409_and_admin_is_not_exemptnobody exempt
S44, S53tests/test_locked_when.py::test_an_edit_that_overlaps_the_approval_is_judged_against_the_approved_rowunder the lock
S55tests/test_locked_checks.py::test_a_storage_level_write_is_checked_and_a_refusal_writes_and_logs_nothingstorage writers are checked
S55tests/test_locked_when.py::test_a_locked_record_refuses_a_change_to_a_frozen_fieldstorage writers are checked
S56tests/test_rev_oracle.py::test_the_rev_a_get_gives_cannot_be_matched_by_guessing_a_hidden_fieldkeyed, no offline guess
S56tests/test_rev_oracle.py::test_an_unkeyed_fingerprint_is_not_accepted_as_if_matchthe fingerprint is not a rev
S56tests/test_rev_oracle.py::test_a_hidden_field_change_is_a_change_to_the_rowhidden fields count
S56tests/test_rev_oracle.py::test_rows_with_identical_visible_content_do_not_say_whether_hidden_fields_matchno two rows share one
S70, S71tests/test_computed_fields.py::test_formula_computed_on_create_and_recomputed_on_updaterecomputed on update
S71tests/test_computed_fields.py::test_broken_formula_yields_empty_and_write_succeedsbroken formula
S71tests/test_computed_fields.py::test_formula_numbers_are_exact_and_an_integer_division_rounds_half_upexact arithmetic
S73tests/test_computed_fields.py::test_client_still_cannot_submit_a_computed_fieldcomputed fields
S74tests/test_locked_checks.py::test_a_rollup_refresh_runs_under_the_locks_its_write_plannedrefresh under the planned locks
S75tests/test_computed_fields.py::test_rollup_updates_on_child_create_update_deletecreate, update, delete
S75tests/test_computed_fields.py::test_parent_formula_sees_fresh_rollup_valueparent formula
S80tests/test_validation_exclusive_required_when.py::test_an_update_is_judged_on_the_record_as_it_will_be_storedrequired_when on the whole row
S91tests/test_object_permissions.py::test_time_boxed_rule_models_temporary_pay_per_view_accesswindow ends exclusive
S92tests/test_object_permissions.py::test_record_matches_filter_ordered_ops_numericnumbers, not text
S92tests/test_object_permissions.py::test_record_matches_filter_ordered_ops_datesdates
S92, S95tests/test_object_permissions.py::test_record_matches_filter_ordered_op_on_missing_field_never_matchesmissing does not match a filter
S93tests/test_attention_declared.py::test_older_than_days_ages_a_date_in_calendar_dayscalendar days
S93tests/test_attention_declared.py::test_older_than_days_ages_a_datetime_in_elapsed_days_and_an_empty_one_not_at_allelapsed days, blank