Yesterday's page on Article 26 says that a deployer of a high-risk AI system has to suspend it when there is reason to think it may present a risk, and tell the provider and the market surveillance authority. That one sentence needs a whole system behind it: a written rule for what counts as reason, something watching for it, a switch, a named person who may use it, a way of carrying on the work without the AI, two reports that actually get sent, and a decision about when it is safe to start again. This post sets out that system for one high-risk use, screening CVs, and the code to run it is open source at github.com/AndyCross/stop-switch, with the Bicep for Azure and two models in Microsoft Foundry.
Screening job applications is high-risk under Annex III, point 4(a). A company that buys a screener and uses it on its applicants is a deployer, and Article 26 applies to it from 2 December 2027. Paragraph 5 reads:
Where deployers have reason to consider that the use of the high-risk AI system in accordance with the instructions may result in that AI system presenting a risk within the meaning of Article 79(1), they shall, without undue delay, inform the provider or distributor and the relevant market surveillance authority, and shall suspend the use of that system.
Nobody has to prove harm first, and the deployer doesn't wait for a serious incident. A risk under Article 79(1) includes a risk to fundamental rights, and non-discrimination is one of them, so a screener that marks people down for their age is squarely the kind of risk the paragraph means.
From the article to a running system
Each duty in the article becomes something that exists, with someone responsible for it:
| Article 26 | In the running system |
|---|---|
| Monitor the operation, 26(5) | A second model, the observer, reads every draft the screener writes before anything leaves. Paired test CVs check the screener from outside |
| Reason to consider a risk, 26(5) | A written policy, policy.toml, says in advance which findings trip the switch and which only hold one case |
| Suspend the use, 26(5) | One switch. When it trips, no AI recommendation leaves, and every case goes to a person |
| Inform the provider and the authority, 26(5) | The stop opens an incident with both reports drafted and the duty owner alerted. A person sends them and records the reference |
| Named people with the authority to act, 26(2) | Named operators are the only people who can stop or restart it, and a restart needs a written reason |
| The support oversight needs, 26(2) | An operator console showing the switch, every incident, what was published and what is waiting for a person |
| Keep the logs, 26(6) | Every draft, finding, stop and restart is kept, and the platform logs are kept for 180 days |
The people in it are the recruiters, who only ever see recommendations that passed; the reviewers, who decide every case the system holds back, without seeing the AI's draft; the named operators, who can stop it and start it; and the duty owner, who is alerted when it stops and is responsible for the two reports. In a small company the operator and the owner may be the same person. The runbook names each of them.
What counts as reason to stop
The policy starts from one concrete failure: a draft that rejects someone because of their age, when age is not a criterion for the job. The observer doesn't return a risk score, because nobody can act on 0.87 or show it to a regulator. It returns a finding that names a rule and quotes the words that break it:
{"rule": "irrelevant_age_used", "evidence": "over 55, so reject"} The system checks that the quote really is in the draft, since an observer model can invent a quote as easily as a screener can invent a reason. Then it applies the policy. A verified quote under the age rule trips the switch for everyone. A quote that isn't in the draft, a rule the policy doesn't know, an observer that doesn't answer in two seconds, or output that won't parse holds that one case for a reviewer and leaves the system running. The policy is short enough for the duty owner to read and sign off before go-live, which is the point of writing it down: the deployer decides what it will treat as reason to consider before the day it has to.
The observer only sees the reasons the screener gives, and a screener can be biased by age without saying so. For that the system also sends paired test CVs to the screener, identical apart from the age, and counts any pair that gets different answers. The tests never pass through to recruiters. Neither check proves that the screener is fair. Each catches a failure that can be named and shown to someone, which is what the duty owner needs in order to say they had reason to consider, and to explain the stop to the provider afterwards.
The operator console after the demo: two stops, one recommendation out, four cases with a person, and both reports for each stop waiting to be sent.
A morning with the switch
stopswitch demo plays the following through with stand-in models, and the test suite runs it against both databases the system supports. Here it is as one morning in a recruitment team. The clock times are illustrative; the order and every outcome are what the demo does.
One morning, five applicants, two stops
- 09:00An operator starts the system recordedA new install starts paused. The named operator restarts it with a written reason,
first start for the demo
, and the switch log records who and why.switch RUNNING · run 1 - 09:02Applicant A clears publishedThe screener advances A for
six years of Python services and four on call
. The observer finds nothing. The gate checks the switch is still running in run 1 and writes A to the recommendations table.switch RUNNING · run 1 - 09:03Applicant C passes, and its commit is held up in flightC's draft is clean and the policy says PASS, but the commit is held up before it reaches the database. In the demo a test hook holds it; in production it would be a slow network or a busy database.switch RUNNING · run 1
- 09:03Applicant B trips the switch trippedThe screener rejects B:
the candidate is over 55, so reject
. The observer namesirrelevant_age_usedand quotes those words, and the gate finds the quote in the draft. In one transaction the switch pauses, run 1 ends, and an incident opens naming the duty owner, with both reports to send and A listed for review. B goes to a person, without the draft.switch PAUSED · run 2 - 09:04Applicant D arrives to a personThe switch is paused, so D goes straight to the manual queue. Neither model is called.switch PAUSED · run 2
- 09:05A job that skips the gate tries to publish D refusedIt writes to the recommendations table directly. The trigger refuses the row: the switch is paused and there is no PASS for D.switch PAUSED · run 2
- 09:40The operator restarts it recordedWith a reason:
age rule reviewed with the provider; screener prompt fixed
. A fresh gate starts up, as it would after a redeploy, and the run number stays at 2.switch RUNNING · run 2 - 09:41C's commit finally arrives to a personIt still carries a PASS, from run 1. The switch is running, but in run 2, so the gate sends C to a person. A check of only "is it running?" would have published it.switch RUNNING · run 2
- 11:15The observer goes down and applicant E arrives heldThe screener drafts an answer for E, the observer never replies, and after two seconds the gate treats the timeout as a hold. E goes to a person, and nothing is released unchecked.switch RUNNING · run 2
- 11:16The operator presses Stop stoppedWith the observer still down. The button is a database transaction and calls no model, so it works. A second incident opens.switch PAUSED · run 3
By lunchtime the recommendations table holds one row, A. B, C, D and E are with a person, and each stop has its two reports waiting to be sent.
After a stop
Suspending the system is the start of the process the paragraph describes. The rest is people's work, and the system's job is to make each step hard to skip.
The work carries on without the AI. Every new application goes to the reviewers' queue, and so does every case that was in flight. The suspension note on the Article 26 page asks for an estimate of how long the team can run on that fallback, and the answer belongs in the runbook before the switch is ever pressed.
The two reports go out without undue delay. The incident names the duty owner and holds both reports, drafted and marked "to send": one to the provider or distributor, one to the market surveillance authority. Each says what was found, when the deployer became aware of it, and that no AI recommendation has left the system since. The owner sends them and records the reference against each one on the console. The time of awareness matters again if this turns out to be a serious incident, because it starts the provider's reporting clock.
What already went out is reviewed. Recommendations published before the stop are not withdrawn automatically, because some of those applicants may already be in interviews. The incident lists every one from the stopped run so a reviewer can look at each.
A restart is a decision with a reason. Only a named operator can restart the system, and only by writing down why it is safe: the provider has answered, the rule has been fixed, the paired tests have been run again. Nothing admitted before the stop can come out after the restart; those cases stay with the reviewers.
Why the stop can be trusted
Once the switch is pressed no recommendation may leave, and the code is built so that none can. The Stop button calls no model, and the same stop works straight against the database when the service itself is down. Every case is stamped with the run it started in, every stop ends the run, and the final decision to publish takes the same lock as the Stop button, so a case that was halfway through when the switch tripped can't publish after it, even once the system has been restarted. The database refuses any recommendation that didn't come through that check, which covers a background job someone adds later that skips it. The tests include sixty cases in flight with Stop pressed at a random moment, run thirty times on each database, and no recommendation got out after a stop in any of them. The repository's README has the detail.
Running it on Azure
infra/main.bicep makes the whole system in one resource group:
| Resource | What it does |
|---|---|
| Foundry account and project | Hosts both models. Key authentication is switched off |
screener deployment | gpt-5.4-mini, standing in for the vendor's screener |
observer deployment | Mistral Medium 3.5, from a different vendor so the two are less likely to share a blind spot |
| Postgres Flexible Server | The switch, the cases, the findings and the incidents. Entra sign-in only |
| Container App | The service and the operator console, behind Entra sign-in, with one copy always running so Stop never waits for a cold start |
| Managed identity | Signs in to Foundry, Postgres and the registry, so there are no keys to leak |
| Log Analytics | Keeps logs for 180 days, past the six months paragraph 6 asks for |
| Alert | Emails the duty owner whenever the switch trips |
Both models use the EU Data Zone deployment type, which keeps processing inside the EU; on 4 December Sweden Central offered each model that way. infra/deploy.sh makes whoever runs it the named operator and gives them direct access to the database, so they can stop the system from their own machine if the service is unreachable.
Before go-live
- Name the duty owner and the operators, and check that each has the authority and the time paragraph 2 asks for.
- Write the policy, have the owner sign it off, and agree with the provider what you will tell them if it trips.
- Put the provider's incident contact and the authority's reporting channel into the system, where the reports will use them.
- Work out how long the reviewers can carry the whole queue.
- Tell applicants that an AI system helps decide about them, which is paragraph 11.
- Press Stop in production on a quiet day, carry the queue by hand for an hour, send practice reports to your own inbox, and restart with a written reason.
What it leaves out
The observer knows one rule set aimed at one named failure, and a real deployment would write rules for every criterion the provider's instructions rule out. Here a Foundry model plays the vendor's screener; a company that builds its own screener from a general-purpose model and puts it to a high-risk use is the provider of that system, with the provider's duties as well as these. The reports are drafted and a person sends them. Postgres and Foundry are on public endpoints with Entra sign-in, and production wants private endpoints for both. By default the demo's observer is a pattern match standing in for the model, and --observer foundry swaps in the Mistral deployment to read the same drafts. Proving the switch works comes before asking how good the detector is.
This is an engineer's reading of Article 26 and no substitute for legal advice.
AI was used to help produce this draft and the code behind it.
First published on stepinto.dev.

