ONE broadcast:ab-result
← Receivers

broadcast:ab-result

broadcast family

An A/B test's state (off, set, testing, decided) and its numbers: per-variant assigned, sent, opens, clicks, orders and revenue while it runs (opens and clicks from the 14-day warm store), the winner with its reason and whether it was a fallback, the frozen result once decided, and the held-back rest (pending, sent). Apple Mail opens cannot be told from a person's (opens_machine_detectable:false)

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/broadcast:ab-result \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "broadcastId": <string> }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • workspace string optional
  • broadcastId string required

Response

What comes back from the call.

  • ok boolean
  • broadcastId string
  • status off | set | testing | decided
  • metric string
  • test_pct number
  • wait_hours number
  • min_events number
  • variants object[]
  • started_at number | null
  • decide_after number | null Unix seconds the rest is due, while undecided
  • winner string | null
  • winner_reason string | null
  • fallback boolean The winner was not called on the metric (too few events, a tie)
  • decided_at number | null
  • result any Per-variant numbers frozen at the decision: the record after the 14-day window
  • live any Per-variant numbers now; null before the test starts
  • live_window_days number
  • revenue_note string | null
  • holdout object | null
  • opens_machine_detectable boolean
  • refused string no_db · forbidden · not_found

Traffic

Every call to broadcast:ab-result, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names broadcast:ab-result, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 1
  • one.ie/web/src/components/newsletter/SendSmarter.tsx:82
API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:87
  • one.ie/web/src/lib/resolvers/broadcast-smart.ts:85
CLI 2
  • packages/cli/src/lib/receivers-index.generated.ts:85
  • packages/cli/src/lib/receivers.generated.ts:85
→

Answered by

broadcast:ab-result one.ie/web/src/lib/resolvers/broadcast-smart.ts:84 Dispatched through POST /api/ask/broadcast:ab-result, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string"
    },
    "broadcastId": {
      "type": "string"
    }
  },
  "required": [
    "broadcastId"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "broadcastId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "off",
        "set",
        "testing",
        "decided"
      ]
    },
    "metric": {
      "type": "string"
    },
    "test_pct": {
      "type": "number"
    },
    "wait_hours": {
      "type": "number"
    },
    "min_events": {
      "type": "number"
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "started_at": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "decide_after": {
      "description": "Unix seconds the rest is due, while undecided",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "winner": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "winner_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "fallback": {
      "description": "The winner was not called on the metric (too few events, a tie)",
      "type": "boolean"
    },
    "decided_at": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "result": {
      "description": "Per-variant numbers frozen at the decision: the record after the 14-day window"
    },
    "live": {
      "description": "Per-variant numbers now; null before the test starts"
    },
    "live_window_days": {
      "type": "number"
    },
    "revenue_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "holdout": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "pending": {
              "type": "number"
            },
            "sent": {
              "type": "number"
            }
          },
          "required": [
            "pending",
            "sent"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "opens_machine_detectable": {
      "type": "boolean"
    },
    "refused": {
      "description": "no_db · forbidden · not_found",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}