SearchJob
object type
the budget rule: at most 50000 records examined (the estimate refuses a plan that cannot fit, with the numbers) · 300 s from the start (past it the job is expired WITH its partials) · 400 machine steps. ONE running job per signed-in session (the SEARCHLOCK marker — a second start refuses CONFLICT/SEARCH_JOB_ACTIVE naming the holder). Lifecycle queued → running → done | cancelled | expired | failed: cancel is the owner's (cancelSearchJob) or the session's end; done stays listed, the other terminals are doomed-class. The generic wire is READ-ONLY (the two reads) — the bespokes own the writes: startSearchJob (THE PLAN GATE, then the per-family list-op offer AS THE CALLER — a family you may not list stops the plan before any read) · cancelSearchJob · searchJobMatches (gated by the READER's own list right over the plan's terminal family).
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The group-scoped human-facing system id (SJ-…). |
type | String String! | The kind of record — always SearchJob here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: queued | running | done | cancelled | expired | failed. |
parentId | ID ID! | The parent org group (the Saga shape); for a SearchJob parentId === rootId. |
rootId | ID ID! | The org-group family root. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
userId | ID ID! | The owner — the User who started the job; cancel is theirs (the system hook cancels on their session’s end). IMMUTABLE at birth. |
sessionId | ID ID! | The signed-in session the job runs under — the SEARCHLOCK aggregate (ONE running job per session); a Session is not a catalog construct, so the id is opaque on the wire. IMMUTABLE at birth. |
planJson | String String! | The NORMALIZED plan as JSON text (the validated SearchPlan with its defaults applied; at most 8192 characters) — re-parsed and re-validated at every read. IMMUTABLE at birth. |
words | String String! | IMMUTABLE at birth. |
stepsDone | Int Int! | Machine steps taken so far (0 at birth; stamped by the step lane). |
examined | Int Int! | Records examined so far across every walk and hydrate (0 at birth) — the budget law’s counter. |
matchCount | Int Int! | The terminal step’s WHOLE match count (0 until the finish; the result row carries at most the plan’s limit of summaries). |
startedAt | String | The running instant (UTC ISO-8601 — the clock’s zero). Null while queued. |
finishedAt | String | The terminal instant (UTC ISO-8601). Null while live. |
problem | String | Why the run stopped short — the executor’s refusal in its teaching voice (the budget, the frontier, the step cap), the expiry, the start refusal, or a machine fault’s cause. Null on done. |
sfExecutionArn | String | The ops/reconcile handle. |
resultTtl | Int | The result row’s ttl (epoch SECONDS = finishedAt + 7 days) — the expiry the matches read derives its expiresAt from. Null until the finish. |