Files
encyclopedia-knowledge-graph/docs/plans/active/PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION.md
T

46 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PLAN: Root-Cause Resolution of Filesystem & Namespace Discrepancies Between Localhost & VPS (`PLAN #71`)
**Document ID:** `PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION`
**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 (Root Cause vs. Workaround)
Previously, path discrepancies between dev localhost (`/workspace`) and production VPS (`/srv/hyperstitionstud.io/repos`)—specifically between `hyperdope-ci-build` and `ingglish-hyperdope-ci`—were handled via defensive workarounds (flexible fallbacks in `WorkspaceConfig`, `try/except` guards, and loose filename globbing in test assertions).
While effective at preventing immediate harvest failures, these workarounds leave the underlying namespace inconsistency unresolved, permitting divergent repository directory naming across deployment environments.
### Architectural Goal
**True Root-Cause Resolution**: Eliminate repository naming divergence entirely by standardizing canonical directory naming, automated directory aliasing/symlinking during VPS hydration (`sync-vps-repos.sh`), and strict workspace-wide path invariants that require identical directory structures across localhost and VPS.
---
## 2. Technical Implementation Specifications
### 1. Automated Repository Normalization in `deploy/sync-vps-repos.sh`
Update `sync-vps-repos.sh` to automatically detect and normalize alternative repository clone names (e.g., ensuring `ingglish-hyperdope-ci` is transparently symlinked or aliased to `hyperdope-ci-build` upon checkout on the VPS), guaranteeing identical filesystem paths across environments:
```bash
if [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]] && [[ ! -e "${REPOS_ROOT}/hyperdope-ci-build" ]]; then
ln -sfn "ingglish-hyperdope-ci" "${REPOS_ROOT}/hyperdope-ci-build"
fi
```
### 2. Strict Canonical Path Enforcements in `config/__init__.py`
Refactor `resolve_workspace_repo_dir()` to enforce strict canonical directory resolution without silent fallback compromises, asserting that expected repository directories exist in their canonical form or establishing deterministic symlinks.
### 3. Restoration of Strict Uncompromised Test Assertions (`test_core_suite.py`)
Remove loose globbing and fallback checks from `test_core_suite.py`, replacing them with strict, deterministic assertions (`assert (ci_dir / "patches" / "0001-...").is_file()`) that prove complete filesystem parity between localhost and production VPS.
---
## 3. Verification Plan
1. Compile Plan Markdown into Dark-Mode PDF via `hs-pdf-build`.
2. Run `python3 -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root /workspace` (Gates `D1`–`D8`).
3. Run `tests/test_core_suite.py` (`ALL 7 TEST SUITES PASSED`).