FactoryWager Wiki

Spine tenants (index)

Continuous-maintenance index for in-process spine tenants.
Typed catalog: lib/harness/maintenance.ts · registry: spine/tenants.ts.

Daemon: bun run spine:schedule · once: bun run spine:schedule:once · --tenant=<id>

Per-tenant runbooks

Each active tenant must have signal · intervention · proof · retirement (retirementVerified: false):

To retire a tenant:

  1. Flip tenants.<id>=true in lib/harness/ci-owned-tenants.json once CI/operate owns the periodic re-proof.
  2. Confirm retirementCheck passes (bun scripts/retirement-check-ci-owner.ts --tenant=<id>).
  3. Move the entry to RETIRED_TENANT_RUNBOOKS with retirementVerified: true and remove it from SPINE_TENANTS / SIGNAL_MONITORS in the same PR (keep spine-multi-tenant ≥2).
  4. The ratchet re-runs retirementCheck for every tombstone and rejects the commit if it fails.

Cross-references

Closed maintenance loop — each edge is machine-checked by bun run test:tenant-runbooks:

Code quality (not spine cron)

Day-loop / CI code-health tenants use the same runbook shape but are not in SPINE_TENANTS:

code-quality.md · bun run test:code-quality · claim code-quality-tenants

CI / deploy (not spine cron)

Required CI envelopes and deploy scripts:

ci-deploy.md · bun run test:ci-deploy · claim ci-deploy-runbooks

E2E heal (sandboxed)

Production SPINE_TENANTS are not mutated. A fixture tenant (heal-fixture) lives under tests/fixtures/tenant-heal/ and is copied into .cache/journey-tenant-heal/ for the journey:

  1. Baselinecheck exits 0
  2. Break — flip health.json ok: false
  3. Signalcheck exits non-zero
  4. Interventionfix restores health
  5. Proofcheck exits 0

Ratchetbun run test:tenant-heal · claim spine-tenant-heal · lib/harness/heal-fixture.ts
Included in bun run test:tenant-runbooks.

Ratchet

Lookup

bun run docs:spine-tenants
bun run test:tenant-runbooks
bun run test:tenant-heal
bun run docs:tenant-install-verify
bun run docs:tenant-docs-integrity