Files
encyclopedia-knowledge-graph/docs/plans/active/PLAN-VPS-NODEJS-RUNTIME-PROVISIONING-AND-TEST-PARITY.md
T

3.3 KiB
Raw Blame History

PLAN: VPS Node.js Runtime Provisioning & Development-Production Test Parity (PLAN #69)

Document ID: PLAN-VPS-NODEJS-RUNTIME-PROVISIONING-AND-TEST-PARITY
Status: ACTIVE (docs/plans/active/)
Target Ecosystem Version: v2.17.2 (Baseline: v2.17.1)
Target Repositories: hyperstitionstudio-core, encyclopedia-knowledge-graph
Author: m00t & Hermes Agent
Date: 2026-12-02


1. Context & Problem Statement

Problems Solved

During autonomous VPS execution of hyperstition-closing-bell-harvest.service and hyperstition-utc-rollover-harvest.service (run-vps-data-production.sh), Stage 3 verification runs tests/test_core_suite.py. Previously, minimal headless VPS instances lacked Node.js in $PATH. Consequently, test subtests verifying client-side JavaScript components—specifically:

  1. Guile Scheme & Polyglot REPL Sandbox (site/assets/hs-guile-scheme-repl.js)
  2. Matrix Code-Rain Animation Profiles (site/assets/hs-matrix-coderain.js)
  3. Quant Guided Tour UI Target Signatures (site/quant/quant-tutorials.js)

raised FileNotFoundError: [Errno 2] No such file or directory: 'node' when invoking subprocess.run(["node", ...]). This required adding graceful fallback skips (if not shutil.which("node"): continue) in test_core_suite.py.

Conformity Between Server and Dev Testing Routines

Installing Node.js LTS natively on the target VPS during deployment provisioning eliminates this environment divergence. It guarantees 100% parity between local developer testing, CI workflows, and VPS execution, allowing test_core_suite.py to execute the complete Node.js V8 validation suite on the server without any skipped subtests.


2. Technical Implementation Specifications

1. Automated Node.js Provisioning in deploy/sync-vps-repos.sh

Extend Section 3b ([3b/5] voice synthesis / dependency setup) of deploy/sync-vps-repos.sh to check for node and automatically install Node.js LTS via DNF (Fedora 41) or APT (Ubuntu/Debian):

if [[ -z "$(type -P node || true)" ]]; then
  if [[ "${DO_CADDY}" -eq 1 ]]; then
    if [[ -n "$(type -P dnf || true)" ]]; then
      echo "  -> Installing Node.js via dnf for full test execution parity..."
      ${SUDO} dnf install -y -q nodejs || true
    elif [[ -n "$(type -P apt-get || true)" ]]; then
      echo "  -> Installing Node.js via apt-get for full test execution parity..."
      ${SUDO} env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq nodejs npm || true
    fi
  fi
fi

2. Removal of Graceful Skip Guards in tests/test_core_suite.py

Once Node.js is natively provisioned on the VPS, remove the if not shutil.which("node"): guards from test_core_suite.py, restoring strict assertion enforcement for all Node-backed JavaScript / Polyglot REPL test suites in production.

3. Documentation & Operator Manual Updates

Update docs/VPS-AND-GIT-OPERATOR-DEPLOYMENT-GUIDE.md and docs/OPERATORS-MANUAL-LLM-TOKEN-DEPENDENT-DATA-PIPELINES.md to list Node.js LTS as a formal prerequisite for VPS harvesting hosts.


3. Verification Plan

  1. Run hs-deploy-scripts-sync --check to verify all 8 readiness gates (D1–D8).
  2. Run tests/test_core_suite.py confirming successful execution of all Node.js subtests without skips.
  3. Commit plan, documentation, and deployment tooling updates across repositories.