Skip to content

Rules

Each page below holds one domain's rules. A rule says one testable thing the system does or refuses. Its ID never changes meaning, and a retired ID is never reused. How rules are written defines the format and the check that keeps rules and tests linked.

Code Domain Covers
CONV Conventions Rules every table follows: money, dates, time zone, deletes, refusals
TEN Tenancy Organizations, legal entities, pools, subscriptions, tenant isolation
ACC Access Logins, profiles, memberships, roles, permissions, overrides, row-level security
SET Settings Organization settings and pool overrides
NUM Document numbers Contract, BASTK, surat hutang and claim numbering
AUD Audit log What is logged, masking, who reads it
STO Files Storage buckets, file paths, file access
MD Master data Brands, models, pricing groups, rental companies, garages, insurers, lookups, contract templates, bank accounts
VEH Vehicles Cars, plates, status, documents, GPS devices
TRF Pool transfers Moving a car or a driver to another pool
DRV Drivers Drivers, their documents, addresses, contacts and platform accounts, stage
QUE Registration queue Walk-in queue tickets (antrian)
BC Background checks Virtual and visit checks, decisions, the admin fee refund
RNT Rentals and contracts Booking, live rentals, frozen rates, renewals, contracts
INSP Inspections Checkpoint, handover, return and preparation; checklist items, damages; checkpoint due
WO Work orders and maintenance Work orders, maintenance records
ASR Insurance Policies, claims, partner garages
GATE Gate Gate passes, the exit check, approvals
ETLE ETLE fines ETLE scans and violations
MON Money Charges, payments, allocations, adjustments, balances, payouts
COL Collection Debt letters (surat hutang), collection calls

A new domain gets a code here before its first rule. Codes are two to five capital letters.

  • Status: planned (written, not yet built), built (a test proves it and the code passes) or retired.
  • Example: given, when, then.
  • Refusal: the error key the database raises when the rule refuses an action (D10). Many rules are enforced by a constraint or by row-level security, which raise no key of their own. Those say "none" and name what Postgres does instead:
    • check_violation (23514), unique_violation (23505), not_null_violation (23502) or foreign_key_violation (23503): a constraint refused the row.
    • hidden: row-level security leaves the row out of the result, with no error.
    • insufficient_privilege (42501): row-level security refused an insert or an update's new values.
    • no effect: row-level security matched no row, so an update or delete changes nothing and raises no error.
  • Who: the roles the rule applies to. A permission rule lists the system roles that hold the permission (see [Ref] Roles, permissions and row-level security). "Every writer" means the database enforces it for app users and for jobs alike.
  • Source: the decision, reference or spec the rule comes from. Q1–Q9 and P1–P16 are the schema V13 audit behind D9.

Questions the references don't settle are listed under "Not yet a rule" on their domain's page, each with its issue. A question gets a rule, with a new ID, once it is answered.