Skip to content

PointSav Documentation

The engineering library for the PointSav platform — operating systems and services for regulated businesses that own their data, their AI, and their record-keeping outright. Where the monorepo holds the code, this wiki holds the reasoning: architecture, services, security, and the governance commitments that bind future development.

Spot VM lifecycle — single controller and kill switch pattern

← All revisions

d4b87a1d · PointSav Digital Systems ·

editorial(infrastructure): fix spot-vm-lifecycle-kill-switch throughout + add missing index_group (Track-B) — de-narrated a standing correction block and applied its findings consistently: real orchestrator is nightly-run.sh + nightly-run.timer (not yoyo-daily-cycle.sh/local-yoyo-daily.timer), real idle monitor is an in-process Doorman background task issuing instances.delete (not an external yoyo-idle-monitor.timer), kill-switch mechanism itself confirmed accurate; resolved the standing open question on training-trigger.timer by reading nightly-run.sh directly — it already runs training every night as Phase 2, making the separate weekly timer file read as superseded documentation rather than a live second start path; fixed a pre-existing content-contract ERROR (missing index_group, never set on this article) to compute-and-vm-fabric matching the category's Index Topic; register-clean EN+ES

View the full record as of this revision →

@@ -4,6 +4,7 @@ title: "Spot VM lifecycle — single controller and kill switch pattern"
slug: spot-vm-lifecycle-kill-switch
short_description: "Single-controller lifecycle for the Yo-Yo spot VM — why one timer owns both start and stop, plus the sentinel-file kill switch for immediate operator override."
category: infrastructure
index_group: compute-and-vm-fabric
type: topic
content_type: topic
status: stable
@@ -20,35 +21,6 @@ cycles at full cost with no automated stop path. This document describes the sin
architecture used for the [[yoyo-compute-substrate|Yo-Yo batch node]] and the sentinel file kill switch that provides
immediate operator control.

**Correction (2026-07-18):** several specific names in this article do not match the live
`service-slm` source, though the kill-switch mechanism itself checks out. Verified facts:

- **The orchestrator script is `nightly-run.sh`** (`service-slm/scripts/nightly-run.sh`,
  with flags `--no-yoyo` and `--test-mode`), triggered by a real `nightly-run.timer`
  (`OnCalendar=*-*-* 00:00:00 UTC`) — not `yoyo-daily-cycle.sh` / `local-yoyo-daily.timer`
  as this article names them. One piece of corroboration for the drift: a Rust doc comment
  in `slm-doorman-server/src/idle_monitor.rs` itself still says "see `yoyo-daily-cycle.sh`"
  — that name is real, just apparently superseded by a rename to `nightly-run.sh` that this
  wiki article (and that Rust comment) haven't caught up with.
- **The kill switch itself is accurate as described** — `/srv/foundry/data/yoyo-disabled`,
  checked by `corpus-threshold.py` before any `gcloud instances start` call, matches the
  live source closely (message wording differs slightly but the mechanism is identical).
- **The idle monitor is not a systemd timer.** It is an in-process background tokio task
  inside `slm-doorman-server` (`idle_monitor.rs`), not a unit named `yoyo-idle-monitor.timer`
  firing externally every 5 minutes. Its poll interval (5 min) and idle threshold (30 min
  default) do match this article's numbers. One further behavioral difference: it issues a
  GCP `instances.delete` (not `instances.stop`) — the boot disk survives because auto-delete
  is disabled on it, matching a delete+create nightly pattern, not a stop/start one.
- **Open, unresolved discrepancy — not silently decided either way**: a separate
  `training-trigger.timer` file (`service-slm/docs/deploy/training-trigger.timer`, "Phase 3
  corpus threshold check," Sunday 02:00 UTC) still exists in the repo with active,
  operator-facing install instructions ("`sudo systemctl enable --now
  training-trigger.timer`") — this reads as a currently-recommended timer, in tension with
  this article's claim that the corpus-threshold timer "was masked." This may be a stale
  leftover doc for an already-disabled unit, or it may mean the single-controller fix
  described here is not (or no longer) the deployed reality. Needs project-totebox
  confirmation before this article's central claim is corrected either way.

## The two-timer problem

The Yo-Yo batch pipeline initially had two timers operating independently:
@@ -69,14 +41,17 @@ approximately $17.
## The single-controller fix

The fix is architectural: exactly one systemd unit owns the full VM lifecycle for each VM.
`local-corpus-threshold.timer` was masked (redirected to `/dev/null`), removing its
ability to start the VM. All VM lifecycle operations — start, enrich, check threshold,
optionally train, stop, verify — are now performed within a single invocation of
`yoyo-daily-cycle.sh` triggered by `local-yoyo-daily.timer`.

The corpus threshold check is now Phase 5 inside the daily cycle rather than a separate
timer. The training trigger is Phase 6. Both run while the VM is already running for
enrichment, adding no additional VM start cost.
All VM lifecycle operations — start, DataGraph extraction, corpus-threshold check, training,
stop — are now performed within a single invocation of `nightly-run.sh`, triggered daily by
`nightly-run.timer` (`OnCalendar=*-*-* 00:00:00 UTC`). A separate weekly `training-trigger.timer`
still exists as an installable unit file in the repo, but its own Sunday-only cadence is
superseded by `nightly-run.sh`'s Phase 2, which already runs training every night — it reads
as leftover documentation for the scheme this single-controller design replaced, not a second
live start path.

`nightly-run.sh` runs two mandatory phases every night: a DataGraph extraction phase, then a
training phase running QLoRA against the corpus-threshold check. Both run while the VM is
already up, adding no additional start cost beyond the one nightly boot.

The rule generalises: for any spot VM that performs multiple automated tasks, consolidate
all tasks into a single orchestrator script invoked by a single timer. Do not give
@@ -129,15 +104,16 @@ requires no elevated privileges to activate.
## Defense in depth: the idle monitor

The kill switch prevents starts. A separate safety layer stops a VM that is running when
it should not be. The idle monitor timer (`yoyo-idle-monitor.timer`) fires every five
minutes and checks whether the Yo-Yo batch VM has been running for more than 30 minutes
without an active inference request. If that condition is met, the monitor issues a stop
command.
it should not be. This isn't a standalone timer — it's an in-process background task
inside the Doorman itself, polling every five minutes for whether the Yo-Yo batch VM has
been running for more than 30 minutes without an active inference request. If that
condition is met, the monitor deletes the instance directly (its boot disk survives, since
auto-delete is disabled on it — the VM is re-created, not resumed, on the next nightly run).

The idle monitor is a backstop, not the primary controller. Its role is to bound the cost
exposure if the daily cycle fails to complete its stop sequence — for example, if the
workspace VM loses connectivity during Phase 8, or if the cycle is interrupted by a
process signal before the stop command is issued.
exposure if the nightly run fails to complete its stop sequence — for example, if the
workspace VM loses connectivity mid-run, or if the run is interrupted by a process signal
before the stop step executes.

The combination of single-controller daily cycle, sentinel file kill switch, and idle
monitor provides three independent layers:
Important Information

Corporate structure. PointSav Digital Systems ("PointSav") is currently a trade name of Woodfine Capital Projects Inc. ("Woodfine"), planned to become a wholly-owned Woodfine subsidiary upon incorporation. PointSav does not itself offer, sell, or solicit any security. Any securities offering associated with Woodfine's real-property direct-hold solutions is made exclusively by Woodfine, and only by means of the applicable Private Placement Memorandum.

No investment advice. This wiki's content is provided for engineering, operational, research, and development purposes. Nothing on this wiki constitutes investment advice or a solicitation to invest in any Woodfine partnership or direct-hold solution.

Intellectual property. The PointSav name, trade name, wordmark, and marks, together with all current and future PointSav- and Totebox-branded products, services, and offerings — and the software, source code, documentation, design system, and all related materials — are proprietary to Woodfine and its affiliates, except for components identified as open source. No rights are granted except as expressly set out in a written license or agreement. The full trademark notice appears in the footer of every page on this site.

Open source components. Portions of the platform are made available under permissive open-source licenses identified in the accompanying repository. Use of those components is governed by their respective license terms.

No warranty; informational use. Content on this wiki is provided for general informational purposes only and does not constitute a representation, warranty, or commitment with respect to product functionality, availability, pricing, or roadmap. Some articles describe planned or intended features, capabilities, and milestones — language such as "planned," "intended," "targeted," "may," and "expected" marks this forward-looking content, which is subject to change and does not constitute a commitment regarding future performance.

Confidentiality. Where an article describes an operational or deployment detail that is not intended for public disclosure, that article is not published on this wiki. Content here is general-purpose engineering documentation, not customer-specific configuration.

Jurisdiction. Woodfine Capital Projects Inc. is organized in British Columbia, Canada. References to the Sovereign Data Foundation on this wiki describe a planned or intended initiative only, not a current equity holder or active governance body.

Changes to this notice. PointSav may update this notice from time to time; the version posted on this page governs.

Not a filing system. This wiki is not a securities filing system, an electronic disclosure repository, or a substitute for SEDAR+ or any other regulatory filing system. Formal securities filings are made through the applicable regulatory filing system, not through this wiki.

Full disclaimer. This notice supplements, and does not replace, the full Disclaimers article. In the event of any conflict, the full Disclaimers article governs.

Read the full disclaimer →