clock_unowned

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

A clock's owner can never resolve: a role the Service doesn't have, or of_record with no member of record on its subject. It would run vacant, with no one to answer for the date.

FixFails inSuggestsExit
Name a role the Service has, 'brand' or 'buyer', or give the subject an of_record.services/translation.ts:7 · clocks.deliver_by.ownerclocks.deliver_by.owner: 'buyer'1

Owned by Clocks: the page that explains what this gate holds.

npx services.dev check
  ✗ A clock's owner can never resolve: a role the Service doesn't have, or of_record with no member of record on its subject. It would run vacant, with no one to answer for the date. Name a role the Service has, 'brand' or 'buyer', or give the subject an of_record. clocks.deliver_by.owner is translator, which isn't a role of Translation, which has none.
    at services/translation.ts:7 · clocks.deliver_by.owner
✗ 1 to fix
services/translation.ts
import { Service } from 'services.dev'

export default Service({
  name: 'Translation',
  input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
  output: { document: 'file' },
  clocks: { deliver_by: { due: '30d after draft', owner: 'translator' } },
  price: 49,
})
git add -A && git diff --staged
diff --git a/services/translation.ts b/services/translation.ts
index 1abd301..edac9dc 100644
--- a/services/translation.ts
+++ b/services/translation.ts
@@ -4,6 +4,6 @@ export default Service({
   name: 'Translation',
   input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
   output: { document: 'file' },
-  clocks: { deliver_by: { due: '30d after draft', owner: 'translator' } },
+  clocks: { deliver_by: { due: '30d after draft', owner: 'buyer' } },
   price: 49,
 })
npx services.dev check
✓ ready to sell · 1 Service · AI delivers it alone · it keeps at least 80% of every job

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

examples/tax/services/annual-return.ts
subject: {
  kind: 'taxpayer', key: 'ein', period: 'tax_year', of_record: { role: 'signer', named_at: 'sign', custodian: ['signer', 'brand'] },
// …
clocks: {
  file: { due: fileDue, each: { of: 'jurisdictions' }, owner: 'of_record', rungs: ['notice 90d', 'notice 30d', 'run tentative 3d', 'ack daily 5d'], moves: { extend: '6mo after due' } },
  pay: { due: payDue, owner: 'buyer', hard: true, rungs: ['notice 14d', 'escalate 3d'], satisfied_by: ['pay', 'file'] },
  expiring: { due: earliestExpiry, owner: 'of_record', lives_on: 'subject', rungs: ['notice 180d'] },

Read them in context: Annual return.

npx services.dev check --json · the clock_unowned failure
{
  "code": "clock_unowned",
  "reason": "A clock's owner can never resolve: a role the Service doesn't have, or of_record with no member of record on its subject. It would run vacant, with no one to answer for the date.",
  "next": "Name a role the Service has, 'brand' or 'buyer', or give the subject an of_record. clocks.deliver_by.owner is translator, which isn't a role of Translation, which has none.",
  "doc_url": "https://services.dev/docs/reference/check/clock_unowned",
  "file": "services/translation.ts",
  "line": 7,
  "path": "clocks.deliver_by.owner",
  "suggest": {
    "path": "clocks.deliver_by.owner",
    "value": "'buyer'"
  }
}
The whole document check --json prints
npx services.dev check --json
{
  "ai": {
    "cents_per_call": 42,
    "simulated": true
  },
  "mcp": {
    "tools": 13,
    "tokens": 4486,
    "sandbox": 9,
    "budget": 8000
  },
  "services": [
    {
      "path": "services/translation.ts",
      "lines": 5,
      "steps": "draft · ai → review · ai · adversarial",
      "ok": false,
      "price": "$49 per job, within 48 hours, charged on delivery.",
      "who": "AI delivers every job.",
      "clocks": [