Revise PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION for root-cause resolution and recompile PDF
This commit is contained in:
1 parent
967f983eda
commit
a16957da62
3 files changed
+18
-13
No files matched your search
@@ -3,8 +3,8 @@
|
||||
<!-- HS-COMMIT-STATUS:START -->
|
||||
> **Gitea Commit & Release Telemetry (`v2.17.1` • Namespace `urn:io:hyperstitionstud`)**
|
||||
> - **Repository Role & Public Route:** `388`-Node / `1,282`-Edge Interactive Knowledge Graph Workbench (Modes 1-4), 6-Gate Verifier, & Architectural Plan/Release Archive → [`https://hyperstitionstud.io/graph/index.html`](https://hyperstitionstud.io/graph/index.html)
|
||||
> - **Latest Commit Scope (`encyclopedia-knowledge-graph`):** Synchronized v2.17.1 release state across 3 tracked module/artifact surface(s)
|
||||
> - **Touched Files / Surfaces:** `docs/periodic-harvest-cicd-to-vps-flow-diagram.png`, `docs/plans/active/PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION.md`, `docs/plans/active/PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION.pdf`
|
||||
> - **Latest Commit Scope (`encyclopedia-knowledge-graph`):** Synchronized v2.17.1 release state across 2 tracked module/artifact surface(s)
|
||||
> - **Touched Files / Surfaces:** `docs/plans/active/PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION.md`, `docs/plans/active/PLAN-VPS-LOCALHOST-NAMESPACE-DISCREPANCY-RESOLUTION.pdf`
|
||||
> - **Live Verified Ecosystem Metrics (`v2.17.1`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
||||
<!-- HS-COMMIT-STATUS:END -->
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# PLAN: Resolution of Filesystem & Namespace Discrepancies Between Localhost & VPS (`PLAN #71`)
|
||||
# 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/)`
|
||||
@@ -11,26 +11,31 @@
|
||||
|
||||
## 1. Context & Problem Statement
|
||||
|
||||
### Problems Solved
|
||||
As observed during VPS harvest test suite runs, path resolution discrepancies between local development workstations (`/workspace/...`) and target production VPS environments (`/srv/hyperstitionstud.io/repos/...`) frequently arise due to repository alias naming variations—specifically `hyperdope-ci-build` versus `ingglish-hyperdope-ci`.
|
||||
### 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).
|
||||
|
||||
Hardcoded fallback expressions such as `cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")` fail when the physical directory on the VPS is named `ingglish-hyperdope-ci`. This leads to assertion failures during Stage 3 transactional verification gates (`test_core_suite.py`), triggering automated harvest rollbacks.
|
||||
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
|
||||
Standardize all workspace-wide path resolution around centralized properties on `WorkspaceConfig` (e.g., `cfg.ci_build_dir`, `cfg.core_dir`, `cfg.archive_dir`, `cfg.zoology_dir`, `cfg.knowledge_graph_dir`) backed by `resolve_workspace_repo_dir()`, which transparently handles repository key aliases and Gitea slug variations across host environments.
|
||||
**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. Centralized Property Enforcement in `WorkspaceConfig` (`config/__init__.py`)
|
||||
Ensure all configuration accessors (`ci_build_dir`, `core_dir`, `archive_dir`, `zoology_dir`, `knowledge_graph_dir`) rely exclusively on `resolve_workspace_repo_dir()` to dynamically detect repository folders regardless of local vs. production directory naming (`hyperdope-ci-build` ↔ `ingglish-hyperdope-ci`).
|
||||
### 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. Elimination of Ad-Hoc Hardcoded Path Fallbacks in Test Suites (`test_core_suite.py`)
|
||||
Replace all ad-hoc fallback expressions across test suites and build scripts (such as `cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")`) with direct accessor calls (`cfg.ci_build_dir`), ensuring 100% environment parity between localhost and VPS execution.
|
||||
### 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. Resilient File Globbing for CI Patches & Artifacts
|
||||
Utilize glob patterns (`ci_dir.glob("0001-*.patch")`) rather than rigid absolute filenames in validation assertions to absorb minor hyphenation or versioning string differences safely.
|
||||
### 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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user