AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The human-readable id, shaped like SJ-… — stable for the record’s life.
typeString String!The kind of record — always SearchJob here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of queued, running, done, cancelled, expired or failed.
parentIdID ID!The parent org group (the Saga shape); for a SearchJob parentId === rootId.
rootIdID ID!The id of your organization group — every record of yours carries the same one.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption.
userIdID ID!The owner — the User who started the job; cancel is theirs (the system hook cancels on their session’s end). Immutable at birth.
sessionIdID 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.
planJsonString 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.
wordsString String!Immutable at birth.
stepsDoneInt Int!Machine steps taken so far (0 at birth; stamped by the step lane).
examinedInt Int!Records examined so far across every walk and hydrate (0 at birth) — the budget law’s counter.
matchCountInt Int!The terminal step’s whole match count (0 until the finish; the result row carries at most the plan’s limit of summaries).
startedAtStringThe running instant (UTC ISO-8601 — the clock’s zero). Null while queued.
finishedAtStringThe terminal instant (UTC ISO-8601). Null while live.
problemStringWhy 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.
sfExecutionArnStringThe ops/reconcile handle.
resultTtlIntThe result row’s ttl (epoch seconds = finishedAt + 7 days) — the expiry the matches read derives its expiresAt from. Null until the finish.

Used by