GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — headlesscode/docs/campaign-control-service.md at master · Capsize-Games/headlesscode

Expand file tree

/

campaign-control-service.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
101 lines (81 loc) · 4.8 KB
/

campaign-control-service.md

Copy path

File metadata and controls

101 lines (81 loc) · 4.8 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Campaign-control API supervisor

headlesscode campaign serve runs the loopback campaign-control HTTP API and its dashboard files. The API binds to 127.0.0.1:4391; it does not run campaign ticks or start RSI work. On MX, scripts/campaign_control_supervisor.py checks the listener address, process command line, working directory, and API status before adopting the existing process. If that process exits, it starts only the installed fixed headlesscode campaign serve command, using bounded retry delays.

The supervisor uses the existing home-directory registration and control files. It does not set a model, budget, adapter, credential, or alternate data-directory environment variable. Campaign data remains under ~/.local/share/headlesscode/campaign-control/. API authentication continues to follow the existing campaign-control server configuration.

Prerequisites

  • Node.js and the supported headlesscode CLI wrapper are installed.
  • The dashboard build exists at ~/Projects/capsize-web/apps/fleet-campaign-control/dist, the path selected by campaign serve.
  • The user cron daemon is running. The installer adds one marked @reboot entry and preserves unrelated entries.
  • Port 4391 is free, or the existing campaign-control API is the process being adopted. Do not start a second instance beside the existing listener.

The installer checks the wrapper and dashboard build before changing cron. It rejects a changed or duplicate managed entry and preserves cron output that it cannot verify as the explicit no-crontab case. It does not inspect or copy process environment values.

Install and check

The reviewed supervisor was activated on the reference MX workstation on 2026-10-29. Use these commands to install on another authorized target or verify the existing installation.

python3 scripts/manage_campaign_control_supervisor.py install
python3 scripts/manage_campaign_control_supervisor.py check

The supervisor checks every ten seconds. Restart delays increase from five seconds to a five-minute cap. Production waits are interruptible, so rollback can stop the supervisor promptly during backoff. It uses a private lock, PID file, and log under ~/.local/state/headlesscode/campaign-control-supervisor/; it does not write campaign state. If the port belongs to an unrecognized process, it leaves that listener untouched and does not launch another process. For campaign data, use headlesscode campaign status --json; do not use campaign tick as a service health check.

Rollback

python3 scripts/manage_campaign_control_supervisor.py rollback

Rollback validates the managed cron line before stopping the supervisor or removing its installed artifact. It removes only its exact marked @reboot line and stops the supervisor only when its PID matches the fixed launcher. It does not signal the campaign API or delete registration, control state, job history, or evidence. If the cron line or installed source was edited, rollback stops and preserves it for review. Other cron entries are kept.

Current activation status

The managed check last reported the loopback supervisor healthy. An earlier check found the supervisor stopped even though its @reboot entry remained; the supported installer restarted the existing managed singleton, and the next managed check passed. Reboot recovery has not been exercised, so the cron entry is not evidence of a successful reboot test. The API is a control surface; its health does not establish that a repository worker is ready or running.

At the latest recorded campaign check, legacy global admission was ON at epoch 20. The separate Curl repository campaign remained disabled and blocked on prerequisites because workerQualified was false and the private worker registry was empty. No live CVE worker was runnable or claimed. See Fleet campaign control for the current distinction between global admission and repository readiness.

The service check does not verify model access, qualify a worker, enable a repository campaign, run a campaign tick, or test reboot recovery. It does not change repository campaign state or publish CVE catalog content.

Synthetic checks

Run the focused unit suite through the shared build queue and compile-check the Python modules:

python3 -m py_compile scripts/campaign_control_supervisor.py scripts/manage_campaign_control_supervisor.py scripts/test_campaign_control_supervisor.py
python3 -m unittest discover -s scripts -p 'test_campaign_control_supervisor.py' -v

The tests use temporary state and mocked listeners/processes. They cover exact loopback process identity, unknown-listener refusal, singleton locking, interruptible backoff, bounded restart delay, cron preservation, error handling, rollback validation, and zombie process handling. They do not connect to the campaign API or a provider.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.