---
title: "rail_conflict"
url: https://services.dev/docs/reference/check/rail_conflict
---
# rail_conflict

URL: https://services.dev/docs/reference/check/rail_conflict

> A role's pay.rail contradicts the rail of the row for its act.

| Fix | Fails in | Exit |
|---|---|---|
| Leave pay.rail out, so the row's rail holds, or make the two agree. | `services/translation.ts:9` · `roles.translator.pay.rail` | 1 |

**Owned by** [Refusals and cures](https://services.dev/docs/people/refusals.md): the page that explains what this gate holds.

## What check says

```txt title="npx services.dev check"
  ✗ A role's pay.rail contradicts the rail of the row for its act. Leave pay.rail out, so the row's rail holds, or make the two agree. translator's pay.rail is 'brand', and the sign row's rail is 'member'.
    at services/translation.ts:9 · roles.translator.pay.rail
✗ 1 to fix
```

## The failing file

```ts title="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' },
  output: { document: 'file' },
  rules,
  roles: { translator: { credential: 'sworn translator', pay: { usd: 30, rail: 'brand' } } },
  deliver: {
    translate: 'ai',
    harden: { review: 'adversarial', lenses: ['meaning', 'terms'] },
    sign: { by: 'translator', stamp: true },
  },
  price: 89,
})
```

## The fix

```diff title="git add -A && git diff --staged"
diff --git a/services/translation.ts b/services/translation.ts
index 7069288..6a58339 100644
--- a/services/translation.ts
+++ b/services/translation.ts
@@ -6,7 +6,7 @@ export default Service({
   input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
   output: { document: 'file' },
   rules,
-  roles: { translator: { credential: 'sworn translator', pay: { usd: 30, rail: 'brand' } } },
+  roles: { translator: { credential: 'sworn translator', pay: { usd: 30 } } },
   deliver: {
     translate: 'ai',
     harden: { review: 'adversarial', lenses: ['meaning', 'terms'] },
```

```txt title="npx services.dev check"
✓ ready to sell · 1 Service · it keeps at least 80% of every job
```

## The rest of the brand

```ts title="rules.ts"
import { Rules } from 'services.dev'

export default Rules({
  version: '2026-10',
  services: {
    translation: {
      sign: { reserved: 'sworn translator', where: '*', rail: 'member', position: 'A sworn translator signs a translation filed with a registry.' },
    },
  },
})
```

## In the legal example

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

```ts title="examples/legal/rules.ts"
'trademark-response': {
  respond: { reserved: 'bar admission', where: '*', rail: 'member', position: 'A response for the applicant is signed by an attorney admitted in any state.' },
```

```ts title="examples/legal/services/trademark-response.ts"
roles: { attorney: { pool: attorneys, pay: 175 } },
```

Read them in context: [The rules table](https://services.dev/docs/examples/legal/rules.md), [Trademark response](https://services.dev/docs/examples/legal/trademark-response.md).

## Explained in

- [Refusals and cures](https://services.dev/docs/people/refusals.md)
- [Roles](https://services.dev/docs/people/roles.md)
- [Rules: how a Service meets licensing by design](https://services.dev/docs/people/rules.md)

## What an agent reads

```json title="npx services.dev check --json · the rail_conflict failure"
{
  "code": "rail_conflict",
  "reason": "A role's pay.rail contradicts the rail of the row for its act.",
  "next": "Leave pay.rail out, so the row's rail holds, or make the two agree. translator's pay.rail is 'brand', and the sign row's rail is 'member'.",
  "doc_url": "https://services.dev/docs/reference/check/rail_conflict",
  "file": "services/translation.ts",
  "line": 9,
  "path": "roles.translator.pay.rail"
}
```

<details>
<summary>The whole document check --json prints</summary>

```json title="npx services.dev check --json"
{
  "ai": {
    "cents_per_call": 42,
    "simulated": true
  },
  "mcp": {
    "tools": 13,
    "tokens": 4490,
    "sandbox": 9,
    "budget": 8000
  },
  "files": [
    {
      "path": "rules.ts",
      "lines": 6,
      "kind": "rules",
      "says": "rules 2026-10 · 1 Service · 1 row"
    }
  ],
  "inert": [
    "rules rail on 1 row: the ledger names who sells each fee; money moves at payout",
    "roles.pay rail and from on translation.translator: named on the ledger; money moves at payout"
  ],
  "services": [
    {
      "path": "services/translation.ts",
      "lines": 11,
      "steps": "translate · ai → harden · ai · adversarial · 2 lenses → sign · translator · * · stamped",
      "ok": false,
      "price": "$89 per job, within 48 hours, charged on delivery.",
      "who": "A translator signs every document before delivery. (rules 2026-10)",
      "roles": [
        "translator · sworn translator · your staff · $30 an act"
      ],
      "rules": "2026-10",
      "boundary": {
        "full": [
          "reserved sign to sworn translator · the translator sells the fee"
        ]
      },
      "agent": {
        "tool": "order_translation",
        "words": 26,
        "job": "job_7Hq2",
        "status": "waiting",
        "on": "person",
        "charged": null,
        "person": true,
        "why": ""
      },
      "ledger": "+$89.00 · AI $1.26 (example) · you $87.74",
      "approved_ledger": null,
      "outcome": null,
      "margin": {
        "floor": {
          "cents": 7120,
          "pct": 80
        },
        "own": 7120,
        "stop": 1780,
        "nested": []
      },
      "apps": [
        "customer portal",
        "delivery portal",
        "owner console"
      ],
      "failures": [
        {
          "code": "rail_conflict",
          "reason": "A role's pay.rail contradicts the rail of the row for its act.",
          "next": "Leave pay.rail out, so the row's rail holds, or make the two agree. translator's pay.rail is 'brand', and the sign row's rail is 'member'.",
          "doc_url": "https://services.dev/docs/reference/check/rail_conflict",
          "file": "services/translation.ts",
          "line": 9,
          "path": "roles.translator.pay.rail"
        }
      ]
    }
  ]
}
```

</details>

---

- Up: [check’s gates](https://services.dev/docs/reference/check.md)
- Previous: [upgrade_below_payout](https://services.dev/docs/reference/check/upgrade_below_payout.md)
- Next: [rush_uncapped](https://services.dev/docs/reference/check/rush_uncapped.md)
