region_unqualified

The running jobjob_7Hq2 · delivered · document.fr-CA.pdf · $49.00 charged

A rules row's regions entry isn't an ISO 3166 code: a bare state such as NY is no country, and CA is Canada.

FixFails inSuggestsExit
Write the subdivision as US-NY, or a country such as US for every state.rules.ts:7 · rules.services['translation'].sign.regionsrules.services['translation'].sign.regions: ['CA','US-NY']1

Owned by Where an act happens: the page that explains what this gate holds.

npx services.dev check
  ✗ An agent couldn't order, wait for and accept a job. Run npx services.dev dev and read its job. It stopped at: sign is ratified in CA, NY under rules 2026-10, and this order's region is US-CA.
    https://services.dev/docs/reference/check/agent_cannot_buy
  ✗ A rules row's regions entry isn't an ISO 3166 code: a bare state such as NY is no country, and CA is Canada. Write the subdivision as US-NY, or a country such as US for every state. The sign row ratifies NY, which isn't an ISO 3166 code: a country (US) ratifies its subdivisions, and a subdivision is US-NY.
    at rules.ts:7 · rules.services['translation'].sign.regions
✗ 2 to fix

The same file failed agent_cannot_buy in the same run. Each has its own page.

rules.ts
import { Rules } from 'services.dev'

export default Rules({
  version: '2026-10',
  services: {
    translation: {
      sign: { reserved: 'sworn translator', where: 'client', regions: ['CA', 'NY'], position: 'A sworn translator signs a translation filed with a registry.' },
    },
  },
})
git add -A && git diff --staged
diff --git a/rules.ts b/rules.ts
index 4d13b17..c3717ff 100644
--- a/rules.ts
+++ b/rules.ts
@@ -4,7 +4,7 @@ export default Rules({
   version: '2026-10',
   services: {
     translation: {
-      sign: { reserved: 'sworn translator', where: 'client', regions: ['CA', 'NY'], position: 'A sworn translator signs a translation filed with a registry.' },
+      sign: { reserved: 'sworn translator', where: 'client', regions: ['US-CA', 'US-NY'], position: 'A sworn translator signs a translation filed with a registry.' },
     },
   },
 })
npx services.dev check
✓ ready to sell · 1 Service · it keeps at least 80% of every job
services/translation.ts
import { Service } from 'services.dev'
import rules from '../rules.ts'

export default Service({
  name: 'Translation',
  input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA', client_region: 'jurisdiction: such as US-CA' },
  output: { document: 'file' },
  rules,
  roles: { translator: { credential: 'sworn translator' } },
  deliver: {
    translate: 'ai',
    harden: { review: 'adversarial', lenses: ['meaning', 'terms'] },
    sign: { by: 'translator', stamp: true },
  },
  price: 89,
})

How the legal example passes this gate, in lines read from its files.

examples/legal/rules.ts
'contract-review': {
  advise: { reserved: 'bar admission', where: 'client', regions: ['US-CA', 'US-NY', 'US-TX'], kind: 'advice', rail: 'member', position: 'Advice on a contract is legal advice in the client\'s state.' },

Read them in context: The rules table.

npx services.dev check --json · the region_unqualified failure
{
  "code": "region_unqualified",
  "reason": "A rules row's regions entry isn't an ISO 3166 code: a bare state such as NY is no country, and CA is Canada.",
  "next": "Write the subdivision as US-NY, or a country such as US for every state. The sign row ratifies NY, which isn't an ISO 3166 code: a country (US) ratifies its subdivisions, and a subdivision is US-NY.",
  "doc_url": "https://services.dev/docs/reference/check/region_unqualified",
  "file": "rules.ts",
  "line": 7,
  "path": "rules.services['translation'].sign.regions",
  "suggest": {
    "path": "rules.services['translation'].sign.regions",
    "value": "['CA','US-NY']"
  }
}
The whole document check --json prints
npx services.dev check --json
{
  "ai": {
    "cents_per_call": 42,
    "simulated": true
  },
  "mcp": {
    "tools": 13,
    "tokens": 4525,
    "sandbox": 9,
    "budget": 8000
  },
  "files": [
    {
      "path": "rules.ts",
      "lines": 6,
      "kind": "rules",
      "says": "rules 2026-10 · 1 Service · 1 row"
    }
  ],
  "services": [