Skip to main content

Phase 3.2 — Implementation Plan

This page splits Phase 3.2 into issues for jodapp-api and jodapp-web, in build order.

Endpoints that Phase 3.2 adds or changes​

Phase 3.2 adds 10 endpoints and changes 4 that exist today, all in jodapp-api.

EndpointNew or changedWhat it does in Phase 3.2Plan item
GET /team/careers/job_posting_pricesNewLists every Careers::JobPostingPrice for SalesAPI-2
POST /team/careers/job_posting_pricesNewSales creates a Careers::JobPostingPriceAPI-2
GET /team/careers/job_posting_prices/:idNewShows one Careers::JobPostingPriceAPI-2
PATCH /team/careers/job_posting_prices/:idNewSales edits name, duration_days and unit_costAPI-2
PATCH /team/careers/job_posting_prices/:id/activateNewSales sets is_active: trueAPI-2
PATCH /team/careers/job_posting_prices/:id/deactivateNewSales sets is_active: falseAPI-2
GET /team/careers/jobs/*slugNewShows one Careers::Job with its Careers::JobPosting rows, read-onlyAPI-9
GET /team/careers/job_postings/:idNewShows one Careers::JobPosting and the slug of its Careers::Job, for the ledger linkAPI-10
GET /employers/careers/job_posting_pricesNewLists the active prices for the job form and the renew dialogAPI-2
POST /employers/careers/jobsChangedTakes careers_job_posting_price_uuid and a required idempotency_key, and pays with consume_nowAPI-4
GET /employers/careers/jobsChangedAdds posting_ends_at and job_postings_count to each Careers::JobAPI-4
GET /employers/careers/jobs/*slugChangedAdds posting_ends_at and job_postings_countAPI-4
PATCH /employers/careers/jobs/*slugChangedChecks Careers::JobPosting.ends_at before open or hidden, blocks every company change, and refuses draftAPI-5, API-11
POST /employers/careers/jobs/*slug/renewNewBuys one more Careers::JobPosting with careers_job_posting_price_uuid and job_postings_count, and refuses an existing Careers::JobAPI-6
  • GET /employers/billing/entitlement-balances exists, and the job form reads the balance from it with no change.
  • No Billing endpoint changes.

Where the code goes​

Phase 3 is not on main yet, and Phase 3.2 has its own feature branch in each repo.

RepoBase branch for Phase 3.2 PRsIt starts from
jodapp-apifeature/backend-billing-phase-3-2feature/backend-billing-phase-3
jodapp-webfeature/frontend-billing-phase-3-2feature/frontend-billing-phase-3

Phase 3.2 uses Billing::SpendService and Billing::SpendValidator, which exist only on the Phase 3 api branch.

  • So each Phase 3.2 branch starts from the Phase 3 branch of its repo.
  • Billing fixes still merge into feature/backend-billing-phase-3.
  • A sync merges main into the Phase 3 branch, then the Phase 3 branch into the Phase 3.2 branch.
  • Phase 3.2 ships to main with the rest of Phase 3.
  • jodapp-api#2301 is merged: a second consume_now for one deliverable raises, before the balance check.
  • consume_now already raises for units of 0 or less.
  • API-3 starts after jodapp-api#2305 merges, because it adds the last rule of consume_now.
    • The rule: a spend counts only the lots that have not expired.

Build order​

Legend: lavender = jodapp-api, grey = jodapp-web.

API-4 and WEB-2 must ship together.

  • Otherwise the job form sends no careers_job_posting_price_uuid, and every post fails.

API-5, API-6, API-7 and WEB-3 must ship together.

  • Otherwise Careers::Jobs::CloseJob closes an ended Careers::Job, and the employer has no way to renew it.

API-11 and WEB-6 must ship together.

  • Otherwise the job edit form offers "Draft", and the update fails with a 422.

API-12 and API-13 run in the same deploy as Billing Phase 3.2.

  • Otherwise no price is active, or most companies have 0 credits, and no company can post its first job.

WEB-4 ships after WEB-5, API-9 and API-10.

  • Otherwise the ledger text links to a page that does not exist.

jodapp-api issues​

API-1 — The tables careers_job_posting_prices and careers_job_postings​

  • Add both tables to the file jodapp-api/docs/db/careers.dbml, as the Design Plan shows.
    • jod-app/jodapp-api#2315 plans both tables in the DBML, with each new table marked PLANNED:.
    • Its tables must match the block on the Design Plan, with no free row, with idempotency_key and with org_company_id.
    • careers_job_posting_prices.instrument is a string with the default 'placement', and it has no foreign key.
  • Name Careers::JobPosting in the note of billing_ledger_entries.source_type in the file jodapp-api/docs/db/billing.dbml.
  • Write the migrations with the tag ActiveRecord::Migration[8.1].
  • Each new table has uuid string [not null, unique], with a unique index.
  • Add the models Careers::JobPostingPrice and Careers::JobPosting.
    • Careers::JobPostingPrice has the scope active.
    • Careers::JobPostingPrice has the Rails enum instrument, with only placement, and prefix: :instrument.
    • Careers::JobPosting has the constant BILLING_LEDGER_ENTRY_DESCRIPTIONS, with the keys :post and :renew.
  • Add a foreign key on each ref: column, with t.references and the default delete rule:
    • careers_job_postings.careers_job_id, careers_job_posting_price_id and org_company_id.
  • Add the unique index on careers_job_postings (careers_job_id, starts_at).
  • Add the index on careers_job_postings (careers_job_id, ends_at), to find the latest Careers::JobPosting.ends_at of a Careers::Job.
  • Add the unique index on careers_job_postings (org_company_id, idempotency_key), and idempotency_key is null for a renew.
    • The index is unique per company, because the client makes the key.
  • Add to Careers::Job the association has_many :job_postings, with class_name: 'Careers::JobPosting' and foreign_key: :careers_job_id.
  • Add the CHECK constraints:
    • careers_job_posting_prices.duration_days > 0 and careers_job_posting_prices.unit_cost > 0;
    • careers_job_postings.ends_at > careers_job_postings.starts_at;
    • careers_job_postings.unit_cost_snapshot > 0.
  • careers_job_postings.careers_job_posting_price_id is NOT NULL.
  • Run bin/dbml_check, and check that it reports no difference for the new tables.

API-2 — Careers::JobPostingPrice endpoints​

  • The managers, validators and serializers live in app/domains/careers/job_posting_prices/.
  • On create, the database sets instrument to its default, 'placement', and Sales does not edit it.
  • Team endpoints, built like Team::Ads::PlacementPricesController:
    • GET /team/careers/job_posting_prices;
    • POST /team/careers/job_posting_prices;
    • GET, PATCH /team/careers/job_posting_prices/:id;
    • PATCH /team/careers/job_posting_prices/:id/activate and /deactivate.
  • Employer endpoint GET /employers/careers/job_posting_prices lists the active prices, ordered by duration_days.
  • Every employer response names a price by its uuid, never its id, because employer endpoints are public.
  • The Team endpoints name a price by its id, because only Jod staff use them.
  • A Team price response holds id, name, duration_days, unit_cost, instrument and is_active.
    • It follows Ads::PlacementPriceSerializer, with unit_cost in place of credit_cost and instrument added, and it has no uuid.
  • Add the routes to the Bruno collection.

API-3 — Careers::JobPostings::Shared::CreateService​

  • Inputs: careers_job:, careers_job_posting_price:, created_by:, description_key: and idempotency_key:.
    • description_key: is :post or :renew.
    • idempotency_key: is the key of the job form for a post, and nil for a renew.
  • Lock the careers_jobs row.
  • Set starts_at to the latest Careers::JobPosting.ends_at of the Careers::Job when that is in the future, and to Time.current otherwise.
  • Set ends_at to starts_at + duration_days.days.
  • Create the Careers::JobPosting with these fields:
    • org_company_id, copied from careers_job.org_company_id;
    • created_by_type and created_by_id;
    • duration_days_snapshot and unit_cost_snapshot;
    • idempotency_key;
    • starts_at and ends_at.
  • Call Billing::SpendService.consume_now as the Design Plan shows:
    • org_company: careers_job.org_company and instrument: careers_job_posting_price.instrument.to_sym;
    • units: unit_cost_snapshot and deliverable: the new Careers::JobPosting;
    • description: from BILLING_LEDGER_ENTRY_DESCRIPTIONS.fetch(description_key), with the job title and the price name.
  • The caller owns the transaction, and consume_now raises when none is open.
  • No code creates a Careers::JobPosting row without this service.
  • Careers names no Billing class except Billing::SpendService and Billing::SpendValidator, and rescues no Billing::Error.
  • Tests cover these cases:
    • a new Careers::Job gets a period from now;
    • a running Careers::Job gets a period from its latest Careers::JobPosting.ends_at;
    • an ended Careers::Job gets a period from now;
    • two calls for one Careers::Job at the same moment run one after the other, because of the row lock;
    • the ledger entry has the text "Job post: <title>, <price name>" for a post and "Job renew: ..." for a renew;
    • too few credits raises Billing::InsufficientCreditsError, and no Careers::JobPosting row is left.

API-4 — Posting a job pays with credits​

  • EmployersCreateRequest accepts careers_job_posting_price_uuid, and requires idempotency_key.
    • A post with no key fails with a 422.
    • The manager finds the price by uuid once, and uses its id after that.
  • EmployersCreateManager looks for the idempotency_key before it runs the validator.
    • It reads careers_job_postings by (org_company_id, idempotency_key), so it reads only the rows of the same company.
    • When it finds a row, the manager answers with the Careers::Job of that row, and writes nothing.
    • So a repeated post gets the first Careers::Job back, even when the credits are now too low.
  • Two posts with one key at the same moment both pass that check.
    • The unique index on careers_job_postings (org_company_id, idempotency_key) stops the second insert, and its transaction rolls back.
    • The manager rescues ActiveRecord::RecordNotUnique outside the transaction, because PostgreSQL refuses every query after a failed one inside it.
    • It rescues only the error of that index, and then reads the first Careers::Job of the same company.
    • It raises every other unique error, such as the one on careers_jobs.slug or on billing_ledger_entries.idempotency_key.
  • EmployersCreateValidator adds these checks, with the messages from UC-2:
    • the price exists and is active;
    • Billing::SpendValidator with the price's instrument and unit_cost, and the validator merges its errors.
  • EmployersCreateManager calls Careers::JobPostings::Shared::CreateService with description_key: :post, inside the existing transaction.
  • EmployersJobDetailSerializer and EmployersJobListSerializer add posting_ends_at and job_postings_count.
    • posting_ends_at is null for an existing Careers::Job.
    • The manager loads both values for each Careers::Job, so the serializer runs no query.
  • The trial gate and TrialService.start_trial do not change.

API-5 — Updating a job: period check and company lock​

  • An update of a Careers::Job never pays.
  • When the request sets status to open or hidden, the validator checks the Careers::Job:
    • a Careers::Job with a Careers::JobPosting needs its latest Careers::JobPosting.ends_at in the future;
    • an existing Careers::Job that is open or hidden passes, because no period rule applies to it;
    • an existing Careers::Job that is closed fails, because closed is its end state.
  • A failed check returns the message from UC-4.
  • On every update of every Careers::Job, the validator blocks a company change.
    • This includes an existing Careers::Job with no Careers::JobPosting.
    • The message is "You cannot move this job to another company. Post a new job for the other company."
  • Closing and other field edits work as today.

API-6 — Renew endpoint​

  • POST /employers/careers/jobs/*slug/renew, with careers_job_posting_price_uuid and job_postings_count.
    • job_postings_count is the number of Careers::JobPosting rows that the job detail returned.
  • EmployersRenewValidator runs these checks, in this order:
    • the Careers::Job has at least one Careers::JobPosting, so an existing Careers::Job fails first;
    • the trial gate lets the company post;
    • the API-4 checks on the price and the credits.
  • EmployersRenewManager runs one transaction:
    • it locks the careers_jobs row and counts the Careers::JobPosting rows of the Careers::Job;
    • when the count differs from job_postings_count, it fails with a 422 and writes nothing;
    • it calls Careers::JobPostings::Shared::CreateService with description_key: :renew;
    • when the period had ended, it sets status: :open;
    • it syncs the Careers::Job with Careers::Jobs::SyncService.
  • The 422 messages come from UC-5:
    • "This job cannot be renewed. Post a new job to hire again." for an existing Careers::Job;
    • "This job is already renewed until <posting end>." for an old count.
  • Tests cover these cases:
    • a renew with the right count creates one Careers::JobPosting;
    • a second renew with the same count fails, and the account pays once;
    • a renew of an existing Careers::Job fails with a 422, writes no Careers::JobPosting and pays nothing.
  • The response is the job detail, with the new posting_ends_at.
  • Add the route to the Bruno collection.

API-7 — The hourly Sidekiq job Careers::Jobs::CloseJob​

  • Careers::Jobs::CloseJob runs every hour in sidekiq-scheduler.
  • It finds Careers::Job rows with status open or hidden whose latest Careers::JobPosting has ends_at in the past.
    • An existing Careers::Job has no Careers::JobPosting, so the query never selects it.
  • For each Careers::Job, it locks the careers_jobs row and reads the latest Careers::JobPosting.ends_at again.
    • It closes the Careers::Job only when that ends_at is still in the past.
  • It sets each Careers::Job to status: :closed and syncs it to Listings.
  • One Careers::Job that fails does not stop the others, and the failure goes to Sentry.
  • Tests cover these cases:
    • an ended open Careers::Job closes;
    • an ended hidden Careers::Job closes;
    • a Careers::Job whose period runs until tomorrow stays open;
    • an existing Careers::Job that is open stays open;
    • an existing Careers::Job that is hidden stays hidden;
    • a Careers::Job that a renew pays for after the query stays open.

API-9 — Team endpoint: one Careers job with its Careers::JobPosting rows​

  • GET /team/careers/jobs/*slug, built like the Team Ads campaign show.
  • The request finds the Careers::Job by careers_jobs.slug, and a missing Careers::Job returns a 404.
  • The response has the Careers::Job: slug, title, the company name, status and posting_ends_at.
  • The response has every Careers::JobPosting of the Careers::Job, newest starts_at first:
    • id, starts_at and ends_at;
    • the price name;
    • unit_cost_snapshot and duration_days_snapshot;
    • created_by_type and created_by_id.
  • The manager loads the Careers::JobPosting rows and their prices with includes, so the serializer runs no query.
  • Add the route to the Bruno collection.

API-10 — Team endpoint: one Careers::JobPosting​

  • GET /team/careers/job_postings/:id, built like GET /team/ads/campaign_placements/:id.
  • The id is billing_ledger_entries.source_id, so the route takes the numeric id.
  • The response has the Careers::JobPosting and the slug of its Careers::Job, which the deliverable route needs.
  • A missing Careers::JobPosting returns a 404.
  • Add the route to the Bruno collection.

API-11 — careers_jobs.status has three values​

  • Remove draft from the status enum and from DISPLAY_STATUS_MAP in app/domains/careers/job.rb.
  • Change the default of careers_jobs.status from 'draft' to 'open', in a migration and in docs/db/careers.dbml.
  • Production has no draft row, so the migration only changes the default, with no check for draft rows.
  • An update with status: draft fails with a 422, because the validator accepts only the enum keys.
  • WEB-6 removes "Draft" from the web, and ships together with API-11.
  • Just before the deploy, a person checks by hand that production has no draft Careers::Job row.

API-12 — A seed file creates the first two prices​

  • Add db/seeds/singles/<timestamp>_seed_careers_job_posting_prices.rb, built like 20260130135900_seed_ads_placements.rb.
  • It creates "1 Month" (30 days, 50 credits) and "3 Months" (90 days, 100 credits) with find_or_create_by!(name:).
    • A second run creates nothing.
    • It never changes a price that exists, so a price that Sales edited keeps its values.
  • The deploy runs it in each environment with bin/rails db:seed:single SEED_FILE=....
  • Sales practises entering and editing prices in QA.

API-13 — Free placement credits for each company​

  • A Billing service grants the free credits to one company, as the Design Plan says.
    • It creates one Billing::CreditAction with action_type: :trial_grant and 50 placement credits.
    • admin_created_by_id is the Identities::Admin named System, and reason is "Sign up free credits".
    • It does nothing for a company with careers_access_status: :blocked.
  • A rake task calls the service for each existing company, with DRY_RUN=true for a report.
    • It gives one company the free credits once only, also when it runs twice.
  • The sign-up path calls the service for a new company, in the transaction that creates its own account.
  • Still open for Ali: when the credits expire, companies synced from JodGig, and which paths count as a sign-up.

jodapp-web issues​

WEB-1 — Team Portal: Careers::JobPostingPrice pages​

WEB-1 has one issue for each page, so each page follows the API endpoint it uses.

PageRouteAPI endpoint
List/team/careers/job-posting-pricesGET /team/careers/job_posting_prices
Detail/team/careers/job-posting-prices/:idGET /team/careers/job_posting_prices/:id
Create form/team/careers/job-posting-prices/newPOST /team/careers/job_posting_prices
Edit form/team/careers/job-posting-prices/:id/editPATCH /team/careers/job_posting_prices/:id
Activate and deactivateA button on the detail pagePATCH /team/careers/job_posting_prices/:id/activate and /deactivate
  • Build the pages like the Team billing product pages, in app/routes/team/billing-products/ and app/domains/billing-product/.
  • The forms have name, duration_days and unit_cost, and the create and edit forms share one form and one schema.
  • The list page adds a "Job Posting Prices" link in the Careers section of app/layouts/team/team-sidebar-config.js.
  • The "Deactivate" confirm dialog warns about the last active price, because then no company can post a job.

WEB-2 — Employer Dashboard: the job form shows the periods, the cost and the balance​

  • Read the active prices from GET /employers/careers/job_posting_prices.
  • Read the balance from GET /employers/billing/entitlement-balances.
  • Show the prices as a picker, for example "1 Month, 50 credits" and "3 Months, 100 credits".
  • Make one idempotency_key when the form opens.
  • Send careers_job_posting_price_uuid and the idempotency_key with the post.
  • Show the cost, the balance and "Posted until" with the end date under the form.
  • Open a confirm dialog with the cost and the end date on submit.
  • When the balance is lower than the cost, show the "Insufficient Placement Credits" alert and disable the submit.
    • Copy the alert from employers-ads-campaigns-detail-page.jsx.
    • Its WhatsappButton says "Chat with us to top up credits", with a message that names the cost and the balance.
  • When no price is active, show "Posting a job is not available right now. Please contact Jod support." and disable the submit.

WEB-3 — Employer Dashboard: posted until and the renew dialog​

  • The job list and the job page show "Posted until" with posting_ends_at.
    • They show "Posting ended" when posting_ends_at is in the past.
    • An existing Careers::Job has posting_ends_at: null, and it shows neither text.
  • Each job with a Careers::JobPosting has a "Renew" button.
  • An existing Careers::Job shows the renew button as disabled, with the text "Cannot renew".
    • The page reads posting_ends_at: null for this, so it needs no new field.
  • The renew dialog shows the active prices, the cost, the balance and the new end date.
    • The new end date starts from posting_ends_at when it is in the future, and from today otherwise.
  • The renew dialog shows the same alert and WhatsApp button as WEB-2 when credits are too low.
  • When no price is active, the renew dialog shows "Posting a job is not available right now. Please contact Jod support." and disables the renew.
  • The renew dialog calls POST /employers/careers/jobs/*slug/renew, with the job_postings_count of the job detail.
    • On the 422 "This job is already renewed until ...", the dialog shows the message and reloads the job.
  • When the period has ended and the HQ manager opens the job, the page shows the API error.
    • The page also shows the "Renew" button.

WEB-4 — Team Portal: the ledger shows the Careers::Job of a Careers::JobPosting​

  • Add Careers::JobPosting to BILLING_LEDGER_ENTRY_SOURCE_TYPE and to the source filter options, with the label "Job Posting".
  • The source cell shows billing_ledger_entries.description for a Careers::JobPosting, as it does for an Ads placement.
  • Build on jod-app/jodapp-web#1535, which shows the description for an Ads placement, and is merged into feature/frontend-billing-phase-3.
  • The text links to /team/careers/job-postings/<source_id>, in a new tab, like an Ads placement.
  • Add the deliverable route /team/careers/job-postings/:id, built like team-ads-campaign-placements-redirect-page.jsx.
    • Its clientLoader calls GET /team/careers/job_postings/:id.
    • It redirects to /team/careers/jobs/<slug>.
    • The module keeps an empty default export, so React Router does not treat it as a resource route.

WEB-5 — Team Portal: the Careers job page​

  • A read-only page at /team/careers/jobs/*, because the slug of a Careers::Job has slashes.
  • The clientLoader calls GET /team/careers/jobs/*slug.
  • The page shows the Careers::Job: title, company, status and the latest Careers::JobPosting.ends_at.
  • The page shows one table of Careers::JobPosting rows:
    • starts_at and ends_at;
    • the price name;
    • the credit cost;
    • who created it.
  • The "Jobs" entry in app/layouts/team/team-sidebar-config.js stays disabled, because there is no list page.

WEB-6 — Employer Dashboard: the job status has no "Draft", and the company is read-only​

  • Remove the draft entry from CAREERS_JOB_STATUS in app/domains/careers-job/careers-job-constant.js.
  • The job edit form in careers-job-form-fields.jsx and the job filter in careers-job-filter-form.jsx then offer only "Open", "Closed" and "Hidden".
  • careers-job-org-detail-view.jsx and employers-careers-jobs-list-page.jsx also read CAREERS_JOB_STATUS.
    • They show "N/A" for a status that the list does not hold.
  • WEB-6 ships together with API-11.
    • Otherwise an HQ manager can pick "Draft", and the update fails with a 422.
  • The job edit form shows the company of the Careers::Job as read-only, because a Careers::Job never changes company.
    • The job create form still shows the company select, so a parent HQ manager can post for a child company.

Manual test plan​

Setup: the seed file of API-12 created two active prices.

  • P1 "1 Month" is 30 days for 50 credits.
  • P3 "3 Months" is 90 days for 100 credits.
  • Company A has careers_access_status: :trial, and the rake task of API-13 gave it 50 free credits.
  • Company A has an existing Careers::Job J0, with status: :closed and no Careers::JobPosting.
  • Company A has an existing Careers::Job J9, with status: :open.
  • Company C is a child company of company B, and C has 100 credits on its own account.
#StepExpected
1Run Careers::Jobs::CloseJobJ9 stays open, because an existing Careers::Job has no Careers::JobPosting
2Hide J9 as A, then open it againJ9 is open with no Careers::JobPosting, and A still has 50 credits
2aOpen the job list and the edit form of J9 as ANo "Posted until" and no "Posting ended", the renew button is disabled with "Cannot renew", the status select has no "Draft", and the company is read-only
2bIn Bruno, change the company of J9Fails with "You cannot move this job to another company. Post a new job for the other company."
3Deactivate P1 and P3, then open the job form as A"Posting a job is not available right now. Please contact Jod support.", and submit is disabled
4Activate P1 and P3, then open the job form as AThe form shows both periods, the cost, the balance of 50 and the end date
5Post a job J1 as A with P1J1 is open until 30 days from now, J1 has one Careers::JobPosting, and A has 0 credits
6In Bruno, send the post of step 5 again with the same idempotency_keyThe response is J1, the system created no second Careers::Job, and A still has 0 credits
7Open A's ledger in the Team PortalOne consume entry of 50 credits, with "Job post: <J1 title>, 1 Month" in the source cell
8Click the source text of that entryA new tab opens the Team page of J1, with one Careers::JobPosting of 50 credits
9Open the job form for a second job as AThe "Insufficient Placement Credits" alert shows, submit is disabled, and the WhatsApp button opens a chat
10Hide J1, close it, then open it againNo new Careers::JobPosting, "Posted until" shows the same date as in step 5, and A still has 0 credits
11In Bruno, change the company of J1Fails with "You cannot move this job to another company. Post a new job for the other company."
12Open J0 as A, then hide itBoth fail with "This job is closed. Post a new job to hire again."
13Grant A 200 credits, then renew J1 with P3The latest Careers::JobPosting.ends_at of J1 moves 90 days later, and A has 100 credits
14In Bruno, send the renew of step 13 again with the same job_postings_countFails with "This job is already renewed until <date>", and A still has 100 credits
15In Bruno, renew J0 with P1 and job_postings_count: 0Fails with "This job cannot be renewed. Post a new job to hire again.", and A still has 100 credits
16Post a job J2 as A with P1, then in the console set starts_at of its Careers::JobPosting to 30 days and 1 minute ago, and ends_at to 1 minute ago, then run Careers::Jobs::CloseJobJ2 is closed, it is gone from the job search, and A has 50 credits
17Edit P1 to 60 creditsEvery Careers::JobPosting created before the edit still says 50 credits
18Log in as B's HQ manager, and in Bruno post a job for C with P1 and the idempotency_key of step 5The system creates a new Careers::Job for C, C's account goes from 100 to 40, and B's account does not change
19Set A to careers_access_status: blocked, then post a job and renew J1Both fail with "Company trial period has ended"

Risks​

RiskWhat we do
Billing Phase 3.2 ships with no active price, so no company can postThe deploy runs the seed file of API-12, and a person checks both prices in the Team Portal
A company that paid by invoice has no credits on the day Billing Phase 3.2 shipsIts existing Careers::Job rows stay open with no end date, and the free credits given when Billing Phase 3.2 ships pay one Careers::JobPosting
Careers::Jobs::CloseJob closes an existing Careers::JobThe query selects only a Careers::Job that has a Careers::JobPosting, and a test covers an existing Careers::Job that is open and one that is hidden
A database has a draft Careers::Job row after API-11Before API-11 merges, a person counts the draft rows on QA, and checks production by hand just before the deploy
Careers::Jobs::CloseJob fails, and ended Careers::Job rows stay posted for freeSentry reports the failure, and the next hourly run closes them
Sales changes a price while an employer has the form openThe Careers::JobPosting uses the price on submit, and the confirm dialog showed the old cost