API reference
JSON over HTTPS. Most /v1 routes accept a browser session or a bearer token and stay inside your org and project. Some management routes need a browser session or a minimum role.
The server parses model output itself. The client sends raw stdout and echoes the prompt_hash it was given.
Identifiers
Every identifier in a request path, query string, body or response (org_id, project_id, campaign_id,
lease_id, slice_id, finding id, report_id, client_id, user_id, config_version_id, …) is an opaque
positive integer below 2^53. Treat it as a name, never as a number:
- Do not compare, sort, subtract or parse meaning from ids. A newer object can have a smaller id. Matching an id for equality against one the server returned is fine; deriving order or meaning from it is not.
- Campaign lists are newest first (creation order); other lists are ordered as documented where they
appear (for example the triage
historyarrays, newest first). To pick "the latest campaign", take the first row of the list, not the largest id;previous_campaign_idnames the campaign before one. Findings lists are not in creation order: they followsort(defaultpriority: severity priority, then most recently updated first). Do not infer order from finding ids either. - An id is unique within its kind across the whole service, and never reveals how many objects exist outside your
organization or how fast they are created. Ids issued before this scheme keep their old values and keep working,
so a stored
PROJECT_IDor campaign id from an older run stays valid. - Ids are 64-bit safe integers (JSON number). Do not store them in a 32-bit field.
- An object id (campaign, finding, project, lease, …) that does not exist, was deleted, or belongs to another
organization is the same
404(campaign_not_found,finding_not_found,project_not_found, …). A syntactically invalid id is400 invalid_<x>_id. AcampaignIdfilter follows the same rule on every route that takes one (the findings list, finding detail and export among them): present but malformed is400 invalid_campaign_id, unknown or foreign is404 campaign_not_found; it is never silently ignored. - Org selectors are different:
X-Org,?org=andorg_id/org_slugin a client-token mint take the org slug or theidreturned byGET /v1/meorGET /v1/agent/memberships, whileorg_idin the body of an OAuth consent takes the numeric public id only (a slug is400 missing_org). Anything that is not one of the caller's own organizations is rejected as403 not_a_memberwith a constant message, the same answer whether or not that organization exists. - The global model catalog rows carry no numeric id. Identify a model by
code;PATCH /v1/projects/{id}/modelsstill accepts the legacymodel_idfor older callers, but new callers sendcode. - The
idof history rows (history,classificationHistory,fixes,falsePositives) is a per-response ordinal,1for the oldest entry. It is not a stable key and is never accepted back.
Endpoints
Health
GET /healthz → { status, mode, version, db, feedback_available }
This route is public.
Agent skills (public)
Unauthenticated Agent Skills catalog. npx skills add <origin> discovers
/.well-known/agent-skills/index.json (v0.2.0, relative artifact URLs, sha256: digests) then
fetches each SKILL.md. Served in both SaaS and on-prem; the origin is the server the user pointed
npx skills at.
GET /.well-known/agent-skills/index.json
GET /.well-known/agent-skills/{name}/SKILL.md
Shipped skill: thespider (guided by default; autonomous when the user clearly asks to run it).
Source files live in bundled/skills/ in this repository.
Agent downloads (public)
Unauthenticated first-party proxy of prebuilt thespider-agent binaries from a private release
store. Used by the install docs, startup.md, and thespider-agent update.
GET /downloads/agent/latest.json
GET /downloads/agent/v{semver}/manifest.json
GET /downloads/agent/v{semver}/SHA256SUMS
GET /downloads/agent/v{semver}/thespider-agent-{platform}
GET /downloads/agent/latest/thespider-agent-{platform}
GET /downloads/agent/latest/SHA256SUMS
Platform IDs: linux-x86_64, linux-aarch64, darwin-x86_64, darwin-arm64, and
windows-x86_64 (whose binary name ends in .exe). Direct links are on
Agent downloads. Optional
query ?source=install|update|docs is recorded for analytics only. Binary responses include
X-Checksum-SHA256. Rate-limited per IP (429 rate_limited). Returns 404 when the channel is
disabled (AGENT_DOWNLOADS_PUBLIC=0) or the object is missing.
Device authorization (CLI setup/login)
Interactive agent login. The CLI starts a session, opens /activate?code=XXXX-XXXX, and waits
(SSE or poll) for the signed-in user to authorize the CLI as themselves. Approve issues an
agent identity token (user-linked, not org-scoped). Setup chooses the org/project after approval.
The browser never receives client_token — only the CLI does, once,
via device_code.
POST /v1/device/start
{ client_name?, project? }
→ { device_code, user_code, verification_uri, verification_uri_complete, expires_in, interval }
GET /v1/device/wait?device_code=… # SSE: event pending|approved|denied|expired
POST /v1/device/token # poll fallback
{ device_code }
→ { client_token, client_id, org_id: null, user_id, kind: "agent_identity" }
| { error: authorization_pending|… }
GET /v1/device/pending?code=XXXX-XXXX # any signed-in session (no org required)
POST /v1/device/approve # any signed-in session
{ user_code }
POST /v1/device/deny # any signed-in session
{ user_code }
Agent identity (multi-org discovery + mint)
After device login, the identity token may call:
GET /v1/agent/me
→ { kind: "agent_identity", user_id, token_id, user_status }
GET /v1/agent/memberships
→ { memberships: [{ org_id, slug, name, role, org_status, access }] }
GET /v1/agent/orgs/{orgIdOrSlug}/projects
→ { org, projects[] } # membership required
POST /v1/agent/client-token
{ org_id | org_slug, project_id? }
→ { client_token, client_id, org_id, project_id, kind: "client" } # member+; rate-limited
POST /v1/agent/bootstrap
→ { org, project, profiles, models, readiness_url } # zero-membership identity only; idempotent
Org-scoped client tokens cannot list memberships (403 identity_required). Identity tokens
cannot claim/results or call GET /v1/me (403 client_token_required).
An organization with a sign-in policy judges a login by how the
browser session that approved it signed in. Each membership's access says whether this login
qualifies ({ ok, reason, message, allowed_methods, allowed_email_domains }). For an org it does not
satisfy, POST /v1/agent/client-token and GET /v1/agent/orgs/{org}/projects answer
403 org_policy_sign_in_method or 403 org_policy_email_domain. The message tells the user to run
thespider-agent login again and approve it while signed in with an allowed method.
Enroll (headless / CI)
POST /v1/enroll
{ enrollment_code }
→ { client_token, client_id, org_id }
Enrollment codes are minted from the signed-in activation page (manual/CI path). They are single-use and expiring, and issue org/project-scoped client tokens (not multi-org identity). Prefer device authorization for interactive machines.
Identity & catalog
GET /v1/me → { org, projects[], models[], entitlements, usage, server_capabilities[] } # client token or session
GET /v1/me/memberships → { memberships: [{ org_id, slug, name, role, org_status, access }] } # browser session only
GET /v1/me/projects/{id} → { project_id, org: { id, slug, name, role, status } } # browser session only
GET /v1/models → [{ code, display_name, provider }] # NO command_template — ever
GET /v1/me is org-scoped (the token's or session's active org). It does not list all of a
user's memberships. For multi-org discovery, a browser session uses /v1/me/memberships (no active
org needed; banned orgs omitted) and an identity token uses /v1/agent/memberships.
Each membership's access is { ok, reason, email_unverified, allowed_methods, allowed_email_domains }:
whether this browser session satisfies the org's sign-in policy.
An org the session does not satisfy is listed, not hidden; reason is org_policy_sign_in_method
or org_policy_email_domain, and allowed_methods lists only that org's own methods.
GET /v1/me/projects/{id} answers "which of my organizations owns this project?" without an active
org, so the web app can open a /projects/{id} link that belongs to a different org than the one
currently selected: it selects the owner before loading the page. A project of an organization the
caller is not a member of, a banned or deleted organization, and a project that does not exist are
the same 404 project_not_found, so it reveals nothing about other tenants.
The model catalog has no command_template; machine-specific commands live in the client's project
config.toml.
Your credentials
GET /v1/me/credentials → { credentials: [{ id, kind, name, org, scopes[], minted_auth_method,
minted_aal, created_at, last_used_at, expires_at }] }
DELETE /v1/me/credentials/{id} → { revoked: true, id }
Browser session only. Lists your own live agent logins (kind: "agent_identity"), CLI client tokens
(client) and MCP authorizations (mcp). minted_auth_method is how the browser session that
created the credential signed in (password, google, github, microsoft, sso:<id>, …), or
null for credentials created before this was recorded. Revoking an MCP authorization revokes its
whole refresh family. Another user's credential is the same 404 credential_not_found as a missing one.
Cloud signup profile
POST /v1/me/customer-profile
{ accountType: "personal" | "business", customerRole, signupIntent, companyName?, employeeRange?, name? }
→ { ok: true, account_type }
Cloud only (404 on-prem). A Google, GitHub, Microsoft or SSO sign-up skips the signup form, so it
completes these answers before creating an organization. It can be set once (409 profile_already_set).
Invalid answers are 400 invalid_customer_profile.
server_capabilities names the optional protocol features this server speaks: lease_v2 (lease
inspection and release, below), campaign_cancel
(Cancel a campaign), model_effort (effort participants),
claim_exclude (claim exclusions), and claim_target_dirty (per-claim audited-tree dirtiness;
claim fields).
A client checks for a name before it uses the feature, because an older server ignores unknown body
fields instead of refusing them.
Model catalog
GET /v1/model-catalog?q=<text>&limit=<n>
→ { source, synced_at, model_count, last_error,
models: [{ code, lab, model_id, name, context_limit, output_limit, reasoning, release_date, alias_of }] }
The server's copy of the models.dev catalog, limited to the codes TheSpider can audit with. It backs the model search in Settings → Models. Any authenticated caller can read it.
q ranks codes, names and model ids the same way the thespider-agent setup picker does. An empty
q returns the newest models first. limit defaults to 50 and is clamped to 1–200.
source is the catalog URL. synced_at is the last successful sync, and null on an instance that
has never synced (an air-gapped install, or MODEL_CATALOG_SYNC=off). last_error is the last sync
failure, or null. model_count counts every code that can be enabled, aliases included.
alias_of is null for a model of its own. For a lab's own alias, such as
deepseek/deepseek-flash, it is the model models.dev currently says the alias points at
(deepseek/deepseek-v4.1-flash). It is advisory. TheSpider can't verify which model the vendor routes an alias
to, so the alias is a code of its own and its reports are recorded under it. alias_of also appears
on the rows of GET /v1/projects/{id}/models (the project's model list in Settings → Models), and
nowhere in findings, reports or the gate.
AI deduplication usage
GET /v1/me includes usage.ai_dedupe. GET /v1/orgs/usage returns the same object as ai_dedupe. Both require authentication and report the active organization's allowance.
| Field | Meaning |
|---|---|
included, used, remaining | Lifetime welcome allowance of 100 AI pair comparisons, consumed and remaining. Shared across the organization; no monthly reset. |
status | welcome, exhausted, included (ongoing plan access), disabled (AI entitlement disabled), or unavailable (no comparison can run right now; unavailable_reason says why). |
unavailable_reason | null unless status is unavailable. not_configured: the server has no AI provider. provider_rejected: the provider rejects the server's key, billing or model, which needs an operator fix. provider_outage: the provider has been failing (rate limits, errors, timeouts) for at least ten minutes. |
catchup | none, pending, or complete for automatic review after a paid upgrade or after findings the provider could not compare (see below). |
catchup_skipped | Findings the automatic review stepped past after the provider repeatedly refused or returned unusable output for them. They stay unmerged. |
upgrade_path | /settings#billing. Organization admins can upgrade there. |
Cached decisions and fingerprint matches do not consume the allowance. Exhaustion leaves audits running with standard deduplication and adds ai_dedupe_allowance_exhausted to result warnings when a new AI comparison is needed. Paid usage does not consume or reset welcome credits; a later downgrade retains the remaining balance. The welcome allowance is separate from the monthly usage.dedupe allowance described under Billing and shared usage: a new AI comparison needs room in both.
A Free-to-paid upgrade automatically queues existing findings for AI duplicate review. The review reuses cached decisions, applies soft merges, and resumes after provider failures, server restarts, the daily AI comparison cap, or the monthly AI dedupe allowance. A finding whose adjudication fails deterministically (a refusal or unusable output, repeated three times) is stepped past and counted in catchup_skipped so it cannot block the rest of the project; provider outages never cause a skip. No re-upload or audit rerun is needed. pending remains visible until every queued project finishes. On-prem license entitlements are unchanged.
When the AI provider can't answer for a new finding (an outage, a rate limit or a rejected key), the finding is saved with standard deduplication, the result carries the warning ai_dedupe_catchup_queued, and its project is queued for the same automatic review. The review checks it for duplicates and merges it once the provider answers again. This works in both deployment modes and on every plan with AI deduplication. A Free organization's review spends its welcome allowance, as the original comparison would have. When the allowance is used up, the review finishes without comparing. While the provider rejects the server's key, the review retries every 30 minutes rather than continuously.
Organization and membership
GET /v1/org
POST /v1/org # SaaS browser session only
POST /v1/org/invitations # admin+
POST /v1/invitations/accept # browser session only
PATCH /v1/org/members/{userId} # admin+
DELETE /v1/org/members/{userId} # admin+
GET /v1/orgs/usage
GET /v1/orgs/attention # per-project finding counts + newest unfinished campaign
GET /v1/orgs/attention backs the dashboard's "where you left off" cards. It returns one row per
visible project: live-finding counts (open, severe_open, new, triaged, needs_retest,
fixed) across every profile, the last claim/result time, and the newest campaign that still has outstanding work
together with the participants that hold its remainder (waiting_models, one row per
(code, effort), each with effort). Each row also carries
latest_cancelled_campaign, which is { "campaign_id": 41, "profile": "default", "type": "full", "cancelled_at": "2026-10-14T09:30:00.000Z" } when the project's newest campaign (by id, any status) was cancelled
and the project has no unfinished campaign, and null otherwise. The dashboard uses it to suggest
starting a fresh campaign. A cancelled campaign never appears as the row's campaign.
findings.profiles says which profile holds those findings: one entry per profile with at least one
live finding, in profile order, each { "profile": "bugs", "open": 36, "unresolved": 36, "severe_open": 0, "new": 36, "severe_new": 0, "triaged": 0, "needs_retest": 0 }. unresolved is open without
wont_fix. A finding belongs to a profile when a campaign
of that profile sighted it, the same rule the profile-scoped finding views use. A finding sighted
under two profiles counts in both, so the entries do not add up to the totals. The read is
read-only and scoped to the caller's org by the same row-level security as every other tenant read.
Roles are viewer, member, admin, and owner. Owner-specific safeguards prevent removing or demoting the final owner.
Under an active sign-in policy, demoting or removing the last owner who
can still sign in under it is 409 last_compliant_owner.
An organization's allowed email domains apply to every way in. POST /v1/org/invitations to an
address outside them is 422 email_domain_not_allowed. POST /v1/invitations/accept checks the
accepting account's verified email (the link may have been sent to another address):
403 email_domain_not_allowed, with email_unverified: true when verifying the address would fix it.
A refused invitation stays usable. Ten unknown invitation tokens from one account within 10 minutes
lock accepting for 10 minutes (429 too_many_attempts, with Retry-After).
Organization sign-in policy
GET /v1/org/auth-policy # any member, or a client token
→ { policy: { sign_in_methods, allowed_providers, allowed_email_domains, allow_subdomains,
updated_at, updated_by: { user_id, label } } | null,
configured_methods: [{ method, label, domains }], degraded, enforcement, editable,
entitlements: { sso } }
GET /v1/org/auth-policy/preview?sign_in_methods=&allowed_providers=a,b&allowed_email_domains=x,y&allow_subdomains=0|1
→ { valid, errors[], actor_compliant, members: [{ user_id, email, role, reasons[] }],
invitations: [{ id, email, role }],
tokens: { user_linked_noncompliant, legacy_provenance, oauth_grants }, capable_owner_count }
PUT /v1/org/auth-policy
{ sign_in_methods: "any" | "federated", allowed_providers?: [...] | null,
allowed_email_domains?: [...], allow_subdomains?: bool }
→ the GET shape
sign_in_methods: "federated"requires Google, GitHub, Microsoft or an SSO connection approved for this organization.allowed_providersnarrows that set (google,github,microsoft,sso:<provider id>;nullmeans all of them).configured_methodslists only this org's methods.allowed_email_domains(at most 20) requires a verified address in one of the domains, or a subdomain withallow_subdomains. Domains are stored IDNA-normalized and lowercased.- The preview and the PUT need an owner's browser session (
403 session_required,403 owner_required); the PUT also needs a recent sign-in (403 reauth_requiredwithmethod). - PUT refusals:
400 invalid_body,422 invalid_email_domain,422 sign_in_method_unavailable(a method this org does not have; the same answer whether it exists elsewhere or not),402 sso_requires_business(naming an SSO connection needs Business; removing one never does),409 policy_would_lock_out_actor(your own current session would fail it), and409 no_compliant_owner(no owner could sign in under it). - To turn the policy off, send
{ "sign_in_methods": "any", "allowed_email_domains": [] }.
A request that does not satisfy the policy of the org it acts on is refused with
403 org_policy_sign_in_method (allowed_methods) or 403 org_policy_email_domain
(allowed_email_domains, email_unverified). That covers browser sessions, CLI client tokens and MCP
tokens, judged by how the browser session that minted them signed in. Tokens created before sign-in
methods were recorded count as legacy and are refused under a federated rule until the user
signs in again. Enrollment (service) tokens have no person behind them and are exempt. See
Org sign-in policy.
POST /v1/org/invitations takes { email, role?, send_email? }. send_email defaults to true
and must be a boolean when it is present. The response always includes the one-time token and
accept_url, plus email_status, which says what happened to the email:
email_status | Meaning |
|---|---|
sent | The server emailed the accept link. |
failed | The send failed. The invitation still exists; share the link yourself. |
skipped | send_email was false, so nothing was mailed. |
not_configured | This server has no mailer. Reported even when send_email was false. |
email_sent is the older boolean form. It appears only when a send was attempted (true for
sent, false for failed) and is omitted otherwise.
Billing and shared usage
Billing is an optional SaaS module. These routes require a browser session; checkout and portal creation require an organization admin or owner.
GET /v1/billing
→ { available, plan, plan_source, purchased_seats, minimum_seats, occupied_seats,
has_active_subscription, subscription, catalog[] }
POST /v1/billing/checkout
{ plan: "pro" | "business", interval: "month" | "year", seats: 1..1000 }
→ { url }
POST /v1/billing/portal
→ { url }
Only Business supports yearly checkout. seats must be an integer covering at least the current human membership. An active subscription must be changed through the billing portal rather than a second checkout. purchased_seats comes from trusted subscription state and is null without a paid subscription; agents and service tokens do not consume seats.
GET /v1/me exposes effective pooled caps in entitlements and monthly usage in usage.slices (used, included, remaining). SaaS usage.dedupe includes used_usd, limit_usd, remaining_usd, reserved_usd, uncertain_requests, status, and resets_at; on-prem returns null. An exhausted dedupe allowance pauses AI adjudication while finding ingestion continues. Slice quotas reset each calendar month, including annual plans, without rollover or automatic overage charges. See Pricing.
Browser organization creation
POST /v1/org
Cookie: better-auth.session_token=...
{ name, slug }
→ { id, name, slug, plan, role: "owner" }
A Cloud sign-up through Google, GitHub, Microsoft or SSO first completes its
signup profile; until then this answers 409 customer_profile_required.
A signed-in Cloud user can create multiple organizations. Each session-only operation creates an
organization and owner membership atomically and returns 409 if the slug is taken. Invited users
can join existing organizations and create organizations of their own.
Dashboard feedback
POST /v1/feedback
Cookie: better-auth.session_token=...
{ type: feature|bug|enhancement|question, title, description, page? }
-> { sent: true }
This browser-session-only endpoint emails the feedback and authenticated account identity to FEEDBACK_RECIPIENT. It returns 503 feedback_unavailable unless both the Postmark mailer and recipient are configured, 429 rate_limited when the per-user submission budget is exhausted, and 502 feedback_send_failed when delivery fails; feedback is not persisted in the database. GET /healthz exposes a boolean feedback_available capability so clients can hide the form when it is disabled.
Projects, profiles, configuration, and enrollment codes
POST /v1/projects
{ name, models?: string[], default_profile?, slug?, repo_remote_url?, default_branch? }
PATCH /v1/projects/{id}
GET /v1/projects/{id}/profiles
GET /v1/projects/{id}/profiles/{security|bugs|hygiene|pipeline}/config-version
GET /v1/projects/{id}/profiles/{security|bugs|hygiene|pipeline}/config?version=N
POST /v1/projects/{id}/profiles/{security|bugs|hygiene|pipeline}/config-versions
GET /v1/projects/{id}/readiness?profile=security|bugs|hygiene|pipeline&config_version=N
GET /v1/projects/{id}/models
PATCH /v1/projects/{id}/models
GET /v1/projects/{id}/models/disable-preview?code=<code>[&effort=<effort>][&profile=security|bugs|hygiene|pipeline]
DELETE /v1/projects/{id}/models/participants?code=<code>&effort=<effort>
GET /v1/projects/{id}/enrollment-codes
POST /v1/projects/{id}/enrollment-codes
DELETE /v1/projects/{id}/enrollment-codes/{codeId} → { revoked: true, code_id }
code_id in the revoke response is the public id of the code, the same value POST returned and GET lists.
Project creation, metadata changes, config-version creation, model enablement, and enrollment-code
management require admin or owner. Every project contains Security, Bugs, Hygiene and Pipeline
profiles. default_profile is security unless supplied. The PR gate runs only the default profile,
so the web create form and thespider-agent setup send security when the first audit chosen is
Hygiene or Pipeline (beta); an API caller gets exactly the default_profile it sends. Unqualified legacy config routes resolve to
that default and include the resolved profile in their response; new clients use the canonical routes.
Profile codes are exact and lowercase. Write bodies validate them before any change is made:
| Field | Absent or null | "", padded, non-string, or unknown ("nope", "Hygiene") |
|---|---|---|
POST /v1/projects default_profile | security | 400 invalid_profile |
PATCH /v1/projects/{id} default_profile | not changed | 400 invalid_profile; no other field is updated either |
POST /v1/agent/bootstrap default_profile | security | 400 invalid_profile |
POST /v1/projects/{id}/campaigns profile | the project default | 400 invalid_profile |
PATCH /v1/projects/{id}/models profile | all profiles | padded values are trimmed (" bugs " is bugs); "", whitespace-only, non-string and unknown codes are 400 invalid_profile |
GET .../models/disable-preview ?profile | all profiles (also for "" and whitespace) | padded values are trimmed; unknown codes are 400 invalid_profile |
The message of each 400 is exact:
default_profile:default_profile must be `security`, `bugs`, `hygiene`, or `pipeline`- campaigns:
profile must be `security`, `bugs`, `hygiene`, or `pipeline`, or omitted for the project default - models:
profile must be `security`, `bugs`, `hygiene`, or `pipeline`, or omitted for all profiles
Reads keep 404 profile_not_found for an unknown profile in ?profile= or /profiles/{code}/.
Arrays of profile codes in responses (profiles, previously_enabled_profiles, enabled_profiles)
are alphabetical: ["bugs","hygiene","pipeline","security"]. Two exceptions list profiles in
display order (security, bugs, hygiene, pipeline): GET /v1/projects/{id}/profiles and a finding
detail's finding.profiles (Finding detail). Clients sort for display themselves.
Effort participants
A participant is a model code at one effort: { "code": "anthropic/claude-opus-5-5", "effort": "xhigh" }.
A project enables participants, a campaign plans one slice per pass, bucket and enabled participant,
and a claim hands a slice only to a runner that asks for its exact pair. The server advertises this as
model_effort in server_capabilities.
effort: nullis the default participant: no effort was set, so the runner uses its own default. Everyeffortkey in a response is always present, andnullfor the default. In a request,null, an absent key and""all mean the default.- Any other effort is 1 to 64 characters of
A-Z a-z 0-9 . _ : / -, not starting with-, matched byte for byte (never trimmed or lower-cased). Anything else is400 { error: "invalid_effort", message }. The server knows no agent's vocabulary; the agent checks Claude's and Grok's lists. - The effort is what the runner was bound to. The server does not verify what the provider ran.
- It is never folded into
code, and a participant has no id. - Lists of participants are sorted by code, then the default first, then effort in byte order.
- A claim or campaign create names at most 64 participants (for the older
modelslist, 64 distinct codes). More is400 { error: "too_many_participants", message }, checked before anything is read.
PATCH /v1/projects/{id}/models takes { code | model_id, effort?, enabled?, profile?, replace_starter? }.
The unit is the pair: enabling or disabling writes only (code, effort) in the targeted profiles, and
the response carries the effort it wrote. A bad effort is 400 invalid_effort before any lookup.
With replace_starter: true, enabling a participant also disables the participants of other
models that are still exactly what provisioning wrote (no explicit enablement since) and whose own
slices were never claimed in the project. A participant of the model being enabled is never retired,
so enabling the starter code at another effort keeps its default-effort participant as the
comparison's baseline. The response lists the retired ones in retired_participants
([{ code, effort }]) and their distinct codes in disabled_starter_models.
Every PATCH response also carries other_enabled_participants ([{ code, effort }], always
present, [] when there are none): the model's participants at other efforts that are enabled in
at least one targeted profile after the write. Disabling the default participant of a model that is
also enabled at xhigh leaves xhigh enabled, planned and billed; this key says so.
GET /v1/projects/{id}/models is the per-profile enablement matrix behind Settings → Models:
{ profiles, participants: [{ id, code, effort, name, provider, notes, context_limit, reasoning, lab, in_catalog, alias_of, enabled_profiles }], models: [same shape] }. It lists every model in use on the
instance, joined to the model catalog. participants has a row per model at the
default effort (effort: null), plus one row per other effort configured in this project, so a code
can appear on several rows; key rows by (code, effort). models holds only the default-effort rows,
one per code, for clients that predate effort: such a client toggles a row with a PATCH that names
no effort, which writes the default participant, so it is never shown another effort's row.
enabled_profiles is for that pair. in_catalog is false, and the catalog fields are null, for a
code models.dev no longer lists. alias_of is models.dev's advisory pointer for an alias code.
DELETE /v1/projects/{id}/models/participants?code=<code>&effort=<effort> removes a non-default
participant from the project (every profile's enablement row), for example a mistyped effort. Same
admin or owner requirement as disabling. Only a participant that never mattered can go:
| Case | Answer |
|---|---|
| removed | 200 { code, effort, removed_profiles } (removed_profiles alphabetical) |
effort absent or empty (the default participant) or malformed | 400 invalid_effort; disable the default participant instead |
| unknown code | 404 model_not_found |
| the code has no row at that effort in this project | 404 participant_not_found |
| still enabled in any profile | 409 participant_enabled; disable it first |
| the project has slices for it | 409 participant_has_history; it stays listed so its history stays visible on the Models tab |
Refused codes. Enabling a code the server can't audit with returns
400 { error: "invalid_model_code", message }. The server checks the code against its catalog copy,
and the message names the case:
| Case | message |
|---|---|
Not <lab>/<model> (and not mcp-*) | model code "…" is not a canonical models.dev code — use <lab>/<model>, … |
| A reseller's listing | model code "azure/gpt-5.6-sol" is azure's listing of openai/gpt-5.6-sol on models.dev, not a model code. … |
| An alias that fails an eligibility rule | model code "…" is a models.dev alias of …, but TheSpider can't audit with it: <reason>. |
| A model that fails an eligibility rule | model code "…" is listed on models.dev, but TheSpider can't audit with it: <reason>. |
| Not listed | model code "…" is not in the models.dev catalog — see https://models.dev for the full list |
An instance with an empty catalog (never synced, or MODEL_CATALOG_SYNC=off) checks only the shape.
The check runs only for a code the instance has not used before. A code already in use is not checked
again, so a model models.dev retires keeps its slices and findings. The full messages and what to do
for each:
troubleshooting.
Disabling skips slices. PATCH with enabled: false also skips that participant's unfinished
slices (never another effort's) in the same transaction (skip_pending, default true; send false to opt out), for the targeted
profiles only: pending slices, failed slices with attempts left, and running slices whose lease
already expired become skipped (reason model-disabled in error_message). A running slice on a
live lease is left to finish. A campaign with nothing else outstanding completes. The response adds
previously_enabled_profiles and skipped_slices:
{ "pending": 6, "retryable": 0, "expired_lease": 0, "in_flight": 0, "contended": 0,
"campaigns": [{ "campaign_id": 15, "name": "...", "status": "running", "skipped": 6 }] }
contended counts slices a concurrent claim or result held locked and were not skipped; repeating the
request skips them. Disabling twice is idempotent. While a participant is explicitly disabled for a
campaign's profile its slices cannot be claimed, even before they are skipped. Re-enabling does not
touch slices: creating or reusing a campaign (POST .../campaigns) turns the skipped slices of a
re-enabled participant back to pending with a fresh attempt budget.
GET .../models/disable-preview returns the same profiles, previously_enabled_profiles,
skipped_slices and other_enabled_participants (the state now), plus the effort it previewed,
without writing anything. ?effort= picks the
participant (absent or empty is the default; a bad value is 400 invalid_effort). It runs under the same admin or owner requirement. It is a
separate route, not a flag on the PATCH, so a server that predates it can only answer 404 rather
than perform the real change.
Readiness returns the selected profile/config, bucket/pass/model/planned-slice counts, enabled models,
ready, blockers, blockers_detail, and activity. counts.enabled_models counts enabled
participants, and planned_slices is buckets × passes × participants. enabled_models
([{ code, name }]) keeps its older meaning for clients that predate effort: the codes enabled at the
default effort. enabled_participants ([{ code, name, effort }]) lists every enabled participant.
The response of POST /v1/projects carries enabled_participants beside enabled_models too. Blocker codes are profile_not_found
(returned as a 404 error, not a blocker entry), config_missing, no_buckets, no_passes,
no_enabled_models, and empty_matrix.
blockers is the stable code list. blockers_detail repeats it in the same order as
{ code, message, remedy } so a terminal, the dashboard, and these docs show identical wording;
treat the codes as the contract and the strings as display text. activity is
{ last_claim_at, last_result_at } for the selected profile — both null until an agent claims.
POST /v1/projects accepts models, an array of canonical model codes (at most 100). The server validates and enables those models for all four profiles in the project-creation transaction. The response's enabled_models and enabled_participants reflect that selection. Idempotency includes the model selection.
All four profiles receive the bundled methodology. No model is selected automatically: omitting models or sending [] creates a project whose readiness includes no_enabled_models. Invalid model codes return 400 invalid_model_code without creating a project. The web UI requires at least one model before project creation. Model choices on existing projects are preserved.
Project reads and triage
GET /v1/projects/{id}/dashboard/risk
GET /v1/projects/{id}/dashboard/models
GET /v1/projects/{id}/profile-counts
GET /v1/projects/{id}/campaigns
GET /v1/projects/{id}/campaigns/{campaignId}/progress
GET /v1/projects/{id}/campaigns/claimable
GET /v1/projects/{id}/campaigns/{campaignId}/cancel-preview
GET /v1/projects/{id}/config
GET /v1/projects/{id}/findings
GET /v1/projects/{id}/findings/{findingId}
GET /v1/projects/{id}/slices
GET /v1/projects/{id}/findings/export
POST /v1/projects/{id}/findings/{findingId}/status # member+
POST /v1/projects/{id}/findings/{findingId}/classification # member+
POST /v1/projects/{id}/findings/{findingId}/links # member+
DELETE /v1/projects/{id}/findings/{findingId}/links?url= # member+
Profile-aware reads accept profile=security|bugs|hygiene|pipeline|all. Omission resolves to the project default,
except a selected campaign supplies its pinned profile. A contradictory campaign/profile pair is
rejected. all is explicit, never the default. Finding export includes selected-profile metadata and
only matching report provenance while retaining project-global canonical status.
dashboard/risk also returns profiles, the project-wide per-profile counts described for
GET /v1/orgs/attention. It ignores the selected profile and campaign, so a page open on one profile
can tell that another profile has findings waiting. GET /v1/projects/{id}/profile-counts returns
only that breakdown, as { "profiles": [...] }; the web profile switcher badges each profile with its
unresolved count.
Campaigns and progress
GET /v1/projects/{id}/campaigns lists campaigns newest first with their slice counts (slices,
pending, running, completed, failed, retryable, skipped, cancelled). limit caps the list;
outstanding=1 keeps only campaigns that still have work — a pending, running, or retryable slice,
the same predicate campaign completion, the gate and wait use — and never a cancelled campaign. A
server older than the parameter ignores it, so a client should still check the counts.
A campaign's status is new, running, completed or cancelled. A cancelled campaign also
carries the flat columns cancelled_at, cancel_reason and cancelled_by_label, and a cancel
object (null for every other campaign):
"cancel": { "cancelled_at": "2026-10-14T12:00:00.000Z", "cancel_reason": "broken runner env",
"cancelled_by": { "kind": "token", "id": 31, "label": "ci-runner" } }
cancelled_by.kind is user (a browser session), token (a client token; label is its name) or
null once the user or token was deleted. label is a snapshot taken at cancel time, so it survives
that deletion. The list and the progress route carry the flat columns and the cancel object, and
the create response always carries cancel: null (a create never returns a cancelled campaign). The
gate has no cancel object: it carries flat keys, and only on a cancelled campaign (see
Gate).
Each row carries planned_participants: the participants the campaign was created for
([{ code, effort }]), or null when it plans every enabled participant (the default set).
planned_model_codes is the distinct codes of the same set, or null, for older readers. The
progress route carries both too.
Each row carries previous_campaign_id: the id of the campaign that was created immediately before it in the
same project and profile, or null for the first one. It does not depend on the profile filter. Use it,
together with baseline_campaign_id, to find the comparison campaign; ids themselves carry no order.
GET /v1/projects/{id}/campaigns/{campaignId}/progress returns the campaign plus a participants
array, one row per participant with slices in the campaign, and a models array that holds only the
default-effort rows (effort: null) of the same set. models is the per-code view an agent older than
0.8.0 reads: it matches rows by code and claims only default-effort slices, so a row for another effort
would read as work it can claim. Read participants when it is present and fall back to models on
an older server, whose models rows are already one per participant. Each row:
| Field | Meaning |
|---|---|
code | Model code. |
effort | The participant's effort, null for the default. |
enabled | false only when the participant is explicitly disabled for the campaign's profile; the claim then refuses its slices. A missing enablement row reads true, as the claim reads it. |
slices, pending, completed, failed, retryable, skipped, cancelled, invalid | Slice counts. failed includes slices that have spent their attempts; retryable is the part still offered. skipped counts every slice that will never be audited: model disabled and cancelled. cancelled is the cancelled subset of skipped, so skipped - cancelled is the model-disabled part. pending, running, retryable and failed never include a cancelled slice. |
pending | Unstarted slices and stalled slices whose lease expired with attempts left. |
stalled | The subset of pending whose lease expired with attempts left. No live lease holds them. They can be claimed again only while their participant is enabled. |
running | Slices whose lease has not expired. |
leased | Slices held by a live lease (lease_expires_at in the future). |
claimable | Exactly what a claim would hand out now: pending, retryable, or on an expired lease with attempts left, and the participant not disabled for the profile. Never overlaps leased. |
The top-level counts (including stalled, leased and claimable) are the sums of the participants rows,
so they cover every effort.
stalled is already included in pending; do not add it again when calculating outstanding work.
It measures lease expiry, not eligibility: a disabled participant may have stalled work with
claimable: 0 when its live lease was left alone during disablement and subsequently expired.
Re-enable that participant to run the work, or repeat the disable operation to skip its remaining slices.
The slices list reports these rows as status: "pending", with stalled: true and
lease_expires_at. An expired final attempt remains failed. Cancelled campaigns never expose
their unsettled work as stalled. Older servers omit stalled.
GET .../campaigns/claimable (the daemon's poll) applies the same disabled-participant rule, so it
never lists a campaign whose only claimable work belongs to a disabled participant.
Slices and the model dashboard
GET /v1/projects/{id}/slices lists slices with campaignId, status, model (a code), effort
and q filters. effort absent means every effort; effort= (present and empty) means the default
participant only; any other value matches that effort exactly. Each row carries model_code and
effort. modelCounts has one row per participant, { label, effort, count }, where label is the
code. models is unchanged: the distinct codes configured in the project, for a model filter.
participants ([{ code, name, effort }]) lists every configured participant, enabled or not, for an
effort filter.
GET /v1/projects/{id}/dashboard/models backs the Models tab. It has one row per participant: every
participant configured in the profile scope, enabled or not, plus any participant with slices in
scope, so turning a participant off never hides its history. Each row carries code, effort,
enabled, slice counts, findings, unique_findings (reported by this participant and no other),
false positives, severe open findings, reports, estimated_total_tokens and recommendation, all
counted per participant. The overlap keys keep their names (single_model_findings,
multi_model_findings, avg_models_per_finding) but count participants: a finding reported by one
model at two efforts is multi-model there.
Findings filters
GET /v1/projects/{id}/findings and GET /v1/projects/{id}/findings/export share one filter
implementation, so everything below applies identically to both.
List rows keep models (the comma-joined distinct codes that reported the finding) and add
participants ([{ code, effort }], the distinct reporting participants, sorted).
status and severity accept one or more values, comma-separated. Values are trimmed, empties
are dropped, and duplicates are de-duplicated. A single value behaves exactly as it always has.
GET /v1/projects/{id}/findings?status=new,triaged
GET /v1/projects/{id}/findings?severity=critical,high
status also accepts three aliases. They mean "everything except these statuses," so an unknown
legacy status still lands on the right side. Mix aliases and literals (status=actionable,accepted);
the result is their union.
| Token | Meaning |
|---|---|
open | Everything except fixed and false_positive |
actionable | Everything except wont_fix, false_positive, accepted, and fixed (what the PR gate still blocks on) |
closed | Exactly fixed or false_positive |
accepted and wont_fix stay open (dashboard still counts them) but drop out of actionable. Use actionable to decide whether to do work; use open to report state. ?status=open matches summary.open in the same response.
severity recognizes one reserved token, none, meaning "no severity was assigned": a NULL
canonical_severity (the bucket severityCounts labels (none)). canonical_severity only ever holds
critical, high, medium, low or info (see Canonical quality fields).
It combines with real severities:
| Filter | Matches |
|---|---|
severity=high | exactly high |
severity=critical,high | critical or high — excludes unclassified findings |
severity=none | only findings with no severity assigned |
severity=critical,high,none | critical, high, or unclassified |
Unknown status or severity tokens are not rejected; they are matched literally and simply return nothing. Filters still combine with AND across parameters.
since keeps findings discovered after a point in time. A bare integer is a campaign id: it selects
findings first discovered in a campaign created after that campaign, by creation order (not by id value). An
ISO date or timestamp selects by time. A campaign id that does not exist in this project (or belongs to
another organization) is 400 invalid_since.
campaignId keeps findings sighted in that campaign. A value that is present but not a valid id is
400 invalid_campaign_id; a valid id that names no campaign in this project (or one in another organization) is
404 campaign_not_found. The same two answers apply to
GET /v1/projects/{id}/findings/export.
Rows come back in the order chosen by sort (priority by default: severity priority, then most recently
updated first; also updated_desc, updated_asc and title). That is not creation order, and ids carry no
order either, so clients must not re-sort by id.
has_link=true keeps findings that have at least one link; has_link=false keeps
those with none. Any other value is 400 invalid_has_link. List rows carry links[], and
summary.linked counts the linked findings in the filtered set.
basis filters on the evidence basis: a comma-separated set of
demonstrated, speculative (a hardening note) and unclassified (nobody classified it). Any other
token is 400 invalid_basis. "Hide hardening notes" is basis=demonstrated,unclassified.
authentication, authorization, and sensitive_data filter the canonical security attributes.
Authentication and sensitive data accept yes, no, or unassessed; authorization accepts
elevated, standard, or unassessed. Each accepts comma-separated alternatives; different fields
combine with AND. These filters match only findings with security audit context, including under profile=all. Unknown tokens return 400 invalid_security_attribute. The list response includes
security_attributes: true when these filters are supported. Export echoes each supplied filter.
bucket_review=true keeps findings whose bucket is flagged for review; bucket_review=false keeps
the rest. Any other value is 400 invalid_bucket_review.
bucket matches the display bucket (below), and so does q, under the same profile rule. category
still means "a supporting report used this category code", not the canonical category.
model keeps findings that model code reported, at any effort, in the selected profile's audits (like
category). An unknown code matches nothing. modelCounts lists every model that reported a finding
in the set, { label, count } with label the code and count distinct findings, under every filter
except model itself, so it is the full option list for a model picker. A server that predates the
model filter answers without modelCounts.
summary also carries speculative (findings with evidence_basis = speculative) and
bucket_review (findings flagged for bucket review), both over the filtered set.
Canonical quality fields
A finding's severity, bucket/category and evidence basis are computed from its supporting reports at
every ingest, report removal and merge, and stored with their provenance. The reports themselves are
never rewritten: each report keeps the model's raw severity, categories and stdout artifact.
| Field (list, detail, export) | Meaning |
|---|---|
canonical_severity | critical, high, medium, low, info, or null. The highest severity any supporting report assigned, normalized (High is high). A merge never lowers it. |
severity_source | reports (computed), manual (set through the classification route; sticky) or legacy (an imported or pre-upgrade value, kept as a floor until the reports reach it). Never null. |
severity_reason | Why that value won, e.g. highest of 3 reports: high (report #17, openai/gpt-x); distribution high 1, medium 1, low 1 (spread 2). |
severity_report_id, severity_model_code | The witness report (the earliest-ingested report at the winning level; a deterministic tie-break, not an id order) and its model. The id becomes null if that report is later removed; the model code stays. |
bucket_code, bucket_name | The display bucket (rule below): the bucket the finding's classification decided — the moved-to bucket when normalization or a person moved it, otherwise the discovery bucket. |
bucket_moved | true when the display bucket is the finding's moved-to (canonical) bucket, so a client can say "moved from discovered_bucket_code"; false otherwise, including when another profile's view shows a different bucket. Older servers omit it: treat a missing value as false. |
discovered_bucket_code | The bucket of the slice that discovered the finding (provenance). Retests do not follow the display bucket either; see Campaigns. |
canonical_category, category_source | The category most supporting reports used (from the discovery taxonomy), and reports / manual / legacy. |
bucket_review, suggested_category | A reason when the reports' own tags or text suggest a different bucket (mixed buckets, a sensitive file in a build artifact, a CWE), else null; and the suggested category, if any. A finding is moved automatically only when every report's categories point to exactly one other bucket and nothing contradicts it. |
evidence_basis, evidence_basis_source, evidence_basis_reason | demonstrated, speculative ("hardening note") or null (unclassified); model (the report asserted it), heuristic (a low/info security report says so explicitly) or manual. Speculative needs every supporting report to be speculative. |
authentication, authorization, sensitive_data | Security context: yes/no, elevated/standard, and yes/no, respectively. null means unassessed. |
authentication_source, authorization_source, sensitive_data_source | reports, manual, or null when unassessed. Manual values survive ordinary recompute. |
Display bucket rule. The decided bucket is the moved-to bucket, or the discovery bucket when the
finding was not moved. profile=all always shows it. Under a selected profile (including the project's
default profile when you send none) it is shown when that profile's config version owns the bucket.
Otherwise the response falls back to the bucket of the finding's latest report in that profile. That
happens in two cases: the profile does not own the bucket (for example the bugs view of a security
finding), or the row is a legacy one whose bucket was never computed (category_source = legacy and
no moved-to bucket), which keeps the pre-upgrade display until its next ingest computes one. List,
summary counts, export, detail, the risk dashboard, bucket= and q all use this one rule. The
gate is profile-agnostic and always shows the decided bucket.
Speculative findings still count toward severe_open, wait --fail-on and the gate verdict.
Quiet them with accepted or wont_fix.
canonical_severity held the first report's raw text, so a
model's High matched no severity filter, no severe_open count and no wait --fail-on threshold.
The upgrade normalizes existing values; a finding that was invisible to those checks becomes visible,
so a CI job that passed before the upgrade can fail after it. That is the intended fix.Finding detail
GET /v1/projects/{id}/findings/{findingId} returns finding (every finding column plus
bucket_code, bucket_name, bucket_moved, discovered_bucket_code, discovered_bucket_name and
suggested_bucket_code, the single bucket that owns suggested_category), reports[], history,
fixes, falsePositives, sightings, links and classificationHistory.
reports[] and sightings are filtered to the profile read (?profile=, the campaign's profile
with campaignId, else the project default; all returns every profile's). Two finding fields say
where the evidence lives whatever the read profile:
| Field | Meaning |
|---|---|
profiles | Every profile with a report or a sighting of this finding, in display order (security, bugs, hygiene, pipeline), unlike the alphabetical profile arrays elsewhere. [] when it has none. A client that opened the finding under a profile missing from this list reads it again under one that is in it. |
discovered_profile | The profile of the campaign that first discovered the finding. |
Each report carries model_code and effort: the participant of the slice that produced it, with
effort: null for the default. The export's reports[] carry effort too.
Each report also adds read-time fields that are never stored:
| Field | Meaning |
|---|---|
normalized_severity | The report's raw severity normalized, or null when unrecognized. |
evidence_basis, evidence_basis_source, evidence_basis_signal | This report's own basis, its source (model / heuristic), and the heuristic signal that fired. |
recommendation_issues | [{ code, message, excerpt }]: command syntax in the recommendation that does not do what it claims. Today one rule ships, sqlite3_positional_bind (the sqlite3 shell does not bind extra arguments to ?). excerpt is model text, capped at 200 characters. |
classificationHistory lists every change of a canonical field, newest first:
{ id, finding_id, field: severity|bucket|category|evidence_basis|authentication|authorization|sensitive_data, from_value, to_value, from_source, to_source, cause: ingest|merge|repair|manual|clear, report_id, model_code, merged_from_finding_id, actor_user_id, decider, notes, created_at }. The id of each history row is a per-response ordinal
(see Identifiers).
Finding classification
POST /v1/projects/{id}/findings/{findingId}/classification
{ severity?: critical|high|medium|low|info,
category?: "<category code of the finding's discovery taxonomy>",
evidence_basis?: demonstrated|speculative,
authentication?: yes|no, authorization?: elevated|standard, sensitive_data?: yes|no,
clear?: ["severity" | "category" | "evidence_basis" | "authentication" | "authorization" | "sensitive_data"],
notes?: "<= 2000 chars", decider?: "<= 200 chars" }
→ 200 { finding_id, changes: [{ field, from_value, to_value, from_source, to_source }],
finding: { canonical_severity, severity_source, severity_reason, bucket_code, canonical_category,
category_source, bucket_review, suggested_category, evidence_basis,
evidence_basis_source, evidence_basis_reason, authentication, authentication_source,
authorization, authorization_source, sensitive_data, sensitive_data_source } }
Sets a manual value (source manual) that ordinary recomputes leave alone, or clears a field back to
the value computed from the reports (dropping a manual value or a legacy floor). Setting a category
moves the display bucket to the bucket that owns it and clears any bucket-review flag. Member role,
session or client token (actor_user_id is null for a token), same gate as a status change.
A write identical in value and source changes nothing and returns changes: [], so retries are safe.
Confirming the current value manually (same value, new source) is recorded.
| Error | When |
|---|---|
400 invalid_json | The body is not a JSON object. |
400 invalid_classification | An unknown key, a wrong type, or notes/decider too long. |
400 security_attributes_unavailable | Security attributes were set or cleared on a finding with no security audit context. |
400 empty_classification | Nothing to set or clear. |
400 conflicting_classification | The same field is set and cleared. |
400 invalid_severity / invalid_evidence_basis / invalid_clear | A value outside the lists above (severity tokens are exact and lowercase). |
400 invalid_category | The code is not in the finding's discovery taxonomy, or no bucket owns it. The message lists valid codes. |
400 ambiguous_category | Several buckets own the code, so it does not decide a bucket. |
400 category_unavailable | The finding has no discovery bucket. |
403 insufficient_role / read_only_license | As for status writes. |
404 finding_not_found | No such finding in this project. |
409 finding_merged | The finding was merged away; the body names merged_into_finding_id. Nothing is written. |
Finding status writes
POST /v1/projects/{id}/findings/{findingId}/status
{ status, notes?, decider?, reason?, commits?: [sha…], commit?: sha, … }
→ { finding_id, from_status, to_status, actor_user_id }
commits (or the legacy single commit) is accepted only with status=fixed or
status=needs_retest. Any other status returns 400 commits_invalid_for_status.
fixed+ commits writes a verified fix row and setsfixed_at_committo the last SHA.needs_retest+ commits is refine's proposed fix: same commit rows,fixed_at_commitset, finding stays actionable. Only a finished retest writesfixedorstill_vulnerable. See Refine.false_positiverequiresreason(400 missing_reasonotherwise).pr_urlis a deprecated spelling of "link this finding to a pull request": it attaches a finding link (at any status) and must be anhttp(s)URL (400 invalid_pr_url). A merged-away finding returns409 finding_merged. Prefer the links routes below.
Finding links
A finding can carry any number of links to merge requests, pull requests or issues (up to 50). A link is just a URL; the server derives everything else from it and calls no forge API.
POST /v1/projects/{id}/findings/{findingId}/links { url }
→ 201 { finding_id, created: true, link } # new link
→ 200 { finding_id, created: false, link } # already attached: idempotent, never a duplicate
DELETE /v1/projects/{id}/findings/{findingId}/links?url=<url>
→ 200 { finding_id, removed: true, link }
link is { id, url, provider, kind, ref, host, actor_user_id, created_at }:
| Field | Values |
|---|---|
provider | github, gitlab, bitbucket, azure_devops, gitea, jira, linear, other |
kind | merge_request, pull_request, issue, other |
ref | !128 (merge request), #57 (pull request, issue), PROJ-9 (Jira, Linear), or null |
Both routes need the member role, the same as a status change, and work with a session or a client
token (actor_user_id is null for a token). Errors: 400 invalid_url (not an http(s) URL, longer than
2048 characters, contains whitespace), 403 insufficient_role / read_only_license, 404 finding_not_found, 404 link_not_found (delete of a URL the finding does not carry), 409 finding_merged (the finding was merged away; the body names merged_into_finding_id), 409 too_many_links.
The URL is canonicalized before it is compared or stored: scheme and host lower-cased, credentials,
fragment and trailing slash dropped, and a sub-page of a known change collapsed to the change itself
(…/pull/57/files is …/pull/57), so the same request linked from two tabs is one link. provider,
kind and ref come from the URL's host and path, and an unrecognised host is other. Soft-merging
two findings moves the loser's links to the keeper.
Campaigns
POST /v1/projects/{id}/campaigns
{ profile, type, git:{branch,commit,remote_url,dirty}, base_commit?, changed_paths?, config_version?,
participants?: [{ code, effort }] | models?: [code] }
→ { campaign_id, profile, profile_id, config_version, config_version_id, slice_count, status, reused,
planned_model_codes, planned_participants, cancel: null }
Which participants a campaign plans:
| Body | Plans |
|---|---|
neither, or participants: null | every enabled participant of an agent model in the profile (the default set; planned_participants: null) |
participants: [{ code, effort }, …] | exactly those participants that are enabled for the profile, never the default set |
models: [code, …] (older clients) | each code at the default effort only; models: [] (or a non-array) is still the default set |
models that is non-empty but holds no usable code ([""]) | nothing: 422 empty_matrix, never the default set |
more than 64 participants (or 64 distinct models codes) | 400 too_many_participants |
participants: [] | 400 invalid_body participants must not be empty |
both participants and models | 400 invalid_body send participants or models, not both |
a participant that is not an object, or has no code | 400 invalid_body |
a bad effort | 400 invalid_effort, message prefixed with the code |
A participant that is unknown or not enabled plans nothing, like an unknown code; when nothing is
planned at all the create is 422 empty_matrix. That includes an incremental create whose changed
paths matched a pass but whose selection, or the default set, plans no slice; only an incremental
create whose changed paths match no pass completes at once with zero slices. The PR webhook reaches
the default-set case when the profile's only enabled models are MCP host-agent (mcp-*) models: it
answers 202 { ok: true, mapped: true, created: false, reason: "empty_matrix", message } and creates
no campaign, so the gate never sees a clean pass for code nobody audited.
Who plans what: webhooks (the PR gate) and the web retest button, which create without a selection,
plan every enabled agent participant (the default set). thespider-agent run plans the participants
bound and enabled on that machine, unioned with the existing plan on identity reuse. refine
plans exactly its retest participant. MCP thespider_start_audit plans its own mcp-* code at the
default effort. Reusing a live campaign at the same identity unions the planned participants (the
default set wins over any list) and stores the union even when it adds no slice; the response shows
the merged set.
Campaign identity is unique among campaigns that were not cancelled. A create at the identity of a
live campaign returns it with reused: true; a create at the identity of a cancelled campaign (and of
no live one) makes a fresh campaign, so run, the webhook, the web retest button, refine and MCP
thespider_start_audit all start new work after a cancel. A create never returns a cancelled campaign
and never tops one up. An explicit baseline_campaign_id that points at a cancelled campaign is
422 baseline_cancelled. A retest is the exception: a type: retest create whose newest
campaign at the identity was cancelled answers 409 retest_cancelled (with cancelled_campaign_id,
cancelled_at, cancel_reason, cancelled_by_label) unless the body sends
restart_after_cancel: true, so an unattended retest loop cannot re-bill a retest somebody stopped.
changed_paths for an incremental campaign,
or use the GitHub webhook path. Full campaign identity includes profile and pinned config ID.
Retests require an explicit profile. A retest runs in the bucket of the finding's latest report in
that profile, falling back to its discovery bucket. It never follows the display bucket, so a finding
that was moved is still retested where its reports came from. The request returns
422 retest_bucket_unmapped when that bucket code does not exist in the target profile config.Cancel a campaign
GET /v1/projects/{id}/campaigns/{campaignId}/cancel-preview # anyone who can read the project
POST /v1/projects/{id}/campaigns/{campaignId}/cancel # member+, refused on a read-only instance
{ reason?: string } # trimmed; empty is none; max 500 characters
A campaign that is new or running (any type) can be cancelled. Cancel is terminal and sticky.
The preview is a separate route, not a flag on the POST, so a server that predates it can only
answer 404 rather than perform the real cancel. It writes nothing, not even the settling other
reads do. The server advertises both routes as "campaign_cancel" in server_capabilities of
GET /v1/me.
GET .../cancel-preview →
{ "campaign": { "id": 18, "name": "…", "status": "running", "profile": "security" },
"already_cancelled": false, "cancellable": true, "unavailable_reason": null,
"slices": { "total": 6, "to_cancel": 5, "pending": 1, "running": 4, "retryable": 0,
"completed": 1, "skipped": 0, "failed": 0, "cancelled": 0 },
"live_leases": [ { "lease_id": 90, "slice_id": 213, "model": "openai/gpt-6.1-sol", "effort": null,
"holder": "colin@build-01", "age_seconds": 1680 } ],
"claims_billed": 5,
"billing_note": "Cancelling does not refund anything: …" }
POST .../cancel →
{ "campaign": { "id": 18, "name": "…", "status": "cancelled", "cancelled_at": "…",
"cancel_reason": "…", "cancelled_by": { "kind": "user", "id": 2, "label": "Colin" } },
"already_cancelled": false, "cancelled_slices": 5, "superseded_leases": 4,
"contended_slices": 0, "claims_billed": 5, "billing_note": "…" }
The preview includes the campaign's profile and, when already cancelled, its cancelled_at,
cancel_reason and cancelled_by, so the CLI can resolve and describe it without a settling read.
In the preview, slices.skipped is only the model-disabled count (not folded with cancelled), and
to_cancel is what a cancel would move: pending, running and retryable-failed slices. live_leases
are leases that have not expired. cancellable is false with unavailable_reason: "campaign_terminal"
when there is nothing to cancel: the campaign has finished, or it has no pending, running or
retryable-failed slice (including a campaign with no slices at all). For an already-cancelled campaign
cancellable is false, unavailable_reason is null and to_cancel is 0; its counters show
every slice a cancel has not settled yet as cancelled, never as pending or running.
The cancel runs in one transaction: it sets the campaign cancelled, moves every pending, running and
retryable-failed slice to the slice status cancelled (neither claimable nor outstanding), and ends
the live leases of those slices. Completed, skipped and out-of-attempts failed slices keep their
status. A slice that a concurrent claim or result holds locked is not waited on (that would deadlock
with the order everything else locks in): it is counted in contended_slices and settled by the
server moments later, from completion or the next read. Until it is settled, every published counter
(list, progress, slices summary, gate) already reports it as cancelled (and inside skipped), never as
pending, running or retryable. It never becomes claimable again, and the campaign is cancelled
and stops accepting work from the instant the transaction commits. The cancel does wait for the
campaign row itself, so it can queue behind a result that is in the middle of being ingested.
| Answer | When |
|---|---|
200 | Cancelled. A campaign that is already cancelled also answers 200 with already_cancelled: true, the original actor, time and reason, and changes nothing. |
409 campaign_terminal | There is nothing to cancel. The campaign is completed; or every slice is already settled, so it is finished (the cancel records the completion and refuses); or it has no slices at all (it is left as it was). |
404 campaign_not_found / project_not_found | No such campaign in this project. |
422 invalid_reason | reason is not a string, or longer than 500 characters. |
403 insufficient_role / read_only_license | Below member, or the instance is read-only. |
Billing. Cancelling refunds nothing. A slice claim is billed once per slice, so claimed slices
stay billed (claims_billed counts them); slices that were never claimed are never billed. A fresh
campaign after a cancel has new slices, billed when they are claimed. The same holds when a GitHub
webhook redelivery at the same head commit creates the fresh campaign.
What a cancelled campaign does afterwards.
| Surface | Behaviour |
|---|---|
| Claim | 409 campaign_cancelled, answered before the quota check (so never 402). |
| Heartbeat | { lease_expires_at: null, superseded: true, campaign_cancelled: true }. |
| Result | 202, stored on its lease as provenance; completes no slice, ingests no finding. |
requeue-invalid | 409 campaign_cancelled, before anything is written. |
Claimable poll, campaigns?outstanding=1, org attention | Never listed. |
| Gate | degraded with reason: "campaign_cancelled", or fail on a new finding. |
| Baselines | Never used as a baseline or as the previous campaign in a comparison. |
One race cannot be closed. If a result that is already past its status check completes the last
outstanding slice at the moment the cancel commits, the campaign ends cancelled with every slice
completed and cancelled_slices: 0: the result really did finish before the cancel, and no count is
made up to hide it. The gate still reads such a campaign degraded (it is keyed on the status), but an
agent 0.6.0 or older, which reads only the counters, can see it as finished with nothing skipped. An
imported campaign that is cancelled and holds only completed slices behaves the same way.
Findings already ingested from slices that finished before the cancel stay. Findings are
project-wide and keep going through normal de-duplication. A retest campaign that is cancelled never
concludes: its finding is not marked fixed or still_vulnerable.
Claim, heartbeat, results
POST /v1/campaigns/{id}/claim
{ client_id, participants:[{ code, effort }] | models:[...], max_slices, lease_seconds,
exclude_slice_ids?: [<public slice id>, ...], target_dirty?: boolean }
→ { leases:[ { lease_id, slice_id, model_code, effort, pass_code, bucket_code,
prompt:"<full rendered prompt.md>", prompt_hash, marker,
timeout_seconds, lease_expires_at } ], excluded_claimable }
POST /v1/leases/{lease_id}/heartbeat → { lease_expires_at, superseded[, campaign_cancelled] } # best-effort, online clients only
POST /v1/leases/{lease_id}/results
{ exit_code, # REQUIRED: number, or null for "killed before it exited"
duration_ms, model_code, client_version, prompt_hash,
stdout:"<raw output.txt>",
stderr_tail }
→ { accepted, parsed_report_count, warnings[], error? } # idempotent on (lease_id, prompt_hash)
participants claims only slices of exactly those (code, effort) pairs. The older models list claims
only those codes at the default effort, so an agent that predates effort never runs a slice
planned for another effort. Sending both, or participants: [], is 400 invalid_body; a bad effort
is 400 invalid_effort; more than 64 is 400 too_many_participants; all are checked before the
organization and quota checks. Sending neither, models: [] or models: [""] claims nothing. A participant explicitly disabled for the campaign's profile is not handed out. Each
lease carries effort (null for the default): run it with the binding at exactly that effort. The
prompts of two efforts of one model are identical apart from the Slice id: line. The slice_claim
usage event records the effort too, and each participant's slices are billed on their own. MCP host
agents keep sending models.
With claim_target_dirty, the optional claim field target_dirty accepts a boolean describing the
tree the runner will audit. It controls this claim's prompt only; it never changes the stored campaign
dirty flag. Omission falls back to the campaign's stored value. Any non-boolean value, including
null, is 400 invalid_body. Clients send it only when the capability is advertised and observation
succeeds; a failed observation is unknown, not clean. The first-party runner observes once per claim
batch with untracked files included (git status --porcelain --untracked-files=normal). Under
--isolated, it observes the detached audited worktree, not the live checkout. Campaign creation
still records the live checkout's dirty flag. MCP next_slice keeps using the stored campaign value.
With claim_exclude, exclude_slice_ids accepts up to 10,000 positive safe-integer public slice
ids. Exclusions are applied before selecting or leasing work: an excluded slice consumes no new
attempt and receives no new lease. Unknown ids and ids outside this project are ignored. Invalid
ids are 400 invalid_exclude_slice_ids; an oversized list is 400 too_many_excluded_slices.
The server never truncates the list. excluded_claimable is
the count of otherwise-claimable excluded slices for the requested participants in this campaign.
Claims prefer unstarted pending work, then expired leases, then failed retries.
The first-party runner excludes every slice it has already attempted in this invocation. If the
exclusion limit is reached, it stops before another claim and explains how to resume. Against a
server without claim_exclude, it runs one batch per invocation and asks for an upgrade or manual
resumption. It never discards an already-claimed batch to avoid retrying it.
A claim on a campaign that was cancelled answers 409 with
{ error: "campaign_cancelled", message, cancelled_at, cancel_reason, cancelled_by_label }, where
message is the sentence campaign #18 was cancelled by Colin at <time>: <reason> and the claim is
refused before it checks quota or bills anything. See Cancel a campaign.
exit_code decides coverage validity, so it is the one required field of the body. An absent field
or a non-numeric one ("0") is answered 400 missing_exit_code / 400 invalid_exit_code — a
payload error, not the 422 coverage verdict, so an integrator is not sent looking at their runner
for a bug in their request.
Gate
GET /v1/campaigns/{id}/gate → { status: pass|fail|pending|degraded, pending_slices, failed_slices, skipped_slices, new_findings:[...] }
skipped_slices counts slices that were never audited and never will be: a disabled model's, and a
cancelled campaign's. A cancelled campaign's verdict comes from its status, not from slice
counts, and is never pass or pending: degraded, or fail when a finding that is new to the
project came from a slice that finished before the cancel. Only a cancelled campaign's response
carries these extra keys, and they stay on a fail:
| Key | Meaning |
|---|---|
reason | "campaign_cancelled". |
cancelled_slices | How many slices were cancelled (a subset of skipped_slices). |
cancelled_at, cancel_reason, cancelled_by_label | When, why and by whom. |
A client that does not know reason still reads the campaign as degraded: status is degraded, and
skipped_slices is above zero whenever a slice was cancelled.
repair cannot fix a cancelled campaign; the way forward is a fresh campaign. The baseline used for
new_vs_baseline skips cancelled campaigns, and a baseline that was cancelled after it was chosen
falls back to the automatic one.
Cheap CI poll — no model creds or long runtimes in CI.
Each finding in new_findings, new_to_project and new_vs_baseline is
{ id, fingerprint, canonical_title, canonical_severity, status, bucket_code, primary_file, evidence_basis }.
bucket_code is the display bucket. evidence_basis is informational: a speculative finding (a
hardening note) still fails the gate.
The gate route is authenticated. CI needs a TheSpider token even though it does not need model credentials.
Lease policy
The client requests lease_seconds sized to its batch (server caps it, e.g. 24h). Heartbeats extend a lease when the client is online but are not required — claim and submit are the only calls that need connectivity. On expiry the slice requeues.
- A late result is still accepted if no other lease has completed the slice with a valid marked array and exit 0.
- If one has, first-accepted-wins and the late output is stored as a provenance artifact.
- A missing marker, unclosed marker, empty marker body, malformed JSON, a value that is not an array of objects, or a nonzero/absent exit stores the artifact, marks the slice
failed(retryable), and returns422. - A cancelled campaign accepts no result. A result for a lease of a cancelled campaign answers
202withaccepted: falseand a warning that starts withcampaign_cancelled; the output is stored on that lease as a provenance artifact. It completes no slice, ingests no finding and bills nothing. This holds for failures too: a failed result cannot flip a cancelled slice. A result already being ingested when the cancel commits finishes as if it came before the cancel, so its findings stay. A replay of a lease that won its slice before the cancel gets its original answer. - Retries are bounded. A slice is offered at most
MAX_SLICE_ATTEMPTS(default 3) times. After that it staysfailedbut is no longer claimable and no longer counts as outstanding, so the campaign reaches a terminal status and the gate reaches a verdict instead of hanging on a deterministically-broken runner. The run is reported as degraded, never clean.requeue-invalidresets the counter — that is the operator's "I fixed the binding, try again". - Slice-quota usage is recorded once at claim, idempotent per
slice_id. Paid subscription seats set the pooled organization allowance; see Pricing.
GET /v1/projects/{id}/campaigns/{campaignId}/coverage
→ { valid, invalid, unverified, items:[{ slice_id, model_code, effort, validity, reasons[] }] }
POST /v1/projects/{id}/campaigns/{campaignId}/requeue-invalid # member+ role
→ { requeued, valid, campaign_status, removed_findings, stranded_findings:[id] }
GET /v1/projects/{id}/findings/merge-suggestions?limit=50 # max 200
→ { suggestions:[{ keeper_id, other_id, confidence, rationale }] }
requeue-invalid takes back what the invalid runs produced, not just their slice rows: their
reports are deleted, and a finding left with no supporting report is deleted with them —
removed_findings counts those. A finding a human has touched (triaged, fixed, dismissed) or that
something else points at (a merge keeper, a retest target) is never deleted out from under them; it
is reported in stranded_findings instead, so a successful repair cannot hide a remnant.
merge-suggestions is a bounded review aid, not a report: it stops after limit suggestions and
after a bounded number of findings examined, because the cost is per finding walked. It never
merges anything.
Heartbeat and held leases
A heartbeat renews a lease by the lease_seconds it was claimed with, and only while that lease is
the slice's current lease: it is active, no later lease exists for the slice, and the slice is
running. A current lease that has not expired holds its slice (a "live lease"). A current lease
past its expiry (expired: true) no longer holds anything: any runner may claim the slice, and until
one does, a heartbeat revives the lease.
The heartbeat answers lease_expires_at: null when the lease is no longer current, and
superseded says why:
superseded | Meaning | What a runner should do |
|---|---|---|
false | the lease ended without anyone else taking the slice: released, retired on its last attempt, or closed by its own result or a repair | keep going if the model is still running: a late result is still accepted |
true | a later lease holds the slice, or another lease completed it, or its campaign was cancelled | stop: a result from this lease is stored only as a provenance artifact |
A lease of a cancelled campaign is answered lease_expires_at: null, superseded: true plus the
additive campaign_cancelled: true, whatever the lease row says and whether or not it has expired.
This check comes first, and it is a plain read: it takes no slice lock and writes nothing, so it can
never answer slice_busy. A client that predates campaign_cancelled reads the null expiry as "lost"
and kills the model, which is the same signal as a superseded lease. The agent notices it on its next
successful heartbeat, so a model can keep running for up to about two heartbeat intervals
(an interval is a third of the model's timeout, between 15 and 60 seconds) after the cancel. A client
that cannot reach the server learns nothing. MCP host agents send no heartbeat and cannot be
interrupted; the cancel reaches them only as a campaign_cancelled answer to their next claim or
submit.
A current lease that expired but that nobody reclaimed is not lost: the heartbeat renews it. A lease
row left active on a slice that a later lease holds (servers before 0.6.0 did not expire it on
reclaim) is expired by its next heartbeat and answered superseded: true.
The heartbeat never waits for the slice's row lock. While another transaction holds it (typically the
same runner's result being ingested) it answers 409 slice_busy and renews nothing; that is not a
verdict about the lease, and the runner simply beats again on its schedule.
A client detects the routes below, and the superseded field, by server_capabilities containing
"lease_v2" in GET /v1/me. Older servers omit both. The cancel routes and the cancelled statuses are
the separate capability "campaign_cancel".
GET /v1/projects/{id}/campaigns/{campaignId}/leases
→ { now, max_attempts,
leases:[ { lease_id, slice_id, model_code, effort, pass_code, bucket_code, client_ident,
claimed_at, lease_seconds, lease_expires_at, last_renewed_at, expired,
claim_count, final_attempt, owned } ] }
GET /v1/leases/{lease_id}
→ { now, max_attempts,
lease: { …the same fields…, campaign_id, project_id, status, slice_status, current, superseded,
release: { allowed, reason, silent_seconds } } }
POST /v1/leases/{lease_id}/release # client token, member+; refused on a read-only instance
{ observed_expires_at } # REQUIRED: the lease_expires_at you displayed
→ { released: true, lease_id, slice_id, slice_status, claimable }
| { released: false, reason: "not_active" | "superseded", lease_id, slice_id, status }
| 409 { error: "slice_busy", slice_id, message } # the slice is locked; nothing decided, try again
The list shows the current lease of each stored running slice of the campaign, expired or not (expired
tells them apart; a lease on its final attempt that has expired is retired before the list is read,
so it is not shown). now is the server
clock, so ages can be computed without trusting the caller's clock. last_renewed_at is
lease_expires_at − lease_seconds. final_attempt means the slice fails, rather than returning to
the queue, when this lease runs out (repair gives it a fresh budget). owned means the lease was
claimed with the calling token. client_ident is whatever the runner called itself: display only.
GET /v1/leases/{lease_id} shows one lease in any status, plus the verdict a release would reach
right now. It is the release dry run: there is no dry-run flag on the POST.
Release frees a lease whose runner has stopped renewing it, without waiting for it to expire. The server decides from its own evidence (the lease's silence), never from a process check on some machine: a pid that is gone on one host can still be a live runner on another. A release is allowed only when the calling token claimed the lease, the lease is still the slice's current lease, it is the one you looked at, it has been renewed at least once, and it has not been renewed for 180 seconds (three missed heartbeats). A lease that was never renewed (an MCP host agent's, an external agent's, or a runner killed before its first heartbeat) shows nothing by being quiet and frees itself at expiry. So does a lease whose token was deleted.
A released slice is treated exactly like an expired one: the attempt counts against
MAX_SLICE_ATTEMPTS, a final attempt is retired to failed (and the campaign completes if that
was its last outstanding work), and a late successful result from the released lease is still
accepted if no other lease has completed the slice. claimable says whether the slice can be
claimed now (attempts left, and its model not disabled for the campaign's profile).
Reason (release.reason) | POST answer | Meaning |
|---|---|---|
not_owned | 403 lease_not_owned | another token claimed it, or its token was deleted |
not_active | 200 { released: false } | nothing holds the slice through this lease any more (completed, expired, released); a retry after a lost response lands here |
superseded | 200 { released: false, status: "expired" } | the row says active but is not the current lease (a later lease exists, or the slice is no longer running), or its campaign was cancelled (nothing to release); the stale row is expired and the slice is not touched |
| — (preview said allowed) | 200 { released: false, reason: "superseded", status: "active" } | the slice's lease pointer no longer matches this lease's expiry, so nothing was written: the lease still holds its slice until it expires |
renewed | 409 lease_renewed | the lease was renewed after you looked (lease_expires_at is more than 1 s past observed_expires_at); look again |
never_renewed | 409 lease_never_renewed | the lease was never renewed; wait for it to expire |
recently_renewed | 409 lease_recently_renewed | renewed less than 180 s ago (silent_seconds, min_silence_seconds) |
Release, like the heartbeat, never waits for the slice's row lock: while a result is being ingested
for the slice it answers 409 slice_busy with nothing decided or written; retry.
400 missing_observed_expires_at / 400 invalid_observed_expires_at reject the body, and
404 lease_not_found covers a lease that does not exist or belongs to another organization or
project.
Error semantics
| Status | Meaning | Client action |
|---|---|---|
200 | accepted (valid coverage) | — |
202 | accepted-as-artifact / superseded, or a result for a cancelled campaign (campaign_cancelled warning) | — (a cancelled campaign: stop) |
400 | missing_exit_code / invalid_exit_code — the results body omitted exit_code or sent it as something other than a number or null | fix the payload; resubmitting it unchanged always fails |
400 | invalid_effort — an effort outside the participant shape; invalid_body — participants and models together, or an empty participants | fix the request |
402 | sso_requires_business — a sign-in policy or SSO approval that needs the Business plan | upgrade, or drop the SSO entry |
403 | org_policy_sign_in_method / org_policy_email_domain — the organization's sign-in policy refuses this session or token | sign in with an allowed method (CLI: thespider-agent login again) |
403 | mfa_required — the browser session has not finished two-factor verification; reauth_required (method: "step_up" | "sign_in") — the action needs a recent sign-in or step-up | verify, then retry |
404 | *_not_found — the id does not exist, was deleted, or belongs to another organization (indistinguishable by design) | check the id; do not retry |
409 | prompt_hash mismatch | re-claim |
409 | campaign_cancelled on claim or requeue-invalid (message: who cancelled it, when and why); campaign_terminal on cancel of a finished campaign | stop working that campaign; start a fresh one with run (never retry the same call) |
413 | stdout exceeds MAX_ARTIFACT_BYTES | reduce output or enable --redact; presigned upload is not implemented |
422 | parse error or nonzero runner exit | claim again; the slice was not counted as coverage |
409 | account_conflict — this sign-in's email belongs to an account linked to another sign-in | contact the administrator |
429 | rate limited; too_many_attempts on device approval and invitation accept (with Retry-After) | retry after the indicated wait |
503 | id_collision_retry — a freshly drawn random id collided; nothing was written | retry immediately |
5xx | server error | retry with backoff |
Network errors, 429, and 5xx are retried with exponential backoff + jitter by the agent.
Detailed integration contracts:
Webhooks (optional)
The Cloud webhook integration is not self-service yet. When TheSpider enables it for a project,
POST /v1/webhooks/github verifies GitHub's signature, maps pull_request opened, synchronize,
or reopened events to a project, fetches changed paths, and creates an incremental campaign. A
redelivery at the same head commit reuses the live campaign, but after that campaign was
cancelled it creates a fresh, billed campaign.