BE-DP-30 · The values the drivers step maps
ID BE-DP-30 · Level L0 · Pack Row 5 · The domain steps · Run order row 5, before the drivers step's pull request · Issue #281
The drivers step maps v1's statuses and sources through value_map, with no default (R-MIG-02). migration.unmapped_values() reads every value field on every night, so a value with no row would stop BE-DP-26's and BE-DP-29's nights too. Its rows must therefore ship complete in its pull request. This step prints every value the step will meet, so the Backend Engineer writes all of them, and the counts the step's checks will be compared with.
tools/migration/v1-copy/drivers-values.sql prints:
- 1 · Lead status × latest onboarding status × latest bc status: how many leads have each combination. This decides each driver's stage (D66, D73, R-DRV-36, R-DRV-37, R-DRV-39, R-DRV-43).
- 2 · bc statuses: rows of each status with the status before it (
prev_status, kept on a rejection), and how many have an approval time or a reject reason; then how many leads each one is the latest of. Together they decide each background check's kind and status: a video call can reject too (D54). - 3 · Lead sources and queue statuses:
leads.source,antrian.sourceandantrian.status, with their counts (R-DRV-04, R-QUE-09). - 4 · The repossession groups: lead status, return reason, onboarding status and a Denda Repo fine, for every lead with a return reason or a fine (D73).
- 5 · What the step would refuse or list: NIKs that aren't 16 digits or are on two leads (R-DRV-01, R-DRV-41), phones not in v2's form, leads with no name or no registration date, dates that aren't dates, queue numbers given twice on one day, and keys that name no lead.
It prints statuses, sources, reasons and counts, never a name, a NIK or a phone (D15). It reads the copy and changes nothing in it.
Before
Section titled “Before”docker ps --filter name=v1copylists the copy as Up.- You are at the root of your clone, on main, after
git pull.
1 · The values
Section titled “1 · The values”docker exec -i v1copy psql -qX -U postgres -d postgres < tools/migration/v1-copy/drivers-values.sqlExpect
Section titled “Expect”Six tables, in a few seconds, headed 1 to 5 (2 has two).
- 1: its
leadsadd up to 3,407, as BE-DP-20 counted them. - 2: four bc statuses (Virtual, Approved, Rejected and Pengecekan), 2,974 rows in all, then the latest of each lead.
- 3: the sources and the six queue statuses BE-DP-20 found (Masuk Lead, Ditolak, Dipanggil, Menunggu, Diproses, Terlewat).
- 4: the groups D73 counted on 2026-10-22, give or take what v1 changed since.
- 5: one line per kind of problem, with its count,
0where there is none.
Read table 3's sources before posting. Each should be a channel, such as TikTok or Driver TOP. If one reads like a person's name or a phone number, delete that line and say you did.
Then post the tables on #281.
If it fails
Section titled “If it fails”ERROR: relation "public.onboarding" does not exist, or another table: the copy isn't the one BE-DP-20 read. Post the line on #281.- Anything else: post the
ERRORline on #281.
Nothing to undo: it reads only, and its tables are temporary.
Log each run as a comment on #281: date · who · result, with the tables.