Release v2.1.0: Programmatic zero-token version bumper (hs-sync-version --auto-bump) and daily 00:20 UTC VPS archive rotation cronjob (deploy/run-vps-archive-rotation.sh)

This commit is contained in:
Hermes Agent committed 2026-12-01 00:21:20 +00:00
1 parent a2a84f429a
commit 37cd610a25
11 files changed
+35 -79

No files matched your search

@@ -1,66 +0,0 @@
# Plan: Scheduled Archive Rotation Cronjob (`00:20 UTC` / `19:20 EST` Daily) on `hyperstitionstud.io` — Coordinating `hs-archive-rotate` (`docs/archive/*.tar.gz`) & Quiescent SQLite Telemetry Rotation Across `/etc/cron.d/`, `systemd` Timers & Hermes Cron (`v2.0.29`)
- **Document ID:** `PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO` (`v2.0.29`)
- **Roadmap Status:** **ACTIVE / READY**
- **Strict Zero-LLM-Token / Zero-API-Key VPS Mandate:**
**No cronjob or timer requiring metered LLM tokens or an LLM/OpenRouter API key will ever run on `hyperstitionstud.io`.** All scheduled jobs installed on the `hyperstitionstud.io` VPS (`/etc/cron.d/hyperstition-archive-rotate`, `hyperstition-archive-rotate.{service,timer}`, `hyperstition-closing-bell-harvest.{service,timer}`, `hyperstition-utc-rollover-harvest.{service,timer}`, and `/etc/logrotate.d/hyperstition-sqlite-meta`) execute **100% deterministic, keyless local Python and Bash scripts (`0` LLM tokens, `0` API keys)** and explicitly `unset OPENROUTER_API_KEY OPENAI_API_KEY ANTHROPIC_API_KEY`. All LLM-token-dependent agent cronjobs remain strictly on `localhost`.
- **Target Schedule (`00:20 UTC` / `19:20 EST` Daily — Window C on `hyperstitionstud.io` VPS Only):**
Runs daily at `00:20 UTC` via `/etc/cron.d/hyperstition-archive-rotate` (and `hyperstition-archive-rotate.timer`) on the `hyperstitionstud.io` web host.
- **Target Modules & Deployment Files:**
- `/workspace/hyperstitionstudio-core/deploy/cron.d/hyperstition-archive-rotate` (Installed to `/etc/cron.d/hyperstition-archive-rotate` by `deploy/sync-vps-repos.sh` Step 5)
- `/workspace/hyperstitionstudio-core/deploy/hyperstition-archive-rotate.{service,timer}` (`systemd` timer unit for `00:20:00 UTC` daily execution on `hyperstitionstud.io`)
- `/workspace/hyperstitionstudio-core/deploy/run-vps-archive-rotation.sh` (Flock-guarded, zero-`/dev/null`, zero-API-key wrapper script executing `hs-archive-rotate`, `sqlite_meta --run-logrotate-directive`, `tmpfs` sync when loose files were rotated, and optional `git.libre.audio` push)
---
## 1. Unified Daily Cron Topology (`21:30 UTC` -> `00:00 UTC` -> `00:20 UTC`)
With `29c871eb6b78` and `7effa9679803` decommissioned under `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS` (leaving `d28b479ec217` as the sole `localhost` exegesis cronjob), `PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO` is scoped strictly to **Window C (`00:20 UTC` Cold-Archive & SQLite Telemetry Rotation on `hyperstitionstud.io`)**:
| Window | Schedule (`UTC` / `EST`) | Execution Surface & Unit Name | What It Executes | Metered LLM Token Cost |
| :---: | :--- | :--- | :--- | :---: |
| **Window A** | `21:30 UTC` / `16:30 EST` (`Mon–Fri`) | • **VPS `hyperstition-closing-bell-harvest.timer`**<br/>*(Implemented in `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS`; `29c871eb6b78` decommissioned)* | US Closing-Bell Financial (`hs-quant-harvest --append-history --live`), FRED Macro (`hs-macro-harvest`), 14-point `timeseries.py`, 5-Agenda Bayesian `hs-daily-brief`, `tmpfs` RAM hydration, & `git.libre.audio` push. | **`0` LLM tokens & `0` API keys** |
| **Window B** | `00:00 UTC` / `19:00 EST` (`Daily`) | • **`localhost` Hermes `d28b479ec217`** *(Sole Remaining LLM Cronjob)*<br/>• **VPS `hyperstition-utc-rollover-harvest.timer`** *(Implemented in `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS`; `7effa9679803` decommissioned)* | • **`localhost` (`d28b479ec217`):** LLM-assisted narrative exegesis prose synthesis for `<NN>-dossier-news-YYYY-MM-DD.md`.<br/>• **VPS (`00:00 UTC` timer):** Deterministic `ci_provision_ingglish.py --tier 2`, `timeseries.py`, `hs-daily-brief`, and `build_encyclopedia_knowledge_graph.py`. | Metered **only** on `localhost` `d28b479ec217`; **`0` tokens on VPS** |
| **Window C**<br/>*(This Plan — VPS Archive Rotation Only)* | **`00:20 UTC` / `19:20 EST` (`Daily`)** | • **VPS `/etc/cron.d/hyperstition-archive-rotate`**<br/>• **VPS `hyperstition-archive-rotate.timer`** | 1. Explicitly unsets `OPENROUTER_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY` (`0` API keys).<br/>2. Runs `hs-archive-rotate` (`publishing.archive_rotator`): rotates any loose completed `docs/archive/*.{md,pdf}` pairs (`require_companion_md=True`) into `completed-plans-archive.tar.gz` + `archive-manifest.json` while enforcing `assert_not_gematria_pipeline_source()` and `verify_gematria_pipeline_richness_invariant()`.<br/>3. Runs `python3 -m hyperstitionstud_io.db.sqlite_meta --run-logrotate-directive`: checks `/var/lib/hyperstitionstud.io/api-telemetry.db` against the `100M` limit and performs quiescent `BEGIN EXCLUSIVE` `.1.gz` compression + truncation when `>= 100M`.<br/>4. If loose `docs/archive/` files were rotated, refreshes `/var/www/hyperstitionstud.io/repos` (`tmpfs` RAM) via `sync-vps-repos.sh --no-pull --no-caddy`. | **`0` LLM tokens & `0` API keys** (`100%` local Python/Bash on VPS) |
---
## 2. Specification of the Three Coordinated Components
### 2.1 Flock-Guarded Execution Script (`deploy/run-vps-archive-rotation.sh`)
- Contains **`0` `/dev/null` redirections**, uses `set -euo pipefail`, `trap 'on_error ${LINENO}' ERR`, and `run_checked()`, and acquires `/tmp/hyperstition-vps-harvest.lock` via `flock -n 9` so it never collides with `run-vps-data-production.sh` or `sync-vps-repos.sh`.
- Executes:
1. `python3 -m hyperstitionstud_io.publishing.archive_rotator` (`hs-archive-rotate`), verifying `gematria_richness_invariant_verified == true` (`0` gematria/dossier/lexicon/graph/quant/calc files ever touched; standalone `.pdf`s with `has_md == False` preserved).
2. `python3 -m hyperstitionstud_io.db.sqlite_meta --run-logrotate-directive` on `/var/lib/hyperstitionstud.io/api-telemetry.db` (or `$HYPERSTITION_TELEMETRY_DB_PATH`).
3. Checks if `git status -s` in `encyclopedia-knowledge-graph` or `technocapital-singularity-zoology` shows newly rotated `docs/archive/` files; if so, runs `deploy/sync-vps-repos.sh --no-pull --no-caddy` to remove the unlinked loose files from `/var/www/hyperstitionstud.io/repos` (`tmpfs` RAM) and (when `/etc/hyperstitionstud.io/id_ed25519_git_libre_audio` is present) commits and pushes the updated `completed-plans-archive.tar.gz` and `archive-manifest.json` to `git.libre.audio`.
### 2.2 VPS System Cron & `systemd` Timer (`deploy/cron.d/hyperstition-archive-rotate` & `deploy/hyperstition-archive-rotate.{service,timer}`)
1. **`/workspace/hyperstitionstudio-core/deploy/cron.d/hyperstition-archive-rotate`:**
```cron
# /etc/cron.d/hyperstition-archive-rotate — Daily 00:20 UTC Cold-Archive & SQLite Telemetry Rotation
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
20 0 * * * root /srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-archive-rotation.sh >> /var/log/hyperstition-archive-rotate.log 2>&1
```
Installed idempotently to `/etc/cron.d/hyperstition-archive-rotate` (`chmod 0644`) in Step `[5/5]` of `deploy/sync-vps-repos.sh` (right alongside `/etc/logrotate.d/hyperstition-sqlite-meta`).
2. **`/workspace/hyperstitionstudio-core/deploy/hyperstition-archive-rotate.{service,timer}`:**
Provides the matching `systemd` timer (`OnCalendar=*-*-* 00:20:00 UTC`, `Persistent=true`) installed by `deploy/sync-vps-repos.sh` Step `[5/5]`.
### 2.3 Strict Host & Plan Scope Boundary (`PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO` Is Scoped Strictly to Archive Rotation)
- **Why `29c871eb6b78` & `7effa9679803` Decommissioning Belonged to `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS`:**
- Decommissioning the two non-exegesis `localhost` data-production cronjobs (`29c871eb6b78` and `7effa9679803`) is the source-decommissioning half of `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS` (`deploy/run-vps-data-production.sh`), and has now been executed directly as part of that migration (`cronjob_manage(action="remove")` on `29c871eb6b78` and `7effa9679803`, leaving `d28b479ec217` as the sole `localhost` exegesis cronjob).
- **Scoped Responsibility of `PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO`:**
- This plan is responsible **solely** for daily `00:20 UTC` cold-archive rotation (`hs-archive-rotate`) and SQLite telemetry logrotate (`sqlite_meta --run-logrotate-directive`) on `hyperstitionstud.io` via `/etc/cron.d/hyperstition-archive-rotate`, `deploy/hyperstition-archive-rotate.{service,timer}`, and `deploy/run-vps-archive-rotation.sh` (`0` LLM tokens, `0` API keys).
---
## 3. Test-Suite Appropriateness Analysis & Guardrails
1. **Appropriate for `tests/test_core_suite.py` (Offline & Deterministic):**
- Assert that `deploy/run-vps-archive-rotation.sh`, `deploy/cron.d/hyperstition-archive-rotate`, `deploy/hyperstition-archive-rotate.service`, and `deploy/hyperstition-archive-rotate.timer` exist on disk, contain `0` `/dev/null` redirections, and specify `20 0 * * *` / `00:20:00 UTC`.
- Assert that `deploy/sync-vps-repos.sh` installs `/etc/cron.d/hyperstition-archive-rotate` and `hyperstition-archive-rotate.{service,timer}` in Step `[5/5]`.
- Execute `deploy/run-vps-archive-rotation.sh --skip-hydrate --no-push` in `test_core_suite.py` (using a temporary telemetry DB path) to verify end-to-end execution of `hs-archive-rotate` + `sqlite_meta --run-logrotate-directive` with `0` errors.
2. **Appropriate for `deploy/test-first-deployment.sh`:**
- Verify that `sync-vps-repos.sh --no-pull` installs `/etc/cron.d/hyperstition-archive-rotate` when `/etc/cron.d` is writable, and that `run-vps-archive-rotation.sh --skip-hydrate --no-push` exits `0`.
3. **Inappropriate for Test Suites (Excluded):**
- Never wait on a live cron tick or require a running `crond`/`systemd` daemon inside `tests/test_core_suite.py`.
+2
View File
@@ -48,3 +48,5 @@
| `PLAN-MIGRATE-PERIODIC-DATA-PRODUCTION-FROM-LOCALHOST-TO-VPS.{md,pdf}` | Specification for migrating periodic data production onto the VPS (`deploy/run-vps-data-production.sh`, `collector.py --append-history`, and `hyperstition-{closing-bell,utc-rollover}-harvest.{service,timer}`); now implemented in `deploy/`. |
| `PLAN-SOFTWARE-ENGINEERING-EXPLICATION-HUB-AND-SUBPAGES.{md,pdf}` | Specification for the live-introspected `/engineering/` Hub (`E0`) and 5 orthogonal subpages (`E1–E5`) with Novice Prerequisite Ladders and non-sequential revertability (`hs-eng-docs`); now implemented in `src/hyperstitionstud_io/publishing/engineering_docs.py` and `site/engineering/`. |
| `PLAN-MATHEMATICAL-EXPLICATION-HUB-AND-SUBPAGES.{md,pdf}` | Specification for the live-introspected `/math/` Hub (`M0`) and 5 orthogonal subpages (`M1–M5`) with Novice Prerequisite Ladders and non-sequential revertability (`hs-math-docs`); now implemented in `src/hyperstitionstud_io/publishing/math_docs.py` and `site/math/`. |
| `PLAN-PROGRAMMATIC-VERSION-BUMP-HEURISTICS-ZERO-TOKEN.{md,pdf}` | Specification for zero-LLM-token programmatic semantic version determination (`hs-sync-version --auto-bump` & `--explain-bump`) using change-scope heuristics and plan/skill artifacts; now implemented in `src/hyperstitionstud_io/version_sync.py`. |
| `PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO.{md,pdf}` | Specification for daily `00:20 UTC` cold-archive rotation (`hs-archive-rotate`) and quiescent SQLite telemetry logrotate (`100M` `.1.gz`) on `hyperstitionstud.io` (`deploy/run-vps-archive-rotation.sh`, `deploy/cron.d/hyperstition-archive-rotate`, `deploy/hyperstition-archive-rotate.{service,timer}`, `0` LLM tokens, `0` API keys); now implemented in `deploy/`. |
+25 -5
View File
@@ -1,11 +1,11 @@
{
"version": "2.0.29",
"version": "2.1.0",
"bundle_filename": "completed-plans-archive.tar.gz",
"bundle_size_bytes": 3160007,
"bundle_sha256": "ca686045c0ecde569acc86070b0ab13df821cfc5448f556da209425426bea39d",
"bundle_size_bytes": 3329253,
"bundle_sha256": "b7789c11c6f3e19b49578a0feb494a4f92067abfef283fc89d53b9c97d5a59df",
"require_companion_md": true,
"member_count": 66,
"total_uncompressed_bytes": 3798951,
"member_count": 70,
"total_uncompressed_bytes": 3998770,
"preserved_standalone_pdfs": [],
"members": [
{
@@ -68,6 +68,16 @@
"size_bytes": 97869,
"sha256": "aa03394a82c67edf785eeea8619f4b4be6b0ebe585b6785c330257966dd48b42"
},
{
"name": "PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO.md",
"size_bytes": 9801,
"sha256": "05c6b1c2d819ef8c5ca65c174ec7c6684ce71da64b5969cdeeb44e833403e3ca"
},
{
"name": "PLAN-CRONJOB-ARCHIVE-ROTATION-ON-HYPERSTITIONSTUD-IO.pdf",
"size_bytes": 90913,
"sha256": "7335c35b0612536b10ea22f698f947e5b659484fca1fd5ec856b3f8845151610"
},
{
"name": "PLAN-DAILY-PORTFOLIO-AND-MEMETIC-REGIME-UPDATE-FEATURE.md",
"size_bytes": 17984,
@@ -228,6 +238,16 @@
"size_bytes": 102299,
"sha256": "069cf4c2a294a30a4823548471fc5b4661a929882ac25313715749572dd3037b"
},
{
"name": "PLAN-PROGRAMMATIC-VERSION-BUMP-HEURISTICS-ZERO-TOKEN.md",
"size_bytes": 8606,
"sha256": "810a920663c6d37f5c5e8dd96b7e81de23a5ac1ae73c9b557cd4da64708a3587"
},
{
"name": "PLAN-PROGRAMMATIC-VERSION-BUMP-HEURISTICS-ZERO-TOKEN.pdf",
"size_bytes": 90499,
"sha256": "26f7c14fb2d59d4ef93bfb8057ae4513c62dff1f393eee261ab3dd9e2196f411"
},
{
"name": "PLAN-QUANT-BIDIRECTIONAL-DATA-POINT-CENSUS-AND-CROSS-SPECIES-CONFLUENCE.md",
"size_bytes": 26594,
Binary file not shown.
@@ -120,7 +120,7 @@
<div class="pulse-dot"></div>
<h1>Cross-Repository Dependency Graph &amp; Auditable Build &rarr; Test &rarr; Stage_Commit Pipeline</h1>
</div>
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria &bull; technocapital-singularity-zoology (v2.0.30) &bull; encyclopedia-knowledge-graph (v2.0.30)</p>
<p class="subtitle">Sibling Repositories under /workspace: ingglish-hyperdope-gematria &bull; technocapital-singularity-zoology (v2.1.0) &bull; encyclopedia-knowledge-graph (v2.1.0)</p>
</div>
<!-- Main SVG Diagram -->
Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB