REP · Repossession
A repossession starts as a repo request on a rental, and is carried out through a repo work order (D71, General Flow REP-01 to REP-08, VEH-30 to VEH-32). The request is the list the Repo Leader works from: one per rental, opened when Collection gives up on the driver bringing the car back (COL-12) or when they have missed too many weekly checkpoints (VEH-32). Opening it sets the rental to repossessing (D67, R-RNT-25); the driver's stage changes only when the car is back (D66).
This page holds the request's rules, which the data phase needs before its rentals step (data phase row 0e, #267). The repo work order, its units and its PICs are built as tables in the data phase, ahead of M5 (data phase row 0i, #357; D75), and their rules start at R-REP-15. Their functions, the two jobs, the job that applies the deadline, failed attempts, the checkpoint count and the repo_leader role are M5's, written on #270. Code REP.
Not yet a rule
Section titled “Not yet a rule”-
Who opens a request in the app, and with which permission. COL-12 is Collection's call, which finance, admin and admin_fleet make until the collection role exists (D63); a "Tidak checkpoint" request is opened by M5's daily job. Settled with M5's pack on #270.
-
Which flows end a repossessing rental other than by collecting the car, such as the driver bringing it back themselves, or Collection withdrawing the request after the driver pays. R-REP-08 says what happens to the request when one does; which ones exist is asked on #267.
-
The work order's functions and jobs (M5, #270, #271, #272). Assigning requests to a work order, closing a unit, closing a work order, and the pg_cron job that closes one when its time passes and fails the units still pending (D36); the second job that counts missed checkpoints; the third-failure flag to Collection; repo_leader and repo:assign; the views and pages. R-REP-23 to R-REP-25 give the shape of what these functions write, not how they decide it.
-
The job that applies the deadline (M5) closes a work order when its deadline passes and fails the units still pending (D36); R-REP-29 gives the deadline.
-
Who may mark a unit failed, and when. Only the job at the deadline, or also a PIC before it. The tables allow both: a failed unit may carry the PIC who closed it, or none (R-REP-24). M5's function decides.
-
Who may be a PIC. At the tables, any profile (R-REP-25). That a PIC belongs to the Repo Team and holds repo:read at the pool, that a work order has at least one PIC, that the PICs are fixed at assignment, and that assigned_by holds repo:assign are rules of M5's functions.
-
That every PIC may close any unit of the work order. Seeing every unit follows from repo:read at the pool (R-REP-26); closing any one is the closing function's (M5).
-
How a unit and its request move together. A request is
assignedwhile its unit ispending,collectedwhen the unit is collected, andopenagain when it fails (R-REP-01, R-REP-09). Written with the functions in M5; the tables hold no trigger for it. -
Requests imported from a file (CSV). Stays after cutover (#269, 2026-11-02); no rule yet.
-
How a by-hand reason sits beside R-REP-03's enum. R-REP-03 lists three reasons; a reason from master data (R-REP-28) is not one of them. Whether the request keeps the enum for the system's reasons and adds a master-data reference, or the enum goes, is for BE to propose in #402.
-
The repo fine's amount. The organization's repo_fine setting (300000 at the start) exists; whether a request or a work order can carry another amount is not said (R-REP-30).
R-REP-01 · A repo request's status is open, assigned, collected or cancelled
Section titled “R-REP-01 · A repo request's status is open, assigned, collected or cancelled”- Status: built
- Example: given a request just opened, then it is
open; when the Repo Leader puts it in a repo work order it isassigned, and if that work order's unit fails (REP-07) it isopenagain (REP-08 → REP-01); when the car is recovered it iscollected(R-REP-09); when its rental leavesrepossessingsome other way it iscancelled(R-REP-08).openandassignedare unfinished;collectedandcancelledare final. - Refusal: none.
- Who: every repo request.
- Source: D71; General Flow REP-01, REP-07, REP-08; the CTO's list on #267. When a request becomes
assignedand goes back toopenis written with the work orders on #270.
R-REP-02 · App users can't add, change or delete a repo request directly; only database functions can
Section titled “R-REP-02 · App users can't add, change or delete a repo request directly; only database functions can”- Status: built
- Example: given a member who reads repo requests, when they insert one, set an
openone tocancelledor delete it, then the insert is refused, and the update and the delete change nothing: the request staysopen. Its status moves only through M5's functions, and only the migration writes requests before M5. - Refusal: none: insufficient_privilege (42501) on insert; no effect on update or delete.
- Who: every app user (authenticated). Database functions, jobs and the migration may.
- Source: D71 (each status changed only by a function); D3; as R-RNT-08 does for rentals.
R-REP-03 · A repo request's reason is unpaid, missed_checkpoint or from_v1
Section titled “R-REP-03 · A repo request's reason is unpaid, missed_checkpoint or from_v1”- Status: built
- Example: given a driver Collection sends to repo because they don't pay (COL-12, "Tidak bayar"), then their request's reason is
unpaid; given a driver who missed the weekly checkpoint for cp_skip_weeks_limit weeks in a row (VEH-32, "Tidak checkpoint"), then it ismissed_checkpoint; a request the migration opens without a reason v1 recorded isfrom_v1(R-REP-11). The first two read "Tidak bayar" and "Tidak checkpoint", as in the flow (D29). - Refusal: none: a value outside the list is refused by the enum.
- Who: every repo request.
- Source: D71 (two reasons, and a reason saying a migrated request came from v1); General Flow COL-12, VEH-32.
R-REP-04 · Only the migration opens a repo request with reason from_v1
Section titled “R-REP-04 · Only the migration opens a repo request with reason from_v1”- Status: planned
- Example: given an admin opening a request in the app, when they give the reason
from_v1, then it is refused; the data phase's rentals step opens requests withfrom_v1(R-REP-11). - Refusal: repo_request.reason_from_v1
- Who: every app user and job. The migration may.
- Source: D71 (from v1 marks a migrated request).
R-REP-05 · A rental has at most one unfinished repo request
Section titled “R-REP-05 · A rental has at most one unfinished repo request”- Status: built
- Example: given a rental whose request is
openorassigned, when a second request is opened for it, for any reason, then it is refused; anassignedrequest whose unit fails goes back toopenand is still the only one. Once the first iscollectedorcancelled, a new one may open if the rental can be repossessed again (R-RNT-25). - Refusal: repo_request.already_open, on opening a second request or on reopening one while another is unfinished. A unique index on unfinished requests backs it when two are opened at once: unique_violation (23505).
- Who: every writer, the migration included.
- Source: D71 (a rental has at most one open request); D10.
R-REP-06 · A repo request opens in the same call that sets its rental to repossessing
Section titled “R-REP-06 · A repo request opens in the same call that sets its rental to repossessing”- Status: planned
- Example: given an active rental whose driver Collection sends to repo (COL-12), when the request is opened (REP-01), then in one transaction the request is
openwith reasonunpaid, and the rental isrepossessingwith end_reasonrepossessed(R-RNT-25). Given apausedrental, the call is refused and no request is left behind. - Refusal: R-RNT-25's, for a rental that is neither active nor returning.
- Who: the function that opens a request (M5), and the migration (R-REP-10).
- Source: D71 (opening a request sets the rental to
repossessing); D67; General Flow REP-01.
R-REP-07 · Opening a repo request changes no driver stage
Section titled “R-REP-07 · Opening a repo request changes no driver stage”- Status: retired
- Example: none. The same statement is R-DRV-31, which merged first (#256); its test cites R-DRV-31.
- Refusal: none.
- Who: none.
- Source: D66; retired for R-DRV-31 on 2026-10-22, the CTO on #274.
R-REP-08 · A rental that leaves repossessing other than by its car's recovery cancels its unfinished repo request in the same call
Section titled “R-REP-08 · A rental that leaves repossessing other than by its car's recovery cancels its unfinished repo request in the same call”- Status: planned
- Example: given a rental
repossessingwith anopenrequest, when a flow takes it out ofrepossessingwithout the repo team recovering the car (R-REP-09), then in that transaction the request becomescancelled, with the time and who did it. Arepossessingrental never ends up with no unfinished request while its car is still out. - Refusal: none.
- Who: every function that changes a
repossessingrental's status (M5). - Source: D71; the CTO's list on #267 (what closes a request no longer needed). Which flows do this is under Not yet a rule.
R-REP-09 · A repo request is collected in the same call that records its car as recovered
Section titled “R-REP-09 · A repo request is collected in the same call that records its car as recovered”- Status: planned
- Example: given a request
assignedin a work order, when a PIC records the car collected on 2026-10-21 (REP-05, REP-06), then the request iscollectedand its rental's billing_ends_on is 2026-10-21 (R-RNT-28). The rental staysrepossessinguntil the car reaches the pool, thenreturned(R-RNT-26). - Refusal: none.
- Who: the function that closes a work order's unit (M5, #270).
- Source: D71 (a collected unit is a car recovered: rent stops that day); D67; General Flow REP-05, REP-06, VEH-14.
R-REP-10 · The migration opens one open repo request for every v1 rental it maps to repossessing
Section titled “R-REP-10 · The migration opens one open repo request for every v1 rental it maps to repossessing”- Status: planned
- Example: given 3 v1 rentals that the rentals step maps to
repossessing, when it runs, then 3 requests areopen, one per rental, so the Repo Leader's list is complete on the first Monday. Note: on the copy of 2026-10-29 no v1 rental maps torepossessing(zuki on #301), so the step opens 0 requests there; R-REP-12 still checks every night. The 17 Listed rows with a Denda Repo fine map by their v1 status (R-RNT-35), and the fines load in the money step as repo_fine charges. v1 has no repo work orders, so no request isassigned, and none migrate. - Refusal: none.
- Who: the data phase's rentals step (row 5).
- Source: D71 (migrated repossessions get a request; zuki in a CTO session, 2026-10-22); D73 (BE-DP-16 found none in progress); zuki on #301 (2026-10-27: "1 accepted", no v1 rental maps to
repossessing).
R-REP-11 · A migrated repo request takes v1's reason when v1 records one, and from_v1 otherwise
Section titled “R-REP-11 · A migrated repo request takes v1's reason when v1 records one, and from_v1 otherwise”- Status: planned
- Example: given a v1 rental put to repo for not paying, when it migrates, then its request's reason is
unpaid; given one where v1 records no reason, then it isfrom_v1. v1's reason values are mapped like any other value (R-MIG-02), so one nobody mapped stops the run instead of turning intofrom_v1. - Refusal: none.
- Who: the data phase's rentals step (row 5).
- Source: D71; D18.
R-REP-12 · The reconcile lists every repossessing rental without exactly one open repo request, and every open request whose rental isn't repossessing
Section titled “R-REP-12 · The reconcile lists every repossessing rental without exactly one open repo request, and every open request whose rental isn't repossessing”- Status: built
- Example: given a migrated rental
repossessingwith no request, or with two, when the reconcile runs, then it lists that rental; given an open request on a rental mapped toended, then it lists the request. A clean night lists neither. - Refusal: none.
- Who: the reconcile, as a check the rentals step adds (R-MIG-05).
- Source: D71 (its reconcile checks that every
repossessingrental has exactly one open request); D18; #268.
R-REP-13 · repo:read at a rental's pool lets a user read its repo requests
Section titled “R-REP-13 · repo:read at a rental's pool lets a user read its repo requests”- Status: built
- Example: given a member of the Repo Team at PML, when they read repo requests, then PML's come back and SBY's don't; given a member who reads the rental but has no repo:read, then none come back. A member limited to some rental companies reads only the requests on their cars, as for rentals and contracts (R-ACC-44).
- Refusal: none: hidden without it.
- Who: repo, admin and super_admin hold repo:read (R-ACC-66); repo_leader joins them in M5 (#270).
- Source: D63, D71; the CTO's list on #267; the partner filter as BE proposed on #267.
R-REP-14 · A repo request has a closing time exactly when it is collected or cancelled
Section titled “R-REP-14 · A repo request has a closing time exactly when it is collected or cancelled”- Status: built
- Example: given an
openrequest, when a closing time is set on it, then it is refused; given one set tocollectedwith no closing time, then it is refused too. Anassignedrequest that goes back toopenhas none. A closing time is never before the request opened. - Refusal: none: check_violation (23514).
- Who: every writer.
- Source: D71; proposed by the Backend Engineer on #267.
R-REP-15 · A repo work order's status is active or closed
Section titled “R-REP-15 · A repo work order's status is active or closed”- Status: planned
- Example: given a work order just assigned, then it is
active; when every unit is done or its time passes (M5), it isclosed.closedis final. There is no cancelled work order. The wordopenis the request's and is not used here. - Refusal: none: a value outside the list is refused by the enum.
- Who: every repo work order.
- Source: D71; the CTO on #357.
R-REP-16 · A repo work order records its pool, who assigned it and when
Section titled “R-REP-16 · A repo work order records its pool, who assigned it and when”- Status: planned
- Example: given the Repo Leader at PML who assigns a work order on 2026-11-02 at 08:00, then the work order's pool is PML, its assigned_by is that member and its assigned_at is 2026-11-02 08:00. None of the three is empty. Its deadline is R-REP-29's.
- Refusal: none: not_null_violation (23502).
- Who: every writer.
- Source: D71 (a work order runs from its assignment); one pool per work order, zuki on #357 (2026-10-30).
R-REP-17 · A repo work order has a closing time exactly when it is closed, and never before it was assigned
Section titled “R-REP-17 · A repo work order has a closing time exactly when it is closed, and never before it was assigned”- Status: planned
- Example: given an
activework order, when a closing time is set on it, then it is refused; given one set toclosedwith no closing time, then it is refused too. A closing time earlier than assigned_at is refused. - Refusal: none: check_violation (23514).
- Who: every writer.
- Source: D71 (closes when every unit is done or the time passes); as R-REP-14 does for requests.
R-REP-18 · A repo work order's collection rate is its collected units over its units, computed and never stored
Section titled “R-REP-18 · A repo work order's collection rate is its collected units over its units, computed and never stored”- Status: planned
- Example: given a work order of 5 units, 3
collected, 1failedand 1pending, then its rate is 3 of 5, 60%, and it changes when the pending unit is closed. No column holds it. - Refusal: none.
- Who: every reader of the rate.
- Source: D71; D32.
R-REP-19 · Every unit of a repo work order is a request on a rental at the work order's pool
Section titled “R-REP-19 · Every unit of a repo work order is a request on a rental at the work order's pool”- Status: planned
- Example: given a work order at PML, when a unit is added for a request whose rental is at SBY, then it is refused; a request on a PML rental is accepted.
- Refusal: repo_work_order_unit.pool_mismatch
- Who: every writer.
- Source: one pool per work order, zuki on #357 (2026-10-30); D71; D10.
R-REP-20 · A unit's status is pending, collected or failed
Section titled “R-REP-20 · A unit's status is pending, collected or failed”- Status: planned
- Example: given a unit just added, then it is
pending; when its car is recovered it iscollected(R-REP-09); when it is not recovered by the deadline it isfailed(REP-07).collectedandfailedare final. A failed unit has no reason. - Refusal: none: a value outside the list is refused by the enum.
- Who: every repo work order unit.
- Source: D71; General Flow REP-05 to REP-07; the CTO on #357.
R-REP-21 · A repo request has at most one pending unit
Section titled “R-REP-21 · A repo request has at most one pending unit”- Status: planned
- Example: given a request with a
pendingunit in one work order, when it is added as a unit to a second work order, then it is refused; once the first unit isfailed, it may be added to another. So a request is in at most one unfinished work order. - Refusal: repo_work_order_unit.already_pending. A unique index on pending units backs it when two are added at once: unique_violation (23505).
- Who: every writer.
- Source: D71 (each request in at most one unfinished work order; a failed one goes back to the list); D10.
R-REP-22 · A repo request is a unit of the same work order at most once
Section titled “R-REP-22 · A repo request is a unit of the same work order at most once”- Status: planned
- Example: given a work order with a unit for request A (even a
failedone), when A is added to it again, then it is refused. A later work order may take A again (R-REP-21). - Refusal: none: unique_violation (23505).
- Who: every writer.
- Source: D71 (one unit per repo request).
R-REP-23 · A unit has a closing time exactly when it is not pending
Section titled “R-REP-23 · A unit has a closing time exactly when it is not pending”- Status: planned
- Example: given a
pendingunit, when a closing time is set on it, then it is refused; given one set tocollectedorfailedwith no closing time, then it is refused too. A closing time is never before the work order's assigned_at. - Refusal: none: check_violation (23514).
- Who: every writer.
- Source: D71; as R-REP-14 does for requests.
R-REP-24 · A unit records who closed it: nobody while pending, a PIC when collected, a PIC or nobody when failed
Section titled “R-REP-24 · A unit records who closed it: nobody while pending, a PIC when collected, a PIC or nobody when failed”- Status: planned
- Example: given a
pendingunit, when a closed-by member is set, then it is refused; given acollectedunit with none, then it is refused. Afailedunit closed by the job at the deadline has none; one a PIC failed has that PIC. - Refusal: none: check_violation (23514).
- Who: every writer.
- Source: D71 (who closed each unit is recorded); the CTO on #357.
R-REP-25 · A work order's PIC is a member, once per work order, and the member who closes a unit is a PIC of its work order
Section titled “R-REP-25 · A work order's PIC is a member, once per work order, and the member who closes a unit is a PIC of its work order”- Status: planned
- Example: given a work order with Rina and Dedi as PICs, when Rina is added again, then it is refused; when a unit of that work order is closed by Budi, who is not its PIC, then it is refused; closed by Dedi, it is accepted.
- Refusal: repo_work_order_unit.closer_not_pic; none for a repeated PIC: unique_violation (23505).
- Who: every writer.
- Source: D71 (one or more PICs; every PIC may close any unit); the CTO on #357. Repo Team membership is M5's (Not yet a rule).
R-REP-26 · repo:read at a work order's pool lets a user read its work orders, units and PICs
Section titled “R-REP-26 · repo:read at a work order's pool lets a user read its work orders, units and PICs”- Status: planned
- Example: given a member of the Repo Team at PML, when they read work orders, then PML's come back and SBY's don't, with their units and PICs, so every PIC sees every unit; given a member with no repo:read, then none come back. A member limited to some rental companies sees a work order and its PICs only if at least one of its units' rentals is one of their rental companies', and sees only those units (R-ACC-44, as R-REP-13).
- Refusal: none: hidden without it.
- Who: repo, admin and super_admin hold repo:read (R-ACC-66); repo_leader joins them in M5 (#270).
- Source: D63, D71; R-REP-13; the CTO on #357.
R-REP-27 · App users can't add, change or delete a work order, a unit or a PIC directly; only database functions can
Section titled “R-REP-27 · App users can't add, change or delete a work order, a unit or a PIC directly; only database functions can”- Status: planned
- Example: given a member who reads work orders, when they insert one, set an
activeone toclosed, or delete a unit, then the insert is refused, and the update and the delete change nothing. They move only through M5's functions; nothing writes them before M5 (v1 has no repo work orders, so none migrate). - Refusal: none: insufficient_privilege (42501) on insert; no effect on update or delete.
- Who: every app user (authenticated). Database functions and jobs may.
- Source: D71 (each status changed only by a function); D3; as R-REP-02.
R-REP-28 · A repo request raised by hand takes its reason from master data, which is not limited to "Tidak bayar" and "Tidak checkpoint"
Section titled “R-REP-28 · A repo request raised by hand takes its reason from master data, which is not limited to "Tidak bayar" and "Tidak checkpoint"”- Status: planned
- Example: given a Repo Leader or a Collection user who raises a request on a rental by hand, when they pick the reason "Penyewa hilang" from the list, then the request is saved with it; a reason that is not a master-data row is refused. "Tidak bayar" and "Tidak checkpoint" stay the reasons the Collection call and the daily job give (R-REP-03). The first reasons are the two of the canvas, then the ones the Business Team adds with master_data:write.
- Refusal: a key named by BE in M5 (D10).
- Who: whoever opens a request by hand; who may is settled with M5's pack (#270).
- Source: zuki on #269 (2026-11-02: "the reasons are various and not limited to those two; will be in master data"); D29; D71.
R-REP-29 · A repo work order has a deadline of 1 to 72 hours after its assignment, which the Repo Leader picks and which is 24 hours when they pick none
Section titled “R-REP-29 · A repo work order has a deadline of 1 to 72 hours after its assignment, which the Repo Leader picks and which is 24 hours when they pick none”- Status: planned
- Example: given the Repo Leader who assigns a work order at 08:00 on 2026-11-02 and picks no deadline, then it ends at 08:00 on 2026-11-03; given 6 hours, then at 14:00 the same day; 0 hours and 73 hours are refused, and 72 is accepted. A deadline can't be changed to run past 72 hours after the assignment. A column holds the deadline (hours or the time, for BE to choose); BE adds it in #402, which reverses #357's "no deadline column".
- Refusal: none: check_violation (23514) on a deadline outside 1 to 72 hours.
- Who: the Repo Leader (repo:assign, M5) and every writer of the column.
- Source: zuki on #269 (2026-11-02: a soft limit of at least 1 hour and at most 3 days); D71 (24 hours from the assignment); D36; #357. A change to R-REP-15 to R-REP-27's tables.
R-REP-30 · The repo fine is charged once for a repo request, when its BASTK is submitted, never when the request opens or the unit is collected
Section titled “R-REP-30 · The repo fine is charged once for a repo request, when its BASTK is submitted, never when the request opens or the unit is collected”- Status: planned
- Example: given a repo request opened on 2026-10-20, whose unit is collected on 2026-10-21, when the checker submits the return inspection's BASTK on 2026-10-23 (R-INSP-13), then one repo_fine charge is made on the driver in the same call; opening the request on the 20th and collecting on the 21st made none; a second BASTK for the same request makes none. The amount is the organization's repo_fine setting.
- Refusal: none.
- Who: the BASTK function for repossessions (M5, M6).
- Source: zuki on #269 and on #236 (2026-11-02: charged when the BASTK is submitted, the Inspection & Handover module in v1); this is not the CTO's proposal on #236 (the call that marks the unit collected). D71 (opening a request charges nothing). v1's 363 Denda Repo bills load as repo_fine charges as they are (#306).
R-REP-31 · A car that has missed the weekly checkpoint for cp_skip_weeks_limit weeks in a row gets a repo request with reason missed_checkpoint
Section titled “R-REP-31 · A car that has missed the weekly checkpoint for cp_skip_weeks_limit weeks in a row gets a repo request with reason missed_checkpoint”- Status: planned
- Example: given cp_skip_weeks_limit 3 and a rented car with no checkpoint in three due weeks in a row (R-INSP-06), when the daily job runs after the third week, then a request with reason missed_checkpoint is opened on its rental and the rental becomes repossessing (R-REP-06); after two missed weeks it is not. The first two missed weeks stop nothing at the gate (R-GATE-11).
- Refusal: none.
- Who: the daily job (M5).
- Source: D71 (VEH-32); zuki on #236 (2026-11-02: repo is triggered after 3 skips); R-SET-11.