Run and schedule work
In a control plane, everything Fistron does for a project is work: one operation that an agent of the project runs. You start work by hand on the Work page, or let a schedule start it at set times.
Before you start
- An agent that serves the project and answers (Install and register an agent).
- The role Manager or Admin in the project to create, pause, resume or delete schedules; an Engineer runs one now. Schedules cannot be created, paused or resumed under an access grant.
Start an operation
- Open the project’s Work page.
- Click Start an operation.
- Choose the Operation, for example
history-collect. - Fill its form. A field that reads a document of an earlier work (a
CI history, a delivery snapshot, the suite map’s configuration, an
inventory) offers the project’s documents of its kind, newest first:
choose one, whichever agent wrote it. The work carries it to whichever
agent runs it. Choose None: a path in the agent’s directory only
for a file you know that agent has. What the operation writes becomes
the project’s documents. A required configuration field shows
fistron.toml: the agent uses its own configuration in its place. - Click Start.
The work’s page shows its state while it runs (queued, leased, then succeeded, partly done, failed or cancelled), the agent taking it, its warnings, the Documents written, The input and The result.
Above the list, Work says at a glance how many works run, how many wait, how many were done today (with a ring of today’s done and stopped ones) and how many stopped today, and the works of the list that ended, day by day.
While an agent works on it, What it is doing shows its newest step and the steps before: the group and the round of an investigation, each call of a model and how long its answer took, a wait for a code host’s rate limit (a token whose hour of reads is spent waits for its reset and says until when), the runs read of a CI history. The agent tells them about every 20 seconds, and the list of Work shows the newest one in the work’s row (“Now: …”). A step says what is being done, never what was read: no line of a log, no answer of a model. After the work, What it did last keeps its last steps, which is where to look when it failed or ran long. Every step is in the agent’s log.
Works of one operation that one person started together (within two minutes, three or more, such as Measure the flaky tests now over every CI history) are one row in Work: the operation with how many, their states counted (“38 succeeded, 2 failed”) and the note they share. Show its N works opens the row to each work. Partly done means the work ended with its documents, but every model call it made failed, so what the model was to add (an RCA’s cause, an answer) is missing; the page says why, with the first call’s error, for example a key the provider rejects. Try the endpoint on Model endpoints (Configure models (LLM endpoints)). Use Cancel to stop it, or Run again to open the form with the same input.
A work a feature’s page started (reading an issue, an investigation, the Daily CI review, the audit, the Test plan, the flaky tests) leads back to it: Open in that page shows its result and the next step, and Run again on that page runs it from there, with what the page knows. The operation’s own form is under Advanced: the operation’s form.
Add a schedule
- Open the project’s Schedules page.
- Click Add a schedule and enter:
- Name, for example
nightly history; - When: a cron expression (minute, hour, day of the month, month,
day of the week), for example
0 2 * * *every night at two, or@hourly,@daily,@weekly,@monthly. At most every five minutes; - Time zone: an IANA name, for example
Europe/RomeorUTC.
- Name, for example
- Choose the Operation and fill its form. Under the operation the
form says what a run of it usually costs, from its runs of the last 30
days (“A run of ci-review usually makes 9 model calls and costs about
$0.05”), or that it makes no model call. In the input you can use
placeholders that are filled in at each run, in the schedule’s time zone:
${today},${today-7d},${now},${now-12h}. For examplesince = ${today-7d},until = ${today},output = history/${today}.json. - Click Save the schedule.
The table shows each schedule’s Next run and Last run (linked to its
work), whether its runs call a model and which (Uses a model: what they
did, never a guess), and what they cost This month and in its last run.
The cost counts against the project’s monthly cap (Models › The monthly
cap). Use Run now, Pause and Resume, or Delete (then
Delete
A schedule marked the system’s is kept by the system: the count of active committers, which the licence rests on (Set up your organisation). Run now runs it; it is never paused or deleted.
See what runs by itself in every project
Admins open What runs by itself (under Administration, at the top): every schedule
of every project and the works the system starts by itself (Fistron
Memory’s derivations, the count of active committers), with the project,
Uses a model, Its last run, This month, the State and
When. Pause
Schedules worth having
| Schedule | Operation | When | Why |
|---|---|---|---|
| CI history | history-collect (GitHub Actions, GitLab CI or Jenkins), since ${today-7d} until ${today} |
every night | the input of flaky tests, Suite Health and the test plan |
| Flaky record | flaky (closed core) on the newest history; Every day on the Flaky tests page adds it with its history’s collection |
every morning | the Flaky tests page (use-flaky-tests.md) |
| Time lost to flaky blocking | quarantine-measure |
weekly | minutes lost, per job |
| Daily CI review | ci-review (Jenkins) with the team’s streams |
every working morning | the Daily CI review page (Review the day’s CI runs) |
| Platform snapshot | platform-snapshot |
daily | compliance needs a snapshot no older than 7 days |
| Suite map | suite-map |
every night | made for you by the Test plan page (Map your suite and plan the missing tests) |
A work’s documents are stored in the control plane up to a size: 100 MB
for a CI history, 200 MB for a delivery baseline snapshot, 20 MB for any
other document. A CI history over its limit keeps its newest runs: the
oldest are left out, and the work and the history’s omissions say how
many and before when. Collect a shorter window (e.g. ${today-3d}), or
fewer workflows, to keep them all. A document over its limit is not
stored, and the work’s warnings say “… was not uploaded”.
For GitLab, history-collect with the platform gitlab reads every
pipeline of the window, its jobs with their retries and GitLab’s test
reports (quarantine.md).
A project with a delivery baseline snapshot already can also turn it into a
history: baseline-history (baseline.md,
quarantine.md).
Schedules that read the project’s documents
The weekly status report and the monthly outcome values read the project’s
current documents, which the control plane attaches to each run. The
Schedules page has no field for attachments, so create these through
the control plane’s API with a manager’s personal token in FISTRON_CP_TOKEN:
curl -s -X POST "$FISTRON_CP_URL/api/v1/projects/$PROJECT_ID/schedules" \
-H "Authorization: Bearer $FISTRON_CP_TOKEN" -H "Content-Type: application/json" \
-d @- <<'JSON'
{"name": "weekly status", "operation": "status-report", "cron": "0 6 * * 1",
"timezone": "Europe/Rome",
"input": {"directory": "${documents}", "project": "acme/payments",
"output": "status/${today}"},
"documents": {"kinds": ["control_assessment", "change_assessment", "rca", "suite_health",
"flaky_quarantine", "delivery_baseline", "status_report"],
"per_kind": 20}}
JSON
An operation that reads one file names the newest attached document of a
kind as ${newest:<kind>}: the daily measurement of flaky tests has
"history": "${newest:fistron-ci-history}" with
"documents": {"kinds": ["fistron-ci-history"], "per_kind": 1, "names": {"fistron-ci-history": "history/shop.json"}}. A run without such a
document does not start, and the schedule’s last run says why.
Once created, the schedule appears on the Schedules page, where you can run,
pause or delete it. The monthly outcomes-measure schedule is in
outcomes.md.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| “a schedule needs a name” | Enter a Name before saving. |
| The cron expression is refused | It runs more often than every five minutes, or is not valid. |
| A run is missing | It was skipped because the previous run had not finished. |
| Work stays queued | No agent of the project answers (Install and register an agent). |
| The work failed | Open it: Why it failed gives the operation’s error. Fix the input and click Run again. |
| A path is refused | Paths must stay inside the agent’s directory of the project. |
| “… is not in this agent’s directory: work … wrote it on the agent …” | Another agent wrote the file. Click Run again and choose it in the field as the project’s document. |
| “N of M runs left out, those before …” | The CI history was over 100 MB: collect a shorter window. |
| “… was not uploaded: …” | The document is over the control plane’s limit for its kind (see above), or the connection broke: run it again. |
| An operation is not in the list | Agents do not run CI-job operations; licensed ones need the closed core where the agent runs. |