Files
encyclopedia-knowledge-graph/docs/PLAN-GIT-OPERATOR-PUBLIC-HTTP-RELEASE-AND-ONBOARDING.md
T

13 KiB
Raw Blame History

Git Operator Release & Public HTTP Repository Update Plan: Guaranteeing Zero-Error New-User Onboarding (v1.0.0)

  • Document ID: PLAN-GIT-OPERATOR-PUBLIC-HTTP-RELEASE-AND-ONBOARDING (v1.0.0)
  • Target Audience: Git Operator maintaining the public HTTP repositories (https://git.libre.audio/seasharp/* and/or GitHub mirrors)
  • End-User Guarantee: A completely new user cloning the public HTTP repositories into any arbitrary local parent directory (e.g., ~/hyperstition-workspace/ on Linux or macOS, not /workspace/) can follow README.md and OPERATORS-MANUAL-ENCYCLOPEDIA-KNOWLEDGE-GRAPH.md from top to bottom with zero errors.
  • Glossary & Encyclopedia Isolation Invariant: Verified (0 changes to taxonomy/glossary-registry.json or encyclopedia/encyclopedia-manifest.json).

1. Executive Audit: Current Repository & Remote State vs. Public HTTP Readiness

An audit of the 5 sibling repositories in /workspace reveals two categories of blockers that a Git Operator must resolve before updating the public HTTP remotes:

1.1 Current Git Working-Tree & Remote Status Across /workspace

Repository Current Branch & Tag Configured Remote (git remote -v) Working-Tree State & Blocker to Resolve
hyperstitionstudio-core main (v1.2.0, f8235a2) None configured yet Clean working tree; needs remote origin added and pushed first.
ingglish-hyperdope-gematria main origin: ssh://git@git.libre.audio:2222/seasharp/ingglish-hyperdope-gematria.git Has uncommitted modified & untracked files (48..70-dossier-*.md, news-aq-harvest-latest.json, build_wire_report_pdf.py). If not committed & pushed, a new user cloning from HTTP will miss Dossiers 48–70!
technocapital-singularity-zoology main (v1.7.0, 1f2c4f4) None configured yet Clean working tree (8 JSON registries tracked); needs remote origin added and pushed.
encyclopedia-knowledge-graph main (v1.0.0, b4ca2ce) None configured yet Clean working tree (388 nodes, 1,282 edges); needs remote origin added and pushed.
hyperdope-ci-build feat/ingglish-aq-corpus (ahead 43) origin: ssh://git@git.libre.audio:2222/seasharp/ingglish-hyperdope-ci.git Clean working tree (43 local commits ahead of origin); needs git push origin feat/ingglish-aq-corpus.

1.2 Four Hidden "/workspace" Traps That Would Break a Brand-New User Outside /workspace

Even if all 5 repositories are pushed as-is today, a new user who clones them into ~/projects/hyperstition/ (instead of /workspace/) and follows the docs will hit four deterministic errors unless the Git Operator applies the Phase 1 portability hardening below before pushing:

  1. Trap 1 — Hardcoded /workspace/... Default Paths in Python CLI Scripts:
    • build_encyclopedia_knowledge_graph.py currently sets KG_REPO_ROOT = Path("/workspace/encyclopedia-knowledge-graph") and UPSTREAM_REPO_DEFAULT = Path("/workspace/technocapital-singularity-zoology").
    • hyperstitionstud_io/config/__init__.py defaults to Path("/workspace/...") when /workspace/workspace.toml does not exist.
    • Effect on New User: Running python3 scripts/build_encyclopedia_knowledge_graph.py or hs-doctor inside ~/projects/hyperstition/encyclopedia-knowledge-graph raises FileNotFoundError: '/workspace/technocapital-singularity-zoology/...'.
    • Fix: Derive REPO_ROOT = Path(__file__).resolve().parent.parent and WORKSPACE_ROOT = REPO_ROOT.parent dynamically in every script and in hyperstitionstud_io.config.
  2. Trap 2 — Absolute /workspace/... Paths Stored Inside encyclopedia-manifest.json (vol["md_path"]):
    • encyclopedia/encyclopedia-manifest.json stores "md_path": "/workspace/technocapital-singularity-zoology/encyclopedia/00-.../00-....md".
    • In build_encyclopedia_knowledge_graph.py (line 197), md_p = Path(vol["md_path"]) checks that literal /workspace/... path instead of resolving upstream_repo / "encyclopedia" / vol["division_id"] / f"{vol['slug']}.md".
    • Effect on New User: Outside /workspace, md_p.exists() returns False, causing all 281 IN_VOLUME edges to drop to 0 and failing Gate 3 (edges >= 1282)!
    • Fix: Resolve volume Markdown paths relative to upstream_repo / "encyclopedia" / vol["division_id"] / f"{vol['slug']}.md" first, falling back to Path(vol["md_path"]).
  3. Trap 3 — Relative Local Paths in verify_draft() When Running Outside /workspace:
    • In taxonomy/citations-ledger-common.json, entries [3]..[7] store /workspace/technocapital-singularity-zoology/dossiers/65-dossier-...md.
    • When a new user runs hs-citations verify or test_core_suite.py inside ~/projects/hyperstition/, load_ledger() should resolve /workspace/technocapital-singularity-zoology/... prefix against the active cfg.zoology_dir when /workspace does not exist on the host machine.
  4. Trap 4 — OS-Specific DejaVu TrueType Font Paths (/usr/share/fonts/truetype/dejavu/):
    • Debian/Ubuntu stores DejaVu fonts in /usr/share/fonts/truetype/dejavu/, whereas Fedora/RHEL uses /usr/share/fonts/dejavu-sans-fonts/, Arch uses /usr/share/fonts/TTF/, and macOS uses /Library/Fonts/ or Homebrew paths.
    • Fix: Implement a multi-path TrueType font resolver in hyperstitionstud_io.publishing.fonts (with graceful fallback to ImageFont.load_default() in Pillow and built-in Helvetica/Courier in ReportLab) so new users on Fedora, Arch, Ubuntu, or macOS never hit TTFError or OSError.

2. Step-by-Step Git Operator Execution Plan (Phases 1–5)

Phase 1: Eliminate All Hardcoded /workspace & OS-Font Assumptions (Location-Independent Sibling Discovery)

Before pushing to any public HTTP remote, update the path-resolution logic in hyperstitionstudio-core, encyclopedia-knowledge-graph, and technocapital-singularity-zoology:

  1. Dynamic Sibling Discovery in hyperstitionstud_io.config: Instead of defaulting to /workspace, load_workspace_config() computes:
    PACKAGE_REPO_ROOT = Path(__file__).resolve().parents[3]  # .../hyperstitionstudio-core
    WORKSPACE_ROOT = PACKAGE_REPO_ROOT.parent                # Parent folder containing all sibling repos
    
    and searches for WORKSPACE_ROOT / "workspace.toml" before /workspace/workspace.toml. All default sibling paths (core_dir, archive_dir, zoology_dir, knowledge_graph_dir, ci_build_dir) resolve relative to WORKSPACE_ROOT.
  2. Dynamic REPO_ROOT & Relative encyclopedia/ Lookup in build_encyclopedia_knowledge_graph.py:
    • Set KG_REPO_ROOT = Path(__file__).resolve().parent.parent and UPSTREAM_REPO_DEFAULT = KG_REPO_ROOT.parent / "technocapital-singularity-zoology".
    • Resolve each volume Markdown file as md_p = upstream_repo / "encyclopedia" / div_id / f"{slug}.md" (falling back to Path(vol["md_path"]) only if the relative path is absent).
  3. Cross-Distro / Cross-OS Font Resolver (hyperstitionstud_io.publishing.fonts): Search candidate font directories (/usr/share/fonts/truetype/dejavu, /usr/share/fonts/dejavu-sans-fonts, /usr/share/fonts/dejavu-sans-mono-fonts, /usr/share/fonts/TTF, /Library/Fonts) and fall back cleanly to built-in fonts if DejaVu is not installed.

Phase 2: Synchronize & Commit Pending Upstream Archive Files in /workspace/ingglish-hyperdope-gematria

Ensure the upstream archive repository has zero uncommitted or untracked files before pushing:

cd /workspace/ingglish-hyperdope-gematria
# 1. Verify .mp3 files are ignored in .gitignore so audio binaries do not bloat HTTP clones
grep -q '\*.mp3' .gitignore || printf "\n*.mp3\n__pycache__/\n*.pyc\n" >> .gitignore

# 2. Stage all dossiers (48..70-dossier-*.md), news-aq-harvest-latest.json, and updated scripts
git add -A
git commit -m "feat(archive): sync dossiers 48-70, 2026-11-28 wire harvest, zoology dossiers 65-69, and lecture transcripts"
git status -s -b

Phase 3: Provision & Push Repositories in Strict Dependency Order

The Git Operator must create the remote repositories on the Git host (e.g., https://git.libre.audio/seasharp/<repo>.git or https://github.com/<org>/<repo>.git) with public HTTP read access enabled so anonymous users can git clone https://... without SSH keys, and push them in topological order:

# Set your remote base URL (SSH for operator push; public HTTP for new-user clone)
OPERATOR_PUSH_BASE="ssh://git@git.libre.audio:2222/seasharp"
PUBLIC_HTTP_BASE="https://git.libre.audio/seasharp"

# 1. Push Tier 0 Common Library: hyperstitionstudio-core (v1.2.0)
/workspace/hyperstitionstudio-core/push-to-origin.sh "${OPERATOR_PUSH_BASE}/hyperstitionstudio-core.git"

# 2. Push Tier 1 Upstream Archive: ingglish-hyperdope-gematria
cd /workspace/ingglish-hyperdope-gematria
git push -u origin main

# 3. Push Tier 2 Domain Taxonomy & Encyclopedia: technocapital-singularity-zoology (v1.7.0)
cd /workspace/technocapital-singularity-zoology
git remote add origin "${OPERATOR_PUSH_BASE}/technocapital-singularity-zoology.git" 2>/dev/null || \
  git remote set-url origin "${OPERATOR_PUSH_BASE}/technocapital-singularity-zoology.git"
git push -u origin main
git push origin --tags

# 4. Push Tier 3 Interactive Knowledge Graph: encyclopedia-knowledge-graph (v1.0.0)
/workspace/encyclopedia-knowledge-graph/push-to-origin.sh "${OPERATOR_PUSH_BASE}/encyclopedia-knowledge-graph.git"

# 5. Push Tier 4 Downstream CI PR Fork: hyperdope-ci-build
cd /workspace/hyperdope-ci-build
git push -u origin feat/ingglish-aq-corpus

Phase 4: Standardize the Public HTTP "New User Quickstart" Across All README.md Files

Every repository's top-level README.md must present the exact same, copy-pasteable 5-Minute New-User Onboarding Block using public https:// clone URLs and relative paths (never requiring /workspace or root privileges):

# 1. Create a parent workspace folder anywhere on your machine
mkdir -p ~/hyperstition-workspace && cd ~/hyperstition-workspace

# 2. Clone the peer repositories over public HTTPS (no SSH key required)
git clone https://git.libre.audio/seasharp/hyperstitionstudio-core.git
git clone https://git.libre.audio/seasharp/ingglish-hyperdope-gematria.git
git clone https://git.libre.audio/seasharp/technocapital-singularity-zoology.git
git clone https://git.libre.audio/seasharp/encyclopedia-knowledge-graph.git

# 3. Create & activate a local Python virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r hyperstitionstudio-core/requirements.txt
pip install --no-deps -e ./hyperstitionstudio-core

# 4. Copy the default workspace configuration and run the pre-flight health check
cp hyperstitionstudio-core/workspace.example.toml ./workspace.toml
hs-doctor

# 5. Verify the Knowledge Graph (all 6 CI gates) & launch in your browser
python3 encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py --verify-only

# Deployment Option A (100% Offline Direct Browser Open — Zero Server):
xdg-open encyclopedia-knowledge-graph/index.html   # Linux (or `open` on macOS)

# Deployment Option B (Local HTTP Server — Serves Both Graph Workbench & 22 Encyclopedia PDFs):
python3 -m http.server 8090 --bind 127.0.0.1 --directory .
# Then open: http://127.0.0.1:8090/encyclopedia-knowledge-graph/index.html

Phase 5: Mandatory Clean-Room New-User Simulation Gate (Pre-Release Verification)

Before announcing or closing the release, the Git Operator must execute a Clean-Room New-User Simulation in an isolated directory outside /workspace (e.g., /tmp/new-user-cleanroom-test) while temporarily hiding or ignoring /workspace defaults:

rm -rf /tmp/new-user-cleanroom-test
mkdir -p /tmp/new-user-cleanroom-test && cd /tmp/new-user-cleanroom-test

# Clone strictly via git clone (from public HTTP URLs or local bare/repo paths during staging)
git clone /workspace/hyperstitionstudio-core
git clone /workspace/ingglish-hyperdope-gematria
git clone /workspace/technocapital-singularity-zoology
git clone /workspace/encyclopedia-knowledge-graph

# Run every documented new-user command inside /tmp/new-user-cleanroom-test
PYTHONPATH="/tmp/new-user-cleanroom-test/hyperstitionstudio-core/src" \
  python3 /tmp/new-user-cleanroom-test/hyperstitionstudio-core/tests/test_core_suite.py

PYTHONPATH="/tmp/new-user-cleanroom-test/hyperstitionstudio-core/src" \
  python3 /tmp/new-user-cleanroom-test/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py

PYTHONPATH="/tmp/new-user-cleanroom-test/hyperstitionstudio-core/src" \
  python3 /tmp/new-user-cleanroom-test/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py --verify-only

Release Acceptance Criteria (All 5 Must Pass):

  1. test_core_suite.py exits 0 (ALL 6 TEST SUITES PASSED) inside /tmp/new-user-cleanroom-test.
  2. build_encyclopedia_knowledge_graph.py exits 0 inside /tmp/new-user-cleanroom-test without passing --upstream-repo or --out-dir flags, producing all 388 nodes and 1,282 deduplicated edges (281 IN_VOLUME edges preserved).
  3. build_encyclopedia_knowledge_graph.py --verify-only reports "all_gates_passed": true.
  4. sources.py verify --evidence exits 0 (citations OK) on all 5 stakeholder proposals inside /tmp/new-user-cleanroom-test.
  5. git status -s is completely empty across every repository in /workspace.