Sisyphus's public surface: the wp sisyphus command, the hooks other code can use, the constants it reads from wp-config.php, and Pipeline\Step_Interface for a new step. Everything else, the REST routes under sisyphus/v1/admin among them, serves its own screens; Architecture lists them.
WP-CLI
WP-CLI lists every wp sisyphus command and option.
Hooks
| Hook | Kind | When |
|---|---|---|
sisyphus_steps | filter | Building the pipeline: the steps, in order. Anything that is not a Step_Interface is dropped |
sisyphus_clef_confidence | filter | Resolving a conflict hunk: how sure clef must be, from 0 to 1, for its choice to stand without Sonnet. 0.75 unless filtered |
sisyphus_ready | action | After every controller registered its hooks, with the Core\Bootstrap |
sisyphus_activated | action | After activation created the tables |
sisyphus_run_tick | Action Scheduler action, group sisyphus | Each tick, with the run id |
sisyphus_schedule_check | Recurring Action Scheduler action, group sisyphus | Every 15 minutes, to start the sites that are due |
linchpin_governing_cleanup_allowlist | filter, fired by packagist-plugin-manager | Sisyphus adds its own slug, so the cleanup pass leaves it active |
linchpin_governing_environment_maintenance | filter, fired by packagist-plugin-manager | For an enrolled production environment, Sisyphus answers with its latest run (id, status, created_at, finished_at), next_run_at while the site runs nightly, and overview_path, unless another callback already answered |
mantle_ai_gateway_base_url | filter, Mantle's | Read, the way Mantle reads it, for the gateway base when MANTLE_AI_GATEWAY_URL is not defined |
Add a step with sisyphus_steps, as Add a step shows.
Constants
wp-config.php constants
-
SISYPHUS_API_CLIENT_IDstring required -
The api.linchpin.com application client Sisyphus uses, with the maintenance:read, maintenance:write and tests:run scopes. Without it and the secret, every run fails at Preflight, and the screens and the registry commands say what is missing.
-
SISYPHUS_API_CLIENT_SECRETstring required -
That client’s secret. Sisyphus exchanges the two for an hour-long token and keeps it in a transient. A secret: keep it out of version control.
-
SISYPHUS_API_URLurl -
The API base, only to point somewhere other than production, such as a local wrangler dev.
-
MANTLE_AI_GATEWAY_URLurl -
Mantle’s, read the way Mantle reads it: the ai.linchpin.com base Resolve sends conflicts to. When it is not defined, Mantle’s mantle_ai_gateway_base_url filter decides.
No fields match this filter.
Resolve uses Mantle's gateway key on the same site (Gateway_Credentials::usable_key()), so Sisyphus has no AI key of its own. Resolve says which models the key has to allow.
The step interface
Linchpin\Sisyphus\Pipeline\Step_Interface is one step of a run:
| Method | Returns | |
|---|---|---|
name() | string | A stable slug, stored on every run. Renaming one fails the runs still using the old name |
timeout() | int | Seconds from start() before the step fails as timed out |
poll_interval() | int | Seconds between polls while the step waits |
start( Step_Context $context ) | Step_Result | Begin the step. Called at most once, after the step is marked running |
poll( Step_Context $context ) | Step_Result | Check on a step that is waiting. It must treat missing data as work that never began |
A step returns Step_Result::waiting( $message, $data ) to be polled again, passed( $message, $data ) to move the run on, or failed( $message, $data ) to stop it. The data is merged into what the step saved before. Step_Context carries $run_id, $site, $data (what this step saved so far) and $results (what each earlier step saved, by step name).
A step that hands work off can also implement Pipeline\Stoppable_Interface. Its stop( Step_Context $context ): string is called when a person restarts the run at that step: it stops the work, never throws, and returns what it stopped, or an empty string. Every GitHub workflow step does, by cancelling its workflow run.