Campaigns
A campaign is one audit of a branch and commit, pinned to one profile (Security, Bugs, Hygiene or Pipeline) and one methodology version.
| Type | When | What it covers |
|---|---|---|
full | First scan, or a periodic re-baseline | Every bucket × pass × enabled participant (a model at one effort) |
incremental | A PR or branch | Passes whose scope hits changed_paths, plus a few high-risk files that always fan out |
retest | Checking that a fix landed | One finding's bucket and the passes that match its files |
Full scan from the agent
thespider-agent run
No --campaign means: look at local git, create or reuse a full campaign, drain claimable slices. Add --once --max-slices 1 for a bounded first run.
Open the project dashboard and wait until nothing is pending, running, or failed before you treat it as a baseline. Failed slices are retryable invalid coverage; they do not count as done.
Reusing a full campaign on the same branch/commit/profile only appends slices for newly enabled models and efforts. Existing completed cells stay. If some of those cells were invalid runner output, thespider-agent repair --campaign ID requeues them without touching valid empty-array results.
A slice whose lease expires with attempts left becomes stalled work. It is included in pending, can be claimed again if its participant is enabled, and is excluded from running. If a participant was disabled while its lease was live and that lease later expired, re-enable it or repeat the disable operation to skip the remaining slices. The campaign and Slices views show the expired lease and a path to resume. It still keeps the campaign and gate pending; it is not completed coverage. An expired final attempt counts as failed instead.
During a drain, the runner excludes slices it already attempted before claiming another batch,
so retryable failures cannot consume new attempts while hiding untouched work. Claims prefer
unstarted work, then expired leases, then failed retries. This needs the server's claim_exclude
capability; against older servers a runner executes one batch and explains how to resume manually.
Incremental (a PR)
The server has no source tree, so someone has to tell it which paths changed. The GitHub webhook does that once TheSpider enables the integration. An API caller can do it directly:
POST /v1/projects/{id}/campaigns
{ profile, type: "incremental", git:{branch,commit,remote_url,dirty},
base_commit, changed_paths: ["src/http/settings.ts"] }
The regular thespider-agent run command only creates full campaigns. To run an incremental that already exists:
thespider-agent run --campaign CAMPAIGN_ID
A one-line change to .env, a lockfile, a Dockerfile, or similar can expand to every pass, because those files change assumptions globally. If no pass matches, the campaign has zero work and the gate can return pass. Check your pass scopes if that surprises you.
On a runner host, thespider-agent daemon picks up claimable campaigns and checks out the right commit for you.
Retest a fix
- Open the finding, mark it fixed, record the fix commit.
- Click Create retest campaign.
- Run it from a checkout at that commit:
thespider-agent run --campaign <retest-campaign-id>
Do not add a contradictory --profile. The campaign already pins one.
When every covered slice finishes:
- The same (or de-duplicated) finding again →
still_vulnerable. - Nothing comes back →
fixed. - A slice that never ran → no conclusion.
A commit mismatch returns 409 unless an API caller sets override: true. The web action uses the recorded fix commit.
To have the agent pick a finding, write the fix, and drive the retest, see Refine.
Cancel a campaign
A campaign that has bad or unwanted work (a broken runner environment, the wrong config, a model run you no longer want to pay for) can be ended for good. Cancel it from the Cancel campaign button on the campaign page, or from a terminal:
thespider-agent campaigns cancel 18 --reason "runner environment was broken"
thespider-agent campaigns cancel 18 --dry-run # preview only, writes nothing
thespider-agent campaigns cancel 18 --yes # no prompt (required without a terminal)
Both show the same preview first: the slices that will be cancelled, the live leases (model, holder, age), the slices already completed, and how many claims were already billed. You need the member role or higher, and the campaign must be new or running; it can be a full, incremental or retest campaign. The actor (user, or CLI token name), time and reason are stored and shown on the campaign page and printed by the agent.
Cancel is terminal and sticky. Nothing moves a cancelled campaign back: not a late result, not repair, not a claim, not enabling a model. Cancelling a campaign that is already cancelled changes nothing, and cancelling one with nothing left to cancel (a completed campaign, one whose slices are all settled, or one with no slices) is refused (409 campaign_terminal).
What happens:
- Every unfinished slice (pending, running, or failed with attempts left) becomes
cancelled. Completed, skipped and spent-out failed slices keep their status. - Live leases are ended. A running
thespider-agent runordaemonlearns this on its next successful heartbeat, which is at most about two heartbeat intervals after the cancel on a client that supports it, kills the model, and does not count the stopped slices as failures. A late result from a killed run is stored on its lease as provenance only: it completes no slice and ingests no finding. waitreturns at once with exit4(or1when a finding matches--fail-on), never0. The PR gate readsdegradedwithreason: "campaign_cancelled", orfailwhen a finding that was new to the project came from a slice that finished before the cancel.- Findings already ingested from slices that finished before the cancel stay. Findings are project-wide and go through normal de-duplication.
Start fresh. A cancelled campaign gives its identity back. thespider-agent run at the same commit, profile and config version creates a new campaign, and so do the retest button and a new refine run (both acknowledge that the cancelled retest may be replaced; older agents that do not are refused with 409 retest_cancelled). The MCP thespider_start_audit tool does too, but an agent asks you first. A GitHub webhook redelivery at the same commit after a cancel also creates a fresh campaign, which is billed as new work. Cancelled campaigns are skipped when the gate looks for a baseline or a previous campaign.
Limits.
- MCP host agents cannot be interrupted. A host agent working slices through MCP has no heartbeat, so the cancel only reaches it at its next
thespider_next_sliceorthespider_submit_findingscall, which answers that the campaign was cancelled and tells it to stop. A slice it already holds finishes as provenance only. - Agent
0.6.0and older understand the heartbeat answer and stop, but they print "model disabled" wording for the cancelled slices and count killed slices as failed. Upgrade the agent for the cancel-aware messages. Their exit code is not0either, apart from the narrow race in which a result completes the very last slice just as the cancel commits (the API reference describes it): only then can an old agent read the counters as clean, while the gate still saysdegraded. - A server that does not advertise
campaign_cancelinGET /v1/memakescampaigns cancelexit6without writing anything.
Compare models and efforts
A campaign plans one slice per bucket, pass and participant. A participant is a model code at one effort: anthropic/claude-opus-5-5 enabled with no effort, at low and at xhigh is three participants and three slices per cell, all with the same audit prompt apart from the slice id. Each slice is claimed only by an agent with a binding at exactly that effort (how to bind two efforts). A binding with no effort runs the default participant, shown as default: the agent's own default effort, not a level TheSpider verified.
The Models tab compares participants. Each card and table row is one (model, effort) pair: completed and assigned slices, failures, findings, unique findings (reported by that participant alone), false positives and token estimate. The overlap panel counts participants too, so a finding that Opus reported at both low and xhigh is multi-participant. A pair you turn off keeps its row and history, marked disabled.
Effort labels also show on the campaign's per-model progress, the Slices list (with an effort filter), the findings list, and each report in a finding.
Which participants a campaign plans depends on what created it:
- Webhooks, the PR gate and the web retest button name no selection, so they plan every enabled participant of the project.
thespider-agent runplans the pairs that are both bound on that machine and enabled for the profile. A secondrunat the same commit, profile and config version from another machine reuses the campaign and adds its own pairs to it. Enablinganthropic/claude-opus-5-5atxhightherefore plans nothing from a machine bound only to the default participant.refineplans exactly its retest pair.- An MCP host agent plans its own
mcp-*code at the default (unspecified) effort.
To pick participants yourself, send participants when creating the campaign (API). Every slice is billed when claimed, so each extra effort adds its own slice claims.
What "new" means
Findings are project-wide, not per campaign. If a finding was already triaged on main, the same issue on a PR is the same finding, not a new one.
A later campaign can name an explicit baseline. Otherwise the dashboard compares with the previous campaign, skipping cancelled ones. New / resolved / carried forward come from sightings, not from who first filed the row. An unfinished campaign is not proof that something is gone.
Suggested rhythm: campaign cadence.