Release v2.16.0: Implement bounded-box text layout & geometry audit across all 11 homepage UI quadrant closeups (Plan #61), unified homepage-matched navigation bar across all subpages with 0 homepage nav changes (Plan #63), and Fedora 41 RPM 4.20 %{_sourcedir} + %changelog fix
This commit is contained in:
1 parent
80ec4eaa51
commit
3cb816d5ef
14 files changed
+286
-153
No files matched your search
@@ -1,27 +0,0 @@
|
||||
# PLAN: Retained & Deferred Candidate Strategies From `PLAN-PIECEWISE-CODEBASE-MODULARITY-DEDUPLICATION-AND-RESOURCE-ECONOMIZATION` (`Strategies 1B, 1C, 2A, 2C, 3B, 3C, 4B, 4C, 5B, 5C, 6B, 6C, 7B, 7C`)
|
||||
|
||||
**Document ID:** `PLAN-PIECEWISE-CODEBASE-MODULARITY-DEFERRED-STRATEGIES`
|
||||
**Status:** `INACTIVE / DEFERRED FOR FUTURE RE-EVALUATION`
|
||||
**Parent Plan:** `PLAN-PIECEWISE-CODEBASE-MODULARITY-DEDUPLICATION-AND-RESOURCE-ECONOMIZATION`
|
||||
**Target Ecosystem Version:** `Future Release (Post-v2.12.0)`
|
||||
**Target Repositories:** `hyperstitionstudio-core`, `encyclopedia-knowledge-graph`
|
||||
**Author:** m00t & Hermes Agent
|
||||
**Date:** 2026-12-01
|
||||
|
||||
---
|
||||
|
||||
## 1. Purpose (`Rule C.4` Active-vs-Inactive Piecewise Plan Partitioning)
|
||||
|
||||
Per `Rule C.4` of `hyperstitionstudio-roadmap-and-release`, this companion inactive document preserves all **unaffirmed / deferred** candidate strategies from the stepwise review of `PLAN-PIECEWISE-CODEBASE-MODULARITY-DEDUPLICATION-AND-RESOURCE-ECONOMIZATION` (`Affirmed Strategies: 1A, 2B, 3A, 4A, 5A, 6A, 7A`). No `.pdf` is compiled for this deferred companion.
|
||||
|
||||
---
|
||||
|
||||
## 2. Preserved Deferred Candidate Strategies
|
||||
|
||||
- **Audit Point 1 (`1B` & `1C`):** Superseded by affirmed **`Strategy 1A`** (unified AQ ciphers in `hyperstitionstud_io.ciphers` + `@lru_cache` `load_pillow_font()` and shared Group 3 chamfered plate primitives in `publishing/fonts.py`).
|
||||
- **Audit Point 2 (`2A` Full `explication_template.py` Hub/Subpage Extraction & `2C`):** Deferred in favor of affirmed **`Strategy 2B`** (`render_polyglot_cartridge_html()` and `_render_prereq_box_html()` shared between `engineering_docs.py` and `math_docs.py` while keeping domain-specific hub and subpage HTML builders separate).
|
||||
- **Audit Point 3 (`3B` & `3C`):** Superseded by affirmed **`Strategy 3A`** (`st_mtime_ns`-keyed `load_json_cached()` in `config/__init__.py` and stat-memoized `sha256_file()` in `glossary/__init__.py`).
|
||||
- **Audit Point 4 (`4B` & `4C`):** Superseded by affirmed **`Strategy 4A`** (`src/hyperstitionstud_io/security.py` with `safe_urlopen()` and `PEP 706` `safe_tar_members()`).
|
||||
- **Audit Point 5 (`5B` & `5C`):** Superseded by affirmed **`Strategy 5A`** (per-inode telemetry schema-init memoization in `db/sqlite_meta.py` and `PRAGMA temp_store = MEMORY`).
|
||||
- **Audit Point 6 (`6B` & `6C`):** Superseded by affirmed **`Strategy 6A`** (preserving valid `.gz`/`.br` across `rsync` + incremental `mtime`-aware parallel `xargs -P` batch pre-compression in `deploy/sync-vps-repos.sh`).
|
||||
- **Audit Point 7 (`7B` & `7C`):** Superseded by affirmed **`Strategy 7A`** (shared `_pack_verify_and_write_archive_manifest()` core + per-repo Git citation memoization + single richness guard pass in `publishing/archive_rotator.py`).
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "2.15.0",
|
||||
"version": "2.16.0",
|
||||
"archive_classification": "archived_inactive_plans",
|
||||
"bundle_filename": "inactive-plans-archive.tar.gz",
|
||||
"bundle_policy": "md_only_single_layer_bounded_with_git_citation_rotation",
|
||||
@@ -14,7 +14,6 @@
|
||||
"PLAN-LOCAL-SERVER-SIDE-WEB-CHATBOT-GUI",
|
||||
"PLAN-MEMETIC-GALLERY-SUBPAGE",
|
||||
"PLAN-MIGRATE-FINAL-EXEGESIS-CRONJOB-WITH-DUAL-MODE-AND-CRYPTO-FUNDING",
|
||||
"PLAN-PIECEWISE-CODEBASE-MODULARITY-DEFERRED-STRATEGIES",
|
||||
"PLAN-PIECEWISE-COMPLETE-MATHEMATICS-AND-INFO-SCIENCE-EXPLICATION",
|
||||
"PLAN-PIECEWISE-COMPLETE-SOFTWARE-ENGINEERING-EXPLICATION",
|
||||
"PLAN-PIECEWISE-GRIMOIRIC-LEARN-PAGE",
|
||||
@@ -35,7 +34,7 @@
|
||||
"companion_pdf_sha256": "bcddde27a678b0b234347065df34c089d23fb2308534d420089955e8ba1ab9a0",
|
||||
"companion_pdf_size_bytes": 92160,
|
||||
"git_commit_sha": "b2049beb38fb6c443a655f121135e7f92fedf9ab",
|
||||
"git_release_tag": "v2.15.0",
|
||||
"git_release_tag": "v2.16.0",
|
||||
"git_citation_url": "https://git.libre.audio/seasharp/encyclopedia-knowledge-graph/src/commit/b2049beb38fb6c443a655f121135e7f92fedf9ab/docs/plans/inactive/PLAN-ECOSYSTEM-WIDE-ECONOMIZATION-EVALUATION-AND-VECTORS.md",
|
||||
"git_source_path": "docs/plans/inactive/PLAN-ECOSYSTEM-WIDE-ECONOMIZATION-EVALUATION-AND-VECTORS.md"
|
||||
},
|
||||
@@ -49,7 +48,7 @@
|
||||
"companion_pdf_sha256": "3e04f3427f0cefe19e1197399c7cc236d0f0a518ef4087dc0577498c899e92fe",
|
||||
"companion_pdf_size_bytes": 82722,
|
||||
"git_commit_sha": "b2049beb38fb6c443a655f121135e7f92fedf9ab",
|
||||
"git_release_tag": "v2.15.0",
|
||||
"git_release_tag": "v2.16.0",
|
||||
"git_citation_url": "https://git.libre.audio/seasharp/encyclopedia-knowledge-graph/src/commit/b2049beb38fb6c443a655f121135e7f92fedf9ab/docs/plans/inactive/PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE.md",
|
||||
"git_source_path": "docs/plans/inactive/PLAN-HEADER-SUBTITLE-TELEMETRY-CONSOLIDATION-ALTERNATIVE.md"
|
||||
},
|
||||
@@ -63,7 +62,7 @@
|
||||
"companion_pdf_sha256": "b4e30a70abc5687c10e7c588f2f7f906ff0de04744765870f55f9462670fefb2",
|
||||
"companion_pdf_size_bytes": 85529,
|
||||
"git_commit_sha": "b2049beb38fb6c443a655f121135e7f92fedf9ab",
|
||||
"git_release_tag": "v2.15.0",
|
||||
"git_release_tag": "v2.16.0",
|
||||
"git_citation_url": "https://git.libre.audio/seasharp/encyclopedia-knowledge-graph/src/commit/b2049beb38fb6c443a655f121135e7f92fedf9ab/docs/plans/inactive/PLAN-HOMEPAGE-QUADRANT-EXPLORATORY-FEATURES-DEFERRED-STRATEGIES.md",
|
||||
"git_source_path": "docs/plans/inactive/PLAN-HOMEPAGE-QUADRANT-EXPLORATORY-FEATURES-DEFERRED-STRATEGIES.md"
|
||||
},
|
||||
@@ -77,7 +76,7 @@
|
||||
"companion_pdf_sha256": "3bffabc233869ca4f429d2c0bf66b3fd8cf85b88edf56fa45b8f41e728813dce",
|
||||
"companion_pdf_size_bytes": 82809,
|
||||
"git_commit_sha": "b2049beb38fb6c443a655f121135e7f92fedf9ab",
|
||||
"git_release_tag": "v2.15.0",
|
||||
"git_release_tag": "v2.16.0",
|
||||
"git_citation_url": "https://git.libre.audio/seasharp/encyclopedia-knowledge-graph/src/commit/b2049beb38fb6c443a655f121135e7f92fedf9ab/docs/plans/inactive/PLAN-PIECEWISE-DECLUTTER-HOMEPAGE-UI-CLOSEUPS-DEFERRED-STRATEGIES.md",
|
||||
"git_source_path": "docs/plans/inactive/PLAN-PIECEWISE-DECLUTTER-HOMEPAGE-UI-CLOSEUPS-DEFERRED-STRATEGIES.md"
|
||||
},
|
||||
@@ -91,7 +90,7 @@
|
||||
"companion_pdf_sha256": "ba0e195190e4e3a2ca9070b3564cc28db472b1ee3ae629e98ec43dc3322f1cf7",
|
||||
"companion_pdf_size_bytes": 87445,
|
||||
"git_commit_sha": "b2049beb38fb6c443a655f121135e7f92fedf9ab",
|
||||
"git_release_tag": "v2.15.0",
|
||||
"git_release_tag": "v2.16.0",
|
||||
"git_citation_url": "https://git.libre.audio/seasharp/encyclopedia-knowledge-graph/src/commit/b2049beb38fb6c443a655f121135e7f92fedf9ab/docs/plans/inactive/PLAN-PIECEWISE-MARKET-RESEARCH-DEFERRED-CANDIDATE-STRATEGIES.md",
|
||||
"git_source_path": "docs/plans/inactive/PLAN-PIECEWISE-MARKET-RESEARCH-DEFERRED-CANDIDATE-STRATEGIES.md"
|
||||
},
|
||||
@@ -105,11 +104,11 @@
|
||||
"companion_pdf_sha256": "f166bfa3cee33326e6b9ade68593af0471d19dfe83ce8d101d67ece07e800860",
|
||||
"companion_pdf_size_bytes": 84345,
|
||||
"git_commit_sha": "b2049beb38fb6c443a655f121135e7f92fedf9ab",
|
||||
"git_release_tag": "v2.15.0",
|
||||
"git_release_tag": "v2.16.0",
|
||||
"git_citation_url": "https://git.libre.audio/seasharp/encyclopedia-knowledge-graph/src/commit/b2049beb38fb6c443a655f121135e7f92fedf9ab/docs/plans/inactive/PLAN-PIECEWISE-UI-EVOLUTION-FOR-GROWING-DATASETS-DEFERRED-STRATEGIES.md",
|
||||
"git_source_path": "docs/plans/inactive/PLAN-PIECEWISE-UI-EVOLUTION-FOR-GROWING-DATASETS-DEFERRED-STRATEGIES.md"
|
||||
}
|
||||
],
|
||||
"long_term_git_storage_citations": [],
|
||||
"manifest_dag_json_cid": "baguqeerax6i2jaco3gol3p6lkvqscfkk6ihjvmkvwihsh4rypxtxntgg7ghq"
|
||||
"manifest_dag_json_cid": "baguqeeraxeqxmzqkqyvwxye4ey7lbt4chnhe4fgpp232spx2fooxb6wyg4lq"
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
# PLAN: Piecewise Codebase Modularity, Deduplication & Resource Economization — Revised for `v2.12.0..v2.15.0` Code Delta (`Audit Points 1–4`, `Rule C` Piecewise Specification)
|
||||
|
||||
**Document ID:** `PLAN-PIECEWISE-CODEBASE-MODULARITY-DEFERRED-STRATEGIES`
|
||||
**Status:** `PENDING AUDIT PIECEWISE (docs/plans/piecewise/ — 0/4 AUDIT POINTS AFFIRMED)`
|
||||
**Parent Plan:** `PLAN-PIECEWISE-CODEBASE-MODULARITY-DEDUPLICATION-AND-RESOURCE-ECONOMIZATION` (`v2.12.0`)
|
||||
**Target Ecosystem Version:** `v2.16.0` (Baseline: `v2.15.0`, evaluating full `v2.12.0..v2.15.0` delta)
|
||||
**Target Repositories:** `hyperstitionstudio-core`, `ingglish-hyperdope-gematria`, `encyclopedia-knowledge-graph`
|
||||
**Author:** m00t & Hermes Agent
|
||||
**Date:** 2026-12-01
|
||||
|
||||
---
|
||||
|
||||
## 1. Ground-Truth Audit: Reactivated Deferred Strategy `2A` + `v2.12.0..v2.15.0` Code Delta (`+4,970` Lines Across 6 Repositories, `Rule C.1`)
|
||||
|
||||
Between `v2.12.0` (when the parent Plan #53 was executed) and `v2.15.0`, implementing Plans `#56`, `#57`, `#58`, `#59`, and `#60` added **`+4,970` insertions across 96 touched files** (`+1,500` in `hyperstitionstudio-core`, `+2,090` in `ingglish-hyperdope-gematria`, `+314` in `haiperdohp-jemaytreeah`, `+971` in `hyperdope-ci-build`, and `+220` in `encyclopedia-knowledge-graph`). Re-auditing the deferred strategy candidates alongside this exact `v2.12.0..v2.15.0` code delta reveals **4 high-leverage modularity, deduplication, security, and resource-economization Audit Points**:
|
||||
|
||||
| Audit Point & Subsystem | Empirically Verified `v2.12.0..v2.15.0` Codebase Delta Measurement | Duplication, Drift Risk, Security Gap or Resource Hotspot Identified |
|
||||
| :--- | :--- | :--- |
|
||||
| **Audit Point 1**<br/>*Unified Explication Hub, Subpage & Navigation Template Engine (`publishing/explication_template.py`, `engineering_docs.py` `801` lines & `math_docs.py` `628` lines — Reactivated Strategy `2A` from Plan #53)* | • In Plan #53 (`v2.12.0`), `Strategy 2B` unified `render_polyglot_cartridge_html()` and `_render_prereq_box_html()`, while deferring **`Strategy 2A`** (full `explication_template.py` extraction).<br/>• `publishing/engineering_docs.py` (`801` lines) and `publishing/math_docs.py` (`628` lines) still duplicate `~260` lines of identical `<head>` CSS, `<header>` layout, `> 6` subpage `More Units ▾` overflow `<select>`, `.grid-cards` unit card loops, `<footer>` colophon, `prev_link / next_link` subpage pagination, and `build_*_site()` bundle orchestration. | • **Eliminate `~260` Duplicate Lines & Enable Single-Point Cross-Page Nav Unification (Plan #63):** Extracting `src/hyperstitionstud_io/publishing/explication_template.py` (`render_explication_nav_html()`, `render_explication_hub_page_html()`, `render_explication_subpage_html()`, `write_explication_site_bundle()`) removes `~260` duplicate lines and lets `/engineering/*` and `/math/*` share one header/subnav renderer. |
|
||||
| **Audit Point 2 (NEW from `v2.13.0–v2.15.0` Delta)**<br/>*Exegesis & CI Script Deduplication + `safe_urlopen` / `compute_aq` Reuse in `ingglish-hyperdope-gematria` (`+2,090` lines added in `v2.13.0–v2.15.0`)* | • Plan #56 (`v2.13.0`) added `synthesize_news_dossier_openrouter.py` (`736` lines) in **two identical copies** (`ingglish-aq-archive/scripts/` and `packaging/bundle/scripts/` = `1,472` lines).<br/>• Plan #60 (`v2.15.0`) had to patch `ci_provision_ingglish.py` across **three identical copies** (`ingglish-aq-archive/scripts/`, `packaging/bundle/scripts/`, and `packaging/bundle/skills/hyperdope-ingglish-ci/scripts/` = `~1,950` lines), plus duplicate copies of `collect_news_aq.py`, `generate_aq_tier_list.py`, and `build_wire_report_pdf.py` (`~3,600+` duplicated lines in `ingglish-hyperdope-gematria`!).<br/>• `synthesize_news_dossier_openrouter.py` redefines `compute_aq()` locally (`lines 39–46`) and calls raw `urllib.request.urlopen()` instead of delegating to `hyperstitionstud_io.ciphers.compute_aq` and `hyperstitionstud_io.security.safe_urlopen` when available. | • **Eliminate `~2,100+` Lines of Multi-Copy Script Drift in `ingglish-hyperdope-gematria`:** Keep `ingglish-aq-archive/scripts/*.py` as the Single Source of Truth, replace duplicate copies in `packaging/bundle/scripts/` and `packaging/bundle/skills/.../scripts/` with thin `runpy` delegators (while `packaging/build-fedora41-rpm.sh` materializes standalone copies into the RPM buildroot at package build time), and wire `compute_aq` + `safe_urlopen` delegation into `synthesize_news_dossier_openrouter.py`. |
|
||||
| **Audit Point 3 (NEW from `v2.14.0–v2.15.0` Delta)**<br/>*Pre-Commit & Release Pipeline Consolidation: Shared 6-Repo Discovery, Path Normalizer, Git Helper & Stat-Cached Line Counter (`config/__init__.py`, `deploy_scripts_sync.py` `266` lines, `version_sync.py` `550` lines, `readme_sync.py` `616` lines, `closeups_sync.py` `765` lines)* | • Plan #58 (`v2.14.0`) added `src/hyperstitionstud_io/ci/deploy_scripts_sync.py` (`266` lines) and wired it into `.git/hooks/pre-commit` (`readme_sync.py`) and `version_sync.py`.<br/>• Across `version_sync.py`, `readme_sync.py`, `highlights.py`, and `deploy_scripts_sync.py`, `_norm_ws_path()`, `_resolve_repo_dir()` (`hyperdope-ci-build` vs `ingglish-hyperdope-ci`), `_git_out()`, and the canonical 6-repo list are now duplicated in **`4` modules**.<br/>• Every `git commit` triggers `.git/hooks/pre-commit` (`deploy_scripts_sync` + `closeups_sync` + `readme_sync`), which scans all `231,615` lines (`4.17 MB`) of `haiperdohp-jemaytreeah/db.txt` from disk multiple times even when `(st_mtime_ns, st_size)` are unchanged. | • **Consolidate 4x Duplicated Repo/Git Helpers & Stat-Cache `db.txt` Line Counts:** Centralizing `CANONICAL_SIX_REPOS`, `resolve_workspace_repo_dir()`, `normalize_workspace_relpath()`, `run_git_stdout()`, and `(resolved_path, st_mtime_ns, st_size)`-memoized `count_file_lines_cached()` in `src/hyperstitionstud_io/config/__init__.py` removes `4` duplicate helper implementations and cuts repeated `4.17 MB` `db.txt` line scans during `pre-commit` to `0`. |
|
||||
| **Audit Point 4 (NEW from `v2.13.0–v2.15.0` Delta)**<br/>*Shared Bounded Pillow Text-Fitting Primitives (`publishing/fonts.py`) & `load_json_cached` Reuse in `publishing/quant_voice.py` (`511` lines)* | • Plan #57 & Plan #59 (`v2.13.0–v2.15.0`) added `src/hyperstitionstud_io/publishing/quant_voice.py` (`511` lines), which reads `voice-manifest.json` via raw `json.loads(manifest_p.read_text())` (`line 336`) instead of `load_json_cached()`.<br/>• `publishing/closeups_sync.py` (`765` lines), `publishing/flow_diagram.py` (`401` lines), and `quant/cards.py` (`550` lines) place text via manual `d.text()` coordinates and `[:N]` slicing without shared bounded text-fitting primitives in `publishing/fonts.py` (`90` lines). | • **Unified Bounded Pillow Typography & Manifest Caching:** Adding `fit_pillow_text_to_width()`, `draw_bounded_box_text()`, and `draw_bounded_kv_row()` to `src/hyperstitionstud_io/publishing/fonts.py` (directly supporting Plan #61's closeup bounding-box fixes) and wiring `load_json_cached()` into `quant_voice.py` unifies image text fitting and JSON caching across `publishing/`. |
|
||||
|
||||
---
|
||||
|
||||
## 2. Four Factual Binary Engineering Gates (`G1–G4`, Zero Synthetic Data & Two-Script Deployment Invariant)
|
||||
|
||||
- **`Gate G1` (100% Backward-Compatible Public API, CLI Entrypoints, RPM Builder & Two-Script Deployment Invariant):** Zero breaking changes to any `pyproject.toml` CLI entrypoint (`hs-*`), MCP tool, OpenAPI 3.1 REST endpoint, `packaging/build-fedora41-rpm.sh`, or the Two-Script Manual Operator Deployment Invariant.
|
||||
- **`Gate G2` (`0` LLM Tokens & `0` New External Dependencies):** Uses Python `3.12+` standard library (`runpy`, `functools`, `subprocess`) and existing workspace libraries (`Pillow`).
|
||||
- **`Gate G3` (`ProtectSystem=strict` `EROFS` & `ReadOnlyIsolationGuard` Safe):** All caches are in-memory and invalidated automatically on `(st_mtime_ns, st_size)` updates.
|
||||
- **`Gate G4` (Measurable Code Deduplication Across Both `hyperstitionstudio-core` & `ingglish-hyperdope-gematria`):** Eliminates `~260` duplicate HTML template lines in `publishing/`, `~2,100+` duplicate Python script lines in `ingglish-hyperdope-gematria/packaging/bundle/`, and `4` duplicate Git/repo helper blocks.
|
||||
|
||||
---
|
||||
|
||||
## 3. Piecewise Audit Points & Candidate Strategies (`Strategies 1A–1C` through `4A–4C`, `Rule C.2`)
|
||||
|
||||
Each Audit Point below is 100% independent and commutative so they can be reviewed, affirmed, or deferred one at a time under the strict Turn-Ending Invariant (`Rule C.3`).
|
||||
|
||||
---
|
||||
|
||||
### Audit Point 1: Unified Explication Hub, Subpage & Navigation Template Engine (`src/hyperstitionstud_io/publishing/explication_template.py` — Reactivated Strategy `2A`)
|
||||
|
||||
- **Strategy `1A` (Extract Shared Group 3 Explication Page Renderer into `src/hyperstitionstud_io/publishing/explication_template.py` — Recommended Candidate):**
|
||||
- **What Changes:**
|
||||
1. Creates `src/hyperstitionstud_io/publishing/explication_template.py` containing the parameterized Group 3 HTML builders and site-bundle writer shared by `/engineering/` and `/math/`:
|
||||
- `render_explication_nav_html()`,
|
||||
- `render_explication_hub_page_html()`,
|
||||
- `render_explication_subpage_html()`, and
|
||||
- `write_explication_site_bundle()`.
|
||||
2. Refactors `publishing/engineering_docs.py` (`hs-eng-docs`) and `publishing/math_docs.py` (`hs-math-docs`) to delegate their HTML/nav/bundle rendering to `explication_template.py` while keeping all domain specifications, cartridges, manifests, and public function signatures 100% intact.
|
||||
- **Modularity Gain:** Eliminates `~260` lines of duplicated HTML/CSS/JS templates and provides a single shared header/navigation builder for `/engineering/*` and `/math/*`.
|
||||
- **Strategy `1B` (Extract Only `render_explication_nav_html()` & `render_explication_subpage_html()`, Keeping Hub Renderers Separate — Partial Candidate):**
|
||||
- Unifies navigation and subpage HTML templates while leaving `_render_hub_html()` and `_render_math_hub_html()` separate.
|
||||
- **Strategy `1C` (Retain Current `v2.12.0` Strategy `2B` Split — Status Quo / Deferred):**
|
||||
- Keeps only `render_polyglot_cartridge_html()` and `_render_prereq_box_html()` shared.
|
||||
|
||||
---
|
||||
|
||||
### Audit Point 2 (NEW from `v2.13.0–v2.15.0` Delta): Exegesis & CI Script Deduplication + `safe_urlopen` / `compute_aq` Delegation in `ingglish-hyperdope-gematria`
|
||||
|
||||
- **Strategy `2A` (Single-Source-of-Truth Scripts in `ingglish-aq-archive/scripts/` + Thin `runpy` Bundle Wrappers + Automatic Standalone Copy Materialization in `build-fedora41-rpm.sh` + `compute_aq`/`safe_urlopen` Delegation — Recommended Candidate):**
|
||||
- **What Changes:**
|
||||
1. Designates `ingglish-aq-archive/scripts/{synthesize_news_dossier_openrouter.py,ci_provision_ingglish.py,collect_news_aq.py,generate_aq_tier_list.py,build_wire_report_pdf.py}` as the Single Source of Truth in `ingglish-hyperdope-gematria`.
|
||||
2. Replaces the duplicate multi-hundred-line copies in `packaging/bundle/scripts/*.py` and `packaging/bundle/skills/hyperdope-ingglish-ci/scripts/ci_provision_ingglish.py` with compact (`~25`-line) self-locating `runpy.run_path` / `importlib` delegators that resolve the canonical script in `ingglish-aq-archive/scripts/` when run from the repo, while updating `packaging/build-fedora41-rpm.sh` to copy the canonical `ingglish-aq-archive/scripts/*.py` files directly into the RPM `SOURCES` bundle at package build time so the installed Fedora 41 RPM (`/usr/libexec/ingglish-exegesis/scripts/*.py`) remains 100% standalone.
|
||||
3. Updates `synthesize_news_dossier_openrouter.py` to delegate `compute_aq()` to `hyperstitionstud_io.ciphers.compute_aq` and HTTP requests in `call_openrouter_exegesis()` to `hyperstitionstud_io.security.safe_urlopen` whenever `hyperstitionstud_io` is importable (retaining the stdlib fallback for standalone Fedora 41 RPM hosts).
|
||||
- **Modularity & Security Gain:** Eliminates `~2,100+` lines of duplicate Python code across `ingglish-hyperdope-gematria`, prevents multi-copy drift across future edits, and extends `safe_urlopen` SSRF/size-cap protection to `synthesize_news_dossier_openrouter.py`.
|
||||
- **Strategy `2B` (Keep Full Copies on Disk, Add Auto-Sync Step to `deploy_scripts_sync.py` + `compute_aq`/`safe_urlopen` Delegation Only — Partial Candidate):**
|
||||
- Keeps duplicate files in Git but synchronizes them automatically in `deploy_scripts_sync.py` before commits.
|
||||
- **Strategy `2C` (Leave Multi-Copy Scripts in `ingglish-hyperdope-gematria` Unchanged — Status Quo / Deferred):**
|
||||
- Retains the current manual multi-copy layout.
|
||||
|
||||
---
|
||||
|
||||
### Audit Point 3 (NEW from `v2.14.0–v2.15.0` Delta): Pre-Commit & Release Pipeline Consolidation — Shared 6-Repo Discovery, Path Normalizer, Git Helper & Stat-Cached Line Counter (`src/hyperstitionstud_io/config/__init__.py`)
|
||||
|
||||
- **Strategy `3A` (Centralize `CANONICAL_SIX_REPOS`, `resolve_workspace_repo_dir()`, `normalize_workspace_relpath()`, `run_git_stdout()`, and Stat-Memoized `count_file_lines_cached()` in `src/hyperstitionstud_io/config/__init__.py` — Recommended Candidate):**
|
||||
- **What Changes:**
|
||||
1. Adds `CANONICAL_SIX_REPOS`, `resolve_workspace_repo_dir(ws_root, repo_key)`, `normalize_workspace_relpath(p, workspace_root=None)`, `run_git_stdout(repo_dir, args, *, strip_leading=True, timeout=5.0)`, and `(resolved_path, st_mtime_ns, st_size)`-memoized `count_file_lines_cached(path)` to `src/hyperstitionstud_io/config/__init__.py`.
|
||||
2. Refactors `version_sync.py`, `publishing/readme_sync.py`, `publishing/highlights.py`, `ci/deploy_scripts_sync.py`, and `publishing/closeups_sync.py` to import and use these shared helpers instead of maintaining `4` separate copies of `_git_out` / `_resolve_repo_dir` / `_norm_ws_path` and re-scanning `231,615` lines of `db.txt` on every commit hook.
|
||||
- **Modularity & Resource Gain:** Eliminates `4` duplicate Git/repo/path helper blocks and cuts repeated `4.17 MB` `db.txt` line-count scans during `pre-commit` hooks to `0`.
|
||||
- **Strategy `3B` (Add Stat-Memoized `count_file_lines_cached()` Only — Minimal Candidate):**
|
||||
- Caches line counts by `(resolved_path, st_mtime_ns, st_size)` in `config/__init__.py` without consolidating `_git_out`, `_resolve_repo_dir`, and `_norm_ws_path`.
|
||||
- **Strategy `3C` (Keep Separate Helpers & Uncached Line Scans — Status Quo / Deferred):**
|
||||
- Leaves `config/__init__.py`, `version_sync.py`, `readme_sync.py`, `highlights.py`, `deploy_scripts_sync.py`, and `closeups_sync.py` unchanged.
|
||||
|
||||
---
|
||||
|
||||
### Audit Point 4 (NEW from `v2.13.0–v2.15.0` Delta): Shared Bounded Pillow Text-Fitting Primitives (`publishing/fonts.py`) & `load_json_cached` Reuse in `publishing/quant_voice.py`
|
||||
|
||||
- **Strategy `4A` (Add `fit_pillow_text_to_width()`, `draw_bounded_box_text()`, and `draw_bounded_kv_row()` to `src/hyperstitionstud_io/publishing/fonts.py` + Wire `load_json_cached()` into `publishing/quant_voice.py` — Recommended Candidate):**
|
||||
- **What Changes:**
|
||||
1. Extends `src/hyperstitionstud_io/publishing/fonts.py` with reusable, zero-truncation Pillow text-layout helpers (`fit_pillow_text_to_width()`, `draw_bounded_box_text()`, and `draw_bounded_kv_row()`) that step down the cached DejaVu font ladder (`14px -> 9px`) so text always fits inside its bounding box with `>= 6px` horizontal padding and `0` mid-word `[:N]` slicing.
|
||||
2. Reuses these shared primitives in `publishing/closeups_sync.py` (directly powering Plan #61's bounding-box remediation) and wires `load_json_cached()` into `publishing/quant_voice.py` when reading `voice-manifest.json`.
|
||||
- **Modularity Gain:** Centralizes bounded Pillow typography in `publishing/fonts.py` and brings `quant_voice.py` into full compliance with the `load_json_cached()` pattern established in `v2.12.0`.
|
||||
- **Strategy `4B` (Keep Bounded Text Helpers Local Inside `publishing/closeups_sync.py` Only — Partial Candidate):**
|
||||
- Implements text-fitting helpers privately inside `closeups_sync.py` without promoting them to `publishing/fonts.py`.
|
||||
- **Strategy `4C` (Manual Per-Call Coordinate Adjustments Only — Status Quo / Deferred):**
|
||||
- Adjusts individual `(x, y)` coordinates manually without shared bounded-text primitives.
|
||||
|
||||
---
|
||||
|
||||
## 4. Summary Matrix of Audit Points `1–4` for Stepwise Review (`Rule C.3`)
|
||||
|
||||
| Audit Point | Target Subsystem (`v2.12.0..v2.15.0` Delta) | Strategy `A` (Full Modularity, Deduplication & Resource Economization — Recommended) | Strategy `B` (Partial / Scoped Change) | Strategy `C` (Status Quo / Deferred) |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| **Point 1** | **Explication HTML Template Engine** (`publishing/explication_template.py`, `engineering_docs.py`, `math_docs.py`) | **`1A`:** Extract shared Group 3 nav, hub, subpage & bundle builders into `explication_template.py` (`-260` duplicate lines) | **`1B`:** Extract shared nav & subpage HTML builders only, keeping hub HTML builders separate | **`1C`:** Retain `v2.12.0` `2B` split |
|
||||
| **Point 2** | **Exegesis & CI Script Deduplication + Security** (`ingglish-hyperdope-gematria/packaging/bundle/` & `synthesize_news_dossier_openrouter.py`) | **`2A`:** Single Source of Truth in `ingglish-aq-archive/scripts/` + thin `runpy` bundle wrappers (`-2,100+` duplicate lines) + standalone copy materialization in `build-fedora41-rpm.sh` + `compute_aq`/`safe_urlopen` delegation | **`2B`:** Keep duplicate files in Git, auto-sync in `deploy_scripts_sync.py` + `compute_aq`/`safe_urlopen` delegation | **`2C`:** Keep manual multi-copy scripts |
|
||||
| **Point 3** | **Pre-Commit & Release Pipeline Consolidation** (`config/__init__.py`, `deploy_scripts_sync.py`, `version_sync.py`, `readme_sync.py`, `closeups_sync.py`) | **`3A`:** Centralize `CANONICAL_SIX_REPOS`, `resolve_workspace_repo_dir()`, `normalize_workspace_relpath()`, `run_git_stdout()`, & stat-cached `count_file_lines_cached()` in `config/__init__.py` | **`3B`:** Add stat-cached `count_file_lines_cached()` only | **`3C`:** Keep 4 separate copies & uncached scans |
|
||||
| **Point 4** | **Bounded Pillow Text-Fitting Primitives & Voice Manifest Cache** (`publishing/fonts.py`, `closeups_sync.py`, `quant_voice.py`) | **`4A`:** Add `fit_pillow_text_to_width()`, `draw_bounded_box_text()`, & `draw_bounded_kv_row()` to `publishing/fonts.py` + wire `load_json_cached()` into `quant_voice.py` | **`4B`:** Keep bounded text helpers private inside `closeups_sync.py` | **`4C`:** Manual coordinate tweaks only |
|
||||
Binary file not shown.
Reference in new issue
Block a user