Skip to content
Longterm Wiki
Updated 2026-04-11HistoryData
Page StatusDocumentationDashboard
Edited 1 day ago24 words
Content1/12
SummaryScheduleEntityEdit history
Tables0Diagrams0Int. links0/ ~5Ext. links0Footnotes0References0Quotes0Accuracy0

Automation Landscape

All automated processes in the longterm-wiki project, grouped by execution tier. Includes schedules, descriptions, current status, and a daily timeline showing when things run.

45
Total processes
38
Active
3
Disabled
4
Manual-only
14
GHA scheduled
9/10
GK tasks (active)
4
K8s services
All scheduled GitHub Actions respect the AUTOMATION_PAUSED repository variable. Set it to true to pause all automation (e.g., during incident response). Resume with pnpm crux ci resume-actions.

GitHub Actions -- Scheduled

NameScheduleDescriptionStatus
Database BackupDaily 02:00 UTCpg_dump to compressed artifact. Also callable as reusable workflow (e.g. pre-deploy).Active
Wiki Server Data ExportDaily 04:00 UTCExports session logs, edit logs, and job data from wiki-server API to GHA artifacts (90-day retention). Safety net for PG data.Active
Refresh Resources SnapshotDaily 04:30 UTCFetches all resources from PG, uploads as artifact. Local dev fallback when wiki-server is unavailable.Active
Auto-Rebase PRsEvery 4 hoursRebases open PRs onto main to surface conflicts early. Skips PRs with working labels, recent activity, or in merge queue.Active
Job WorkerEvery 30 min + on-demand dispatchPolls wiki-server job queue, claims and executes jobs. Types: ping, citation-verify, page-improve, page-create, batch-commit, auto-update-digest, claim-verification, resource-ingest, resource-enrich.Active
Daily Data ValidationDaily 07:00 UTCRuns all data validators (local YAML/MDX + server PG-backed) to catch drift in production data.Active
Server & API HealthTwice daily: 08:00 + 20:00 UTCWiki-server availability, DB record counts, API smoke tests. Auto-creates/updates/closes GitHub issues under the 'wellness' label.Active
Frontend & Data HealthTwice daily: 08:05 + 20:05 UTCFrontend availability and data freshness checks. Staggered +5 min from server health to avoid duplicate issues.Active
CI & PR HealthTwice daily: 08:10 + 20:10 UTCWorkflow health, job queue status, PR/issue quality. Cleans up stale working labels (agent:working, pr-patrol:working).Active
Render Quality MonitorEvery 6 hoursPlaywright render audit against production. Catches display regressions (raw numbers, JSON leaks). Auto-creates/closes GitHub issues.Active
Scheduled MaintenanceWeekdays 07:30 UTC / Sunday 09:00 / Monthly 1st 10:00Claude Code maintenance sweeps. Daily: review merged PRs. Weekly: full sweep (triage, cruft). Monthly: deep cleanup.Active
SourcingWeekly Monday 04:00 UTCPeriodic sourcing verification of facts and records against cited URLs using Anthropic Batch API (50% cost discount).Active
Sourcing RecheckWeekly Monday 08:00 UTCRe-verifies stale sourcing verdicts. Detects when previously-verified data becomes contradicted by updated sources.Active
Wiki Server Dead-Man-SwitchWeekly Monday 06:00 UTCVerifies groundskeeper daemon is alive and monitoring wiki-server health. Catches the case where groundskeeper itself goes down.Active

GitHub Actions -- Event-Triggered

NameScheduleDescriptionStatus
Sync Entities & FactsOn push to main/production + Weekly Monday 07:00 UTCSyncs data/entities and packages/factbase YAML to PG. Weekly run catches stale entries from missed triggers.Active
CIOn push to main/production + PRsFull CI pipeline: build data, validate gate, tests, TypeScript checks, Vercel deploy (production branch).Active
Wiki Server Build & DeployOn push to production (paths: apps/wiki-server/**)Docker build, smoke test, GHCR push, ArgoCD deploy, post-deploy verification, auto-rollback on failure.Active
Worker Build & DeployOn push to production (paths: crux/worker/**, docker/worker/**)Docker build and deploy for the K8s job worker daemon.Active
Groundskeeper Build & PushOn push to production (paths: apps/groundskeeper/**)Docker image build and push to GHCR for the groundskeeper daemon.Active
Discord Bot Build & PushOn push to production (paths: apps/discord-bot/**)Docker image build and push to GHCR for the Discord bot.Active
Auto-Enqueue on Auto-MergeOn auto_merge_enabled eventWhen auto-merge is enabled after checks pass, enqueues PR into merge queue via GraphQL (GitHub limitation workaround).Active
Auto-Update Review GateOn PR open/sync/label (auto-update PRs only)Citation audit gate for auto-update PRs. Runs citation audit, fixes inaccuracies, posts summary.Active
E2E Post-Deploy Smoke TestsAfter CI completes on productionPlaywright E2E tests against live production site after deploy.Active
E2E PR CheckOn PRs (paths: apps/web/src/**, e2e/**)Render quality audit and no-raw-IDs specs against a local build of the PR. Optional (non-required) check.Active

GitHub Actions -- Manual / Disabled

NameScheduleDescriptionStatus
Auto-Update WikiManual dispatch only (schedule disabled)News-driven automatic wiki updates. Schedule was daily 06:00 UTC, now disabled in favor of groundskeeper auto-update-enqueue task.Disabled
Create Release PRManual dispatch onlyCreates or updates a PR from main to production with auto-generated changelog. Does not auto-merge.Manual
Database RestoreManual dispatch onlyRestores database from a backup artifact. Requires confirmation input.Manual
Sync Data to Wiki ServerManual dispatch onlySyncs session logs and auto-update runs to wiki-server. Push-path triggers removed since data is now DB-stored.Manual
Resolve Merge ConflictsManual dispatch only (schedule disabled)Finds conflicted PRs and resolves via two-tier approach: Sonnet API for text, Claude Code CLI for complex cases.Disabled
Wikidata EnrichmentManual dispatch onlyEnriches person entities with structured facts from Wikidata (birth year, education, etc.).Manual

Groundskeeper Tasks (K8s Daemon)

NameScheduleDescriptionStatus
GK: Health CheckEvery 5 minChecks wiki-server availability and PG connectivity. Creates/closes GitHub issues with incident buffering and cooldowns.Active
GK: Job Worker HealthEvery 5 minMonitors job queue health: pending backlog, failure rates, stuck jobs.Active
GK: Session SweepEvery 4 hoursCleans up stale agent sessions and working labels.Active
GK: Snapshot RetentionDaily 03:00 UTCPrunes old page snapshots beyond retention limit (default: keep 100 per page).Active
GK: Data Quality SnapshotDaily 06:00 UTCCaptures data quality metrics snapshot for trend tracking.Active
GK: Auto-Update EnqueueDaily 06:00 UTCEnqueues auto-update jobs for wiki pages. Budget: \$30/run, max 5 pages.Active
GK: Job Failure TriageEvery 6 hoursGroups recent failed jobs by type and error pattern to surface recurring failures.Active
GK: GitHub Shadowban CheckDaily 09:00 UTCChecks configured GitHub usernames for shadowban status. Requires TASK_GITHUB_SHADOWBAN_CHECK_USERNAMES env.Active
GK: Issue ResponderEvery 15 min (disabled)Auto-responds to new GitHub issues. Hard-disabled in code due to repeated failures.Disabled
GK: TableBase ScanDaily 05:00 UTCScans TableBase records for sourcing coverage and writes scanner-results artifacts used by the coverage dashboard.Active

K8s Long-Running Services

NameScheduleDescriptionStatus
Wiki Server (Hono)Always-onHono API server (PG-backed). Serves wiki-server API, job queue, sync endpoints. Deployed via ArgoCD.Active
Job Worker DaemonAlways-on (poll mode)Long-lived Node.js worker that polls the job queue with concurrency control, memory watchdog, and health probes.Active
Groundskeeper DaemonAlways-on (cron-based tasks)Node.js daemon running scheduled tasks via node-cron. Circuit breaker per task (3 failures), half-open recovery, Discord notifications.Active
Discord BotAlways-onDiscord.js bot responding to @mention (wiki Q&A via Anthropic API) and /ask (Claude Code CLI). Rate-limited per user.Active

External Hosting

NameScheduleDescriptionStatus
Next.js Frontend (Vercel)Deploy on push to main + productionNext.js 15 frontend. Main branch previews, production branch serves longtermwiki.com. Triggered by CI deploy hook.Active

Architecture Notes

Execution Tiers

  • GitHub Actions -- ephemeral runners for CI, scheduled jobs, and on-demand work. Job Worker GHA polls every 30 min as backup; the K8s worker daemon handles real-time dispatch.
  • K8s (ArgoCD) -- long-running services: wiki-server, job worker daemon, groundskeeper, Discord bot. Managed via Helm charts in the ops repo.
  • Vercel -- Next.js frontend. Deploy hooks triggered by CI on production branch.

Key Overlaps

  • Health monitoring has two layers: Groundskeeper checks every 5 min (primary), GHA Dead-Man-Switch checks weekly (catches groundskeeper failure).
  • Auto-update has two paths: Groundskeeper enqueues jobs daily (active), GHA auto-update workflow is disabled (was the original mechanism).
  • Job execution has two paths: K8s worker daemon (always-on, real-time) and GHA Job Worker (polls every 30 min as fallback).

Daily Timeline (UTC)

  • 02:00 -- Database backup
  • 03:00 -- Snapshot retention cleanup (GK)
  • 04:00 -- Wiki-server data export + Source-check (Mon)
  • 04:30 -- Resources snapshot refresh
  • 05:00 -- TableBase scan (GK)
  • 06:00 -- Data quality snapshot (GK) + Auto-update enqueue (GK)
  • 07:00 -- Daily data validation + Entity/fact sync (Mon)
  • 07:30 -- Scheduled maintenance (weekdays)
  • 08:00 -- Server health + Source-check recheck (Mon) + Dead-man-switch (Mon)
  • 08:05 -- Frontend health
  • 08:10 -- CI & PR health
  • 09:00 -- GitHub shadowban check (GK) + Weekly maintenance (Sun)
  • 20:00 -- Server health (second run)
  • 20:05 -- Frontend health (second run)
  • 20:10 -- CI & PR health (second run)