Limits
On this page
What you cannot design today, what was never run here, and what to do about each. These fall to hand-written code, or to the host. Each was checked against the code.
Never run here
Read these first. The code for each is written, and none of it has met the real thing in this repository.
| What | How far it went | What to do |
|---|---|---|
| postgres and mysql | Run on live servers, fieldops only: its Python backend on Postgres 16 (it ships on it since 16 November: 69 tests in process on the compose database, transcript) and, on a scratch copy, on MySQL 8.4, each migrated by the Python runner, pressed, and held to its contract by Schemathesis, 29 passed on each of the scratch runs (Postgres, MySQL); its Rust crate on Postgres 16, migrated by its own runner and pressed beside Python, 39 presses the same (transcript), and its Rust in-process tests on the compose database, 13 presses run with GLOBETROTTER_DB_TEST_URL (skipped without it, or failed under CI: reference) (transcript). Not run on Postgres or MySQL: the machine guards written into the conditional move, the development seed for organisation memberships, and the generated tests of transitions, tenancy reads and clients (sqlite only, or skipped without a test database). Not run: Rust on mysql beyond own-row (a scratch settings entity on MySQL 8.4, 20 November: the sequence and 20 parallel first saves, transcript); Rust on Postgres since strings were bounded; Schemathesis against Rust on a live engine; the in-process tests of Rust on MySQL and the Rust presses that read the store through a sqlite pool (versions, managed keys, tenant isolation, limits, idempotency: written for a store with a sqlite file only), and of Python on MySQL; fieldops' pages, presses and e2e against the Postgres backend (npm run dev:fieldops whole); tenants and managed keys on a live engine; Redis as a cache store (the broker and the rate-limit counts were run); and the parts fieldops does not use (versions, shapes, races). |
Serve the backend on a copy of your database and run uv run pytest with GLOBETROTTER_TEST_BASE_URL at it before relying on either (Data and migrations). |
A migration that fails on mysql is not rolled back: mysql keeps each CREATE, ALTER and DROP as it runs. The runner says so and names the file (transcript). |
Put the database right by hand or restore it, then run migrate again. |
|
A string with no max holds 255 characters, on every engine; a longer value is a 400. No text takes a NUL. A file's id and signature are not bounded: a NUL there is the 403 a wrong link gets. A page's own action (openJob) is bounded nowhere (transcript). |
Make a field text where it must hold more, or give it its own max. |
|
Row-level security (tenancy.rls) |
Applied on Postgres 16 on a scratch fieldops with organisations, 19 November (transcript, first and second round). Round one, as a role that is not the owner and lacks BYPASSRLS, with app.org set to your organisation, to theirs, or unset: your rows, theirs, or none; a write into the other organisation refused or a no-op; the same through both binaries on a pool of one, no leak between requests. Round two: the migration now writes FORCE ROW LEVEL SECURITY too, so an owner that is not a superuser is bound (4 rows unset without FORCE, 0 with); at start each target asks Postgres for its role's rolsuper, rolbypassrls and whether it owns a table with a policy, and in production serves no request until that has passed: it refuses a superuser, a BYPASSRLS role or such an owner with one sentence naming it (both targets), waits up to 30 seconds for a database that is not up and then refuses (a role that cannot be asked is never taken as bound), and locally says it once; the generated compose.yaml makes a second role, <app>_app (no superuser, no BYPASSRLS), for the API to serve as while migrate stays the owner, and the earlier presses held through both binaries as it (own rows listed, the other organisation's row a 404, a create in yours, a body naming theirs a 400). It still binds no superuser and no BYPASSRLS role (the Postgres image's own POSTGRES_USER is both), and membership in a superuser role is not detected, and a role the policy binds sees none of these tables' rows in its own seed or backfill, even the migration runner when it is such a role. |
Serve as a role that is neither a superuser nor BYPASSRLS, and migrate as the owner (the generated compose does; outside it, create the role as the migration's NOTE says and put its URL in GLOBETROTTER_DB_URL for the API). Run your own seed or backfill as a superuser or BYPASSRLS role, or set app.org in its transaction. A volume made before rls was on has no <app>_app: docker compose down -v or create it. Not run: an organisation read from a claim, through relations, MySQL (no policies there); the worker, relay and scheduler as the app role; production serving as the app role with real secrets beyond the start check. |
An organisation read from a token's claim (from: claim) |
Python only, and never run with a real token. Rust refuses it in lint. | Use a header or a cookie, or test the claim with your issuer. |
The Docker images and compose.yaml |
The Python image and compose were built and run once for fieldops on Postgres, 18 November: 389 MB, non-root, healthy, refuses to start without GLOBETROTTER_ENV (transcript). The whole stack with Redis (db, redis, migrate, api, relay, worker, scheduler) came up on 19 November: the scheduler sent flagOverdue to the worker through Redis, and a durable flow on a scratch copy was relayed and retried to dead, surviving Redis stopped and restarted (transcript). Not run: Dockerfile.rust, never built; an image on MySQL; another design's image. |
Build before relying on them. |
| The migration lock on its hard paths | Seen live on Postgres 16 only: two runners, a wait, the timeout, a pool of one, Python and Rust against each other (transcript). Not seen: the false-unlock path (it needs PgBouncer in transaction mode), a statement running over 30 s on the migrate connection, MySQL's GET_LOCK, sqlite's lock timing out, a --down that runs SQL on sqlite or mysql. |
Give migrations a direct database URL; try a migration on a copy first. |
| Organisations on Rust | Run on Postgres 16, 19 November, on a scratch fieldops with organisations (transcript): a list answers its organisation's rows; another organisation's row by its id is a 404 to read, update and delete; a create lands in the caller's organisation, and a body that names an organisation is a 400, not ignored; no organisation named is a 400, one the person is not in a 404, a role below allowIn a 403; the audit rows carry the organisation. Python answered the same words. tests/tenancy.rs is now written for a Postgres-only store too (it returns without GLOBETROTTER_DB_TEST_URL); on a store with sqlite it is as before. That test runs as the test database's own role, so it presses the repositories' scope, not the policy. |
Run your isolation checks against your binary on your engine, as the role you serve as. Not run here: Schemathesis with organisations, compare_targets, both targets on one database. |
pyright and the CI workflows |
pyright was not run offline here; ci/github-actions.yml and .github/workflows/ci.yml were each command run on a laptop, never on GitHub. |
Run them in your CI before trusting them. |
| A real bucket | A File with backend: s3 was run against a fake S3 (moto) only: not AWS, MinIO or R2. The 60-second expiry of a download link is unproven, since the fake ignores it. No generated test runs against a bucket. |
Upload, download and wait out a link on your bucket. |
| Versions, idempotency keys, rate limits, API keys | Run on sqlite; on postgres and mysql written, never run. Counting in Redis was run on 19 November against Redis 7 on a scratch fieldops with a limits section, both targets, two processes each (transcript); not on a Redis that is not 7, with a password or TLS, a cluster, or from tenant or ip; and the sign-in limit not at all (fieldops signs in by key only). |
The table in Targets says which target and engine each was run on. |
| Both targets on one database, for joins | Rust and Python were not run together on many-to-many rows. | Run one target on a database, or test it. |
| The Rust webhook lease | A claim left by a dead process is taken again after 300 seconds; that wait was not tested. | Make a webhook's command safe to run twice. |
| Schemathesis on Rust for the newer parts | The contract suite was not run against the Rust binary for clients, webhooks, shapes, machines or tenants, nor against storefront's Rust build. It passed against fieldops' Rust binary on sqlite, 29 passed and 40 skipped, served with its development keys (transcript). compare_targets was not run on those either. |
Run it with GLOBETROTTER_TEST_BASE_URL at the Rust binary. |
If a limit blocks you, the design stays valid: write the part that is yours in an operation's handler, a flow step or a job. See Your code.
Data
| Limit | What to do |
|---|---|
A joined (many to many) relation has no fields of its own, and a through one is read only. |
Make the join an entity (through) and write its rows through its own operations. |
Rust on sqlite: a unit of work begun with begin() takes the writer's lock at once (BEGIN IMMEDIATE), so writers take turns instead of failing, and a read you begin with begin() queues behind a writer. The generated queries read with begin_read(), which does not. |
Read with begin_read() in your own code. |
Rust on sqlite: the app's own pool refuses double-quoted text on every connection (sqlite3_db_config), so a column the database lacks is an error, not text. The worker's queue (apalis-sqlite) quotes its status words as text and runs on a pool of its own, which does not refuse it; nothing of the app's SQL runs there. |
A project written before this has backend/.cargo/config.toml with SQLITE_DQS=0: remove that line (sync says so when a sqlite queue is in the design). |
One database is applied by one target's runner. Python on a database the Rust runner applied names cargo run -p <app> -- migrate, and its own migrate refuses that database. Rust's migrate on a database Python's runner applied writes nothing and names Python's command (with no Python target it refuses the database): Rust does not take such a database over, and it was not run on one after changes the Python runner made on mysql. Pressed both ways on a database each runner made (transcript). |
Apply migrations with the runner of the target that made the database, or give each target its own. |
| Both runners take the same lock, and each reads whether the other applied the database only once it holds it (since 2026-11-18): whichever starts second waits, then says nothing is left to apply (Rust) or that the database is the other target's (Python), never "already exists". Postgres and mysql: the state read and the migrations run on the connection that holds the lock, without the pool's statement limit; a Postgres unlock that comes back false (a transaction-mode pooler such as PgBouncer) ends non-zero. | Give migrations a direct, session-mode database URL; give each target its own database (transcript). |
sync --check on a machine without cargo passes, with one warning that the Rust build was not checked. GLOBETROTTER_REQUIRE_CARGO=1 fails instead. This repository's CI sets it, installs the pinned toolchain and runs fieldops' cargo tests; each command was run on a laptop, the workflow never on GitHub from here. |
Set GLOBETROTTER_REQUIRE_CARGO=1 in your CI and install the toolchain rust-toolchain.toml names. |
migrate --down runs only the down files sync writes (from 2026-11-16, beside each new migration) or ones you write. A migration that threw data away, left a recipe, or was written by hand is refused, with nothing undone. On mysql a down that fails part way keeps what it dropped. The lock is per database and shared by both runners (see the row above); Rust's runner has no --down (read in its code, not run); sqlite's lock file needs flock: on Windows the Python runner refuses with one sentence (msvcrt.locking was not worth a half-tested branch). Run on Postgres 16 in a scratch copy of fieldops; sqlite: up, and a refused down, on scratch files of storefront and mail; mysql not run (transcript). |
Take a backup before a migration that drops anything; restore it to go back past one. |
A migration you wrote by hand (a seed among the numbered files, as fieldops' 0002_seed.sql) exists for the engine you wrote it for. On another engine migrate stops at that number and says which file to read. |
Write the file again under migrations/<store>/<engine>/ for each engine, by hand. |
Both repositories hold a create and an update to the design's rules, and a generated create refuses in the same words on both: nine bodies on a scratch design answered the same (transcript). A value left out and a rule broken come back in one 400 on both, six bodies the same (transcript). Not pressed: a span of dates. In your own Python code a required field left out of create is not caught by the rules and meets NOT NULL. |
Give every required field a value in a create; press a date span on your design before relying on it. |
An engine added later is written from the present schema only when it has no migration of its own yet (Data and migrations). One that has some revisions and lacks others is written the old way, each missing revision as the design had it then. The new files were applied to sqlite by the Python runner and to Postgres by psql; later, fieldops' backfilled Postgres and mysql files by the Python runner on live servers; not by the Rust runner (transcript). |
Read the new engine's migrations before applying them, and apply them to a copy first. |
| A joined relation joins entities of one store, neither deleted softly. Turned on over a one-to-many relation, the migration moves the links into the join table and then drops the old link column (sqlite before 3.35 cannot drop a column: it stops there). Turned off, the links are dropped with the table: copying them back is a note, not automatic. | Keep both entities in one store; make a soft-deleted one hard, or join it through an entity. |
Changing a joined relation's onDelete after its join table exists writes no migration. |
Write the ALTER yourself as a hand-written migration. |
A unique link row (a through entity's oncePerPair index) that is made twice answers 409 with the service's one wording for a unique key, not one that names the pair. |
Say it in the operation's refusal, or check first in your handler. |
Tenants scope in the repositories only. Your code that asks for every row (every=True, the Rust _every methods) or writes SQL of its own is not scoped; a job or script outside a request runs in no organisation: every row as a role the policy does not bind, no row as one it does (see the rls row below). |
check_tenancy finds those places by file and line. On postgres turn tenancy.rls on: raw SQL is then guarded too, if you serve as a role the policy binds (it stopped a raw SELECT and an unscoped find_every from reading another organisation's rows on both targets: transcript). |
| A person's organisation is one per request (a header, a cookie or a claim): there is no switching inside a request, and a role in an organisation is one level of one order of roles shared by every organisation. | A person in two organisations sends the one they mean. |
With rls on, as a role the policy binds (the compose <app>_app the API, worker and scheduler serve as), these see no rows: the top role with staffSeesAll naming no organisation, a scheduled job or script outside any request, and a flow step whose event carries no organisation. A flow step whose event carries an organisation enters it and sees that organisation's rows. Nothing warns at start. |
Name an organisation (X-Org; a job does its work inside the organisation it is for), set app.org in its transaction, or run that process (the scheduler, say) as a BYPASSRLS role. |
The rls policy is on the tables of scope: rows entities only. The membership, the organisation entity, audit_log, API keys, the outbox, the flow tables and many-to-many join tables have none, so raw SQL on them is guarded by the repositories' care alone. Not extended. |
check_tenancy finds raw SQL; read those tables through the repositories. |
Turning organisations on over rows that exist: the migration adds organisation_id allowing empty values and picks none. Such a row is in no organisation: no member sees it (a list leaves it out, its id is a 404, it is not shown under its parent), and a remove of one that jobs point at is the 409 those jobs earn; staffSeesAll with no organisation named reads it (not as a role the policy binds, which reads none), answering the all-zero organisationId. Run on both targets, 19 November (second round): Rust answered a 500 (decoding a null key in a child read) and Python a 500 for the staff read; both fixed, neither answers a 500 now. |
Assign each by hand as a superuser or BYPASSRLS role, as the migration's NOTE and sync say (UPDATE job SET organisation_id = '<id>' WHERE organisation_id IS NULL); Globetrotter picks none. |
| Rust reads the organisation from a header or a cookie, not from a token's claim. Python's claim was never run with a real token. | Use a header or a cookie. |
A through relation's read across organisations was proved only on rows inserted by hand. Rust's generated tests/tenancy.rs presses, for every kind of sign-in and an organisation keyed by a uuid, a string or a whole number, each list and get held inside its organisation, each update, delete or move on another organisation's row (a valid body: the row's own 404, the row, the audit rows and the events as they were), and each create landing in the organisation named; a write it cannot press (a command of your own, a required param it cannot make up, a Shape answer) is an ignored test saying why. The older cases (a row made in one organisation read from the other whatever If-Match says, an idempotency key, a limit by tenant, managed API keys in an organisation) are written only for a uuid organisation key, an API key sign-in and a store on sqlite or, alone, on Postgres (mysql: none); elsewhere each is an ignored test naming it. |
Write the test in your own tests for the rest. |
press_operation calls in an organisation (org) as the key's own membership: it cannot say a role there. check_auth does press a member at each role of an organisation, but only for people the local environment has put in one (devseed): with nobody in an organisation it says "not a pass", and a read with no rows to read for leaks is "not read". |
Run the seed; call as a person who holds each organisation role. |
A webhook runs in no organisation unless its handler names one (tenantFrom); one that names none that is here is acknowledged and nothing runs. |
Give each handler a tenantFrom. |
| Queries have no join or aggregate (filters, sort, pages, a cursor and a search are the design's). | Write the operation as custom. A handler's repository find takes where, sort, after, order_by, limit, offset and unbounded. |
| A command writes one store. Two stores cannot share one transaction. | Keep related entities in one store. Lint says when a cascade spans two. |
| Engines: sqlite, postgres and mysql. | mongodb and duckdb are in the engine list but no target runs them. |
A list a generated service reads is bounded: GLOBETROTTER_LIST_DEFAULT (50) rows, never more than GLOBETROTTER_LIST_MAX (200). A find in your own code is cut at the default too, with a log line naming the call; unbounded=True (Rust: Find::unbounded()) reads every row. A list that says nothing of the query vocabulary is cut at 50 without a word; one that does answers X-Truncated: true when it was cut. An empty value for a decimal query param (?maxPrice=) is a 400 on both targets: blank is not given only in a body (read in the targets' code, not pressed). |
Say paging on the query (page or cursor), or use bounded() in a body. Lint's list-unbounded offers the pagination block. |
| Search is word-prefix over fields, ranked by the engine. | Write anything finer in a custom query. |
Access
| Limit | What to do |
|---|---|
| One global order of roles. A role is a level, not a set of permissions. | Check finer rules in the operation's handler. |
| No deny rule. | The same. |
A person's row rule is one owner field, or one relation.field (member.email), not both: a row shared by several people has no rule. Through a relation it limits a list, a count, a get, an update, a delete, a Shape's counts and a write that names someone else's link; not a Search, a state machine, versions or organisations (lint refuses the mix), nor your own code's every=True. Run on sqlite on the Python target, two members and a librarian, 20 November; Rust writes it too (pressed on sqlite beside Python, the same answers line for line, 26 November; its Postgres words written, not run). |
Check shared access in your handler; own the rows by a field of their own entity where one of those is needed. |
A where across a relation and a where on today / now are written by both targets (Rust: an exists on each table the links lead to; pressed on sqlite beside Python, a list and a count giving the same rows; its Postgres and MySQL words written, not run); it crosses single relations, never a list; a path may end on a row time (item.createdAt<today) on both, the table's own column compared as a time (on sqlite by julianday), the list pressed on one sqlite file beside Python giving the same rows; today is the server's UTC date. Python run live on sqlite; its SQL is an exists through the ORM, compiled for Postgres and MySQL, not run there. |
Where one target does not write it, use a param the page sends (?due< as a lte filter), or write the list. |
Today, tomorrow and now in a where are UTC; a service time zone is not yet a setting (the pages mark a late day by the same UTC day; lint says it once, where-utc-day). |
In Los Angeles after 4 pm the service already says tomorrow: compare with a param the page sends, or accept the evening. |
A unique for some rows (unique with when) is a partial index on sqlite and Postgres and a check in the transaction on MySQL, where two requests at the same instant can both pass; Rust writes it on sqlite and Postgres (the database's partial index, its 409 in the Index's words) and refuses it (target-unsupported) where a MySQL store is in view, as it refuses a where on today or now there: it has no check in the transaction. A when takes =, !=, =null, !=null only. Run on sqlite (migrated, pressed live, 409 with the words); Postgres and MySQL written, not run. |
On MySQL add a lock or a unique key of your own; on Rust keep the rule in your body. |
Real accounts are not generated. auth.py holds a development list read from the environment. |
Write your store in auth.py. |
| Passkeys are Python only. | Use another sign-in method on Rust. |
| Audit has no tamper evidence and no retention. | Use the database's own privileges and backups, and a job to archive. |
Failed sign-ins are limited per client in each API process (GLOBETROTTER_SIGNIN_MAX_FAILURES in GLOBETROTTER_SIGNIN_WINDOW_SECONDS), not across processes, unless the design has a limits section that names a store. An operation is limited only where the design gives it a limit or the section a default: Rate limits. |
Write the limits section with a redis store, or put a shared limiter in front of the service. |
Keys the service manages are opt-in (keys: "managed"); without it a key is whatever your key store knows. |
API keys. |
CORS is off until GLOBETROTTER_CORS_ORIGINS names origins; a * is refused. |
Name each origin. |
Routes and errors
| Limit | What to do |
|---|---|
The route shape is fixed: GET {route}, GET {route}/{name}, POST {route}/actions/{name}. Saying your own method and path is the one part of the planned vocabulary not built. |
Put a proxy or rewrite in front. |
No PUT, PATCH or DELETE. A delete is a POST action. |
The same. |
No /v1 prefix or versioning. |
Prefix at the proxy. |
Errors are {error, field, fields}, not application/problem+json. |
Translate at the proxy, if a client needs it. |
| A Refusal status is one of 409, 410, 422, 423, 429 and 503. | 400, 401, 403 and 404 come from params, keys and roles. |
A service whose route is /docs or /redoc is shadowed in local on Python: the API explorer answers a GET there, not the service. /openapi.json is the contract's everywhere. Lint warns (route-shadowed). |
Give the service another route, like /documents. |
A restore with returns on an entity that is not versioned does not answer the row, on either target (an update does: fieldops' transcript, Rust's): the generated handler builds its answer from an empty object, which does not fit an answer the contract says holds the row. On Python that statement raises (run alone on a generated model, not run over HTTP); on Rust the helper's own words call it a 500 (read, not run). |
Override the body and return the row, or leave returns off. |
A query of one row by its key that is not named get has no 404 in the contract, though it looks a row up. Read in the contract's code; not run. |
Name it get, or expect the 404. |
What a create and an update read
The rules are in the reference.
| Limit | What to do |
|---|---|
null empties a field or a link only where an update's param says clears (Reference). A generated body that empties a link leaves a text field written from it (a shown name) as it was. fieldops' Work.assign writes its own, which does. Run on SQLite on both targets; postgres and mysql written, not run. |
Write the body where a shown field must follow the link. |
A list is kept by a link and ordered by createdAt or updatedAt through its params and its sort, and its fixed where may name a single link or a row time (Reference). Run on SQLite on each target; postgres and mysql written, not run. A where on a link and a link emptied by null were pressed on each target's own database, not on one shared file. |
Run your design on the engine you deploy to. |
On sqlite a time is kept as text, in the form it was written. Both targets compare, order and page times by their instant there (julianday, to the millisecond, on both), and rewrite no row. An Index on a time column (a datetime field, createdAt or updatedAt) is written on sqlite as an index of julianday(col), the expression both targets order and compare by, and sqlite uses it for their order and paging (checked with EXPLAIN QUERY PLAN on the query shapes, not on a running target); an index written by an earlier migration is a plain one, which those queries do not use. Times within a millisecond of each other tie, so the key decides their order. |
Index the time a large table is ordered by (lint's sort-unindexed fix); an older plain index wants a migration of your own that makes it again. |
The two sentences for a value that is not a number or not a decimal (price input should be a valid decimal.) are not in the words table: a design cannot reword them. |
None today. |
A delete refused because rows still point at it (Reference) was run on SQLite only, one request at a time: on both targets on a scratch design, and on Python on fieldops' Technicians.remove. Not run: postgres, mysql, a row that starts pointing between the check and the delete, and fieldops on Rust. |
Press it on your engine before relying on the words. |
Changing a relation's onDelete on a table that exists makes its constraint again on postgres and mysql; sqlite cannot, so its file is a rebuild of the table as comments (fieldops' 0007_on_delete_job_assignee_id.sql): until you run it, the table keeps ON DELETE SET NULL, only the generated check refuses the delete, and a delete in a body of yours would clear the link. |
Run the recipe as the file says (with foreign keys off, outside a transaction), or keep the generated delete. |
mysql ignores a REFERENCES written on a column, and every mysql migration written before 2026-11-13 wrote links that way: such a store has no working foreign keys. Migrations written since keep each link as a named constraint (<table>_<column>_fkey), and a renamed table or link column carries the name (postgres RENAME CONSTRAINT, mysql drop and add). globetrotter sync tells each such store and writes backend/migrations/<store>/mysql-foreign-keys.sql, a stub no runner reads: rewritten to what is still owed while untouched, kept once edited. Sync is quiet only when the migrations hold each owed constraint by name, and service_status and the studio's Status list them as due. All of it is written and tested as text: none was run on mysql or postgres. |
Find the rows that name a row that is not there (the file's first lines say how), then copy the file into your next mysql migration (Data and migrations). |
Two tables that point at each other, dropped in one migration: postgres and mysql drop the keys between them first, sqlite defers its checks (PRAGMA defer_foreign_keys = ON). Applied to a sqlite database in a test; on postgres and mysql written, not run. |
Read the file before applying it on postgres or mysql. |
| The database's own foreign-key refusal, in a body of yours that does not ask first, is a 409 in general words on both targets, run on SQLite (rust-update-links.txt, python-still-has.txt). On Rust, postgres and mysql are told apart by the server's English message: written, not run. | Ask before the write, or raise a Refusal of your own. |
| Python: any other refusal by the database that the code cannot name (a unique value in a body of yours) answers the 409 for two writes at once. | Check in your body before the write. |
Rust: files::held for a bucket store is written and compiled, never pressed; for a store on disk it was run. |
Press it against your bucket before relying on it. |
A field made unique later, or a column added unique, writes its migration as an index of its own. Run on SQLite in a test only; postgres and mysql never. Taking unique away on mysql is left as two commented statements, and on sqlite a rule the table was made with stays. |
Read the file's note, and on mysql run the statement your database needs. |
| A list cursor made by Rust writes its times with microseconds, Python's does not. Rust reads a cursor Python made (transcript); Python reading Rust's was never pressed. | With both targets on one database, page a list through one target. |
Python's generated test_given_keys.py and test_update_rules.py are not written for a design with organisations. |
Write those presses in your own tests. |
What the backend cannot do yet
| Limit | What to do |
|---|---|
| No queue consumer: flows start from the service's own events. | Write a consumer process beside it. |
| No realtime: no websockets or server-sent events. | Add it beside the generated app. |
The LLM primitive writes no code in either target: with a target on, lint refuses it (target-unsupported). |
Call the provider from a step. |
| SMS and push notices have no provider. They go to the console. | Wire one in the notify adapter. |
A File on a bucket (backend: s3) is uploaded through the service, not straight to the bucket, so a large file crosses it twice. A bucket's credentials come from a key and secret ({secret:NAME} or AWS_*), not from an instance role. |
Upload through the service as it is; for a role, set the key and secret from it. |
| A File on local disk is not shared between hosts. | Point GLOBETROTTER_<STORE>_DIR at a shared volume, or set backend: s3. |
| A page's data the design cannot fill answers 501 until you write it: on Rust, a text column the page shows as a number or a flag, or a number or flag shown as text of a set format or choice (no honest conversion; every other type shown in words is converted, as Python does). | Write the method named in the error. |
A job's due minute is claimed once (in the broker's Redis, else the design's first Redis store with a URL, else a flow_run row: Jobs and schedules), but the claim has only been run on sqlite and on Redis and Postgres (19 and 27 November, transcript); a Python scheduler with a Rust worker on one Redis, and the flow_run claim on MySQL, were not run. A minute missed while nothing ran is not caught up, and a process starting inside a minute first fires at the next top of the minute. Workers on different databases with no shared Redis each run it. |
Write a job to be safe to repeat (fieldops' flagOverdue is), and point every scheduler and worker at one database or one Redis. |
Calling outside services
What a Client does is in Reference. What it does not:
| Limit | What to do |
|---|---|
A call with no returns answers the JSON the other side sent, as data (a dict, a serde_json::Value). With returns naming a Shape it is a typed model, read by the parts' names: what else the other side sent, and a part it sent as null, is left alone, a part that is missing or of another kind is UpstreamUnavailable (a 502, the reason on why and in the log), and a nested object must match exactly. |
Name the Shape for the answers you rely on; read the others as data. |
Retries are for a call that is safe to repeat. A POST is retried only when marked idempotent, and then only as safe as the other side's Idempotency-Key is: the client cannot know it is honoured. |
Read the other service's documentation for the header it takes; keep a POST you cannot repeat out of idempotent. |
The circuit breaker is in the process: with WORKERS above 1, or several containers, each has its own and each must see its failures. |
None needed to run; count on the other side's own limits for the total. |
A 429, or a 503 carrying Retry-After, with a whole number of seconds from 1 to 300 there, is retried after exactly that wait (the date form is not read) instead of the call's backoff; a wait longer than 30 seconds or the call's timeout, whichever is less, ends the retries at once. Every failed try counts toward the breaker. The caller's 502 carries the Retry-After (a 429 with none says 5; at most 300). |
Raise backoff for an answer that names no wait. |
Retries use up the request: timeout times retries + 1 is the longest a call can take, with the backoff between. Called from an operation, that is the longest a page waits, and a database transaction is held open the whole time. |
Keep timeout low and call from a flow step (Your code) when the answer is not needed to reply. |
| One timeout for the client, not one per call. A call that needs longer is a client of its own. | Make a second Client on the same address. |
| Sign-in is a fixed key: bearer, a header, or basic. No OAuth client credentials, no token refresh, no request signing (AWS, HMAC), no mutual TLS. | Fetch the token in your code and call with auth: none and a header param. |
No proxy, custom CA or pinned certificate settings; the platform's trust store and HTTP_PROXY variables are what httpx and reqwest read. |
Set them where the backend runs. |
| No redirects are followed (the key would go with them), no streaming, no multipart or form bodies, and a list param goes in a body only. | Write the call in your code with httpx or reqwest. |
A 4xx with the outside words is for your code: it never reaches the caller, who gets a 502 in fixed words, which words cannot change. |
Catch UpstreamRefused (ClientError::Refused) and refuse in your own words. |
| No import of an outside service's OpenAPI file into Calls yet. | Write the calls by hand. |
A local base URL missing is said at the first call, not at start (a laptop without the other service still boots); a key missing in local goes out as a placeholder, with a warning. |
Set GLOBETROTTER_<NAME>_URL and the key, or install the fake in a test. |
Answers that are not rows
What a Shape does is in Reference. What it does not:
| Limit | What to do |
|---|---|
Only a Query is written from a shape with a from. A Command that answers a shape is typed and yours (501 until you write it); one that creates, updates or deletes is refused by lint. |
Write the command; read a shape's numbers with the query beside it. |
| A shape's query reads no params: no filter by caller, no paging, no sort of its own. A list answers every group, or every row (a shape of rows is a projection, not a table to page). | Put what it keeps in where; for a caller's choice write the query in your code, typed by the shape. |
One entity, one store: a path crosses single relations in that store (a left join). No many relation, no other store, no sub-query, no having. |
Write the query in your code, typed by a shape with no from. |
The expression language is + - * / and parentheses over numbers and fields. No functions (round, lower, date parts), no case, no text joining, no comparison inside a sum. |
A calculated column in the entity, or your code. |
A nested part (an entity's rows, another shape) is in a shape with no from only: its value is yours to write. |
Build it in your code; the contract and the model are typed. |
A shape's rows are in the owner's scope of its from entity, not of the entities a path crosses: a path to another's row shows its value. |
Do not read an owned entity's fields through a path from a shared one. |
| A decimal is exact in postgres and mysql and a float in sqlite, as a decimal field is: a sum is read back at four places. | None needed; compare on the text. |
| A shape's rows come from one statement in a transaction of their own: they are as consistent as that read, not with another read of the same request. | Read both in one handler, in one unit of work. |
| The mysql and postgres SQL of a shape is written from the same tree as sqlite's, and run only on sqlite here. | Run a shape on the engine you deploy to. |
A Cache does not keep a query that answers a shape (lint cache-shape): nothing says when its numbers go stale. |
Read it on each request, or cache it in your code. |
A query named list that answers a shape at its service's own route, where a page reads its data, is only a warning (shape-at-page-route): the contract keeps the page's answer. |
Name the query otherwise. |
Inbound webhooks
What a Webhook does is in Reference. What it does not:
| Limit | What to do |
|---|---|
Python keeps the event's record and the handler's effects in one transaction: a crash before the commit leaves no record and the sender's retry runs it once. Rust cannot: a service's operation opens its own transaction, so the id is claimed first (received), the handler runs, and the record is finished (handled) after. A handler that fails gives the claim back (a 500, the retry runs it again); a process that dies between the claim and the end holds the event for 5 minutes, then a retry takes it again. An event runs at least once, and once unless a process dies mid-handler. |
Write a command a webhook runs so that running it twice does no harm. |
A command a handler runs is not checked against its allow at run time: the webhook is not behind sign-in. Lint refuses a handler whose command needs a role above runsAs. |
Set runsAs to the role the command needs, and keep that role's rows in mind: row rules apply as for it. |
| An event that cannot be handled (a value the command's param does not take, one the body lacks) is a 500 and the sender retries it for as long as it retries. | Read the log: it names the webhook, the event id and what failed (never the body). Fix the design, or the command, and the retry succeeds. |
Ids are forgotten after keepFor (7 days), by a delivery that arrives, at most once an hour in a process, not by a scheduled job. A sender that retries for longer than that may run an event twice. |
Raise keepFor, or make the handler safe to repeat. |
A webhook_event row of the other target's unfinished claim (Rust's received) is a duplicate to Python, which does not read its lease. |
Run one target at a time on a database, or let the lease pass. |
A flow started by a handler's emits on Rust runs from the relay of the store the webhook remembers events in; the event is written either way. |
Run the relay (cargo run -p <app> -- relay), or the Python target's. |
| A webhook's secret is one value: no rotation with two live secrets, no per-sender secrets. | Give a second sender its own Webhook. |
hmac signs a body, or a time and a body (time.body). No other layouts (a URL in the signature, a nonce header, a hash of the headers), no mutual TLS, no IP allow list. |
Put the check in a proxy, or write the route in your code. |
The body is held to GLOBETROTTER_MAX_BODY (2 MB) like every route, not to a cap of its own, and read whole. |
Lower it for the service; a webhook with large bodies needs a route of your own. |
A Handler's tenantFrom is one pointer into the body (or a header): not an expression, and not a lookup by another key. |
Put the organisation's id in the payload's metadata. |
No lint for event types a preset lists and no handler covers (webhook-unmatched of the plan): the presets here do not carry the senders' lists of types. |
An event no handler fits is recorded and acknowledged; read the Webhooks tags in the log. |
The studio's Webhooks card shows the design, not the last deliveries. press_operation signs a webhook's POST with the development secret, and service_session outlines each webhook and its handlers. |
Read webhook_event and the log. |
| A handler runs a command or emits an event; there is no stub for a handler body of its own. | Have it call a custom command of yours, or emit an event and write a flow step. |
State transitions
What a Machine does is in Reference. What it does not:
| Limit | What to do |
|---|---|
Changing an enum's values makes the database take the new state: postgres drops and makes its CHECK again; sqlite rebuilds the table inside the migration (a new table with the new check, the rows copied, the old one dropped, the new one renamed, its indexes made again), which both runners apply. It does not where something else points at the table (a drop would cascade or be refused under the runner's foreign keys), where a search is built on it, or where the same migration adds it a required column with no default: there the file is a commented recipe and a NOTE, and the old check refuses the new state until you rebuild. mysql names an inline check <table>_chk_<n>, which the file cannot know: always a recipe. |
Rebuild the table as the file says (sqlite: with PRAGMA foreign_keys=OFF outside a transaction, as sqlite's own procedure says), or change the enum before the first migration. |
| A state taken away is marked DESTRUCTIVE and given a NOTE: a row still in it is refused by the new check, so the migration stops there (on sqlite and postgres nothing of it is kept). | Move those rows first (the NOTE gives the UPDATE). |
| A guard reads the row's own fields: no path across a relation, no dates, times, ids or json, no division, arithmetic only on fields that are there, and no comparison of two fields that may both be empty. | Put the value on the row (a field the command sets before), or write the move yourself. |
What is guaranteed: the write of a move is conditional on the state, UPDATE … SET status = :to WHERE id = :id AND status IN (:from…), so of any number of requests moving one row at once exactly one is written (and writes its audit row and event, once) and the rest get the same 409 with the state the row is in now, or a 404 if it is gone. Proven on sqlite (200-row runs on both targets); on postgres and mysql it is written, not run. On both targets each conjunct of a guard's top-level and is judged on its own and goes into that write when it is a null test, a comparison of a field with a literal number (negative allowed), word or yes/no, or such tests joined by and, or and not (a yes or no field that is empty is neither true nor false: = false holds only of false, != false of true and of empty): a guard that stopped holding after the row was read changes nothing, and the move answers 422 in the guard's words (or 409 if the state moved); a conjunct that compares two fields, uses a decimal or arithmetic, or orders words stays with the check on the row as it was read, where a field another request changes in between is not re-read. On mysql the Rust target compares words in the write as BINARY; the Python target does not (SQLAlchemy has no dialect-neutral way to say it), so there the write compares words case- and accent-insensitively unless the column's collation is binary. |
Where such a guard must hold at the moment of writing, put its condition in the write yourself in an override. On mysql, whose default isolation shows a row as it was when the transaction first read, the 409 of a loser may name the state it read, not the one now. |
A text key the service makes (a create given none) and made-key-too-short: pressed on sqlite only, never on postgres or mysql. |
Run a create with no key on your engine. |
compare_targets never sends a real row's id in a write's path (it presses writes with a body no operation accepts); that rule is held by a unit test only, since no live project had a write with an id in its path. |
Press such writes by hand with press_operation. |
The event a move emits carries the row's fields after the move, not the transition (from and to) as the plan sketched. |
Read the state from the data; the event's name says the move. |
On Rust, a body of yours that makes a move and then writes more (fieldops' shown text after start) is two units of work: a failure between them leaves the move made. On Python it is one. |
Make the second write safe to run again. |
Only the generated update is warned about (machine-direct-write); code of yours that writes the field around the machine is stopped when it runs (a ValueError on Python, a 500 on Rust), not when it is written. On Rust the field is stopped in the repository's update, which update_moving bypasses on purpose. |
Move the row through a transition command, or _machine= / update_moving from a body of yours that is the machine's own. |
| A transition is one move of one field. Nothing says "from any state" (list the states), a move needing two rows, or a time limit on a state. | List the states; put the rest in a flow. |
| The studio's state diagram is crowded where several moves end on one state at a narrow width. | Read the moves in the list beside it. |
Versions
What versioned does is in Reference; where it has been run, in Targets. What it does not:
| Limit | What to do |
|---|---|
| Rust: SQL of your own around the repository is neither held to the tag nor raises the version. | Raise version in the statement; hold it with crate::version::expecting(entity, row.version)?: Your code. |
Rust: only the first write of the entity in a request is held to the tag. A write in a task you tokio::spawn sees no tag. |
Do the write the tag is for first, in the request's own task. |
Rust: a write that another request beat between its read and its write is told 412 when it sent If-Match (* too) and 409 when it sent none, as on Python. |
Read again and retry. |
After a delete nothing hands back the new version: the answer is {} with no ETag, and a read of the row is a 404. |
Restore with If-Match: *, or with the version you deleted at plus one. |
Rust: tests/versions.rs is not written for a design with sign-in or organisations. |
Write the test yourself there. |
An update with no returns answers {} and no ETag, though it raised the version. |
Give the command returns, or read the row again for its tag. |
A create and a custom command take no If-Match (lint notes the custom one). A delete answers no ETag. |
Hold the version in a custom handler yourself: Your code. |
tests/test_versions.py is not written for a design with organisations, or with sign-in on and no development key to press with. It runs in process only. |
Write the test yourself there. |
With ifMatch: required, a write with no header and another wrong field is the ordinary 400 for the field, not the 428. |
Send the header. |
service_session's outline does not say which entities are versioned. |
Read the entity's props. |
Idempotency keys
What idempotent does is in Reference; where it has been run, in Targets. What it does not:
| Limit | What to do |
|---|---|
On sqlite, taking a key waits on the database's one write lock. A writer that holds it for more than 5 seconds, whatever it is writing, makes a request with a key answer 503 (storeBusy), and nothing runs. |
Send the request again with the same key after Retry-After, on a 409 or a 503 alike. Keep write transactions short on sqlite, or use postgres where writes are long. |
| Rust keeps the answer after the handler's commit, not in it. A process that dies between the two leaves the key taken with no answer: until the key expires a repeat is told 409, and never the first answer. The handler never runs twice. | Read what the first request made by its own id, or wait out keepFor. Keep keepFor short for such commands. |
| A whole number past 2^53 in a body is hashed as the double it rounds to, so two such bodies can hash alike. | Send such numbers as strings. |
Only a Command takes a key. A webhook has its own record of deliveries; a flow step and a job have theirs. An upload (a File's POST) takes none. |
Name the upload from the client and check for it in your handler. |
What your handler does outside the command's store (another store, an outside call, a file) is not in the key's transaction. Lint sees only client calls (idempotent-calls-out). |
Your code. |
A caller who is not signed in has no id, so under allow: anyone, or with sign-in off, every such caller shares one set of keys: one who sends another's key reads that answer. Lint says it only for allow: anyone with sign-in on (idempotent-anyone). |
Have clients send keys nobody can guess (a UUID), or require sign-in for the command. |
| Expired keys are deleted at most once an hour by each process that serves requests. A service that gets none keeps its old rows. | Delete from idempotency_key where expires_at is past, in a job. |
The kept answer is the whole body, in the command's store, for keepFor. |
Keep keepFor short where the answer is large or private. |
Rate limits
What limit does is in Reference; where it has been run, in Targets. What it does not:
| Limit | What to do |
|---|---|
| On Python a body that is not JSON is refused before the check, so it is not counted. | Nothing; it is a 400 either way. |
| A fixed window, not a sliding one or a token bucket: across the edge of a window a caller can make twice the number. | Set the number at half of what must never be passed, or put a limiter of the kind you need in front. |
With no store, each process counts its own, so the limit is that many times looser and a restart forgets (lint limit-per-process). The memory counter holds 10,000 keys. |
Name a redis store in limits.store. |
| A store that cannot be reached lets every request through (run, both targets, with Redis stopped: 200s and 404s as usual, no 500), with one warning a minute saying why. A store that is down is a limit that is off. | Watch limits_store_errors_total (with metrics on) or the log line. |
The address is the connection's. Behind a proxy every caller is the proxy, for limitBy: ip and for requests that are not signed in. |
Have the server trust the proxy's forwarded headers (uvicorn's setting), or limit by address at the proxy. |
A key lives for the window's length from its first count, so Redis keeps a counter up to a window past its use; and the reply to a request in the last second says 1 seconds. |
Nothing needed. |
No RateLimit-Limit, -Remaining or -Reset headers: a caller learns the limit only from the contract and the 429's Retry-After. |
Read x-globetrotter.limit in the contract. |
| One number per operation: no limit per role or plan, no cost per request, no limit on how many run at once. | A Refusal with status 429 from your handler: Your code. |
Webhooks, flows, jobs, uploads and the sign-in paths are not limited by limit. The sign-in limit counts failures only, and cannot be turned off in the design. |
Limit a webhook at the proxy. GLOBETROTTER_SIGNIN_MAX_FAILURES=0 turns the sign-in limit off. |
GLOBETROTTER_LIMITS=off turns every operation's check off for the whole process. |
Never set it outside tests. |
API keys
What managed keys do is in Reference; where they have been run, in Targets. What they do not:
| Limit | What to do |
|---|---|
An operation's scope without managed keys is refused by lint on Python. |
Turn managed keys on, or take the scope away. |
With nothing audited in the design, a key made, rotated or revoked leaves no audit row (lint notes apikey-unaudited). |
Audit an entity, so audit_log exists. |
| No accounts: without organisations, a key outlives its maker until someone revokes it. With them, a key stops when its maker leaves the organisation, and no sooner. | Revoke a person's keys when they leave. |
In an organisation a key follows its maker's role there, down and up. Its own role caps it only when that role's name is also one of the organisation's roles; otherwise only scopes narrow it (lint notes apikey-org-unscoped). |
List scopes, and give each key the fewest it needs. |
No wildcard scope (jobs:*), no scopes for people, no address list per key, no key that belongs to nobody. A key is shown once and never again. |
List each scope; rotate a key that was lost. |
Deploy
| Limit | What to do |
|---|---|
Dockerfile.rust has never been built; the Python Dockerfile and compose were run for fieldops on Postgres, and with Redis for the worker, relay and scheduler (image, Redis). There is no Kubernetes manifest. |
Build the image and read the compose file before relying on them: Deploy and operate. |
An unset GLOBETROTTER_ENV is production: the server and migrate refuse to start. Only exactly local restarts on change, puts exceptions in answers and serves /docs. |
Set it on every machine; say local on a laptop. |
Metrics (GET /metrics, with GLOBETROTTER_METRICS=1) are each process's own counters, not summed across WORKERS. |
Scrape every process, or send metrics through OTLP. |
Sample rows (migrate --seed) run only in local (--force: another non-production environment, never a database marked production or for another environment), from backend/seed/; the example projects keep their older seed migrations. |
Put a production reference set in a migration. |
| A memory cache is each process's own. | Use a redis store. |
Observability exporters are console and otlp. logfire and sentry are accepted by the design, but Rust refuses them in lint. |
Collect through an OTLP collector. |
| Rust has no non-inline flows on mysql. | Use postgres or sqlite, or run inline. |
globetrotter deploy (and the studio's Deploy button, which runs it) puts the static pages only on Cloudflare Pages; the backend is yours to host. It has not been run against a real Cloudflare account, only against a stand-in for wrangler. Behind its Pages Function the backend sees Cloudflare's address as the caller's: the generated server starts uvicorn with no trusted addresses, so the per-address sign-in limits count every visitor as one until FORWARDED_ALLOW_IPS (uvicorn's own variable) names the sender it trusts. |
Host the backend yourself and give deploy its --backend-url; set FORWARDED_ALLOW_IPS where the backend runs, to Cloudflare's addresses or, only when Cloudflare alone can reach the backend, *. Never set * on a backend that can be reached directly: anyone could then claim any address. |
The studio's backend view
| Limit | What to do |
|---|---|
Turning tenants on does not add the membership's missing fields, and there is no editor for grants. |
Add the fields in Entities first; set grants with set_service_props. |
| The Tenants part says both "Orgs" and "Tenants" for the same thing. | They are one. |
A relation through an entity is shown, not edited. |
Edit the through entity. |
| The studio does not open under 640 px. | Use a wider window. |
Known behaviour
- A row two requests change at the same moment is a 409 for the one that lost, to try again.
- Events are at least once. A step may run twice. A webhook's event on Rust is at least once too.
- An outside service's 429 reaches the caller as a 502, like its other failures (its
Retry-Aftergoes on). - A restore of a backup can run an event's steps again.
- A key's kind cannot be changed once its table exists: the save is refused (
key-kind-changed), nothing is converted in place on any engine. - On sqlite a field made required later keeps its column nullable (sqlite cannot change that in place; the migration fills the rows that have none first), so a raw insert by your own code can still write NULL there, and the next list of that row answers an error.
- A new required field with no default, on an entity that has a table, is refused (
required-needs-default): give it a default or make it optional. Amin,maxor pattern tightened under rows is not, and nothing refuses it: a rule belongs to a write. On Python a read never fails on a stored row that breaks one (a list or a get answers 200 with the value as stored, and an update of another field goes through; only what a request sets is checked), and the contract's row schema agrees: it says a row's shape (type,date-time/date/uuid/int64/decimalformats, enum, nullability) and none ofmaxLength,minLength,minimum,maximum,pattern,multipleOfor theemail/uriformats, so a client or Schemathesis holding a stored old value to it finds none wrong. The rules are on what you send: every param and form body keeps them. An enum that loses a value rows hold is the one change refused: its migration is marked destructive and stops at migrate. - A page's list rows carry numbers and booleans as text (the service's get answers real types).
- A decimal on sqlite holds 15 digits in all (it is kept as a float there): one with more is a 400, and the contract says so on the field; postgres and mysql keep 18, 4 after the point.