VEH · Vehicles
A car belongs to a home pool and to a rental company; the operator's own cars belong to the company marked as the operator's, TOP (D108). Its status is one of not_ready, ready, booked, rented, returned, unchecked (D92), maintenance (D91) and inactive, and changes only through database functions, which write its history. The glossary says what returned, unchecked and maintenance mean. unit_code keeps v1's unit id, so the printed unit QR codes keep working. Code VEH.
Essential flows
Section titled “Essential flows”D61 names three flows that must not break on the first Monday after cutover: driver onboarding (the queue to an approved driver), vehicle onboarding (a new car to ready) and collection (an overdue driver to a call, a surat hutang and a payment). Their rules get the most tests, refusals included, and the hardest review. On this page:
- Vehicle onboarding: R-VEH-01 to R-VEH-08, R-VEH-12, R-VEH-21, R-VEH-22, R-VEH-25 to R-VEH-27 and R-VEH-47 to R-VEH-84.
Not yet a rule
Section titled “Not yet a rule”These questions are open in #77. Each gets a rule with a new ID once it is answered.
- VEH open 1 · Who else reads vehicles
- VEH open 2 · Status history
- VEH open 3 · Pool on child rows
Answered in part
Section titled “Answered in part”-
A car with no STNK on file yet (a temporary plate, R-VEH-21): settled by zuki, 2026-11-24 (#463): it can be made ready; R-VEH-25 refuses only a known expiry date in the past.
-
contract_status is supply_status (OQ10, #36): D56 renames the column and its enum, with the values active, replacing and inactive. No rule names it; the data model does, and BE pack G2 renames it in the schema.
-
VEH open 1: gate:read and fleet_monitor:read read cars too (R-VEH-15, R-VEH-16), which settles acceptance check 7. Whether any other permission reads cars stays open.
-
v1's vehicle_status_log: claimed by R-VEH-31. The history's rental link and the text of who changed a status are the open parts (see the rule).
-
The rental of a history row. Settled for now (zuki, 2026-11-02): no rental link for a status-history row, so rental_id stays empty (R-VEH-31). v1 gives the lead id in some rows (driverId, on 3,011 of 10,693), and it is not used yet; whether to use it later, as the inspections' lookup does (R-INSP-17), waits for the first run.
-
Who changed a status.
byanddriverare text; whether any becomes a member later is for zuki.
R-VEH-01 · A plate is stored in upper case without spaces
Section titled “R-VEH-01 · A plate is stored in upper case without spaces”- Status: built
- Example: given a new car, when its plate is saved as "b 1234 xyz", then it is refused; B1234XYZ is accepted.
- Refusal: none: check_violation (23514).
- Who: every writer.
- Source: [Ref] Database rules and conventions, Normalized input; [Ref] Data model V13: vehicles.
R-VEH-02 · A plate is unique among the organization's cars that aren't inactive, unless it is on the temporary plates list
Section titled “R-VEH-02 · A plate is unique among the organization's cars that aren't inactive, unless it is on the temporary plates list”- Status: built
- Example: given an active car with plate B1234XYZ, when a second car with B1234XYZ is saved, then it is refused; once the first car is inactive, it is accepted. Two cars may both carry a temporary plate on the list.
- Refusal: none: unique_violation (23505).
- Who: every writer.
- Source: D39; #144 (veh 02: the temporary plate is the exception; zuki's answer 2).
R-VEH-03 · A unit code is unique within the organization
Section titled “R-VEH-03 · A unit code is unique within the organization”- Status: built
- Example: given a car with unit code 0042, when a second 0042 is saved in the same organization, then it is refused.
- Refusal: none: unique_violation (23505).
- Who: every writer.
- Source: [Ref] Data model V13: vehicles.
R-VEH-04 · A vehicle's year is between 1990 and 2100
Section titled “R-VEH-04 · A vehicle's year is between 1990 and 2100”- Status: built
- Example: given a new car, when its year is saved as 202, then it is refused.
- Refusal: none: check_violation (23514).
- Who: every writer.
- Source: [Ref] Data model V13: vehicles.
R-VEH-05 · A new vehicle starts as not_ready
Section titled “R-VEH-05 · A new vehicle starts as not_ready”- Status: built
- Example: given a car is added with no status, when it is read back, then its status is not_ready.
- Refusal: none.
- Who: every writer.
- Source: [Ref] Data model V13: vehicles.
R-VEH-06 · App users change a vehicle's status only through database functions, which the app's buttons call; a direct update is refused
Section titled “R-VEH-06 · App users change a vehicle's status only through database functions, which the app's buttons call; a direct update is refused”- Status: built
- Example: given an admin_fleet, when they update vehicles.status from ready to rented directly, then it is refused; when a maintenance user presses the button that takes a car from ready to not_ready, the app calls the status function, which does it.
- Refusal: vehicle.status_locked
- Who: every app user (authenticated). Database functions, jobs and the migration may.
- Source: D9 (P9); [Ref] Database rules and conventions; #144 (veh 06; zuki's answer 13: the buttons stay, the function does the change). Wording only; the behaviour is unchanged.
R-VEH-07 · Every vehicle status change writes a status history row with the old and new status
Section titled “R-VEH-07 · Every vehicle status change writes a status history row with the old and new status”- Status: built
- Example: given a ready car, when app.set_vehicle_status moves it to booked, then vehicle_status_history has a row from ready to booked, with who and when.
- Refusal: none.
- Who: app.set_vehicle_status and every function that calls it.
- Source: D9 (P9); the M0 acceptance checks.
R-VEH-08 · Changing a vehicle's status needs vehicle:write, booking:write, inspection:handover, preparation:write, maintenance:write or insurance:write at its home pool
Section titled “R-VEH-08 · Changing a vehicle's status needs vehicle:write, booking:write, inspection:handover, preparation:write, maintenance:write or insurance:write at its home pool”- Status: built
- Example: given a satpam at PML, when they call app.set_vehicle_status on a PML car, then it is refused; a checker at PML may.
- Refusal: vehicle.status_forbidden
- Who: super_admin, admin, admin_fleet, checker, maintenance and asuransi hold one of these.
- Source: [Ref] Database rules and conventions, Status and stage only through functions; the M0 acceptance checks.
R-VEH-09 · When a car's plate changes, the old plate is kept in its plate history
Section titled “R-VEH-09 · When a car's plate changes, the old plate is kept in its plate history”- Status: built
- Example: given a car with plate B1234XYZ, when its plate changes to B5678ABC, then vehicle_plate_history holds B1234XYZ, so an old ETLE ticket still finds the car.
- Refusal: none.
- Who: every writer.
- Source: [Ref] Data model V13: vehicle_plate_history.
R-VEH-10 · An inspection, work order or gate pass given no pool takes its car's home pool
Section titled “R-VEH-10 · An inspection, work order or gate pass given no pool takes its car's home pool”- Status: built
- Example: given a car whose home pool is PML, when an inspection is saved for it with no pool, then its pool is PML.
- Refusal: none.
- Who: every writer.
- Source: D9 (P5); [Ref] Database rules and conventions, Bookings (pool on child rows).
R-VEH-11 · A car has at most two GPS devices: one primary and one backup
Section titled “R-VEH-11 · A car has at most two GPS devices: one primary and one backup”- Status: built
- Example: given a car with a primary Easygo tracker and a backup, when a third device is linked to it, then it is refused, and so is a second primary.
- Refusal: none: unique_violation (23505).
- Who: every writer.
- Source: [Ref] Data model V13: gps_devices; #144 (veh 11; zuki's answer 13: one GPS often fails).
R-VEH-12 · Adding or changing a vehicle, its documents, its photos or its GPS device needs vehicle:write at its home pool
Section titled “R-VEH-12 · Adding or changing a vehicle, its documents, its photos or its GPS device needs vehicle:write at its home pool”- Status: built
- Example: given a maintenance user at PML, when they edit a PML car's color, then nothing changes; an admin_fleet at PML may.
- Refusal: none: insufficient_privilege (42501) on insert; no effect on update. The functions that add a car, a document or a photo (R-VEH-47, R-VEH-48, R-VEH-54) refuse it with vehicle.not_allowed (42501).
- Who: super_admin, admin and admin_fleet hold vehicle:write.
- Source: [Ref] Roles, policy matrix.
R-VEH-13 · No one deletes a car in the app; a car that leaves the fleet is set inactive
Section titled “R-VEH-13 · No one deletes a car in the app; a car that leaves the fleet is set inactive”- Status: built
- Example: given a super_admin, when they delete a car, then nothing is deleted; setting it inactive through the status function retires it, and its history stays.
- Refusal: none: no effect, as there is no delete policy.
- Who: every app user, super_admin included. vehicle:delete leaves the catalogue (R-ACC-86).
- Source: D39; #144 (veh 13). Replaces "deleting a car needs vehicle:delete".
R-VEH-14 · vehicle:read at a car's home pool lets a user read the car
Section titled “R-VEH-14 · vehicle:read at a car's home pool lets a user read the car”- Status: built
- Example: given a viewer scoped to PML, when they read vehicles, then PML's cars come back.
- Refusal: none: hidden without it.
- Who: super_admin, admin, admin_driver, admin_fleet, maintenance, asuransi, checker and viewer hold vehicle:read.
- Source: [Ref] Roles, policy matrix.
R-VEH-15 · gate:read at a car's home pool lets a user read the car
Section titled “R-VEH-15 · gate:read at a car's home pool lets a user read the car”- Status: built
- Example: given a satpam at PML, who holds gate:read, when they scan a PML car's unit code at the gate, then the car comes back; a PML car stays hidden from a satpam scoped to SBY.
- Refusal: none: hidden without it.
- Who: super_admin, admin, maintenance, asuransi, checker, satpam and viewer hold gate:read.
- Source: [Ref] Roles, policy matrix (vehicles: vehicle:read and other vehicle-facing reads); D25, which makes the delivered M0's checks the acceptance list (check 7: satpam reads its pool's car).
R-VEH-16 · fleet_monitor:read at a car's home pool lets a user read the car
Section titled “R-VEH-16 · fleet_monitor:read at a car's home pool lets a user read the car”- Status: built
- Example: given a user whose only vehicle-facing permission is a grant of fleet_monitor:read at PML, when they read vehicles, then PML's cars come back.
- Refusal: none: hidden without it.
- Who: super_admin, admin, admin_fleet, maintenance, asuransi, checker and viewer hold fleet_monitor:read.
- Source: [Ref] Roles, The RLS pattern (vehicles_read lists vehicle:read and fleet_monitor:read).
R-VEH-21 · Temporary plates are kept on a short list in master data
Section titled “R-VEH-21 · Temporary plates are kept on a short list in master data”- Status: built
- Example: given the police issue plate B 9999 TMP for cars not yet registered, when an admin adds it to the list, then two new cars may carry it at once (R-VEH-02), and it can be used again for the next car.
- Refusal: none: insufficient_privilege (42501) without master_data:write.
- Who: writing the list: super_admin, admin, maintenance and asuransi hold master_data:write. Reading it: holders of vehicle:read or master_data:read, so whoever handles cars sees which plates may repeat.
- Source: D39; #144 (zuki's answer 2); the readers from #154 (the CTO's answer 6) and #164. How a car moves from its temporary plate to its registered one is still to be designed.
R-VEH-22 · Adding a car opens a preparation work order for it, whose preparation inspection is the car's first inspection
Section titled “R-VEH-22 · Adding a car opens a preparation work order for it, whose preparation inspection is the car's first inspection”- Status: planned
- Example: given a new car saved as not_ready (R-VEH-05), when it is added, then a work order routed to preparation is opened for it, and the car's first inspection is that work order's preparation inspection; there is no separate first inspection.
- Refusal: none.
- Who: the vehicle function (M5).
- Source: #144 (veh 05; zuki's answer 13); D47; General Flow VEH-01 → VEH-02 → VEH-03. Wording only: D47 names the inspection.
R-VEH-23 · A car's backup GPS device stays on standby until it is activated
Section titled “R-VEH-23 · A car's backup GPS device stays on standby until it is activated”- Status: built
- Example: given a car whose primary tracker stops sending, when staff activate the backup, then its positions are used from then on; until then the backup's positions aren't.
- Refusal: none.
- Who: the GPS pull (M2, M5).
- Source: #144 (veh 11; zuki's answer 13: the backup is active only on request).
R-VEH-24 · Reactivating an inactive car is refused when its plate is now on another car that isn't inactive
Section titled “R-VEH-24 · Reactivating an inactive car is refused when its plate is now on another car that isn't inactive”- Status: built
- Example: given an inactive car with plate B1234XYZ and an active car that now carries B1234XYZ, when the inactive car is set back to not_ready, then it is refused with the detail of the car and the plate.
- Refusal: vehicle.plate_in_use, with vehicle_id and plate_number.
- Who: every writer.
- Source: D39; #144.
R-VEH-25 · A car becomes ready only while its STNK hasn't expired
Section titled “R-VEH-25 · A car becomes ready only while its STNK hasn't expired”- Status: built
- Example: given a car whose STNK expires on 2026-10-15 (the STNK that counts, R-VEH-51), when it is set ready on 2026-10-16, then it is refused; on 2026-10-15 it is accepted. Dates are the pool's. A car with no STNK on file, or whose STNK has no expiry date, is not refused (a temporary plate, R-VEH-21); there is no key for a missing STNK.
- Refusal: vehicle.stnk_expired
- Who: app.set_vehicle_status and every function that calls it (M2).
- Source: D47; General Flow VEH-03 (STNK not expired); zuki, 2026-11-24 (#463: a missing STNK or expiry doesn't refuse).
R-VEH-26 · A VIN is unique within the organization, when there is one
Section titled “R-VEH-26 · A VIN is unique within the organization, when there is one”- Status: built
- Example: given a car with VIN MHKA6GJ6JPJ012345, when a second car with that VIN is saved in the organization, then it is refused; two cars with no VIN yet are accepted.
- Refusal: none: unique_violation (23505) on a direct write; vehicle.vin_taken from the create_vehicle function (R-VEH-47).
- Who: every writer, the migration included; the constraint is BE pack G2's.
- Source: D47; General Flow VEH-01 (Data Constraints: plate and VIN unique).
R-VEH-27 · A car becomes ready only through its work order becoming ready
Section titled “R-VEH-27 · A car becomes ready only through its work order becoming ready”- Status: planned
- Example: given a car whose work order is routed to maintenance, when an admin_fleet sets the car ready, then it is refused; when the work order becomes ready through the Preparation Leader's check (R-WO-08), the car becomes ready with it.
- Refusal: a key named by BE in M5.
- Who: app.set_vehicle_status and the work order functions (M5).
- Source: D47; D41 (no release to ready without the leader's check); General Flow VEH-28 → VEH-03 (Data Constraints: the ready guard).
R-VEH-28 · The migration loads one car per vehicle_master row, with its unit_id as unit_code; a unit_id on two rows loads neither, and both are unmatched rows
Section titled “R-VEH-28 · The migration loads one car per vehicle_master row, with its unit_id as unit_code; a unit_id on two rows loads neither, and both are unmatched rows”- Status: built
- Example: given 1,750 vehicle_master rows, when the vehicles step runs, then each row with a unit_id no other row has becomes one car, with data ->> 'unit_id' as unit_code (R-VEH-03) and id v2_id('vehicle', unit_id) (R-MIG-03); two rows sharing a unit_id both go to migration.unmatched with their reason (R-MIG-04), and neither is loaded. Its status is its live status from vehicle_status, by plate (the latest row when a plate has two), else vehicle_master's when it has no vehicle_status row; the labels map as in R-MIG-02, so U-9, Not Ready in vehicle_master and Ready in its latest vehicle_status row, loads ready. 2. Undermaintain - TOP and 3. Undermaintain - Asuransi both load as maintenance (D91), and 0. Return loads as returned (D92); no v1 label loads as unchecked, as v1 can't tell whether a car's BASTK was done. v1's backup tables are never read as a source.
- Refusal: none.
- Who: the migration's vehicles step (data phase row 5).
- Source: #280 (BE, 2026-10-22: one car per row; BE-DP-20 block 1: vehicle_master holds 1,750 rows, each with data.unit_id); #287; D91 and D92 (the maintenance and return labels, #582); unit_code keeps v1's unit id so the printed QR codes keep working (this page's intro); R-MIG-03, R-MIG-04, D18; zuki's counts on #324 (2026-10-28: vehicle_status agrees with every Listed and Booked onboarding row, vehicle_master's differs for 642 cars) and BE on #364. The example widens; the ID and the rule stay.
R-VEH-29 · A plate clash v1's data can't settle makes both cars unmatched rows; a plate is never renamed
Section titled “R-VEH-29 · A plate clash v1's data can't settle makes both cars unmatched rows; a plate is never renamed”- Status: built
- Example: given two vehicle_master rows that aren't inactive with plate B1234XYZ, when the vehicles step runs, then both are listed in migration.unmatched with their reason (R-MIG-04), and neither is loaded under that plate or under an altered one such as B1234XYZ-2. One active car and one inactive car with the same plate is no clash (R-VEH-02), and both load. The reconcile shows the pair until it is fixed in v1 or signed (D18).
- Refusal: none.
- Who: the migration's vehicles step (data phase row 5).
- Source: #280 (BE, 2026-10-22: a plate clash is unmatched, never renamed); #287; R-VEH-02, R-MIG-04.
R-VEH-30 · Every plate a v1 car has carried finds that car in id_map, and a temporary plate also becomes a plate history row
Section titled “R-VEH-30 · Every plate a v1 car has carried finds that car in id_map, and a temporary plate also becomes a plate history row”- Status: built
- Example: given a car whose plat is B 1234 XYZ and whose plat_sementara_1 is B 9876 TMP, when the vehicles step runs, then id_map holds entity vehicle_plate for both B1234XYZ and B9876TMP (upper case without spaces, R-VEH-01), each pointing at the car, and vehicle_plate_history holds a row for B9876TMP; plat_sementara_2 and plat_sementara_3 are read the same way when they are filled. The photo copy (#288) finds a v1 file's car by any of these plates.
- Refusal: none.
- Who: the migration's vehicles step (data phase row 5), read by the photo copy.
- Source: #280 (BE, 2026-10-22: every current and former plate onto its car; BE-DP-20 block 1: data.plat, and data.plat_sementara_1 to 3 filled on 141, 5 and 0 rows); #287; #288; R-VEH-01, R-MIG-03.
R-VEH-31 · The operations step loads each row of v1's vehicle_status_log as one vehicle_status_history row, its statuses through value_map, its time as changed_at and its note as the note
Section titled “R-VEH-31 · The operations step loads each row of v1's vehicle_status_log as one vehicle_status_history row, its statuses through value_map, its time as changed_at and its note as the note”- Status: built
- Example: given v1's 10,693 status log rows on the v1 copy of 2026-11-02 (v1copy), all of 2026, every one finding its car by plate (10,693 of 10,693), when the step has run twice, then v2 holds 10,693 history rows with the same ids both times (R-MIG-03), each on its car, with
atas changed_at andnote(filled on 10,664) as the note. Itstois to_status and itsfromis from_status through the value_map rows the vehicles step already uses for v1's status labels (R-VEH-28): 0. Return to returned, 1. Not Ready to not_ready, 2. Undermaintain - TOP and 3. Undermaintain - Asuransi both to maintenance (D91), 4. Ready to ready, 5. Rented to rented and 6. Booked to booked (counts from/to: Return 1,430 / 1,442, Not Ready 1,188 / 1,185, Undermaintain - TOP 79 / 86, Undermaintain - Asuransi 112 / 203, Ready 2,059 / 2,094, Rented 1,929 / 3,471, Booked 2,073 / 2,212). The 1,823 rows with an emptyfrom(8,870 are filled) are the car's first status and load with from_status empty. A label with no value_map row stops the step (R-MIG-02). Each row also keeps v1'sfromandtolabels as v1 wrote them, in legacy_ text columns (D84's naming), so the history still shows which of the two Undermaintain labels a row had (D91); the counts per label above are v1's and stay so.by(text, on every row) anddriver(text on 5,699 rows) anddriverId(3,011 rows: 3,006 numbers, 5 strings) are not members: they are kept as v1 wrote them in legacy_ text columns (D84's naming) and never guessed as members, so changed_by stays empty. rental_id stays empty. The reconcile compares each loaded car's status (R-VEH-28) with thetoof its latest history row and prints one line underoperations status historywith the count of cars that differ (113 on the copy of 2026-11-03), not a line per car; zuki on #304 (2026-11-03) signed that line (R-MIG-05, R-MIG-06), and the cars themselves are listed by a local query in BE-DP-38. - Refusal: none.
- Who: the data phase's operations step (#304); the reconcile check.
- Source: zuki's run of operations-claimed.sql on v1copy (2026-11-02, via the CTO); zuki on #415 (2026-11-02: vehicle_status_log is important and needs a claim); R-VEH-07 (a status change writes a history row); R-VEH-28; R-MIG-02; R-MIG-03. The maintenance label and the legacy_ label columns: D91, #582. The example widens; the ID and the rule stay.
R-VEH-32 · A lookup by unit code finds the car whose unit code equals the trimmed input exactly, with its case and leading zeros kept
Section titled “R-VEH-32 · A lookup by unit code finds the car whose unit code equals the trimmed input exactly, with its case and leading zeros kept”- Status: built
- Example: given cars with unit codes 0042 and 42, when a user looks up " 0042 ", then only the car 0042 comes back; looking up 42 returns only the other.
- Refusal: none: no match is zero rows.
- Who: every reader of the car (R-VEH-14 to 16). The unit QR payload is the unit code.
- Source: #462; the CTO's answer in #462's session, 2026-11-23; R-VEH-03; the printed QR codes carry unit_code (this page's intro).
R-VEH-33 · A lookup by plate removes all whitespace and upper-cases the input before it matches a car's current plate
Section titled “R-VEH-33 · A lookup by plate removes all whitespace and upper-cases the input before it matches a car's current plate”- Status: built
- Example: given a car with plate B1234XYZ, when a user looks up "b 1234 xyz", then the car comes back; "B-1234-XYZ" finds nothing, as no other punctuation is stripped.
- Refusal: none.
- Who: every reader of the car (R-VEH-14 to 16).
- Source: #462; the CTO's answer in #462's session, 2026-11-23; R-VEH-01.
R-VEH-34 · A lookup by plate also finds a car by a former plate in its plate history, for a user who holds vehicle:read
Section titled “R-VEH-34 · A lookup by plate also finds a car by a former plate in its plate history, for a user who holds vehicle:read”- Status: built
- Example: given a car whose plate changed from B1234XYZ to B5678ABC (R-VEH-09), when a vehicle:read holder looks up "b 1234 xyz", then the car comes back with match_kind former_plate; a gate:read holder without vehicle:read finds it by B5678ABC only.
- Refusal: none.
- Who: the lookup is security invoker, so the plate history's own policy decides: super_admin, admin, admin_driver, admin_fleet, maintenance, asuransi, checker and viewer hold vehicle:read.
- Source: #462; zuki, 2026-11-23; R-VEH-09, R-VEH-30 (migrated plates, temporary plates included); no policy change.
R-VEH-35 · A lookup returns one row per matching car with its best match_kind, and every match is returned: not inactive cars first, then unit_code, plate, former_plate, then the unit code
Section titled “R-VEH-35 · A lookup returns one row per matching car with its best match_kind, and every match is returned: not inactive cars first, then unit_code, plate, former_plate, then the unit code”- Status: built
- Example: given car A whose current plate is B1234XYZ, car B whose former plate is B1234XYZ and an inactive car C with plate B1234XYZ (R-VEH-02), when B1234XYZ is looked up, then three rows come back in the order A (plate), B (former_plate), C (plate, inactive); a car matching by two routes appears once, with the better match_kind (unit_code before plate before former_plate). Two cars on one temporary plate (R-VEH-21) both come back.
- Refusal: none.
- Who: every reader of the car.
- Source: #462; the CTO's answer in #462's session, 2026-11-23; D39, R-VEH-02, R-VEH-21.
R-VEH-36 · A lookup never returns a car the user can't read: another pool's car comes back as zero rows, with no error key
Section titled “R-VEH-36 · A lookup never returns a car the user can't read: another pool's car comes back as zero rows, with no error key”- Status: built
- Example: given a viewer scoped to SBY, when they look up the unit code or plate of a PML car, then zero rows come back and nothing is raised; the same lookup by a PML reader returns the car.
- Refusal: none: hidden, as R-VEH-14 to 16 say.
- Who: every app user.
- Source: #462; the CTO's answer in #462's session, 2026-11-23; R-VEH-14, R-VEH-15, R-VEH-16; the issue's "refused" means hidden.
R-VEH-37 · A blank lookup input returns no rows
Section titled “R-VEH-37 · A blank lookup input returns no rows”- Status: built
- Example: given an input of "" or " ", when the lookup runs, then zero rows come back; it never returns every car. The page drops a NUL character from the input before the lookup, so an input of only NULs is blank, and "E2E-V01" with a NUL inside it still finds E2E-V01.
- Refusal: none.
- Who: every reader of the car.
- Source: #462; the CTO's answer in #462's session, 2026-11-23; R-VEH-33, R-VEH-32.
R-VEH-38 · The vehicle list page shows cars that aren't inactive until its status filter is set; v_vehicles returns inactive cars too, and a lookup always includes them, labelled inactive
Section titled “R-VEH-38 · The vehicle list page shows cars that aren't inactive until its status filter is set; v_vehicles returns inactive cars too, and a lookup always includes them, labelled inactive”- Status: built
- Example: given an inactive car and a ready car at PML, when the list page opens with no status filter, then it applies "status is not inactive" to v_vehicles and shows only the ready car; with status inactive it shows the inactive car; v_vehicles itself returns both, as the sheet of the inactive car reads it; a lookup of the inactive car's plate returns it with its status inactive, after any car that isn't.
- Refusal: none.
- Who: the list: vehicle:read holders (super_admin, admin, admin_driver, admin_fleet, maintenance, asuransi, checker and viewer hold vehicle:read); the lookup: every reader of the car.
- Source: #462; zuki, 2026-11-23; D39, D56 (supply_status inactive is not the same as status inactive), R-VEH-13 (a car that leaves the fleet is set inactive).
R-VEH-39 · The vehicle list filters by pool, status and supply_status, combined with AND; no filter means every pool the user can read
Section titled “R-VEH-39 · The vehicle list filters by pool, status and supply_status, combined with AND; no filter means every pool the user can read”- Status: built
- Example: given PML and SBY cars with mixed statuses and supply_status values (active, replacing, inactive), when the list is filtered by pool PML and supply_status replacing, then only PML cars in replacing come back; with no filter every car that isn't inactive (R-VEH-38) in the user's pools comes back, and none of another pool's. The pool filter offers the pools where the user holds vehicle:read; a car the user reads at another pool through another permission (R-VEH-15, R-VEH-16) still shows in the unfiltered list. status takes the values the enum holds after #584 (maintenance, unchecked and returned included).
- Refusal: none.
- Who: vehicle:read holders. The filters are plain PostgREST filters on v_vehicles, a security invoker view, and there is no list function.
- Source: #462; the CTO's answer in #462's session, 2026-11-23; D3, D4, D56, D91, D92, R-VEH-14.
R-VEH-40 · The vehicle list is sorted by unit code and paged
Section titled “R-VEH-40 · The vehicle list is sorted by unit code and paged”- Status: built
- Example: given 120 cars, when the first page is read, then it holds the first 20 cars by unit code, with a Berikutnya link to the next page; the page is in ?page=, so ?page=2 holds cars 21 to 40, none repeated or missed, and has Sebelumnya and Berikutnya links; the last page, ?page=6, has no Berikutnya link; a page past the last one (a shared ?page=7 after the fleet shrinks, or ?page=99) shows the last page, not an error.
- Refusal: none.
- Who: vehicle:read holders.
- Source: #462; the CTO's answer in #462's session, 2026-11-23; D3, R-VEH-39.
R-VEH-41 · The vehicle detail sheet shows a car's unit code, plate, pool, rental company, model, year, color, VIN, odometer, status and supply_status, and not its daily cost or GPS
Section titled “R-VEH-41 · The vehicle detail sheet shows a car's unit code, plate, pool, rental company, model, year, color, VIN, odometer, status and supply_status, and not its daily cost or GPS”- Status: built
- Example: given a car at PML, when its sheet is read through v_vehicles, then those fields come back, the rental company's name only for a holder of master_data:read or payment:read, or of vehicle:write at any pool (R-VEH-74), a partner-limited user seeing only their own companies, and empty for every other reader, which the sheet shows as a dash: admin_driver and checker (viewer reads it through payment:read, which super_admin and admin hold too, admin_fleet through vehicle:write; finance holds payment:read but not vehicle:read, so it never opens the sheet); company_daily_cost is not a column of the view; GPS belongs to a later slice. The STNK and documents are on the documents tab (R-VEH-52), and the photos are R-VEH-63; neither is in v_vehicles.
- Refusal: none.
- Who: vehicle:read holders.
- Source: #462; zuki, 2026-11-23 (Z5: the name follows R-MD-12, no policy change); D3, D56; the odometer, rental company and VIN are the data model's vehicles columns. The name for vehicle:write: zuki in the session on #748, 2026-11-25; D108.
R-VEH-42 · The detail sheet shows a car's plate history and status history read-only, to whoever holds vehicle:read at its pool
Section titled “R-VEH-42 · The detail sheet shows a car's plate history and status history read-only, to whoever holds vehicle:read at its pool”- Status: built
- Example: given a car whose plate changed once (R-VEH-09) and whose status changed twice (R-VEH-07), when a vehicle:read holder at its pool opens the sheet, then one plate history row and two status history rows come back, newest first (plate history by valid_to, status history by changed_at); a reader at another pool gets none, and no one can edit or delete a history row from the sheet; the plate change and status moves the sheet offers (R-VEH-100, R-VEH-101) add rows only through their functions.
- Refusal: none: hidden without vehicle:read.
- Who: super_admin, admin, admin_driver, admin_fleet, maintenance, asuransi, checker and viewer hold vehicle:read.
- Source: #462; zuki, 2026-11-23; R-VEH-07, R-VEH-09, R-VEH-31 (migrated rows); the existing vehicle:read policies on both history tables, no new permission.
R-VEH-43 · /vehicles, its list and its sheet, opens for a user who holds vehicle:read; without it the menu item is hidden and the page is refused
Section titled “R-VEH-43 · /vehicles, its list and its sheet, opens for a user who holds vehicle:read; without it the menu item is hidden and the page is refused”- Status: built
- Example: given a satpam, who holds gate:read but not vehicle:read, when they open /vehicles, then the menu has no Vehicles item and the page is refused as the shell refuses any page the user may not open; the lookup function, not a page, still answers for them by unit code or current plate (R-VEH-15, R-VEH-33). An admin_fleet sees the item and opens the list.
- Refusal: none: the page is refused by the shell, as for other pages.
- Who: super_admin, admin, admin_driver, admin_fleet, maintenance, asuransi, checker and viewer hold vehicle:read.
- Source: #462; zuki, 2026-11-23; lib/nav.ts; R-VEH-14, R-VEH-15. VEH open 1 (who else reads vehicles) stays open in #77.
R-VEH-44 · /vehicles has one search box: with input the lookup results replace the list, whatever the filters; without input the page shows the list
Section titled “R-VEH-44 · /vehicles has one search box: with input the lookup results replace the list, whatever the filters; without input the page shows the list”- Status: built
- Example: given a user on /vehicles with the filter pool PML set, when they type a plate that matches one car at SBY they can read, then the page shows that one car as a row linking to its sheet, the filter notwithstanding; when two or more cars match (R-VEH-35), the page shows them as a pick list; when the box is cleared, the list comes back with its filters.
- Refusal: none.
- Who: vehicle:read holders (R-VEH-43).
- Source: #462; zuki, 2026-11-23 (Z6); R-VEH-32 to R-VEH-37.
R-VEH-45 · The vehicle list and the lookup results show the columns unit code, plate, model (labelled "Cocok dengan" in lookup results), partner, pool, status and supply_status, supply_status as its own column and not a badge in the status column, and brand and color only on the sheet
Section titled “R-VEH-45 · The vehicle list and the lookup results show the columns unit code, plate, model (labelled "Cocok dengan" in lookup results), partner, pool, status and supply_status, supply_status as its own column and not a badge in the status column, and brand and color only on the sheet”- Status: built
- Example: given a viewer, who holds payment:read, on /vehicles, when the list or a lookup result loads, then each row shows Kode unit, Plat, Model, Partner, Pool, Status and Status pasokan (a checker sees the same without Partner, R-VEH-46), a car with supply_status set showing it under Status pasokan and not beside its status; brand and color appear only when the sheet opens.
- Refusal: none.
- Who: vehicle:read holders (R-VEH-43).
- Source: #462; zuki, 2026-11-23 (v1's Status Mobil is supply_status; Brand and warna stay on the sheet; v1's Akun is the driver's platform account and comes with rentals); R-VEH-41, R-VEH-44. Changed by zuki in the session on #748, 2026-11-25; D108.
R-VEH-46 · The Partner column, a car's rental company name, is shown only to a user who holds master_data:read or payment:read in the organization, or vehicle:write at any pool of it; for anyone else the column is not there at all
Section titled “R-VEH-46 · The Partner column, a car's rental company name, is shown only to a user who holds master_data:read or payment:read in the organization, or vehicle:write at any pool of it; for anyone else the column is not there at all”- Status: built
- Example: given a viewer, who holds payment:read, when they open /vehicles, then the Partner column shows each car's rental company name (a partner-limited user only their own companies, R-MD-12); given an admin_fleet, who holds vehicle:write, the same (R-VEH-74); given a checker, who holds none of them, when they open /vehicles or run a lookup, then the table has no Partner column, not a column of dashes.
- Refusal: none.
- Who: holders of master_data:read or payment:read; super_admin and admin hold payment:read too; and holders of vehicle:write, admin_fleet among them (R-VEH-74).
- Source: #462; zuki, 2026-11-23; R-MD-12 (rental_companies_read), R-VEH-41, R-VEH-45. Changed by zuki in the session on #748, 2026-11-25; D108.
R-VEH-47 · Adding a car saves it as not_ready with its plate, unit code, pool and rental company, and refuses a VIN, unit code or plate already taken
Section titled “R-VEH-47 · Adding a car saves it as not_ready with its plate, unit code, pool and rental company, and refuses a VIN, unit code or plate already taken”- Status: built
- Example: given an admin_fleet at PML, when they add a car with plate "b 1234 xyz", unit code U-0100, pool PML, rental company TOP and VIN mhka6gj6jpj012345, then it is saved as not_ready (R-VEH-05) with plate B1234XYZ and VIN MHKA6GJ6JPJ012345 (R-VEH-01), and no document is needed. When a second car is added with that VIN, it is refused with vehicle.vin_taken; with unit code U-0100, vehicle.unit_code_taken; with a plate on another car that isn't inactive (R-VEH-02), vehicle.plate_in_use. A car with no VIN is accepted, and a blank VIN is stored as no VIN. A blank unit code, plate, pool, model or rental company (R-VEH-70) is refused with vehicle.field_required; a year outside 1990 to 2100 (R-VEH-04), a negative odometer, or a model, rental company or pool of another organization, with vehicle.field_invalid (both carry the field name). The daily cost isn't taken: create_vehicle has no such argument.
- Refusal: vehicle.vin_taken, vehicle.unit_code_taken, vehicle.plate_in_use, vehicle.field_required, vehicle.field_invalid, vehicle.not_allowed (42501: no vehicle:write at the pool, R-VEH-12), vehicle.rental_company_not_held (R-VEH-72). The create_vehicle function raises them; a direct insert answers 42501 or 23505 with no key.
- Who: vehicle:write holders at the car's home pool (super_admin, admin, admin_fleet). The input is normalized before the checks (R-VEH-01). Opening the preparation work order stays with R-VEH-22 (M5).
- Source: #463; zuki, 2026-11-24; D47; D10; R-VEH-01 to R-VEH-05, R-VEH-26. Changed by zuki in the session on #748, 2026-11-25; D108.
R-VEH-48 · A document is added to a car with a type and an optional expiry date, and needs no file yet
Section titled “R-VEH-48 · A document is added to a car with a type and an optional expiry date, and needs no file yet”- Status: built
- Example: given a car at PML, when an admin_fleet at PML adds a document of type stnk with expiry 2027-03-01, then a row is saved for the car, its id is returned, and it has no file yet. The types are stnk, bpkb, insurance and other; kir or tax is a cast error; a document with no expiry date is accepted for every type.
- Refusal: vehicle.not_allowed (42501); vehicle.not_found (a car the user can't read). doc_type takes only the four values above; any other is a cast error from the API, not a key. The function is add_vehicle_document.
- Who: vehicle:write holders at the car's home pool. Adding a car requires no document (R-VEH-47); documents are added afterwards.
- Source: #463; zuki, 2026-11-24 (an expiry is optional on every type; storage_path becomes nullable, D11); D47; #745 and D110 (kir and tax leave the types); R-VEH-12.
R-VEH-49 · A document has any number of files under its own D14 folder, and its main path is set only inside that folder
Section titled “R-VEH-49 · A document has any number of files under its own D14 folder, and its main path is set only inside that folder”- Status: built
- Example: given a document with id D1 on a car of organization O, when three photos are uploaded to O/vehicle_documents/D1/stnk-front.jpg and the next two names, then all are stored, and setting the document's main path to O/vehicle_documents/D1/stnk-front.jpg is accepted; setting it to O/vehicle_documents/D2/x.jpg, or to another organization's folder, is refused with vehicle.document_path_invalid.
- Refusal: vehicle.document_path_invalid; vehicle.document_file_already_set (the document's main path is already set, so a second set_vehicle_document_file is refused); vehicle.not_allowed (42501); vehicle.document_not_found (no such document, or one the caller can't read). The function is set_vehicle_document_file. An upload without write access to the row is refused as R-STO-04 says (42501).
- Who: vehicle:write holders at the car's home pool. The path is stored, never the content (R-STO-05); the folder follows R-STO-02 and D14.
- Source: #463; zuki, 2026-11-24 (several files per document; set_vehicle_document_file); R-STO-02, R-STO-04, R-STO-05.
R-VEH-50 · The app never changes or deletes a document row or its files: a renewal adds a new row
Section titled “R-VEH-50 · The app never changes or deletes a document row or its files: a renewal adds a new row”- Status: built
- Example: given a car whose STNK expired on 2026-10-15, when it is renewed to 2031-10-15, then a new stnk row with that expiry is added and the old row stays; a wrong row is superseded by a new one. Any direct update of a row, or a delete, is refused for an app user (set_vehicle_document_file is the only way to write the path), as is overwriting or deleting its files (R-STO-12). The main path is set once, by R-VEH-49.
- Refusal: none: insufficient_privilege (42501) on any direct update, on delete and on a direct insert. A direct insert of a row is refused for an app user too; add_vehicle_document is the only way to add one.
- Who: every app user; the migration alone writes migrated rows (R-STO-15).
- Source: #463; the CTO's answer, 2026-11-24; D39, D65, R-STO-12.
R-VEH-51 · The STNK that counts is the car's stnk row with the latest expiry date, and it is valid through that date
Section titled “R-VEH-51 · The STNK that counts is the car's stnk row with the latest expiry date, and it is valid through that date”- Status: built
- Example: given a car with stnk rows expiring 2026-10-15 and 2031-10-15, when the car is read on 2026-11-24, then the 2031 row counts and the STNK is valid; given only the 2026 row, the STNK is expired. A car with no stnk row, or only stnk rows with no expiry, has no known expiry: it is not refused (R-VEH-25) and the documents tab shows it as not on file. Dates are the pool's, and the expiry date itself is still valid.
- Refusal: none.
- Who: every reader of the documents (R-VEH-52); the same reading is used by R-VEH-25.
- Source: #463; the CTO's answer and zuki, 2026-11-24; D47.
R-VEH-52 · The documents tab shows each document's type, expiry date and files, and whether the STNK is valid, expired or not on file, to a user who holds vehicle:read at the car's pool, within the member's rental companies (R-ACC-43)
Section titled “R-VEH-52 · The documents tab shows each document's type, expiry date and files, and whether the STNK is valid, expired or not on file, to a user who holds vehicle:read at the car's pool, within the member's rental companies (R-ACC-43)”- Status: built
- Example: given a car with an STNK expiring 2026-10-15 and a BPKB with no expiry, when a vehicle:read holder opens its documents tab on 2026-11-24, then both rows show with their type, expiry (a dash for none) and files, and the STNK shows as expired; a user without vehicle:read at the pool sees nothing, and a partner-limited member sees only the documents of cars of their own rental companies (R-ACC-43, R-ACC-44), files included (R-STO-18). A holder of vehicle:write sees the add-document control; others don't. There is no control that sets a car ready in this slice (R-VEH-25).
- Refusal: none: hidden, as R-VEH-14 to R-VEH-16 say.
- Who: vehicle:read holders to read, within their rental companies (policy vehicle_documents_read and the storage read, as vehicles_read); vehicle:write holders to add.
- Source: #463; the CTO's answer, 2026-11-24; D107 (the page is built from an approved mockup); R-VEH-41 (STNK and documents were left to this slice), R-VEH-51.
R-VEH-53 · The add-car form has the fields of a car and a documents step after it; the car is saved before any document
Section titled “R-VEH-53 · The add-car form has the fields of a car and a documents step after it; the car is saved before any document”- Status: built
- Example: given an admin_fleet on /vehicles, when they add a car, then the form asks for unit code, plate, pool, rental company (R-VEH-75), model, year, color, VIN and odometer, saves the car as not_ready, and opens its documents tab to add documents; a refusal (R-VEH-47) is shown beside the field it names, in Indonesian; a user without vehicle:write sees no add control.
- Refusal: the keys of R-VEH-47.
- Who: vehicle:write holders.
- Source: #463; the CTO's answer, 2026-11-24; D107: the layout comes from the mockup zuki approves, and where it and a rule disagree the rule stands. Changed by zuki in the session on #748, 2026-11-25; D108.
R-VEH-54 · A photo is added to a car for one side, front, back, left or right, and has no file yet
Section titled “R-VEH-54 · A photo is added to a car for one side, front, back, left or right, and has no file yet”- Status: built
- Example: given a car at PML, when an admin_fleet at PML adds a photo for side front, then a row is saved for the car with that side, its id is returned and it has no file yet.
- Refusal: vehicle.not_found (a car the user can't read); vehicle.not_allowed (42501: no vehicle:write at the pool); vehicle.field_required (no side, with the field name). Any other side is a cast error from the API, not a key. The function is add_vehicle_photo.
- Who: vehicle:write holders at the car's home pool, within the member's rental companies (R-ACC-43).
- Source: #745; zuki, 2026-11-24; D110; D10; R-VEH-12.
R-VEH-55 · A photo's path is set once, to a file that exists in the vehicles bucket in the photo's own D14 folder
Section titled “R-VEH-55 · A photo's path is set once, to a file that exists in the vehicles bucket in the photo's own D14 folder”- Status: built
- Example: given a photo with id P1 on a car of organization O and a file uploaded to O/vehicle_photos/P1/front.jpg, when its path is set to that file, then it is accepted; a path in O/vehicle_photos/P2/ or another organization's folder is refused with vehicle.photo_path_invalid; a path in P1's folder with no file uploaded, with vehicle.photo_file_missing; a file uploaded to the same folder in another bucket, such as documents, is refused the same way, with vehicle.photo_file_missing, because the file must exist in the vehicles bucket; a second set, with vehicle.photo_file_already_set.
- Refusal: vehicle.photo_path_invalid, vehicle.photo_file_missing, vehicle.photo_file_already_set, vehicle.photo_not_found (no such photo, or one the caller can't read), vehicle.not_allowed (42501). The function is set_vehicle_photo_file. An upload without write access to the row is refused as R-STO-04 says (42501).
- Who: vehicle:write holders at the car's home pool, within the member's rental companies (R-ACC-43).
- Source: #745; zuki, 2026-11-24; D110; D14; D10; R-STO-02, R-STO-04, R-STO-05.
R-VEH-56 · A side of a car shows its latest photo with a file, the one whose row was added last, and of rows added at the same time the one with the highest id
Section titled “R-VEH-56 · A side of a car shows its latest photo with a file, the one whose row was added last, and of rows added at the same time the one with the highest id”- Status: built
- Example: given a front photo with a file and a second front photo added later, when the second has no file yet, then the first shows; once its file is set, the second shows, and the first is kept but not shown. Rows added at the same time are ordered by the highest id, so one photo always shows.
- Refusal: none.
- Who: every reader of the photos (R-VEH-59).
- Source: #745; zuki, 2026-11-24; D110.
R-VEH-57 · The app never changes or deletes a photo row or its file: replacing a photo adds a new row
Section titled “R-VEH-57 · The app never changes or deletes a photo row or its file: replacing a photo adds a new row”- Status: built
- Example: given a car with a left photo, when an admin_fleet replaces it, then a new left row is added and the old row and its file stay; a direct insert, update or delete of a row is refused, as is overwriting or deleting its file (R-STO-12). The path is set once, by R-VEH-55.
- Refusal: none: insufficient_privilege (42501) on a direct insert, update or delete of a row; Storage as R-STO-12 says.
- Who: every app user, super_admin included.
- Source: #745; zuki, 2026-11-24; D110; D39; D65.
R-VEH-58 · No photo is required to add a car or to set it ready
Section titled “R-VEH-58 · No photo is required to add a car or to set it ready”- Status: built
- Example: given a car with no photos that meets every other condition for ready, when it is set ready, then it is not refused for its photos; adding a car with none is accepted (R-VEH-47).
- Refusal: none.
- Who: every function that adds a car or sets it ready.
- Source: #745; zuki, 2026-11-24; D110; D47, unchanged; R-VEH-25.
R-VEH-59 · A car's photos, files included, are readable by whoever may read the car, within the member's rental companies (R-ACC-43)
Section titled “R-VEH-59 · A car's photos, files included, are readable by whoever may read the car, within the member's rental companies (R-ACC-43)”- Status: built
- Example: given a PML car with a front photo, when a satpam at PML (gate:read) reads its photos, then the row comes back and its file opens; a satpam at SBY sees neither. A member limited to partner A sees the photos of partner A's cars only, and a member whose list is empty sees none. On the car's page, a photo shows to whoever the page opens for (R-VEH-43).
- Refusal: none: hidden; Storage answers not found (R-STO-03).
- Who: holders of vehicle:read, gate:read, fleet_monitor:read, inspection:read, work_order:read or insurance:read at the car's home pool, as R-STO-18; the rental-company limit holds for the row and the file.
- Source: #745; zuki, 2026-11-24; D110; R-ACC-11, R-STO-03, R-STO-18.
R-VEH-60 · A side with no v2 photo with a file shows the file from v1 of v1's vehicle folder for that side, with a path, marked as from v1 and read-only
Section titled “R-VEH-60 · A side with no v2 photo with a file shows the file from v1 of v1's vehicle folder for that side, with a path, marked as from v1 and read-only”- Status: built
- Example: given a migrated car with v1's vehicle-folder files labelled depan, belakang, kiri, kanan and bbm, then front, back, left and right show the first four marked as from v1, and bbm fills no side; once a v2 front photo has its file, front shows that instead. The label must be exactly depan, belakang, kiri or kanan, as the photo copy stores it (lower-cased, with the trailing time dropped), so depan_2 fills none. Only a file from v1 with a path in v1's vehicle folder counts: a file in another folder, such as a checkpoint's, labelled depan fills no side. A label that names no side fills none, and a side with neither shows empty. Nothing is copied: the file stays a file from v1 (R-STO-14, R-STO-15).
- Refusal: none.
- Who: every reader of the photos (R-VEH-59), who may read the file from v1 too (R-STO-18).
- Source: #745; zuki, 2026-11-24; D110; D70, narrowed by D110; #184 (the labels).
R-VEH-61 · When several files from v1 fit one side, the one with the latest taken_at shows, a missing taken_at last, and equal ones by the highest id
Section titled “R-VEH-61 · When several files from v1 fit one side, the one with the latest taken_at shows, a missing taken_at last, and equal ones by the highest id”- Status: built
- Example: given two files from v1 labelled depan on a car, taken on 2026-09-01 and 2026-09-20, then front shows the one of 2026-09-20; the other stays a file from v1. A file with no taken_at shows only when no other file for the side has one; of two files with the same taken_at, or both with none, the one with the highest id shows, so one file always shows.
- Refusal: none.
- Who: every reader of the photos (R-VEH-59).
- Source: #745; zuki, 2026-11-24; D110.
R-VEH-62 · A file from v1 that the browser can't draw, such as HEIC, is offered as a download in its side's place
Section titled “R-VEH-62 · A file from v1 that the browser can't draw, such as HEIC, is offered as a download in its side's place”- Status: built
- Example: given a car whose only front picture is a HEIC file from v1, when its photos are opened, then front shows a download marked as from v1 and no broken image. The download shows even when an older file of that side could be drawn, because R-VEH-61 picks the latest.
- Refusal: none.
- Who: every reader of the photos (R-VEH-59).
- Source: #745; zuki, 2026-11-24; D110.
R-VEH-63 · A car's photos open in the app's image viewer from the car's page
Section titled “R-VEH-63 · A car's photos open in the app's image viewer from the car's page”- Status: built
- Example: given a car with a front photo, when a reader opens it on the car's page, then it shows in the viewer with its side named, without leaving the app; an image file from v1 opens the same way, marked as from v1.
- Refusal: none.
- Who: every reader of the photos whom the car's page opens for (R-VEH-43, R-VEH-59).
- Source: #745; zuki, 2026-11-24; D110; D88; D107: the layout comes from the mockup zuki approves.
R-VEH-64 · A document's JPEG or PNG file opens in the image viewer, a PDF in a new tab, and a HEIC file downloads
Section titled “R-VEH-64 · A document's JPEG or PNG file opens in the image viewer, a PDF in a new tab, and a HEIC file downloads”- Status: built
- Example: given a document with stnk.jpg, stnk.pdf and stnk.heic, when a reader opens each on the documents tab, then the JPEG shows in the viewer of R-VEH-63, the PDF opens in a new tab through a signed URL, and the HEIC file downloads.
- Refusal: none.
- Who: every reader of the documents (R-VEH-52).
- Source: #745; zuki, 2026-11-24; D110; D88; R-STO-06.
R-VEH-65 · An STNK row may have a tax due date, and no other document type may
Section titled “R-VEH-65 · An STNK row may have a tax due date, and no other document type may”- Status: built
- Example: given a car at PML, when an admin_fleet at PML adds a document of type stnk with expiry 2031-10-15 and tax due date 2027-10-15, then both dates are saved; an stnk row with no tax due date is accepted; a bpkb, insurance or other row with one is refused with vehicle.field_invalid for tax_due_on.
- Refusal: vehicle.field_invalid (with the field name). The function is add_vehicle_document.
- Who: vehicle:write holders at the car's home pool, within the member's rental companies (R-ACC-43).
- Source: #745; zuki, 2026-11-24; D110; D10; R-VEH-48.
R-VEH-66 · The tax due date shows with its STNK on the documents tab, and no guard reads it
Section titled “R-VEH-66 · The tax due date shows with its STNK on the documents tab, and no guard reads it”- Status: built
- Example: given a car whose STNK expires on 2031-10-15 with tax due 2025-10-15, when its documents tab is opened on 2026-11-24, then both dates show (a dash for no tax due date) and the STNK shows as valid (R-VEH-51); the car isn't refused ready for the tax date (R-VEH-25).
- Refusal: none.
- Who: every reader of the documents (R-VEH-52).
- Source: #745; zuki, 2026-11-24; D110; D47, unchanged.
R-VEH-67 · The control that adds or replaces a car's photo shows only to a user who may add one
Section titled “R-VEH-67 · The control that adds or replaces a car's photo shows only to a user who may add one”- Status: built
- Example: given a PML car, when an admin_fleet at PML opens its page, then each side has a control to add or replace its photo; a viewer at PML sees the photos and no control.
- Refusal: none: hidden; the functions refuse as R-VEH-54 and R-VEH-55 say.
- Who: vehicle:write holders at the car's home pool, within the member's rental companies (R-ACC-43).
- Source: #745; zuki, 2026-11-24; D110; R-VEH-12.
R-VEH-68 · A car always has a rental company
Section titled “R-VEH-68 · A car always has a rental company”- Status: built
- Example: given a writer who may insert the car (R-VEH-73), when they save it with no rental company, then it is refused; a limited member who writes it directly gets 42501 first (R-VEH-73); a car of the operator belongs to TOP, the marked company (R-MD-84).
- Refusal: none: not_null_violation (23502). create_vehicle refuses it earlier, with a key (R-VEH-70).
- Who: every writer, the migration and the seed included.
- Source: zuki, 2026-11-24 (#741); zuki in the session on #748, 2026-11-25; D108. be in the session on #748 (which refusal comes first on a direct write).
R-VEH-69 · A car's rental company is of the car's own organization
Section titled “R-VEH-69 · A car's rental company is of the car's own organization”- Status: built
- Example: given a rental company of organization B, when a car of organization A is saved with it by a writer who may insert the car (R-VEH-73), such as a member with the flag, then it is refused; a limited member's direct write gets 42501 first. The composite foreign key (organization_id, rental_company_id) holds it (R-TEN-05).
- Refusal: none: foreign_key_violation (23503). create_vehicle refuses it earlier, with vehicle.field_invalid {field: rental_company_id} (R-VEH-47).
- Who: every writer.
- Source: zuki in the session on #748, 2026-11-25; D108. be in the session on #748 (which refusal comes first on a direct write).
R-VEH-70 · Adding a car without a rental company is refused
Section titled “R-VEH-70 · Adding a car without a rental company is refused”- Status: built
- Example: given an admin_fleet at PML, when they add a car with rental_company_id null, then it is refused and no car is saved.
- Refusal: vehicle.field_required with {field: rental_company_id}. Checked first, with the other required fields (R-VEH-47).
- Who: vehicle:write holders, through create_vehicle.
- Source: zuki in the session on #748, 2026-11-25; D108.
R-VEH-71 · Adding a car for a retired rental company is refused
Section titled “R-VEH-71 · Adding a car for a retired rental company is refused”- Status: built
- Example: given partner A is retired, when an admin_fleet with the flag adds a car for A, then it is refused and no car is saved; A's cars keep A (R-MD-59).
- Refusal: vehicle.field_invalid with {field: rental_company_id}. Checked after R-VEH-72.
- Who: vehicle:write holders, through create_vehicle.
- Source: zuki in the session on #748, 2026-11-25; D108.
R-VEH-72 · A member without the all-companies flag adds a car only for a rental company on their list
Section titled “R-VEH-72 · A member without the all-companies flag adds a car only for a rental company on their list”- Status: built
- Example: given Rina, an admin_fleet at PML limited to partner A, when Rina adds a car for partner B, then it is refused and no car is saved; for A it goes through. When TOP is on Rina's list, a car for TOP goes through too. A member with the flag isn't limited.
- Refusal: vehicle.rental_company_not_held (42501), with {rental_company_id}. create_vehicle checks in this order: required fields, the pool, vehicle:write (vehicle.not_allowed), the company of the organization, this rule, then active (R-VEH-71), then the model and the other values. The list counts retired companies (R-ACC-43), so a retired one on it gets R-VEH-71's key.
- Who: vehicle:write holders without the flag (R-ACC-43), through create_vehicle.
- Source: zuki in the session on #748, 2026-11-25; D108. be in the session on #748 (the detail; the model and the other values come after).
R-VEH-73 · A direct insert or update of a car holds to the same rental-company limit
Section titled “R-VEH-73 · A direct insert or update of a car holds to the same rental-company limit”- Status: built
- Example: given Rina, limited to partner A, with vehicle:write at PML, when Rina inserts a PML car for partner B directly, then it is refused; when Rina changes an A car to B, it is refused and the car keeps A; when Rina updates a partner B car, no row changes. A direct write holds the member's list only: "active" is create_vehicle's (R-VEH-71), so a retired company on the list is allowed on a direct write, and a retired company's cars stay editable (R-MD-59). Without vehicle:write, R-VEH-12 applies as before.
- Refusal: none: insufficient_privilege (42501) on insert and on a change to a company outside the list; no effect on a car outside the list.
- Who: members without the flag, through the vehicles_insert and vehicles_update policies (R-ACC-43).
- Source: zuki in the session on #748, 2026-11-25; D108.
R-VEH-74 · A vehicle:write holder at any pool of the organization reads rental companies' names, for the companies they may see
Section titled “R-VEH-74 · A vehicle:write holder at any pool of the organization reads rental companies' names, for the companies they may see”- Status: built
- Example: given an admin_fleet at PML, when they read the names, then each company comes back with its id, its name and whether it is active, and nothing else of it: with the flag, every company of the organization, retired ones included; without it, only the companies on their list, retired ones included; a user without vehicle:write at any pool gets none, and a holder at a pool of organization A gets no name of organization B. The operator mark isn't returned.
- Refusal: none: hidden. It is a separate read, one function for the picker, v_vehicles and find_vehicles, and the last two show a name when rental_companies_read gives it or this read does, so a viewer still sees it through payment:read. rental_companies_read and the readers of the other fields don't change (R-MD-08, R-MD-12).
- Who: vehicle:write holders at any pool of the organization.
- Source: zuki in the session on #748, 2026-11-25; D108. be in the session on #748 (one function for the picker, v_vehicles and find_vehicles).
R-VEH-75 · The add-car form asks for the rental company, from the active ones the user may see
Section titled “R-VEH-75 · The add-car form asks for the rental company, from the active ones the user may see”- Status: built
- Example: given an admin_fleet with the flag, when they open the form, then the active companies of the organization, TOP among them, are offered and none is chosen for them; a limited member is offered their own active ones; a retired company isn't offered. A refusal of R-VEH-70, R-VEH-71 or R-VEH-72 shows beside the rental company field.
- Refusal: none of its own: R-VEH-70 to R-VEH-72.
- Who: vehicle:write holders (R-VEH-53), through R-VEH-74.
- Source: zuki in the session on #748, 2026-11-25; D108.
R-VEH-76 · A CSV row holds the add-car fields only, as ids: unit code, plate, pool, rental company, model, year, color, VIN and odometer
Section titled “R-VEH-76 · A CSV row holds the add-car fields only, as ids: unit code, plate, pool, rental company, model, year, color, VIN and odometer”- Status: built
- Example: given an admin_fleet importing a CSV on /vehicles, when the file is read, then each row carries unit code, plate, pool, rental company, model, year, color, VIN and odometer (R-VEH-53, R-VEH-75) and no document dates; the app turns the file's pool, rental company and model names or codes into ids from the same option lists the add-car form uses (R-VEH-75), and the batch function receives ids, not names.
- Refusal: none of its own: a name or code the app cannot map stays on the user to pick; a row with a bad id is refused per row by the batch checks (R-VEH-77) with the R-VEH-47 keys.
- Who: vehicle:write holders, through the csv-import dialog (D88).
- Source: zuki, 2026-11-26 (#746, Align answers); R-VEH-53, R-VEH-75; D109.
R-VEH-77 · Every row of a batch gets everything create_vehicle checks, by one shared check, and each refusal is reported with its row and field
Section titled “R-VEH-77 · Every row of a batch gets everything create_vehicle checks, by one shared check, and each refusal is reported with its row and field”- Status: built
- Example: given a file whose second row (index 1) has no rental company and whose third row (index 2) repeats a plate another car holds (R-VEH-02), when the batch is checked, then the refusals list is
[{row: 1, field: rental_company_id, key: vehicle.field_required}, {row: 2, field: plate_number, key: vehicle.plate_in_use}]: the same keys and field names as R-VEH-47 (with R-VEH-70, R-VEH-71, R-VEH-72), raised by the one shared check both create_vehicle and vehicle_batch use (D3). - Refusal: the keys of R-VEH-47, each returned as {row, field, key} (D10); field is the column the key names, or null for the whole row.
- Who: vehicle:write holders, through vehicle_batch (D109).
- Source: D3; zuki, 2026-11-26 (#746); D109; #751; R-VEH-47, R-VEH-70 to R-VEH-72.
R-VEH-78 · Duplicates inside the file are refused on the later row: unit code, plate and VIN, after R-VEH-01's normalizing
Section titled “R-VEH-78 · Duplicates inside the file are refused on the later row: unit code, plate and VIN, after R-VEH-01's normalizing”- Status: built
- Example: given a file whose rows 0 and 3 carry plate "b 1234 xyz" and "B1234XYZ", when the batch is checked, then row 3 is refused with vehicle.batch_duplicate and row 0 is not; the same holds for unit code (R-VEH-03) and VIN (R-VEH-26). Two rows with no VIN, or a blank one, are never duplicates of each other.
- Refusal: vehicle.batch_duplicate with {row, field, key} on the later row, field the duplicated column.
- Who: vehicle:write holders, through vehicle_batch; a duplicate against cars already saved comes back as the R-VEH-47 key of the row that carries it.
- Source: zuki, 2026-11-26 (#746, Align answers); D47; D109; R-VEH-01, R-VEH-03, R-VEH-26.
R-VEH-79 · A file with more than 500 rows is refused whole
Section titled “R-VEH-79 · A file with more than 500 rows is refused whole”- Status: built
- Example: given a file of 501 rows, when it is checked or saved, then it is refused before any row is checked, with no per-row refusals and nothing written.
- Refusal: vehicle.batch_too_many, as a whole, not per row.
- Who: vehicle:write holders, through vehicle_batch.
- Source: zuki, 2026-11-26 (#746, Align answers); D109.
R-VEH-80 · Check-only mode writes nothing and returns the refusals list; an empty list means every row can be saved
Section titled “R-VEH-80 · Check-only mode writes nothing and returns the refusals list; an empty list means every row can be saved”- Status: built
- Example: given vehicle_batch(rows, check_only = true) over a file, when it runs, then no row is written and it returns { refusals: [{ row, field, key }] } (R-VEH-77, R-VEH-78); when every row passes, refusals is empty and the same rows can be saved.
- Refusal: none of its own: it returns, it doesn't raise.
- Who: vehicle:write holders, through vehicle_batch.
- Source: D109; #751; zuki, 2026-11-26 (#746).
R-VEH-81 · Saving a batch is all or nothing: it writes every row in one transaction, or nothing and raises vehicle.batch_refused with the refusals list in its detail
Section titled “R-VEH-81 · Saving a batch is all or nothing: it writes every row in one transaction, or nothing and raises vehicle.batch_refused with the refusals list in its detail”- Status: built
- Example: given vehicle_batch(rows, check_only = false) over a file with one refused row, when it runs, then no row is written and it raises vehicle.batch_refused whose detail is the same refusals list check-only would have returned (R-VEH-77, R-VEH-78); when every row passes, all rows are saved and it returns { created: [uuid] }.
- Refusal: vehicle.batch_refused with { refusals: [{ row, field, key }] } in the detail (D10).
- Who: vehicle:write holders, through vehicle_batch.
- Source: zuki, 2026-11-24 and 2026-11-26 (#746); D10; D109; #751.
R-VEH-82 · Each row is checked with vehicle:write at its own pool, so one file may span pools
Section titled “R-VEH-82 · Each row is checked with vehicle:write at its own pool, so one file may span pools”- Status: built
- Example: given an admin_fleet at PML importing a file whose rows name pools PML and SBY, when the batch is checked, then the PML rows pass and the SBY rows are refused per row with vehicle.not_allowed (R-VEH-12, R-VEH-47), reported with their row and field (R-VEH-77); a member with vehicle:write at both pools gets both rows checked.
- Refusal: vehicle.not_allowed, per row (42501 on a direct path; through vehicle_batch as {row, field, key}).
- Who: vehicle:write holders at each row's pool (super_admin, admin, admin_fleet).
- Source: zuki, 2026-11-26 (#746, Align answers); D3; R-VEH-12.
R-VEH-83 · A saved batch is one entry in the activity log, opening to every car it created
Section titled “R-VEH-83 · A saved batch is one entry in the activity log, opening to every car it created”- Status: built
- Example: given a file of 30 rows saved, when the activity log is read, then the batch shows as one entry and opening it lists the 30 new cars with their ids from { created: [uuid] } (R-VEH-81); a refused save (R-VEH-81) writes no entry.
- Refusal: none.
- Who: vehicle:write holders, through vehicle_batch.
- Source: D52; D109; zuki, 2026-11-26 (#746).
R-VEH-84 · The CSV import dialog keeps its edited rows when it is closed by accident, until the user starts a new file
Section titled “R-VEH-84 · The CSV import dialog keeps its edited rows when it is closed by accident, until the user starts a new file”- Status: built
- Example: given an admin_fleet editing rows in the review table, when the dialog is closed by accident and reopened, then the edited rows are shown and the server check runs again (R-VEH-80); a successful save (R-VEH-81), "Ganti berkas" or a new defaultFile clears them; the same defaultFile is not re-read over rows being edited, and the page keeps the dialog mounted (open passed, not rendered conditionally).
- Refusal: none.
- Who: vehicle:write holders, through the csv-import dialog (D88); its Playwright journey comes with the FE phase.
- Source: zuki, 2026-11-24 in the #722 session; zuki, 2026-11-26 (#746); D88: the 2.3.2 change to csv-import-dialog.tsx is zuki's to publish, so the rule stands on the answer, not on the component as it is today; D27: the journey proves it.
R-VEH-85 · App users change a car's plate only through change_plate; a direct update of its plate is refused
Section titled “R-VEH-85 · App users change a car's plate only through change_plate; a direct update of its plate is refused”- Status: built
- Example: given an admin_fleet at PML, when they update a PML car's plate_number from B1234XYZ to B5678ABC directly, then it is refused with vehicle.plate_locked and the car keeps B1234XYZ; when they call change_plate with B5678ABC, the plate changes. Other columns of the car are still updated directly under R-VEH-12.
- Refusal: vehicle.plate_locked (42501), with vehicle_id. An insert of a car (R-VEH-47, R-VEH-73) is untouched.
- Who: every app user (authenticated), super_admin included. Database functions, jobs and the migration may, as for status (R-VEH-06).
- Source: zuki, 2026-11-27 (#464): plates only through change_plate, in the pattern of R-VEH-06; D3, D10.
R-VEH-86 · change_plate needs vehicle:write at the car's home pool, for a car of one of the member's rental companies
Section titled “R-VEH-86 · change_plate needs vehicle:write at the car's home pool, for a car of one of the member's rental companies”- Status: built
- Example: given a maintenance user at PML, when they call change_plate on a PML car, then it is refused with vehicle.not_allowed; an admin_fleet at PML may, and an admin_fleet at another pool who reads the car may not. A car the caller can't read is vehicle.not_found, not vehicle.not_allowed (R-VEH-87): given Rina, limited to partner A (R-VEH-73), with vehicle:write at PML, when Rina changes the plate of a PML car of partner B, then it is refused with vehicle.not_found.
- Refusal: vehicle.not_allowed (42501), with vehicle_id, for a car the caller reads but may not write.
- Who: super_admin, admin and admin_fleet hold vehicle:write; a member limited to some rental companies only for those companies' cars (D108).
- Source: zuki, 2026-11-27 (#464); R-VEH-12, R-VEH-73.
R-VEH-87 · change_plate refuses a car that doesn't exist or that the caller can't read
Section titled “R-VEH-87 · change_plate refuses a car that doesn't exist or that the caller can't read”- Status: built
- Example: given an admin_fleet, when they call change_plate with a vehicle id no car has, or for a car they can't read (no read permission at its pool, or a company outside their list, R-VEH-73), then it is refused with vehicle.not_found and nothing is written, as add_vehicle_document and add_vehicle_photo refuse it. change_plate checks in this order, and raises the first refusal: not_found, not_allowed (R-VEH-86), field_required (R-VEH-89), inactive (R-VEH-92), plate_unchanged (R-VEH-91), plate_in_use (R-VEH-90), as add_vehicle_document and add_vehicle_photo do; so a car that doesn't exist, or that the caller can't read, is not_found before not_allowed.
- Refusal: vehicle.not_found, with vehicle_id.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464); D10.
R-VEH-88 · change_plate saves the new plate in upper case without spaces
Section titled “R-VEH-88 · change_plate saves the new plate in upper case without spaces”- Status: built
- Example: given a car with plate B1234XYZ, when change_plate is called with " b 5678 abc ", then the car's plate is B5678ABC (R-VEH-01), as create_vehicle saves it (R-VEH-47); the refusals in R-VEH-89 to R-VEH-91 are checked on the normalized plate.
- Refusal: none.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464); R-VEH-01, R-VEH-47.
R-VEH-89 · change_plate refuses a blank plate
Section titled “R-VEH-89 · change_plate refuses a blank plate”- Status: built
- Example: given a car with plate B1234XYZ, when change_plate is called with an empty plate, or one of spaces only, then it is refused with vehicle.field_required and the car keeps B1234XYZ.
- Refusal: vehicle.field_required, with field plate_number.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464); R-VEH-47 (the same key and detail).
R-VEH-90 · change_plate refuses a plate on another car that isn't inactive, unless the plate is on the temporary plates list
Section titled “R-VEH-90 · change_plate refuses a plate on another car that isn't inactive, unless the plate is on the temporary plates list”- Status: built
- Example: given car A with plate B1234XYZ, when car B's plate is changed to B1234XYZ, then it is refused with car B's id and the plate, never car A's, which the caller may not be able to read (another pool, or a company outside their list, R-VEH-73); once car A is inactive, it is accepted. A temporary plate on the list (R-VEH-21) is accepted even while another car carries it (R-VEH-02).
- Refusal: vehicle.plate_in_use, with vehicle_id (the car being changed) and plate_number, as R-VEH-24 gives them for the car being reactivated.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464); D39; R-VEH-02, R-VEH-24.
R-VEH-91 · change_plate refuses the plate the car already has
Section titled “R-VEH-91 · change_plate refuses the plate the car already has”- Status: built
- Example: given a car with plate B1234XYZ, when change_plate is called with "b 1234 xyz", then it is refused with vehicle.plate_unchanged and no plate history row is written.
- Refusal: vehicle.plate_unchanged, with vehicle_id and plate_number.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464).
R-VEH-92 · change_plate refuses an inactive car; it is reactivated first
Section titled “R-VEH-92 · change_plate refuses an inactive car; it is reactivated first”- Status: built
- Example: given an inactive car with plate B1234XYZ, when change_plate is called with B5678ABC, then it is refused with vehicle.inactive; after it is reactivated (R-VEH-96), the change is accepted.
- Refusal: vehicle.inactive, with vehicle_id.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464); D39.
R-VEH-93 · A plate changed through change_plate keeps the old plate in the plate history, so a lookup by the old plate still finds the car
Section titled “R-VEH-93 · A plate changed through change_plate keeps the old plate in the plate history, so a lookup by the old plate still finds the car”- Status: built
- Example: given a car with plate B1234XYZ, when change_plate sets B5678ABC, then vehicle_plate_history has one row for B1234XYZ (R-VEH-09, written by the trigger), and a vehicle:read holder who looks up B1234XYZ gets the car with match_kind former_plate (R-VEH-34). The change takes no note. This is the slice's plate change case.
- Refusal: none.
- Who: every caller of change_plate.
- Source: zuki, 2026-11-27 (#464); R-VEH-09, R-VEH-34, R-VEH-35.
R-VEH-94 · An app user moves a car's status by hand only by retiring, reactivating or pulling it, through move_vehicle_status; every other move is refused
Section titled “R-VEH-94 · An app user moves a car's status by hand only by retiring, reactivating or pulling it, through move_vehicle_status; every other move is refused”- Status: built
- Example: given an admin_fleet at PML and a PML car that is not_ready, when they call move_vehicle_status to set it ready, maintenance, booked, rented, returned or unchecked, then it is refused with vehicle.status_move_forbidden and the detail {vehicle_id, from_status: not_ready, to_status}; retiring (R-VEH-95), reactivating (R-VEH-96) and pulling (R-VEH-97) are the only moves it makes. A vehicle id no car has, or a car the caller can't read (no read permission at its pool, or a company outside their list, R-VEH-73), is refused with vehicle.not_found. The function checks in this order, and raises the first refusal: not_found, status_move_forbidden (a move that isn't one of the three, or to the same status, R-VEH-98), status_forbidden (R-VEH-95 to R-VEH-97), plate_in_use (reactivating only, R-VEH-96); so a checker who sets a car ready gets status_move_forbidden, and a checker who pulls one gets status_forbidden. The moves into ready, maintenance, unchecked and returned belong to the work order, rental and BASTK functions (M4, M5, #577), which call app.set_vehicle_status (R-VEH-08) and keep its list of six permissions.
- Refusal: vehicle.status_move_forbidden, with vehicle_id, from_status and to_status; vehicle.not_found, with vehicle_id.
- Who: every app user; public.move_vehicle_status(vehicle_id, to_status, note) is the manual status function: public, and it calls app.set_vehicle_status, so each move writes its history row (R-VEH-07).
- Source: zuki, 2026-11-27 (#464); D47 (no ready without the leader's check), D91 (maintenance from the work order), D92 (unchecked and returned from the M5 functions); R-VEH-06, R-VEH-27.
R-VEH-95 · Retiring sets a car that isn't booked or rented to inactive, and needs vehicle:write at its home pool
Section titled “R-VEH-95 · Retiring sets a car that isn't booked or rented to inactive, and needs vehicle:write at its home pool”- Status: built
- Example: given an admin_fleet at PML, when they retire a PML car that is not_ready, ready, maintenance, returned or unchecked, then it becomes inactive and keeps its history (R-VEH-13); a booked or rented car is refused with vehicle.status_move_forbidden; a maintenance user at PML is refused with vehicle.status_forbidden; an admin_fleet limited to partner A, retiring a partner B car they can't read (R-VEH-73), gets vehicle.not_found (R-VEH-94).
- Refusal: vehicle.status_move_forbidden (from booked or rented); vehicle.status_forbidden (a car the caller reads, with no vehicle:write at its pool), with vehicle_id.
- Who: super_admin, admin and admin_fleet hold vehicle:write.
- Source: zuki, 2026-11-27 (#464); D39, D108; R-VEH-13.
R-VEH-96 · Reactivating sets an inactive car to not_ready, and needs vehicle:write at its home pool
Section titled “R-VEH-96 · Reactivating sets an inactive car to not_ready, and needs vehicle:write at its home pool”- Status: built
- Example: given an inactive PML car, when an admin_fleet at PML reactivates it, then it becomes not_ready; when its plate is now on another car that isn't inactive, it is refused with vehicle.plate_in_use (R-VEH-24); a maintenance user at PML is refused with vehicle.status_forbidden. A car is never reactivated straight to ready.
- Refusal: vehicle.plate_in_use, with vehicle_id and plate_number; vehicle.status_forbidden, with vehicle_id.
- Who: super_admin, admin and admin_fleet hold vehicle:write.
- Source: zuki, 2026-11-27 (#464); D39, D47, D108; R-VEH-24.
R-VEH-97 · Pulling sets a ready car to not_ready, and needs vehicle:write or maintenance:write at its home pool
Section titled “R-VEH-97 · Pulling sets a ready car to not_ready, and needs vehicle:write or maintenance:write at its home pool”- Status: built
- Example: given a ready PML car, when a maintenance user at PML pulls it, then it becomes not_ready; an admin_fleet at PML may too; a checker at PML is refused with vehicle.status_forbidden; a car the caller can't read is vehicle.not_found (R-VEH-94). A car that isn't ready can't be pulled (R-VEH-94).
- Refusal: vehicle.status_forbidden, with vehicle_id.
- Who: super_admin, admin, admin_fleet and maintenance hold vehicle:write or maintenance:write; a member limited to some rental companies only for those companies' cars (R-VEH-73).
- Source: zuki, 2026-11-27 (#464); D108.
R-VEH-98 · A manual move to the status the car already has is refused
Section titled “R-VEH-98 · A manual move to the status the car already has is refused”- Status: built
- Example: given an inactive car, when it is retired again, then it is refused with vehicle.status_move_forbidden and the detail {vehicle_id, from_status: inactive, to_status: inactive}, and no history row is written.
- Refusal: vehicle.status_move_forbidden, with vehicle_id, from_status and to_status.
- Who: every caller of the manual status function.
- Source: zuki, 2026-11-27 (#464).
R-VEH-99 · A manual status move takes an optional note, kept on its history row
Section titled “R-VEH-99 · A manual status move takes an optional note, kept on its history row”- Status: built
- Example: given a ready car, when it is pulled with the note "kaca retak", then its status history row from ready to not_ready holds that note; a move with no note is accepted and the row's note is empty. No reason code is asked.
- Refusal: none.
- Who: every caller of the manual status function.
- Source: zuki, 2026-11-27 (#464); D39 (no reason code); R-VEH-07.
R-VEH-100 · The detail sheet offers only the status moves the user may make on that car
Section titled “R-VEH-100 · The detail sheet offers only the status moves the user may make on that car”- Status: built
- Example: given a ready PML car, when a maintenance user at PML opens its sheet, then it offers pull only; an admin_fleet at PML is offered pull and retire; for an inactive car an admin_fleet is offered reactivate only; for a booked or rented car no status move is offered; a viewer is offered none. The sheet offers no move into ready, maintenance, booked, rented, returned or unchecked.
- Refusal: none: a move not offered isn't shown; the function still refuses it (R-VEH-94 to R-VEH-98).
- Who: vehicle:read holders at the car's pool, through the vehicle sheet.
- Source: zuki, 2026-11-27 (#464); R-VEH-94 to R-VEH-97, R-VEH-42.
R-VEH-101 · The detail sheet offers a plate change only to a vehicle:write holder at the car's home pool, for a car that isn't inactive
Section titled “R-VEH-101 · The detail sheet offers a plate change only to a vehicle:write holder at the car's home pool, for a car that isn't inactive”- Status: built
- Example: given a not_ready PML car, when an admin_fleet at PML opens its sheet, then it offers the plate change; a maintenance user or a viewer isn't offered it; for an inactive car no one is offered it (R-VEH-92).
- Refusal: none: a change not offered isn't shown; change_plate still refuses it (R-VEH-86, R-VEH-92).
- Who: vehicle:read holders at the car's pool, through the vehicle sheet; super_admin, admin and admin_fleet hold vehicle:write.
- Source: zuki, 2026-11-27 (#464); R-VEH-12, R-VEH-86.
R-VEH-102 · After a plate change or a status move on the sheet, the sheet shows the new plate or status and both histories with the new row
Section titled “R-VEH-102 · After a plate change or a status move on the sheet, the sheet shows the new plate or status and both histories with the new row”- Status: built
- Example: given a ready car with plate B1234XYZ, when an admin_fleet changes its plate to B5678ABC on the sheet, then the sheet shows B5678ABC and the plate history shows B1234XYZ first (R-VEH-42); when they then pull it, the sheet shows not_ready and the status history shows the ready to not_ready row first, without reopening the sheet.
- Refusal: none.
- Who: the users R-VEH-100 and R-VEH-101 offer an action to.
- Source: zuki, 2026-11-27 (#464); R-VEH-42.
R-VEH-103 · A refused plate change or status move shows its error key's message on the sheet, and the car is unchanged
Section titled “R-VEH-103 · A refused plate change or status move shows its error key's message on the sheet, and the car is unchanged”- Status: built
- Example: given an admin_fleet changing a car's plate on the sheet to a plate another car that isn't inactive holds, when they save, then the sheet shows vehicle.plate_in_use's message with the plate, and the car's plate and both histories are as before; the same holds for vehicle.plate_unchanged, vehicle.field_required, vehicle.status_move_forbidden and vehicle.status_forbidden.
- Refusal: none: the keys come from R-VEH-86 to R-VEH-98.
- Who: the users R-VEH-100 and R-VEH-101 offer an action to.
- Source: zuki, 2026-11-27 (#464); D10.