Build a Field-Service Operations Platform
A trades company with 60 technicians has outgrown its job app: offline edits overwrite the office's changes, two jobs are promised the same part, and a cancelled job still gets invoiced. You will build the replacement, from the job request through quote, schedule, offline phones, stock and invoice, and prove it survives a full simulated working day with failures injected.
The brief
The client
I run operations at a plumbing and electrical company with 60 technicians, 3 admins and 2 dispatchers, about 300 jobs a day, and every technician carries a phone with our job app. The app keeps one copy of each job, and whichever device or desk saved last wins. A dispatcher cancelled a job at 10:05 after the landlord rang to say it was sorted, but the technician was in a basement with no signal, finished the work at 10:20 and synced at 18:00. The job flipped back to completed, an invoice went out and the tenant disputed it, and we could not tell which version was true. The same week two jobs were each promised the last 22 mm isolation valve, because the system keeps one stock number for the whole company and has no idea which van holds what. I need the office and the van to be able to disagree for hours, and the disagreement to end up visible and settled by a rule instead of by whoever synced last.
The problem
The current app keeps one copy of each job, and the dispatcher, the technician's phone and the accounts screen all overwrite it. Phones work offline and upload their edits in a batch when signal returns, so an edit made at 10:20 can replace a decision made in the office at 10:05 and nobody is told. Parts are tracked as one stock number per warehouse, so a van's stock does not exist in the system and two jobs can be promised the same part.
The schedule is a list of times with no check that a technician is free, qualified and able to travel between visits, so a sick call turns into a morning of phone calls. Invoices come from a button on the accounts screen and not from the job completing, so some completed jobs are never billed and some cancelled ones are. Customers hear nothing until the technician knocks.
The client's name and figures are invented for this brief; the rules and the failures are ones that real businesses of this kind work with.
The spec
Requirements
- Let a customer, or a call-taker on the customer's behalf, submit a job request with address, trade, description and photo references. Put an emergency ahead of routine work, and treat two reports of the same job at the same site within 30 minutes as one request.
- Price a quote from a price book, let the customer accept it once, and expire it after 30 days.
- Book each job to a technician who has the skill for the trade, works that day and is free, never in overlapping slots. Give the customer a 2 hour arrival window, and send one message per reshuffle that states the final window.
- Show each technician today's jobs on a phone with no signal, and take the edits made offline when signal returns, including about 6,000 changes from 60 phones within 5 minutes at 18:00. Settle each clash with the office's edits by a rule per field, with no edit silently lost.
- Track stock in every warehouse and van, promise a part to only one job, and record the parts a technician used offline.
- When a customer accepts a quote, end with the parts set aside, the work order created and a visit booked, or with whatever should be undone undone, whichever step fails.
- Let a technician propose a variation on site, bill it only after the customer approves it, and keep the original quote intact.
- Invoice a completed job once, record each payment once however often the provider sends it, credit or refund a disputed invoice once, and charge a flat fee for a late cancellation or a no-access visit.
- Refuse to complete an electrical inspection without its certificate, and report the certificates and deadlines that are missing or overdue.
- Keep the rest of the product working when one capability is stopped or replaced with a new version, and when the payment provider or the SMS provider fails.
Deliverables
- Your repository starts the whole product with one command, plus a simulator that plays the customers, the dispatchers, the technicians' phones, the payment provider's notifications, the SMS provider and the clock.
- A README that takes a reviewer from a fresh clone to the 10:05 cancellation and the 10:20 completion showing as a decision waiting in the office, with no work invoice issued, in 20 minutes, and lists the command that runs each test the brief asks for.
- A way to run the client's working day faster than real time and to cause the outside failures the brief names: a provider that answers late, repeats a message or sends it out of order, a phone that stays offline for hours with a clock 15 minutes wrong, a process killed mid-task, one capability stopped, and one capability replaced with a new version.
- A test suite covering every Phase's tests, plus the results of the simulated day committed to your repository.
- An office guide: how to read the list of decisions waiting for the office, who wins for each job field when the office and a phone disagree, what charging or waiving a visit fee does, and how to record remedial work and a confirmation on a certificate.
- An operations note stating what an operator must be able to do: read one job's whole story in one place, retry a message that keeps failing once the cause is fixed, and see which capability is stopped.
Out of scope
- Route optimisation. The vehicle routing problem is a research field of its own; rules that check skill, shift, overlap and a flat travel allowance are enough.
- A native technician app. A simulator plays the phones, because the rules for offline edits are what this brief is about and the client is not.
- Card handling. Payment arrives as signed notifications from a fake provider you build, so card data never enters the product.
- Live van tracking. It adds a personal-data problem and no consistency problem, so no location data is kept.
- Supplier purchase orders and supplier feeds. Replenishment is a stocktake and a transfer here.
- Accounting package export. Invoicing ends at the issued invoice and the recorded payment.
- A customer portal with accounts, and emailing quotes or invoices. A customer reaches a quote, a variation or an invoice by a signed link, and the only messages sent are arrival-window and on-the-way messages.
- Gas work, recurring service agreements and an agent portal for bulk annual checks. They need compliance rules the brief does not cover.
- Survey visits before a quote. A quote is priced from the price book alone, and a large fixed-price job is a catalogue bundle.
- The VAT domestic reverse charge and proportional cancellation charges. One VAT rate and one flat fee keep the money rules testable.
- Kubernetes or cloud deployment. Everything runs on one machine.
Architectural constraints
- Amounts are exact to the penny. Prices include VAT at 20 percent, and an invoice or credit note shows net, VAT and gross in whole pence, with net worked out once on the total as gross times 5 divided by 6, rounded half up.
- People see times in Europe/London, and a shift runs 08:00 to 17:00 local time all year, including across a clock change.
- No edit is silently lost. Every change an office user or a phone makes is applied, merged, or shown to a person as a decision, and a phone's clock, which can be 15 minutes wrong, never decides who wins.
- No technician is booked in two places at once, even when two dispatchers book at the same moment.
- A part set aside for a job is never promised to another job. A part a technician reports as used is always recorded, even when the books said the van held none, and the shortfall stays visible to the stores person until a stocktake settles it.
- A completed job is invoiced once, a cancelled job is never invoiced as work, each payment counts once and each refund is made once.
- An electrical inspection cannot be completed without its certificate. A certificate is kept until a more recent inspection of the same property supersedes it (regulation 3(3)(ca) of the 2020 Regulations), or for 6 years from completion if that is later.
- A customer's name, phone and email are erased on request. The site address stays on the job and the billing name and address stay on an issued invoice, for 6 years from completion. Invoices, credit notes, payments, each job's history and certificates stay, identified by ID. A phone number shown on a technician's phone for the day's visits is gone when the day ends.
- When one capability is stopped, what depends on it waits and then completes once, and everything else keeps working.
Prerequisites
You have finished an intermediate project or have equivalent experience: you have built an application with a database that several people use at once, and you have fixed a bug that only appeared when two requests arrived together. Any language and stack will do. You do not need to have built a mobile app, and you do not need to know how a plumbing and electrical company runs its jobs; the first Phase explains the business and the words the brief uses. Having once debugged two people editing the same record will make the rules for offline edits feel familiar.
Free to start. An account is what keeps track of the checkpoints you finish.
Map the business
Produces a written map of one job from request to payment, the rules for who wins when the office and a phone disagree, and one command that starts the product with a simulated company. Leaves the behaviour of every capability for the later Phases.
Acceptance criteria
Your repository contains a document that records one job from request to payment on three paths: a call-out (priced by time and parts), quoted work (priced by an accepted quote) and an electrical installation inspection (which needs a certificate). Each path is a numbered sequence. Every step names who acts (customer, call-taker, dispatcher, technician, stores person or accounts), what they see at that moment and what they do next.
The map carries the client's numbers: about 350 requests a day, 60 percent from the web and 40 percent by phone; about 300 jobs a day; 10 percent emergencies and 15 percent through a quote; 3 parts used per job; an average call-out ticket of 18,000 pence; a consumer unit replacement at 90,000 pence; and a flat fee of 4,000 pence for a late cancellation or a no-access visit.
The document holds the cancellation story as a timeline: the dispatcher cancels at 10:05, the technician finishes at 10:20 without signal, and the phone syncs at 18:00. At each time it states what the office screen shows, what the phone shows, what the van's stock is and what should happen to the invoice. The last line says which version the company treats as true and who decides whether the visit is charged.
The document lists every place where two people or devices can hold different versions of the same thing for hours, with at least these five: the job's status, the site address and access notes, the booked time, the parts on a van, and whether a quote can still be accepted. Next to each it gives the longest the disagreement can last, taking the 8 hours a phone can spend offline as the worst case.
The document is written in the client's words. A request for gas work is shown as declined at its first step, because the company does no gas work.
Architectural guidance
A map drawn without walking the story step by step misses the places where two people can disagree for hours, and those places are where the old app lost the technician's 10:20 work. A team that has not walked the cancellation story finds out which version is true when a tenant disputes an invoice. A map in the client's words is one the people who run the company can check.
Acceptance criteria
You write a table in your repository with one row for each of these job fields: notes, time on site, parts used, photos, signature, certificate, status, site address, access notes, booked time and assigned technician. Each row says who may change the field (the technician, the office, or both) and what wins when the office and a phone have both changed it.
The rules give the outcomes the client already stated. Notes, time on site, parts used, photos and signatures from the phone and from the office all end up on the job, and none is lost. Status follows the allowed moves, and a move the rules forbid is shown to a person as a decision. The site address, access notes, booked time and assigned technician belong to the office, so a technician's offline edit to them loses and the technician is told. The certificate row states its own rule and the reason for it.
No row says the latest save wins, and no row orders changes by the time shown on the phone. The table says why: a phone's clock can be wrong by up to 15 minutes either way, so a rule that used it would give a different answer depending on whose watch is off. The phone's time is shown to people as a hint and decides nothing. The status row says that the job's status at the moment the change is processed decides, never the phone's clock.
You work three cases through the table, and the document gives the outcome for each field involved. In the first, the dispatcher edits the site address at 10:05 and the technician edits the same address offline at 10:10. In the second, both add a note to the same job and the phone's clock is 15 minutes fast. In the third, the technician marks a job completed that the office cancelled an hour earlier, which is the 10:05 and 10:20 story. Each outcome states what is kept, what loses, what the technician is told and who has to act.
Architectural guidance
Last save wins is what turned a cancelled job back into a completed one. The fields differ in kind: two notes are both true, two site addresses are not, so one rule for all of them loses either the notes or the office's decision. A table that is missing a row shows up later as an edit that disappears with nobody told.
Acceptance criteria
One command from your repository root starts the product and a simulator. The README names the command and the stack you chose, says how many minutes a reviewer needs from a fresh clone to a running product, and lists the command for each test the brief asks for, one line for each testing Checkpoint. Each later Phase adds its lines as it finishes, and a reviewer can find every test from the README alone. Running the command again on a machine where the product is already running changes nothing and loses no data. A run from a clean checkout reaches the same starting state every time.
The simulator plays the client's company. Given a seed it produces a cast: customers with sites, including landlords and letting agents who own several sites each, enough for a day of 350 requests; 60 technicians, each with a skill, a shift, one of 4 territories and one van; 2 warehouses; 120 SKUs stocked as the client states; 3 admins and 2 dispatchers. The same seed gives the same cast and a different seed gives a different one.
The simulator plays the customers on the web form, at the phone desk and on signed links, the dispatchers, and the technicians' phones: offline for hours, clocks wrong by up to 15 minutes, retrying after any failure, and uploading the same batch twice. The payment provider and the SMS provider join it in the Phases that need them.
The simulator also controls the clock. Moving it 31 days ahead makes everything the product shows treat it as 31 days later, and without the simulator the product keeps real time. People see times in Europe/London.
Architectural guidance
A reviewer who cannot start the product in a few minutes will not trust a result at the end of it. The client's failures take days or years to happen: a quote's 30 days, a phone's 8 hours offline, an invoice's 6 years, and a test that has to wait for them never gets run. Runs that start from different casts make a failure impossible to reproduce.
Architectural walkthrough
How a plumbing and electrical company runs its jobs
The company has 60 technicians, 3 admins and 2 dispatchers, and handles about 300 jobs a day. A customer, or a call-taker on the customer's behalf, reports a job with an address, a trade and a description. The company prices it from a price book and sends a quote. Once the customer accepts, a dispatcher books a technician who has the skill, works that day and is free. The customer is given a 2 hour arrival window and told by SMS when it changes.
Each technician carries a phone with the day's jobs on it and sometimes works without signal, in a basement for example. The phone keeps the technician's edits and sends them to the office when signal returns, which can be hours later. The office keeps changing the same jobs in the meantime.
Parts come from warehouses and from the technicians' vans. A technician who finds extra work on site proposes a variation, which the customer approves before it is billed. When the job is done the company invoices it, a payment provider reports each payment, and an electrical inspection ends with a certificate.
The words this brief uses:
Price book: the list of standard prices a quote is made from.
Quote: the price offered for a job. The customer can accept it once, and it expires after 30 days.
Arrival window: the 2 hour span in which the technician is due.
Variation: extra work found on site, billed only after the customer approves it.
Van stock: the parts a van holds, counted separately from the warehouses.
Stocktake: a count of what a warehouse or van really holds, which settles the books.
Sync: a phone sending its offline edits to the office. A phone can stay offline for up to 8 hours.
Certificate: the record of an electrical inspection, with its date and an outcome of satisfactory or unsatisfactory. The next inspection is due 5 years later.
Remedial work: the repair after an unsatisfactory inspection. It is due 28 days later, and the confirmation is due within another 28.
No-access visit: a visit where the technician cannot get in. The company charges a flat fee for it.
Why the rules for a job come first
The old app kept one copy of each job, and whichever desk or phone saved last won. Nobody had written down who is allowed to change which part of a job, so a phone that had been offline for hours could replace what the office decided that morning.
The client's story shows the cost. At 10:05 a dispatcher cancels a job because the landlord rang to say it was sorted. The technician is in a basement with no signal, finishes the work at 10:20 and syncs at 18:00. The job flips back to completed, an invoice goes out, and the tenant disputes it. The client cannot say which version was true, and the invoice has to be withdrawn by hand.
This Phase is writing plus a start command. The map of a job and the table of who wins are what every later Phase is checked against, so a gap in them returns later as a lost edit or an invoice for work that was cancelled.
The simulator is here for a different reason. The failures in this brief take a long time to happen on their own: a quote lasts 30 days, a phone stays offline for up to 8 hours, an invoice is kept for 6 years. A reviewer who cannot start the product and watch those happen in minutes cannot tell whether it works.
Take job requests
Produces job requests from the web form and the phone desk, an emergency decided by rules the client can read, and no request lost when the process dies. Leaves quoting and booking for later Phases.
Acceptance criteria
A customer submits a request on the web form, and a call-taker submits one at the phone desk on the customer's behalf. Both give the same things: the customer, the site, the trade (plumbing or electrical), the kind of work (a call-out, a quote or an inspection), a problem category chosen from one list, a description, references to photos already stored, and an optional preferred start date. The office sees the two requests in the same layout, with the channel (web or phone) as the only difference. A request with a missing trade, an unknown kind of work or a problem category outside the list is refused and nothing is stored. A request for gas work is declined with a reason the call-taker can read and a message telling the customer to contact their gas supplier's emergency line.
A customer has a name, phone, email, billing address and a type (homeowner, landlord or letting agent). A site has an address, access notes and a tenure. A landlord or letting agent can have many sites, and an address entered twice for one customer that differs only in capital letters or spacing is one site. A request taken at the desk for a landlord's second flat is recorded against that flat.
A call-taker can look up a customer and the customer's requests. Erasing a customer removes the name, phone and email at once, and afterwards the call-taker sees the customer shown as erased, which differs from no such customer. The sites and the requests stay, identified by ID. Erasing one customer leaves another customer with the same name untouched.
Architectural guidance
Two channels with two layouts end up with two sets of rules, and a fix made for one is missing from the other. The customer and the call-taker describe the same problem, and the office should not have to ask which channel it came from to know what it means. A customer's request to be forgotten is a legal duty for the client, and a request that scatters a name across the product leaves the client unable to say it is gone.
Acceptance criteria
Every request ends with exactly one outcome that the office can see: emergency, routine or declined, with the time it was decided. The rules are a document the client's admins can read, listing each problem category and its outcome. These four categories are emergencies: a burst pipe or leak that cannot be isolated, no power to the whole property, a burning smell or sparking from electrics, and sewage backing up. The outcome comes from the category and never from the channel, so the same category gets the same outcome on the web and by phone.
An emergency shows a deadline 2 hours after the time it was decided. A routine or declined request shows none. Only a call-out can be an emergency: a quote or inspection request in an emergency category is routine. A gas request is declined, as in the previous Checkpoint.
The office's list of decided requests shows emergencies first, earliest deadline first, then routine requests in the order they arrived. A request keeps its first outcome and time. A change to the rules made later does not turn yesterday's routine request into an emergency, and a request that is processed twice is not decided again.
Architectural guidance
When a person decides what an emergency is, the outcome depends on who reads the list first, and that is how a burst pipe ended up behind a boiler service. Rules the client can read turn an argument about one job into an argument about the rule. An emergency whose deadline moves when the rules change, or whose decision is made twice, becomes a promise the company has quietly already broken.
Acceptance criteria
The test kills the product's process at chosen moments while requests are being taken: during the save, just after the customer is told the request was received, and before anything has been done with it. After the restart each request is in one of two conditions. Either it was never accepted and the customer was told it failed, or it is accepted and reaches the office, and from there quoting (for a quote request) or the work order (for a call-out or inspection), exactly once.
Nothing accepted is lost and nothing is doubled. A request that the customer was told had been received before the kill is in the office's list after the restart, appears once, and carries the outcome it should have, including the deadline of an emergency. Killing the process a second time during the restart changes nothing.
Architectural guidance
A request lost after the customer was told it arrived has, for an emergency, already started its 2 hours.
Acceptance criteria
A script committed to your repository runs the test and prints its result. It reports one burst pipe at a seeded site on the web and again by phone 4 minutes later by the simulator's clock. It prints counts and fails unless the office holds one request for the pair, with the second report shown beside it with its channel and description.
It then runs the boundaries and prints a line for each. The same site and trade reported 31 minutes after the first makes a second request. The same site with a different trade (an electrical fault, 5 minutes later) makes a separate request. A different site of the same landlord with the same trade, 5 minutes later, makes a separate request. A report 20 minutes after the first joins the first. The 30 minutes run from the first report, so a report at 29 minutes joins and one at 31 minutes does not, and a chain of reports 20 minutes apart cannot stretch the window.
Two reports sent at the same instant from separate connections, one web and one phone, make one request and never two. The joined report does not get a second emergency deadline, and the call-taker sees the first request's reference and outcome beside it. The result is saved in your repository.
Architectural guidance
Two reports of one leak that arrive at the same moment can each look like the first, and two technicians then go to one flat. The 31 minute, different trade and different site cases keep the rule from swallowing real work, so a landlord with a leak in each of two flats still gets two jobs. A window that restarts with every new report would let a chain of reports hide a genuinely new problem.
Architectural walkthrough
A customer with a burst pipe reports it on the web form, hears nothing, and rings the desk four minutes later. If both reports become requests, two technicians go to one leak. If both are lost, nobody goes. About 350 requests arrive a day and 10 percent are emergencies, so about 35 times a day someone is waiting with water coming through a ceiling.
The old app left the decision about what counts as an emergency to whichever dispatcher saw the request first, so a burst pipe waited behind a boiler service. The client promises to be on site within 2 hours of triage, and a request that sits unread has already used part of that time.
A process can also die between saving a request and passing it on. The customer was told the request arrived, nobody is working on it, and the client finds out when the customer phones to ask where the technician is.
A customer can also ask to be forgotten. The name, phone and email have to go while the site and the records the client must keep stay, and a request that cannot honour that is a legal problem for the client.
Quote the work
Produces a priced quote that stays at its price, expires after 30 days and can be accepted once through a signed link. Leaves turning an acceptance into a booked job for a later Phase.
Acceptance criteria
The office can publish a new version of the price book. A version lists priced items: parts, labour bundles and fixed bundles, each at a price in whole pence that already includes VAT at 20 percent. A version also records the minimum call-out of 8,000 pence and the labour rate of 1,500 pence for each started 15 minutes. The first version holds a consumer unit replacement as a fixed bundle at 90,000 pence.
A draft quote is priced from the version in force. Each line has an item from that version, a quantity and the book's price. A line with no item is allowed only for labour, at 1,500 pence for each started 15 minutes. The quote's total is the sum of quantity times price in whole pence and includes VAT at 20 percent. A line whose item is not in the version, a price or quantity that is not a whole number, or a quantity below 1 is refused and nothing is stored.
The quote shows the version it used. Publish a second version in which the consumer unit bundle costs 95,000 pence. The quote priced earlier still totals 90,000 pence and still names the first version, and a new quote totals 95,000 pence and names the second. Publishing a version changes no quote that already exists.
Architectural guidance
A price looked up when the customer accepts is a price the company can change under the customer, which turns a quote into an invitation. A price rise that reaches quotes already sent means the customer saw one figure and is billed another. Money worked out with fractions of a penny gives totals that differ by a penny from one screen to the next.
Acceptance criteria
A request for a quote that was decided routine can be turned into a quote. A declined request, or a request for another kind of work, cannot, and trying is refused. Issuing a quote freezes it: its lines cannot be edited afterwards, and a different price means a new quote. An issued quote shows its expiry, 30 days after it was issued by the simulator's clock.
The customer reaches the quote through a signed link. The page shows the lines, the total including VAT, the price book version and the expiry date. A link with one character changed shows nothing and does not reveal whether the quote exists.
Once the clock reaches the expiry and the quote is neither accepted nor declined, it shows as expired, and the link tells the customer so. Moving the simulator clock 31 days ahead expires an unaccepted quote issued at the start of the test and leaves an accepted one accepted. A quote is expired at exactly its expiry time, and it is still expired after the product is restarted.
Architectural guidance
A link that carries only a quote number lets anyone read anyone's quote by changing a digit, and the address printed on it goes with it. A quote whose expiry passes while the product is restarting, or while the clock jumps, still has to be dead afterwards. Otherwise the customer accepts a quote the company thinks is gone. A customer who accepts what the link showed has to get exactly that.
Acceptance criteria
A customer accepts or declines an issued quote from its signed link, and the page shows the result. The office sees an accepted quote with its lines and the parts it lists.
Accepting twice, by a double click or from two devices, shows the same confirmation both times, and the quote counts as accepted once. An accepted quote cannot be declined and a declined quote cannot be accepted: each refusal shows the customer the quote's current outcome and changes nothing. Accepting an expired quote is refused, and the page says it has expired. One millisecond before the expiry time the acceptance succeeds, and at the expiry time it is refused. Accepting a quote that was never issued is refused.
About 45 jobs a day go through a quote. A customer's acceptance is never undone by anything that happens after it.
Architectural guidance
Everything after an acceptance starts from it: parts are set aside, a job is created and a technician is booked. If a second acceptance counts, the customer gets two jobs at one address. Two clicks that arrive together can both find the quote still open, and then both succeed.
Acceptance criteria
A script committed to your repository runs the test and prints its result. It issues quotes, holds the simulator's clock 1 millisecond before the expiry, and sends an acceptance and the expiry check at the same instant from separate connections, with a fresh quote each time. It repeats until the acceptance has won at least once and the expiry has won at least once.
For every quote the printed result shows exactly one outcome that the customer and the office both see: accepted, or expired. The totals line shows that accepted plus expired equals the number of quotes and that the number of quotes shown as both is 0. The confirmation the customer received always matches the outcome the office sees.
The script also sends two acceptances of the same quote at the same instant, and a decline racing an acceptance. Each quote ends accepted or declined, never both, and the customer sees the same outcome afterwards that they were shown at the time. The result is saved in your repository.
Architectural guidance
An acceptance racing an expiry is the smallest race with money on it. A test that tries only one order of the two cannot tell a protected quote from a lucky one, which is why the clock is held at the boundary and the attempts repeat.
Architectural walkthrough
A quote is a promise at a price. A consumer unit replacement quoted at 90,000 pence has to cost 90,000 pence on the day the customer accepts, whatever the price book says by then. A quote repriced afterwards leaves the client with a customer who was promised one figure and an invoice for another.
Acceptance has to happen once. A customer double-clicks, opens the link on a phone and a laptop, or accepts in the same second the quote expires. If two of those count, the client creates two jobs at one address and sends two technicians. If a customer sees a confirmation while the company has already written the quote off, a technician arrives for a job the office never approved, or the customer waits for one it never booked. About 45 jobs a day go through a quote, so this happens at the client's volume, not in a corner case.
Own the work order
Produces the work order: the allowed status changes, a history of who did what, the certificate rule for inspections and the reopening of a disputed job. Leaves booking, stock and the technician's phone for later Phases.
Acceptance criteria
You write a document in your repository that sets every status a job can be in against every request that can be made of it, and marks each pair as allowed, refused or ignored. The statuses are the client's: created, scheduled, en route, started, completed, access failed, revisit required, cancelled and reopened. The requests are book, set off, start, complete, fail access, require a revisit, cancel and reopen. Every pair has a cell.
The allowed moves are exactly these. Created moves to scheduled when a booking exists. Scheduled moves to en route, and en route to started. Started moves to completed, and a technician may also complete from scheduled or en route when the phone never recorded the earlier taps. En route moves to access failed, which returns to scheduled when a new booking exists or ends in cancelled. Started or en route moves to revisit required, which returns to scheduled when the return visit is booked. A scheduled job whose booking is cancelled returns to created, needing a booking. Created, scheduled, en route, started, access failed and revisit required can each be cancelled, and cancelled is final. A completed job cannot be cancelled. It can be reopened, and a reopened job returns to started when the revisit starts. An inspection cannot complete without a certificate.
The document states the rule for a late request from a phone. A request for a status the job is already at or past, made by the technician who made the earlier moves, is ignored without a decision. A request that contradicts the job's status, such as completing a cancelled job, is shown to the office as a decision waiting. The document gives two worked examples of each, one of them the 10:05 and 10:20 story.
Architectural guidance
Without a written answer, whether a cancelled job can be completed gets decided in the middle of an incident by whoever is on call. A phone reports what the technician did hours after the office moved on, and the right response differs when the technician is merely behind and when the technician contradicts the office. Treating the two alike either buries a real conflict or raises false alarms for a technician who only tapped twice.
Acceptance criteria
An accepted quote, and a triaged call-out or inspection, each produce one work order. A declined request and a request for a quote produce none. The work order carries the site address and access notes, the trade, the description and the estimated minutes: 60 for a call-out, 180 for an inspection, and the quote's own figure for quoted work. A technician needs the address with no signal, so it is on the work order. The skill the job needs is its trade, and an inspection also needs the electrical inspection skill. An inspection is marked as regulated, and an emergency keeps its deadline.
A call-out or inspection freezes the price book version in force when the work order is created, with its VAT rate, minimum call-out and labour rate. A version published afterwards changes nothing about an existing work order. Quoted work carries the accepted quote's lines instead. If a call-out arrives before any price book version has been published, no work order is made and the request waits, and it becomes a work order once a version exists.
The same acceptance processed twice makes one work order, and so does the same triaged request processed twice. Two different quotes for one site make two work orders.
Architectural guidance
A price book that changes between creating the work order and billing it reprices a visit the customer was already told about. A request that arrives with no price to apply and is simply dropped is a customer who is never visited.
Acceptance criteria
The office can ask for a status change on a work order, and so can a technician, played by the simulator. Until booking arrives in the Schedule Technicians Phase, a stand-in provided by the simulator marks a work order as booked with a technician and a time, and that Phase replaces it.
A move the allowed table permits is applied and added to the job's history with who asked, whether the request came from the office or a phone, and when. A move it forbids, such as completing a cancelled job, cancelling a completed job or starting a job that is only created, is refused, leaves the history as it was, and is shown to a person as a decision waiting. Completing from scheduled or en route is accepted. A phone repeating a move the job is already at or past, from the same technician, is ignored and raises no decision.
Every change to a work order is an entry in the history: a note, a time on site, a part used, a photo or signature, or a status move. Each shows its author, whether it came from the office or a phone, and a time. After any sequence of requests every earlier entry reads exactly as it did when written, and nothing edits or deletes one. A correction is a new entry. Sending the same entry twice records it once. Notes, time, parts and photos recorded on a cancelled job are still recorded, because the work happened.
The history of a cancelled job says who cancelled, the customer or the company, and whether the technician was already on the way. A completed job shows its total time on site and the parts used. The phone's clock decides nothing: a completion that the phone dates 10:20 and the product receives at 18:00 is refused on a job cancelled at 10:05, whatever the phone's clock says.
Architectural guidance
A history that can be edited cannot settle a dispute, because nobody can show whether it was changed after the fact. Dropping the notes and parts from a cancelled job hides work that happened, and a van with a part already in a wall then looks fully stocked.
Acceptance criteria
The office or a technician attaches a certificate to an inspection with the inspection date and an outcome of satisfactory or unsatisfactory. The certificate shows the next inspection due 5 years after the inspection date and, for an unsatisfactory outcome only, remedial work due 28 days after it. Remedial work done and confirmation sent start empty. An inspection dated 29 Feb 2028 is due again on 28 Feb 2033. Attaching the same certificate twice stores one, and attaching a certificate to a job that is not an inspection is refused.
Completing an inspection with no certificate is refused and the job stays as it was. After a certificate is attached the completion goes through, even when the outcome is unsatisfactory. Call-outs and quoted work complete without one.
A certificate is kept until a more recent inspection of the same property supersedes it, or for 6 years from completion if that is later, however old it is. A certificate with no newer inspection of its property is still there after 7 years, which the simulator's clock can show. For a customer who was erased, the site address on the job is replaced by the property's ID 6 years after completion, which the simulator's clock can show. A customer who was not erased keeps the address on the job.
Architectural guidance
A certificate is the legal record of an inspection, and a job that can complete without it leaves the company holding an invoice for work it cannot prove. Calendar arithmetic disagrees about what five years after 29 Feb is, and a deadline that comes out a day early or late is a missed duty to a tenant. An address wiped for a customer who never asked to be forgotten destroys a record the client has to keep.
Acceptance criteria
The office reopens a completed job with a reason, and the history records who did it. The reopened job shows the evidence the job held at that moment: every photo, signature and part recorded on it. Notes and time entries are not part of that evidence. Entries added afterwards are not shown as part of it, and looking at the reopening later shows the same evidence.
Reopening a job that is not completed is refused. Reopening a job that is already reopened is refused, so one dispute makes one reopening. The reopened job returns to started when the revisit starts and can then be completed again, and the second completion is recorded as a second completion.
The invoice for a reopened job is held for as long as the dispute is open. The Invoice the Work Phase builds that hold.
Architectural guidance
A tenant disputes the work, and the company needs the photos, signature and parts as they stood when the dispute was raised, not as they look after the technician has added three more photos. A dispute that can be raised twice on one job counts as two disputes, and the client then credits the same invoice twice.
Acceptance criteria
A script committed to your repository runs the test and prints its result. It creates work orders of all three kinds and applies seeded random mixes of office requests and technician requests, including forbidden ones: cancelling after completion, completing after cancellation, entries sent twice, and a part recorded after a cancellation.
For every job the script reads the history as the office sees it, starts from created, applies each status move listed there using the allowed moves from the earlier Checkpoint, and compares the result with the status the office shows. It prints the number of jobs compared and the number of differences, and fails unless that number is 0. It also checks that no earlier entry changed between two readings.
Partway through the run the script restarts the product. The number of differences stays 0 and no entry appears twice. To show the comparison can fail, the script removes one entry from a copy of a job's history and shows that the replay then disagrees with the recorded status. The result is saved in your repository.
Architectural guidance
If a job's status cannot be explained by its history, nobody can answer a dispute: the office says it was cancelled, the phone says it was completed, and the record cannot show which move came first. A product restarted in a busy hour can come back showing a status that disagrees with what happened. A check that cannot fail proves nothing, so the test also breaks one history on purpose.
Architectural walkthrough
A job that can move to any status from any device is how a cancelled job came back as completed. Whoever saved last decides what the job is, and nothing is left that explains why. The cost is the 10:05 and 10:20 story: an invoice for a cancelled job and a tenant who disputes it.
A regulated inspection completed without its certificate is a different failure with the same effect. The client's landlord customers rely on the certificate to show they met the law, and the client is left holding an invoice for work it cannot prove.
A job can also be created twice. A quote accepted twice or a request handled again after a restart sends two technicians to one address.
A disputed job needs its evidence as it stood when the dispute was raised, not as it looks after the technician has added three more photos. About 3 percent of invoices are disputed, which is about 9 jobs a day.
Schedule technicians
Produces bookings that never overlap, arrival windows, and re-planning for an overrun, a sick call and an emergency. Leaves messages to customers and the technician's phone for later Phases.
Acceptance criteria
A dispatcher books a work order to a technician and a start time, or to neither. With neither, the first eligible slot on or after the customer's preferred date is booked, or today if there is no preferred date. The earliest slot wins and ties go to the lower technician ID. There is no ranking and no optimiser. Start times fall on 5 minute marks.
A slot is eligible when the technician has the skill for the trade (an inspection also needs the electrical inspection skill), the site's postcode district is in the technician's territory, the whole range lies inside the shift, the range does not overlap the 12:30 to 13:00 break, and it overlaps none of the technician's other bookings. The client has 60 technicians in 4 territories. Each territory is a list of postcode districts that you seed, and a postcode in none of them is refused as outside the area. A shift is Monday to Friday, 08:00 to 17:00 Europe/London all year. A visit booked at 08:00 on a January weekday and one at 08:00 on a July weekday both start at 08:00 London time, and so does one in the week after the clocks change. A Saturday has no bookable hours.
A booking's range starts 25 minutes before the planned arrival, which is the flat travel allowance, and ends when the estimated visit ends: 60 minutes for a call-out, 180 for an inspection and the quote's figure for quoted work. A booking that ends exactly when the next one begins is accepted. One minute of overlap is refused and the refusal names the booking in the way. A technician or time chosen by a dispatcher that breaks any rule is refused and the refusal names the rule. A dispatcher can book a long job in parts, and a visit too long for either half of a shift is refused and says so.
Booking shows the work order as scheduled, with the technician and the arrival window. Sending the same booking request twice, by a double click or a retry after a timeout, makes one booking. Cancelling a work order cancels its booking and frees the slot. A technician who leaves has their name erased, and the ID stays on their past bookings.
Architectural guidance
A technician's day cannot hold two visits at once, and a dispatcher who books by eye eventually does it. A shift that follows the wrong hour after the clocks change leaves a technician working an hour that is not theirs. A booking that ignores the travel between visits promises an arrival the technician cannot make, and a name kept on a booking after the technician has left is personal data held for no reason.
Acceptance criteria
Given a work order and a date, the dispatcher is offered the eligible arrival windows for that day across the technicians who could take the job. Each offered window shows the technician, the planned arrival and the window's start and end. A window is 2 hours wide from the planned arrival and is cut at the end of the shift, and the offer shows the shortened end.
On an empty day the first window offered for a 60 minute call-out is 08:25 to 10:25 London time, because the 25 minute travel allowance has to fit inside the shift before the arrival. With that visit booked, the next window offered to the same technician starts at 09:50. An arrival at 11:30 is offered, since the visit ends at 12:30 and does not overlap the break. An arrival at 11:45 is not offered, and the next one after 11:30 is 13:25.
The windows offered and the windows a booking accepts are the same set. Booking any offered window succeeds, and a start time that was not offered is refused.
Architectural guidance
A window promised without the travel time between visits is wrong for every later customer that day, because the technician cannot be in two places. An offer that disagrees with what booking accepts sends the dispatcher to a window that then fails. A window that runs past the end of the shift promises an arrival after the technician has gone home.
Acceptance criteria
When a technician's recorded time on a visit runs past the end of its booking, every later unfinished visit of that technician that would now overlap moves later by the least amount that clears the overlap, keeping its order. An open time entry counts as running until the current time. For example, the 08:25 arrival (booked from 08:00 to 09:25) runs until 10:05. The 09:50 visit moves to a 10:30 arrival. The next one, planned for 11:15, would have to arrive at 11:55 and would run into the break, so it moves to 13:25.
If no later slot with the same technician fits that day, the visit goes to the first eligible slot with any technician. A visit whose arrival time has already passed when the news arrives is never moved, and neither is a visit that has started or finished. A job that is completed, fails access or needs a revisit finishes its booking, and a finished booking keeps its time, stays on the technician's day and is never moved.
News of an overrun that arrives twice, or that shows the visit inside its estimate, moves nothing. The news can reach the product hours late, so a late report is checked against the day as it stands when it arrives.
Architectural guidance
A visit takes the time it takes, and the estimate is a guess: a 60 minute call-out that takes 100 pushes every later customer that day. The phone reports the overrun when it has signal, which can be hours late, and rewriting a visit that has already happened makes the record wrong. Moving a visit further than needed changes the window a customer was told by more than it has to.
Acceptance criteria
The office records that a technician is unavailable from a time until a time, with a reason of sick, leave or other. Every unfinished visit inside the period moves to another technician who has the skill, covers the postcode, is in shift, is clear of the break and overlaps none of their bookings. Emergency visits are placed first, then the rest in the order of their original arrival. Booking into the period is refused afterwards. Recording the same period twice changes nothing. A visit that ends before the period begins, a finished visit and one already started are not moved.
A visit that cannot be placed anywhere is cancelled, and its job shows to a dispatcher as needing a booking. An electrician's visit is never given to a plumber: when the only free technicians lack the skill, the visit is left unplaced.
In the simulated day a sick call arrives at 08:30. Afterwards no technician has two overlapping bookings, and every affected job is either booked again or listed as needing a booking.
Architectural guidance
A sick call turns into a morning of phone calls when nobody can see which visits the person held, who else has the skill and who is free. A visit given to someone without the skill is a customer who watches a technician fail to do the work.
Acceptance criteria
A work order marked as an emergency is booked with the eligible technician who can arrive soonest, with ties going to the lower technician ID. The planned arrival is no later than the emergency's deadline, 2 hours after it was decided, and no earlier than the current time by the clock. When no technician can arrive in time the booking is refused with a reason that says so, and nothing else changes.
The emergency goes ahead of routine visits. Routine visits in the way are moved, not dropped. Each moves to its next eligible slot, with the same technician when one fits that day and with any technician otherwise. An emergency visit is never moved to make room for another emergency, and the booking looks at another technician instead.
On a day where every technician is booked solid, inserting one emergency leaves the number of unfinished bookings exactly one higher than before. The emergency's arrival is within 2 hours of being decided, no technician has two overlapping bookings, and no displaced customer's visit has been dropped.
Architectural guidance
Visits pushed out of the way and not placed again are customers waiting at home for nobody. Two emergencies that keep displacing each other can leave both past their deadlines.
Acceptance criteria
A script committed to your repository runs the test and prints its result. Several dispatchers, played as separate sessions at the same moment, book the same few technicians on the same day with overlapping start times, and the demand is higher than the day's capacity, so refusals must happen. The script resends every request after a simulated timeout. While they run, a sick call for one of the technicians, an overrun and an emergency arrive together.
When the run ends the script reads the bookings as the office sees them and prints the number of requests sent, bookings made, requests refused and technicians with two overlapping bookings. It fails unless the last number is 0 and every request produced exactly one booking or one refusal. No visit is dropped: each job either holds a booking or shows as needing one. The result is saved in your repository.
Architectural guidance
Two dispatchers who both see a free slot each believe it is theirs, and the technician is booked into two places. The ways of moving a booking, a sick call, an overrun and an emergency, are the ones most likely to forget a rule the plain booking path follows. Only a test that runs them together finds the overlap before a customer waits at home for a technician who is somewhere else.
Architectural walkthrough
The old schedule was a list of times with no check that a technician was free, qualified and able to travel between visits. Two dispatchers clicking at the same moment book one technician into two places. A call-out estimated at 60 minutes that takes 100 pushes every later visit that day, and customers wait at home for a technician who is somewhere else. About 300 jobs a day over 60 technicians is 5 visits each, so a day has little room to absorb a mistake.
A sick call at 08:30 turned into a morning of phone calls, because nothing showed which visits the person held, who else had the skill and who was free. A visit dropped without notice is a customer waiting for nobody.
Emergencies cost the most. The client promises a technician on site within 2 hours of triage. An emergency squeezed in by editing times by hand leaves an overlap for the next dispatcher to inherit, and one that waits for a free slot misses the 2 hours.
Hold stock in vans and warehouses
Produces stock counts for every van and warehouse, parts promised to one job at a time, stock moving between locations, missing parts sourced and stocktakes that settle shortfalls. Leaves the technician's phone, and the parts it reports used, for a later Phase.
Acceptance criteria
The stores person can see, for each of the 2 warehouses, each of the 60 vans and each SKU, what is on hand, what is set aside for jobs and what is available, which is on hand minus set aside. The simulator's 120 SKUs, about 900 units per van and 2,500 units in the warehouses are in place at the start. Every change to a count is listed with who or what made it, why and when, and each count equals the sum of its listed changes. A check in your repository recomputes every count from the listed changes and finds no difference. Nothing edits or deletes a listed change, and a correction is a new change with a reason.
A part recorded as used on a job lowers the count of the van that carries it, once for each recorded part, and the change names the job. A part recorded as used on a cancelled job lowers the count too. A use larger than the van's count takes the count below zero and is not refused.
Architectural guidance
A van count that can be changed with no trace is the old system's problem again: nobody can say why a van shows 3 valves when it was stocked with 5. A count whose changes are listed can be checked against the shelf, and a count that cannot be traced is an argument at every stocktake. A part already in a wall cannot be put back, so refusing the report of its use only makes the books wrong.
Acceptance criteria
The office sets a quantity of a SKU aside for a work order, at the first warehouse with enough available stock or at a location it names. The set-aside lowers available stock by the quantity and leaves on hand unchanged. A set-aside larger than the available stock is refused whole, nothing is set aside, and the refusal says there is not enough stock. Available stock is never below zero after any sequence of set-asides.
A van holding 1 of the 22 mm isolation valves is asked by two jobs to set it aside. Exactly one succeeds and the other is refused. Sending the same request twice sets aside once.
A part used against a set-aside is not taken out twice. A location with 10 on hand and 3 set aside for a job has 7 available. When the technician uses 3 for that job, on hand is 7, set aside is 0, and available is still 7.
A cancelled job releases the parts it holds. A completed job releases whatever it did not use. Releasing twice releases once.
Architectural guidance
The last valve sold twice is a second trip and a customer who was told the job would be done today. Two jobs that ask in the same moment can each be told yes. Counting a used part against both what is on hand and what is set aside takes it out twice and hides stock that is still on the van.
Acceptance criteria
The stores person can send a quantity of a SKU from one location to another. The quantity leaves the source at once and is counted at neither location while it is on its way. A list shows every transfer on its way, with its age. When the destination receives it, the quantity is counted there.
The units on hand across all locations plus the units on their way is the same number after any sequence of transfers and receipts, and a check in your repository confirms it. A transfer larger than the source's available stock is refused. With 8 on hand and 4 set aside, moving 5 is refused and moving 4 succeeds. Receiving a transfer twice changes nothing the second time. Receiving at a location other than the destination is refused. A transfer that never arrives stays on the list.
Architectural guidance
A transfer that leaves one count and reaches the other in a single step makes stock vanish during the drive between them, and a technician who arrives to find the part missing cannot tell whether it ever left. A transfer that loses units never oversells anything, so it can go unnoticed for a long time. Moving stock that is already promised breaks a promise another job holds.
Acceptance criteria
When a job needs a revisit because a part was missing, the missing part is set aside for that job from the first location with enough available stock: the first warehouse, then the second, then vans in van number order. It is then sent to the van of the technician who raised the revisit. The source no longer shows it set aside for that job, and when the part reaches the technician's van it is set aside there for the return visit. A part set aside for another job is never taken, so a van whose only unit is set aside is not a source.
When no location has the part, the job shows as waiting for a part and the need stays open. When stock of that SKU later becomes available, through a stocktake or an incoming transfer, the open need is sourced without anyone asking again. If nothing has covered it after 3 days, the office is alerted. The same revisit processed twice sets aside and sends once.
Architectural guidance
Taking a part that another job was promised moves the failure to a different customer. A shortage nobody is told about leaves a customer waiting on a part that nobody is looking for.
Acceptance criteria
The stores person records a stocktake for a location and a SKU with the counted quantity. The count is compared with what the system showed, and the difference is recorded as an adjustment with a reason. Sending the same stocktake twice changes nothing. A van whose count stood at -2 after a part was used that the van did not hold, and which is counted at 0, gets an adjustment of +2 and the shortfall is closed.
When the count leaves fewer units on hand than are set aside, not every promise can be kept. The newest set-asides are uncovered first, each whole, until the rest are covered. The office is told which jobs lost their part, and each is sourced again. A van with 4 units on hand, 2 set aside for an older job and 2 for a newer job, counted at 3, uncovers only the newer job. Counted at 1, it uncovers both.
Architectural guidance
The system's counts drift away from the shelf, and a stocktake is the moment the shelf wins. If the count is lower than the units already promised, some customer finds out at the door unless the shortfall is dealt with there and then. When the office is told which promises broke, it finds out from the product and not from a technician standing at an empty van.
Acceptance criteria
A script committed to your repository runs the test and prints its result. It takes a van holding a known number of units of one SKU and, from separate simultaneous sessions, sets it aside for different jobs, sends it to other locations and records it as used, so that demand is higher than stock. A stocktake runs in the middle, and the script kills the product's process once while a part is being set aside for a job.
When the run ends the script prints the units set aside, sent, used and refused, and the available stock of every location it touched. It fails unless no location shows negative available stock because of a set-aside, the units set aside at each location are within what is on hand there, and the units on hand across locations, on their way and used equal the units the run started with plus the stocktake adjustments. Every refusal was shown to the person who asked. After the kill, a job either shows the part set aside once, or shows nothing set aside and the stock unchanged.
The script then sends every request a second time and shows that no figure changes. The result is saved in your repository.
Architectural guidance
Overselling is a race, and a test that never makes the race happen cannot show it is gone. Set-asides, transfers, used parts and a stocktake all change what is available, and the one that is protected while the others are not is the one that oversells. Units that leave a count without arriving anywhere never oversell a valve, so only a check that every unit is still somewhere finds them. A process that dies between promising a part and telling the job leaves stock held for a job that does not know it holds it.
Architectural walkthrough
The old system kept one stock number for the whole company and had no idea what a van held. Two jobs were promised the last 22 mm isolation valve. The cost is a second trip, a customer who was told the job would be done today, and a technician at the door without the part. With 60 vans holding about 900 units each and 2 warehouses holding about 2,500 units, the vans are most of the company's stock.
Stock also moves. Parts sent from a warehouse to a van are in neither place during the drive, and if they vanish from every count a technician can arrive to find the part missing with nobody able to say whether it ever left. Counts drift from the shelves too: a stocktake finds fewer units than the system believed, and promises already made against them cannot be kept.
When a part is missing, a visit has already been spent. The return visit cannot fail for the same reason.
Sync the technician's device
Produces today's jobs on a phone with no signal, offline changes taken once and merged with the office's, decisions waiting for the office, and used parts that are always recorded. It leaves invoicing for the next Phase.
Acceptance criteria
A technician with no signal opens the phone and sees the day's visits. Each visit shows the site address, access notes, description, the 2 hour arrival window, the parts set aside for it and the notes so far. The customer's phone number is shown for those visits only, so the technician can ring from the street. Once the Europe/London day ends it is gone from the phone, and a test that moves the simulator clock past midnight finds no number left. A customer's name, email and billing address never reach the phone.
Whatever the office changes reaches the phone at its next sync, once each: a new booking, a moved booking, a cancellation, a decision waiting for the office, a sick technician's day moving. Syncing twice in a row shows nothing twice. A phone whose clock is 15 minutes slow sees exactly the same visits and changes as one with the right clock. A phone that is not registered to a technician is refused and shown nothing. When a customer's number cannot be fetched at that moment, the phone marks it as not available yet and shows it at the next sync. It never shows a wrong or empty number as if it were real.
Architectural guidance
A phone whose clock runs 15 minutes slow can miss the changes the office made in those 15 minutes, and the technician drives to a job the office cancelled. A phone number that stays on a phone after the day ends outlives the customer's request to erase it, and that is a complaint to the client's data-protection contact. A number shown wrong sends the technician to ring a stranger.
Acceptance criteria
A phone that has been offline for hours uploads a batch of changes, about 100 per technician per day, offline for 3 hours on average and up to 8. The product acknowledges the batch, and the acknowledgement means the changes are safe on the product's side. The same batch uploaded again, a minute later or at the same instant from the same phone, gets the same acknowledgement and changes nothing: the job holds each note, each parts-used entry and each minute of time on site once.
A phone gets its acknowledgement even when the office is busy, so it is never left retrying because of load. In the simulated day 5 percent of batches are uploaded twice, and the job totals are the same as if every batch had arrived once. Negative case: a phone that times out and uploads a batch carrying 55 minutes of time on site 30 seconds later leaves the job with 55 minutes, not 110.
Architectural guidance
Phones retry on any failure or timeout, so a slow answer makes the same batch arrive twice. Counted twice, 55 minutes of work becomes 110, and the customer is billed for labour nobody did. A phone that is never told its batch arrived keeps sending it, and one that is told too early loses the changes if the product dies right after.
Acceptance criteria
Notes, time on site, parts used and photos from the phone and from the office all end up on the job, and none is lost. If the office adds a note at 10:12 and the phone's note from 10:20 uploads at 18:00, the job shows both, each with who wrote it. Time on site entered by the office and time uploaded by the phone are both listed and both counted. Parts used and photos from either side are all listed.
The result is the same whichever side arrives first. An office edit never removes a phone's note, and a phone's upload never removes the office's. Negative case: two notes written at the same minute are both kept, and neither wins by being later.
Architectural guidance
When two people save the same job, the later save can wipe the note the earlier one wrote. The lost note is the one about the live fault or the asbestos panel, and the cost is a repeat visit or an injury. Time and parts that go missing leave a bill the client cannot defend.
Acceptance criteria
The 10:05 and 10:20 case is the test. The office cancels a job at 10:05. At 18:00 a batch arrives carrying a completion recorded at 10:20, with a note, 55 minutes of time, two parts used and a photo. The job stays cancelled. The note, time, parts and photo are kept on the job. The office sees a decision waiting that shows the attempted completion, the status that was kept and the visit's evidence. No work invoice exists. The technician's phone shows the cancellation at its next sync. The result is identical when the phone's recorded time is 15 minutes before the cancellation and when it is 15 minutes after.
The office resolves the decision by charging the visit fee of 4,000 pence or by waiving it, and the choice is added to the job's history with who made it and when. An edit from a phone to the site address, access notes, booked time or assigned technician loses to the office's value, the value is unchanged, the technician is told at the next sync and the office sees a decision waiting. A status change the rules forbid, such as starting a job that has no booking, or one from a technician who is not the one booked, is refused and shown to a person as a decision.
Negative cases that make no work for the office: a phone repeating a move the job is already at or past, made by the same technician, is ignored without a decision. If a completion arrives in a batch before the earlier on-the-way and started taps, the job ends completed, and the late taps create no decision. A change repeated in a later batch creates no second decision.
Architectural guidance
A phone's clock is wrong by up to 15 minutes and its batch may be hours old, so ordering by the time on the phone would let the 10:20 completion win by being later. That is what the old app did, and a tenant paid for a job the landlord had cancelled. A refusal that nobody sees leaves nobody to decide whether the visit is billed, and the technician's phone still shows a finished job.
Acceptance criteria
A part reported as used on the phone is always recorded on the job, in each of these cases: the job was cancelled in the meantime, no part was set aside for the job, and the van held none of that part according to the books. A part used on a cancelled job is not put back on the shelf. The same report uploaded twice is recorded once.
The stores person sees every part used that the books could not cover, with the part, the van, the job and the quantity short, and it stays on that list until a stocktake adjustment settles it, after which it is gone. When the van did hold the part, its count goes down by the quantity used. Negative case: a report of a part used is never refused because stock says zero.
Architectural guidance
The part is already in the wall, so refusing the report loses a fact and leaves the books wrong. The next job is then promised a part the van does not hold, which costs a second trip. The client also cannot bill for a part nobody recorded.
Acceptance criteria
A test takes one set of batches and uploads them in shuffled orders, with repeats, up to 8 hours late, and with phone clocks wrong by up to 15 minutes either way. Every order ends with the same jobs (status, notes, time, parts used and photos), the same decisions waiting for the office, and nothing stored twice. Two uploads of one batch at the same instant, many times over, also end with the batch stored once.
The set includes the 10:05 cancellation against the 10:20 completion that syncs at 18:00, and every order ends with the job cancelled, the evidence kept and one decision waiting. The README takes a reviewer from a fresh clone to that decision in 20 minutes and lists the command that runs this test. Negative case: a product that counts a repeated upload a second time fails the test, and the failure names the order that broke.
Architectural guidance
An order-dependent bug shows only when one particular batch lands first. At 18:00, with 60 phones uploading, the order differs every day, so the client finds out when a tenant disputes an invoice. A test that tries only the order the author expected proves nothing about the others.
Architectural walkthrough
A technician in a basement has no signal for hours, and the office keeps working. At 10:05 the dispatcher cancels a job after the landlord rings to say it is sorted. At 10:20 the technician finishes the work, and the phone uploads that at 18:00. If the 10:20 completion wins because it carries a later time, the job flips back to completed, an invoice goes out for a visit the landlord had cancelled, and the tenant disputes it.
Phone clocks are wrong by up to 15 minutes either way, so a time written on a phone cannot say which edit came first. A phone that gets no answer in time uploads the same batch again, so anything the product does on receipt happens twice unless it takes care. Batches arrive in any order, hours late, and 60 phones do it at once.
A job that quietly loses a technician's note about a live fault, a part already fitted in a wall or 55 minutes on site costs the client a repeat visit or a bill nobody can defend. A cancelled job that quietly becomes completed costs a tenant's trust. This Phase ends with the same uploads arriving shuffled, repeated and late, and the same jobs, the same decisions for the office and nothing stored twice at the end of every order.
Invoice the work
Produces one invoice for each completed job, each payment counted once, credits and refunds made once, and a hold while a dispute is open. It leaves variations and visit fees for the next Phase.
Acceptance criteria
A completed job gets exactly one work invoice, issued when the job completes. It shows the billing name and address, net, VAT and gross in whole pence, with net worked out once on the total as gross times 5 divided by 6, rounded half up. A call-out or inspection is invoiced at the larger of 8,000 pence and the labour (1,500 pence per started 15 minutes), plus parts. For example, 20 minutes on site and no parts is 8,000 pence gross, 6,667 net and 1,333 VAT. 100 minutes and 4,000 pence of parts is 14,500 pence gross, 12,083 net and 2,417 VAT. Quoted work is invoiced at the accepted total plus approved variations, whatever time was spent, so the 90,000 pence consumer unit bundle is 75,000 net and 15,000 VAT. The customer reaches the invoice by a signed link.
A cancelled job is never invoiced as work. A payment taken on site before the invoice exists is applied when the invoice is issued, and the invoice shows as paid if the payment reached its gross. Kill the product's process after a job completes and before its invoice is made: after restart the job has one invoice. A completion reported twice yields one invoice.
Architectural guidance
An invoice made by a button leaves completed jobs unbilled and cancelled jobs billed, and nobody finds out until accounts reconcile or a tenant complains. A process that dies between finishing a job and invoicing it leaves a job that is done and unbilled. Two invoices for one job means the customer is chased twice.
Acceptance criteria
Your fake payment provider causes these behaviours: it signs each notification and the product accepts one only within 5 minutes of its signing, it resends a notification it got no acknowledgement for during up to 3 days, it sends 5 percent of notifications twice and 10 percent out of order. A notification with a wrong signature, or one older than 5 minutes, is refused and changes nothing.
Each payment counts once, however often it is notified. An invoice is paid when its recorded payments reach its gross, so payments of 5,000 and 3,000 pence on an 8,000 pence invoice end it paid in either order, and a part payment shows the balance left in pence. A payment taken on site that is notified before its invoice exists is not lost and is applied when the invoice is issued. Negative case: kill the process in the middle of recording a notification, let the provider resend it, and the payment is counted once.
Architectural guidance
A provider gives no promise about order and may send a notification twice. Taken at face value it charges a customer twice, loses the on-site payment, or leaves a paid invoice chasing the customer. A notification accepted without checking who signed it lets anyone mark an invoice paid.
Acceptance criteria
A disputed invoice is corrected by a credit note showing net, VAT and gross in whole pence. The invoice itself is never edited. A credit note for the full gross of an unpaid invoice also voids it. Credit notes that together exceed the invoice's gross are refused.
For a paid invoice, a refund is made once per credit note, against the amount paid. Clicking refund twice, or repeating the request after a failure, leaves one refund at the provider. The provider remembers a refund request for 24 hours, and a repeat after that is still not a second refund. Negative case: kill the process after the refund is sent and before it is noted, restart, and the provider's records show one refund and the invoice shows it as refunded.
Architectural guidance
A refund is money leaving, and a crash between sending it and noting the answer is exactly when a second one goes out. The client can get that cash back only by asking the customer. A provider that forgets a repeated request after 24 hours turns a retry the next day into a new refund.
Acceptance criteria
When the office reopens a job after a dispute, its invoice goes on hold, and accounts see it marked as on hold because of a dispute. A held invoice cannot be voided and cannot be charged again, and no second invoice is issued for the reopened job. Payments that arrive for it are still counted.
The hold ends when a credit note settles the dispute, or when the reopened job completes again. In the second case the same invoice is released and no second invoice appears. Negative case: a job completed again after a reopen, over several attempts and a restart, still has one invoice.
Architectural guidance
A dispute means the customer says the work was wrong. Voiding or charging the invoice again while it is open takes money for work under dispute or removes the record of what was billed. A second invoice for the same visit doubles the claim and makes the tenant's dispute worse.
Acceptance criteria
A test replays a stream of payment notifications for the day's invoices, about 300, with 5 percent duplicated and 10 percent out of order, including payments reported before their invoice exists and a few with bad signatures. Every invoice ends paid exactly once, no payment is counted twice, and the totals equal those of a clean stream. The replay is run shuffled several times and once with the process killed part way, and the totals are the same each time.
The README lists the command that runs it. Negative case: a stream in which one genuine payment is dropped leaves that invoice unpaid, and the test names it.
Architectural guidance
A duplicate or a reordered notification only does harm when it lands at the wrong moment, and at 300 invoices a day a 5 percent duplicate rate means about 15 chances a day. A test that replays only a clean stream passes while the client's accounts drift.
Architectural walkthrough
The old app made invoices from a button on the accounts screen. Some completed jobs were never billed and some cancelled ones were, and nobody could say which without reading every job. A tenant who disputes an invoice for a cancelled job costs the client the invoice, the goodwill of the landlord and an afternoon of accounts staff.
Payment providers send the same notification twice and send two notifications in the wrong order. A card payment taken on site at 10:20 is reported at once, while the invoice it pays does not exist until the completion syncs at 18:00. A product that counts each notification as an instruction charges a customer twice, loses the on-site payment, or leaves a paid invoice chasing the customer for money already received.
Money that leaves is worse than money that arrives. A refund sent twice is cash the client can recover only by asking the customer. A process that dies after sending a refund and before noting the answer is the moment it happens. An invoice is a legal document: a mistake is corrected by a credit note, and an invoice under dispute is neither voided nor charged again while the dispute is open. This Phase ends with a replayed stream of payment notifications, duplicated and reordered, that must leave every invoice paid once.
Turn an accepted quote into a booked job
Produces the journey from a customer's acceptance to parts set aside, one work order and a booked visit, variations billed only after approval, and the flat fee for a late cancellation or a no-access visit. It leaves messages to customers for the next Phase.
Acceptance criteria
A written, hand-worked table, kept in your repository, of what a failure after each step of an accepted quote leaves behind. The steps are parts set aside, work order created, visit booked. For each failure the table says what the customer, the office and the stores person see and what is undone. It is worked on at least five named examples, including a 90,000 pence consumer unit bundle and a quote with no parts.
The table states these answers: the customer's acceptance is never undone; a failure to create the work order after the parts were set aside releases the parts; a failure to book the visit keeps the parts and the work order and alerts the office; a part that cannot be set aside makes the job wait while it is sourced, with the office alerted after 3 days; a cancelled job releases its parts; a quote with no parts skips the first step. Negative case: a row that says the customer is told the acceptance failed is wrong, and the table says why.
Architectural guidance
Without an agreed answer for each failure, the answer is decided in code by whoever hits it first, and each decision differs. The customer who accepted a 90,000 pence quote may be told nothing, and parts locked for a job that never exists keep another technician from getting them.
Acceptance criteria
After a customer accepts a quote, the accepted quote ends with the parts set aside (skipped when it has none), one work order and a visit booked at the first eligible slot. The customer sees the acceptance confirmed at once, whatever happens to the later steps. The same acceptance sent twice, even at the same instant, yields one set of parts, one work order and one visit.
A part that cannot be set aside leaves the job waiting while it is sourced, and the journey finishes by itself when the part is found, with the office alerted if it waits 3 days. Kill the product's process at any moment of the journey and restart: it finishes, and no step is done twice. A booking that fails keeps the parts and the work order and alerts the office.
Architectural guidance
A process can die between setting the parts aside and creating the job, which leaves stock locked for a job nobody knows about. Restarting and repeating a step can set the parts aside a second time, and then another job is told the part is out. A customer who never gets a visit finds out by phoning.
Acceptance criteria
On quoted work, a technician proposes extra work on site with a description and a price in pence. The customer approves or declines it by a signed link. The original quote stays as it was, still showing the accepted total, and the extra work is billed only after approval, so the invoice is the accepted total plus approved variations. A declined variation changes nothing. Approving twice counts once. A proposal on a call-out is refused, because only quoted work takes variations.
A completion recorded while a variation is pending is accepted but the job is not complete for billing until the variation is decided, and no invoice is issued before then. The office is alerted when a variation has waited 3 days for the customer. Negative case: the customer who never answers is never billed for the extra work.
Architectural guidance
A customer billed for extra work they never approved disputes the whole invoice, not only the extra. One who is not asked first pays the company's cost of the dispute. A variation that overwrites the quote leaves no record of what the customer agreed to.
Acceptance criteria
A customer who cancels after the technician has set off, or a visit that finds no access, is charged the flat fee of 4,000 pence, issued as its own invoice with 3,333 pence net and 667 VAT. At most one fee is issued per visit, however often the trigger is reported or the office chooses to charge it. The fee the office chooses on a refused completion is this same fee, charged once.
A customer who cancels before the technician has set off pays nothing. A cancelled job is never invoiced as work, so the fee invoice is the only invoice. A no-access visit returns the job to needing a new booking, or the job is cancelled, and the fee remains charged once either way. Negative case: reporting no access twice, and the office charging the same fee afterwards, leaves one fee invoice.
Architectural guidance
Each wasted visit costs the client a technician's slot and the drive. Without a fee the client carries that cost every time. A fee charged twice is a dispute the client loses.
Acceptance criteria
A test makes each step of the journey from acceptance to a booked visit fail, and separately kills the product's process at each step. After recovery there is no part set aside for a job that does not exist, no job without a booked visit that the office has not been told about, and no step done twice. The customer's acceptance stands in every case.
The test also sends the same acceptance twice at the same instant and approves a variation twice, and each ends with one outcome. The README lists the command that runs it. Negative case: a run in which the work order fails after the parts are set aside ends with the parts released.
Architectural guidance
A half-finished journey is found weeks later, as a job that was never booked or a part nobody can find. The cost is a customer who has waited without a technician and stock that is wrong for every other job. A test that only fails the last step misses the one that leaves the mess.
Architectural walkthrough
A customer who accepts a quote has made a promise to the company and received one back. After that, three things have to happen: the parts are set aside, the job is created and a visit is booked. A process can die between any two of them, and any of them can fail. Parts set aside for a job nobody created stay out of other jobs' reach for weeks. A job with no visit leaves a customer who accepted a 90,000 pence quote waiting for a technician who is never sent.
The customer's acceptance stays whatever fails afterwards, because a failed booking is the company's problem. A part that is not in stock means the job waits while the part is sourced, and the customer hears in days, not minutes. The office has to hear about the cases that need a person, within the 3 days the client gives itself.
Two more things in this Phase also wait on someone else. A technician finds extra work on site, and the customer takes days to answer. A customer cancels after the technician has set off, or the technician cannot get in, and the company has lost the slot and the travel. The failure is billing for extra work nobody approved, or billing a fee twice.
Notify customers
Produces arrival-window and on-the-way text messages, one message per customer after a reshuffle, and delivery that survives a provider outage. It leaves the whole-system proofs for later Phases.
Acceptance criteria
After a booking is made or changed the customer receives an arrival-window message by SMS, stating the 2 hour window in Europe/London time. When the technician sets off the customer receives an on-the-way message. Both go through your fake SMS provider, which can be made to answer late, fail, or report a message delivered twice. An on-the-way message that cannot be delivered within 30 minutes is dropped and recorded as dropped, not sent late.
A customer who has been erased gets no message, and the failure is recorded against the job. Negative case: a booking made while the provider is failing produces its window message once the provider answers, and not an on-the-way message for a visit that has already ended.
Architectural guidance
The arrival window is what a customer needs to stay home. A missing or wrong one costs a morning of waiting or a failed visit. A message to a number the customer asked to have erased is a data-protection complaint against the client.
Acceptance criteria
A customer whose booking changes several times gets one message stating the final window. The message is sent once the booking has been quiet for 5 minutes, and at most 30 minutes after the first change. A sick call that moves one booking three times in four minutes yields one message, sent 5 minutes after the last move.
Changes that arrive in any order, including the last move reaching the product before the one before it, never put an older window back: the message states the newest booking. A process restart during the wait loses nothing and shortens nothing. At most one message of each kind is sent per booking change. Negative case: a change that does not alter the window sends nothing.
Architectural guidance
Three messages in four minutes can reach the customer's phone in the wrong order. They then hold a window that was already replaced and stay home for the wrong morning. A product that sends a message for every reshuffle teaches customers to ignore the next one.
Acceptance criteria
With the SMS provider down, bookings, phone sync and invoicing keep working. Messages that could not be sent are tried again every 10 minutes until the window starts, and a message whose window has started is recorded as failed and not sent. When the provider returns, no message is lost and none is sent twice, even when the provider answered late or reported a message delivered twice. The simulated day has the provider down for 2 hours.
Negative case: a message sent while the provider was only slow and then reported failed ends up recorded once, not sent again and again.
Architectural guidance
A provider that is down for 2 hours can drag the rest of the product down with it if the product keeps trying in a way that slows everything else. Dispatchers who cannot book leave 60 technicians without a next job. When the provider returns, a careless resend gives one customer six copies of the same message.
Acceptance criteria
A test plays a reshuffled day with a sick call, an overrun and an emergency, and ends with one message per affected customer, stating that customer's final window. The count is checked against your fake SMS provider's own record of what it received, not against the product's account of what it sent.
Kill the process after a message is sent and before the product has recorded it: after restart the provider has received that message once. Run the same day with the provider down for part of it, and each customer still ends with one message. The README lists the command that runs it.
Architectural guidance
A message cannot be taken back, and a process can die after the text has left and before the product knows it. Sending again on restart gives the customer two messages, and not sending loses it. The only honest count is the provider's own.
Architectural walkthrough
A sick call can move one customer's booking three times in four minutes. A product that sends a message for each change sends three, and if they arrive in the wrong order the customer is holding a window that was already replaced. The customer stays home the wrong morning. Over a morning of reshuffles, a customer who gets five messages learns to ignore all of them.
A text message cannot be taken back. The SMS provider can be down for 2 hours, answer late or report a message delivered twice. A product that gives up after the first failure leaves customers hearing nothing. One that resends carelessly sends the same message twice when the provider comes back. A window message for a window already under way is wrong, and an on-the-way message that reaches the customer after the technician has knocked is noise.
A message to a customer who asked to be erased is a complaint to the client's data-protection contact. This Phase ends with a reshuffled day in which every affected customer gets one message that states the final window, even when the process dies right after a message has gone out.
Operate the system
Produces what an operator needs: one job's whole story in one place, a failing message that waits without blocking the others, and a report of regulated jobs that miss a certificate or a deadline. It leaves the whole-system proofs for the last Phase.
Acceptance criteria
Given a request, a quote or an invoice number, an operator reads in one place everything that happened to the job, in order: the request, the quote, the acceptance, booking changes, the visit, parts, decisions for the office, the invoice, payments and messages. Each entry says who or what made it and when. For a change made on a phone it shows both when the phone says it happened and when the product learned of it. The three numbers lead to the same job.
The 10:05 and 10:20 job reads end to end: the cancellation at 10:05, the completion that arrived at 18:00, the decision for the office and how it was resolved. A customer who has been erased shows as erased, not by name. Negative case: with the messages capability stopped, the story still shows everything else and says plainly that the messages part is not available, rather than leaving a silent gap.
Architectural guidance
An operator reading a dozen places can put two events in the wrong order and tell the customer a wrong story. Phone clocks differ by up to 15 minutes, so a story ordered only by the phone's time puts the 10:20 completion before the 10:05 cancellation. A gap in the story that is not marked reads as nothing having happened.
Acceptance criteria
Anything the product cannot complete, such as a text to a number the provider always rejects, a payment notification or a phone change, is tried up to 5 times. After the fifth failure it is set aside and shown to an operator with what it was, why it failed, how many attempts were made and when. Everything behind it still gets through. A test puts one text to a number the provider always rejects among 100 good ones, and all 100 go out within the normal time.
When the cause is fixed, the operator retries the item and it takes effect once. Retrying it twice still has one effect. Negative case: an item that failed 5 times is never dropped silently, and it stays on the operator's list until it succeeds or the operator removes it.
Architectural guidance
One item that fails every time and is tried again forever holds up everything behind it, and 60 technicians' uploads sit behind one bad change. One dropped without a trace is worse: a payment goes missing and nobody notices until the books are checked. The cost is a stuck day or a missing payment.
Acceptance criteria
A report lists four things. Inspections whose visit date has passed with no certificate recorded. Properties whose next inspection, 5 years after the last satisfactory one, is due. Unsatisfactory results whose remedial work, due 28 days after the result, is overdue. Remedial work done whose confirmation to the tenant and the local housing authority, due 28 days after the remedial work, is missing.
The office can record on a certificate that remedial work was done on a date and that the confirmation was sent on a date, and the report reflects both at once. For example, an unsatisfactory result on 3 Mar 2026 has remedial work due on 31 Mar 2026. If remedial work is recorded on 20 Mar 2026, the confirmation is due on 17 Apr 2026. The product sends nothing to a housing authority. Negative case: a certificate with remedial work recorded in time and confirmed in time appears on none of the four lists.
Architectural guidance
The client's landlord customers must complete remedial work within 28 days and confirm it within another 28. A landlord who misses either deadline pays the penalty and blames the client.
Acceptance criteria
A named test, with its command in the README, asks for the 10:05 and 10:20 job by request, quote and invoice number and gets the same job and the same story each time, including the cancellation at 10:05, the completion that arrived at 18:00 and the decision for the office. With the messages capability stopped, the story shows everything else and says plainly that the messages part is not available. The test puts one text to a number the provider always rejects among 100 good ones: all 100 go out in the normal time, the bad one is set aside after 5 failures with its reason and attempts, and retrying it twice has one effect. A certificate with remedial work recorded and confirmed in time appears on none of the four report lists.
Architectural guidance
An operator who cannot read one job's story while a part is down is blind in exactly the hour the story is needed. A failing item that is dropped silently loses a customer's message, and one that blocks the queue delays every job behind it.
Architectural walkthrough
At 3pm a customer phones about a job and an operator has to say what happened to it. If the answer is spread over a dozen places that disagree about the order of events, the operator reads them wrong, and the customer is told the wrong story. A phone's clock can be 15 minutes wrong, so even the order of two entries can mislead.
One message that cannot be delivered, a text to a number the provider always rejects or a phone change the product cannot apply, can hold up everything behind it if the product keeps trying it. Sixty technicians' uploads stuck behind one bad change is a stopped day. Dropping the bad one silently is worse: a payment goes missing and nobody knows.
The client's landlords must carry out remedial work within 28 days of an unsatisfactory inspection and confirm it within another 28. An inspection with no certificate, or a deadline passed, is found when the local housing authority asks for evidence. The cost is the landlord's penalty and the client's reputation.
Prove the system
Produces the proofs a whole company needs: the evening sync storm, the product working with one capability stopped, one capability replaced while the rest serve, and a simulated working day with every failure at once. It leaves nothing for later because it is the last Phase.
Acceptance criteria
At 18:00 on the simulated clock, 60 phones upload about 6,000 changes within 5 minutes while dispatchers keep booking. Every change is acknowledged, none is stored twice, including those from phones that upload again because no answer came in time, and every change ends applied, merged or waiting as a decision for the office within 15 minutes of the storm ending. Every booking a dispatcher makes during the storm completes within 5 seconds.
The storm includes the 10:20 completion on the job the office cancelled at 10:05, and it ends as a decision for the office with the job still cancelled. The README lists the command that runs the storm, and the numbers it measured (the slowest booking, the time the last change settled, the count of changes stored) are committed. Negative case: if one phone's batch is lost on purpose, the run fails and names the phone.
Architectural guidance
A slow product at 18:00 makes its own load worse, because phones that get no answer upload again. Dispatchers waiting a minute for a booking leave customers on hold. A change lost or stored twice in the storm shows up the next morning as a wrong job, and no one can say which phone it came from.
Acceptance criteria
The simulator stops one capability at a time for an hour and the others named as working keep working, with no failed calls among them. What depended on the stopped capability waits and then completes once.
With invoicing stopped, dispatchers still book, phones still sync and jobs still complete. When it returns each completed job has exactly one invoice and payments received meanwhile count once. With stock stopped, requests, quotes, bookings and phone uploads still work, setting a part aside waits, and parts used offline are still recorded. When it returns the waiting promises complete once and nothing is oversold. With phone sync stopped, the office books and invoices as usual and the phones upload on return as in the earlier Phase.
With messages stopped, bookings and phone sync work, and each customer then receives one message stating the final window. With booking stopped, customers still submit requests and accept quotes, phones still sync, and jobs waiting for a booking are placed on return, each once. With request intake stopped, jobs already made are still booked, synced and invoiced, and a customer trying to submit is told it failed rather than left believing it arrived. Each case states the capabilities that keep working and what waits.
Architectural guidance
Parts of a product depend on each other in ways nobody wrote down, and a stopped part that stalls an unrelated one is found in production, on the day it happens. If invoicing stops and 60 technicians cannot get their next job, the client pays 60 people to wait. A request that fails silently loses a customer.
Acceptance criteria
During a simulated working morning, one capability is replaced with a new version while dispatchers keep booking, phones keep syncing and customers keep accepting quotes. There are no failed requests among the capabilities that were not replaced. The replaced capability loses nothing and repeats nothing across the change: a phone's upload in progress, a booking being made and a text being sent when the swap happens each end once.
The README gives the command that does the replacement and the check that follows it. Negative case: a new version that is slow to start, started while the old one is still running, ends with every job and every message once, not twice.
Architectural guidance
The client will update the product in working hours, and an update that drops a phone's upload halfway or sends a text twice costs a lost change or an annoyed customer. The working day runs from 08:00 to 18:00 and later, so there is no quiet hour to wait for.
Acceptance criteria
One command runs the whole working day faster than real time, on a weekday that is not a clock-change day. It sends 350 requests (60 percent web, 40 percent phone, 10 percent emergencies, about 15 percent through a quote), which produce about 300 jobs for 60 technicians with their quotes, bookings, visits, invoices and messages. About 3 percent of invoices are disputed, and the office resolves the day's decisions, charging one visit fee and waiving another. A handful of customers are erased during the day. The run is seeded, and the same seed plays the same day.
The simulator causes these failures at times it prints: a technician's sick call at 08:30, the emergency at 11:00, the 10:05 cancellation against the 10:20 completion that syncs at 18:00, 5 percent of payment notifications repeated and 10 percent out of order, a payment taken on site that reaches the product before its invoice exists, the SMS provider down for 2 hours, stock stopped for 1 hour, 5 percent of change batches uploaded twice, phone clocks wrong by up to 15 minutes, one process killed mid-task in each capability, and the 18:00 sync storm.
The run records when each fault starts and ends. While stock is stopped the other capabilities keep working, and the run shows zero failed calls among them. It finishes when all waiting work has finished and exits with a failure if the product has not settled within a limit you set and document. It writes a results file with counts of requests, jobs, quotes, bookings, invoices, payments, messages, decisions opened and resolved, and messages that kept failing, and leaves the product's data in place for the next Checkpoint. The results of one run are committed to your repository.
Architectural guidance
A day with faults is the only place the capabilities meet one another under pressure, and most bugs between them need two things to go wrong at once. A fault schedule and results the run prints make a failing day explainable. A failure that cannot be reproduced cannot be fixed, which is why the same seed has to play the same day.
Acceptance criteria
After the simulated day, checks that read the product from outside confirm each promise the client makes to its customers. No technician has two overlapping bookings. No part is promised above what is available. Every completed job has one work invoice and a cancelled job has none (a fee invoice for a charged fee is allowed). Every change a phone sent is applied, merged or waiting as a decision. Each customer got one message per reshuffle. Every part reported used is recorded as used or as a shortfall for the stores person. No part is set aside for a job that does not exist, no visit is booked for a job that does not exist, and no accepted quote is left half-done. No customer name, phone or email remains for a customer who was erased, except on an issued invoice.
Each check prints pass or fail, and on a failure names the offending job, technician or invoice. Negative case: the README gives a command that breaks the product on purpose, one promise at a time (a double-booked technician, an invoice for a cancelled job), and each check notices its own break.
Architectural guidance
A check that has never failed proves nothing, because it may be looking in the wrong place. A promise broken in the simulated day is the same promise a tenant, a landlord or an accountant finds broken in real life, much later. The cost of the late discovery is the dispute.
Architectural walkthrough
The 18:00 sync is the heaviest moment of the working day, with about 6,000 changes from 60 phones within 5 minutes. A phone that is not answered in time uploads again, so a slow product makes its own load worse. Dispatchers are still booking at the same time, and a booking that takes a minute leaves a customer on the phone to a call-taker with nothing to say.
Capabilities depend on each other quietly. Invoicing that is stopped for an hour and stops dispatchers booking leaves 60 technicians without their next job. Stock that is stopped for an hour and stops requests being taken costs the company the customers who phoned a competitor. An update in working hours is a failure the client causes itself, and it can drop a phone's upload halfway or send a text twice.
Each failure on its own was survived in an earlier Phase. A day when a technician is sick, an emergency comes in, the SMS provider is down, payments are repeated and a process dies together finds what single tests cannot. The promises the client made to its customers have to be checked from outside after that day, because the product's own account of itself is the thing in doubt.
Architectural walkthrough
A job is edited by people who cannot see each other
The old app kept one copy of each job, and whichever device or desk saved last won. Every failure in the client's account traces back to that. A phone that had been offline for hours replaced a decision the office made at 10:05, because nothing could tell a decision from a stale copy of an older state.
The client's story is the one to hold in mind. At 10:05 the dispatcher cancels a job after the landlord rings to say it is sorted. The technician is in a basement with no signal, finishes the work at 10:20 and syncs at 18:00. In the old app the job flipped back to completed, an invoice went out, and the tenant disputed it. Nobody could say which version was true.
Check your build against that story. After the 18:00 sync the job is still cancelled. The technician's notes, time on site, two parts and photo are all kept. The parts are accounted for. The office sees a decision waiting with the visit's evidence, because the visit happened and a person has to say whether to charge the fee or waive it. No work invoice exists. The technician's phone shows the cancellation and the outcome at its next sync.
The last valve
The client's other incident is two jobs promised the last 22 mm isolation valve. The old system kept one stock number for the whole company and had no idea which van held what. The cost is a second trip and a customer who was told the job would be done today.
Two jobs asking for the last valve at the same moment must end with one promise and one refusal, however the requests interleave. A technician who reports a part used when the books say the van held none is a different problem: the part is already in the wall. Refusing the report would lose a fact, so it has to be recorded, and the stores person has to see the shortfall.
Things that happen twice, late or halfway
Payment providers send the same notification twice and send two notifications in the wrong order. A payment taken on site can reach the product before the invoice it pays exists. A process can die between saving a completed job and telling anyone. The cost shows up as a customer charged twice, a paid invoice that still chases the customer, a completed job that is never billed, or a customer who accepted a quote and never gets a visit, and nobody finds out until someone phones.
Your build should end in the same place whatever order these happen in, and whatever instant a process dies. Repeat a payment notification and the invoice is paid once. Kill a process in the middle of an acceptance and the customer ends with their parts set aside, a work order and a booked visit, or with nothing half-made left behind.
When one thing stops
About 300 jobs a day run through this company. If invoicing is stopped for an hour and dispatchers cannot book, 60 technicians lose their next job. If the SMS provider is down for 2 hours and the product keeps retrying in a way that slows everything else, customers hear nothing and the office drowns in calls. Replacing one capability with a new version during working hours is the same problem on purpose: the rest of the company keeps working while it happens.
The 18:00 sync is the heaviest moment of the day. About 6,000 changes arrive from 60 phones within 5 minutes. A phone that does not get an answer in time uploads again, so a slow product makes its own load worse. Every change must end up applied, merged or shown as a decision, and none may be stored twice.
Where it shows if you cut a corner
If your build lets a phone's clock decide which edit wins, the shuffled-upload test fails when the clocks are wrong, and so does the simulated day. If two jobs asking for the last valve in the same moment can both be told yes, the concurrent-promise test oversells. If an invoice can come from anything other than a completed job, the check after the simulated day finds an invoice for a cancelled job. If a repeated payment notification counts as a second payment, the replayed payment stream pays twice. Each of these tests finds the shortcut before a tenant's dispute does.
Related Links
- Electrical Safety Standards in the Private Rented Sector (England) Regulations 2020, regulation 3the source of the 5 year inspection interval and the two 28 day deadlines the brief uses as the client's rules.
- Consumer Rights Act 2015, section 49services must be performed with reasonable care and skill, the basis for the dispute and reopen Checkpoints.
- Consumer Contracts Regulations 2013, regulation 36a consumer who cancels after a service started at their request pays a proportion. The brief uses one flat fee instead.
- Stripe webhooks documentationthe documented webhook behaviour (no ordering guarantee, duplicates, a signature timestamp tolerance, retries for up to three days) that your fake payment provider copies.