Compare commits
20
Commits
52153e76f0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
137ef70075 | ||
|
|
fc21b78197 | ||
|
|
eae3b86549 | ||
|
|
ddc02a35b8 | ||
|
|
0003e6ccc1 | ||
|
|
fedd31c85c | ||
|
|
8500cf932f | ||
|
|
3af904d1cc | ||
|
|
745424d09a | ||
|
|
2bf65d4dfa | ||
|
|
808882e0a6 | ||
|
|
0d4b2a5d27 | ||
|
|
70a69ef647 | ||
|
|
9b587d6351 | ||
|
|
d4b7502501 | ||
|
|
3945e3648a | ||
|
|
1e2968f84e | ||
|
|
d526ede701 | ||
|
|
fe33f7d8e8 | ||
|
|
91cf671000 |
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:** Shared PEP 420 Python core library (`hyperstitionstud_io.*`), MCP/REST server, `/quant/`, `/learn/`, `/engineering/`, `/math/`, & `/donate/` webroots → [`https://hyperstitionstud.io/`](https://hyperstitionstud.io/)
|
||||
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 19 tracked module/artifact surface(s)
|
||||
> - **Touched Files / Surfaces:** `deploy/run-vps-data-production.sh`, `deploy/sync-vps-repos.sh`, `site/assets/closeups/quadrant-2-esoteric-finance-quant.png`, `site/assets/closeups/quadrant-3-tab-3-math-ts-rust.png`, `site/assets/closeups/ui-elements-manifest.json`, `site/quant/daily-brief-data.js`, `site/quant/daily-brief-latest.json`, `site/quant/daily-brief-state.json` (+11 more)
|
||||
> - **Latest Commit Scope (`hyperstitionstudio-core`):** Synchronized v2.17.1 release state across 8 tracked module/artifact surface(s)
|
||||
> - **Touched Files / Surfaces:** `site/quant/daily-brief-data.js`, `site/quant/daily-brief-latest.json`, `site/quant/daily-brief-state.json`, `site/quant/financial-aq-harvest-latest.json`, `site/quant/quant-timeseries-data.js`, `site/quant/quant-timeseries.json`, `site/quant/real-macro-indicators-data.js`, `site/quant/real-macro-indicators.json`
|
||||
> - **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,5 +1,5 @@
|
||||
[Unit]
|
||||
Description=Hyperstition Studio US Closing-Bell Financial & FRED Macro Harvest (21:30 UTC Mon-Fri)
|
||||
Description=Hyperstition Studio Pre-Market-Open (14:00 UTC) & US Closing-Bell (21:30 UTC) Financial & FRED Macro Harvest (Mon-Fri)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
@@ -9,4 +9,4 @@ WorkingDirectory=/srv/hyperstitionstud.io/repos
|
||||
Environment="REPOS_ROOT=/srv/hyperstitionstud.io/repos"
|
||||
Environment="LIVE_REPOS=/var/www/hyperstitionstud.io/repos"
|
||||
Environment="PYTHONPATH=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/src"
|
||||
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-data-production.sh --window=us-closing-bell
|
||||
ExecStart=/srv/hyperstitionstud.io/repos/hyperstitionstudio-core/deploy/run-vps-data-production.sh --window=auto
|
||||
@@ -1,7 +1,8 @@
|
||||
[Unit]
|
||||
Description=Weekday 21:30 UTC (16:30 EST) Timer for Hyperstition Studio US Closing-Bell Harvest
|
||||
Description=Weekday 14:00 UTC (09:00 EST) & 21:30 UTC (16:30 EST) Timer for Hyperstition Studio Pre-Market & Closing-Bell Harvest
|
||||
|
||||
[Timer]
|
||||
OnCalendar=Mon..Fri *-*-* 14:00:00 UTC
|
||||
OnCalendar=Mon..Fri *-*-* 21:30:00 UTC
|
||||
Persistent=true
|
||||
RandomizedDelaySec=15
|
||||
|
||||
@@ -48,35 +48,71 @@ export PYTHONPATH="${WORKSPACE_DIR}/hyperstitionstudio-core/src${PYTHONPATH:+:${
|
||||
export HYPERSTITIONSTUDIO_CONFIG="${HYPERSTITIONSTUDIO_CONFIG:-${WORKSPACE_DIR}/workspace.toml}"
|
||||
FORGE_SSH="${FORGE_SSH:-ssh://git@git.libre.audio:2222/seasharp}"
|
||||
|
||||
EXEGESIS_HOST="${EXEGESIS_HOST:-}"
|
||||
EXEGESIS_UNINSTALL=0
|
||||
SKIP_EXEGESIS_DEPLOY=0
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--exegesis-host=*)
|
||||
EXEGESIS_HOST="${1#*=}"
|
||||
shift
|
||||
;;
|
||||
--exegesis-host)
|
||||
if [[ $# -lt 2 ]] || [[ -z "${2:-}" ]]; then
|
||||
echo "[ERROR] --exegesis-host requires a <user@host> argument." >&2
|
||||
exit 2
|
||||
fi
|
||||
EXEGESIS_HOST="$2"
|
||||
shift 2
|
||||
;;
|
||||
--exegesis-uninstall)
|
||||
EXEGESIS_UNINSTALL=1
|
||||
shift
|
||||
;;
|
||||
--skip-exegesis-deploy)
|
||||
SKIP_EXEGESIS_DEPLOY=1
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
echo "Usage: $0 [--exegesis-host=<user@host>] [--exegesis-uninstall] [--skip-exegesis-deploy]"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unknown option: $1" >&2
|
||||
echo "Usage: $0 [--exegesis-host=<user@host>] [--exegesis-uninstall] [--skip-exegesis-deploy]" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "${EXEGESIS_UNINSTALL}" -eq 1 ]]; then
|
||||
if [[ -z "${EXEGESIS_HOST}" ]] && [[ -t 0 ]]; then
|
||||
read -r -p "Enter target Fedora 41 host (user@host) to uninstall ingglish-isopsephic-exegesis: " EXEGESIS_HOST || EXEGESIS_HOST=""
|
||||
fi
|
||||
if [[ -z "${EXEGESIS_HOST}" ]]; then
|
||||
echo "[ERROR] --exegesis-uninstall requires --exegesis-host=<user@host>." >&2
|
||||
exit 2
|
||||
fi
|
||||
echo "[uninstall] Verifying SSH connectivity to ${EXEGESIS_HOST}..."
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" true
|
||||
echo "[uninstall] Uninstalling ingglish-isopsephic-exegesis on ${EXEGESIS_HOST}..."
|
||||
if [[ -t 0 ]]; then
|
||||
ssh -t "${EXEGESIS_HOST}" sudo rpm -e ingglish-isopsephic-exegesis
|
||||
else
|
||||
ssh "${EXEGESIS_HOST}" sudo rpm -e ingglish-isopsephic-exegesis
|
||||
fi
|
||||
echo "[OK] Cleanly uninstalled ingglish-isopsephic-exegesis from ${EXEGESIS_HOST}."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "[info] WORKSPACE_DIR=${WORKSPACE_DIR}"
|
||||
echo "[info] PYTHONPATH=${PYTHONPATH}"
|
||||
|
||||
echo "[1/3] Running pre-push verification gates (hs-archive-rotate, hs-closeups-sync, hs-readme-sync, version_sync, hs-doctor, logrotate.d/hyperstition-sqlite-meta check, periodic harvest CI/CD flow diagram PNG test, closeups check, test_core_suite, 6-gate graph verifier)..."
|
||||
echo "[1/3] Running pre-push verification gates (hs-archive-rotate, hs-readme-sync, version_sync --corpus-delta, periodic harvest CI/CD flow diagram PNG, Fedora 41 RPM & dry-run, test_core_suite, 6-gate graph verifier)..."
|
||||
run_checked "hs-archive-rotate --enforce-single-compression" python3 -m hyperstitionstud_io.publishing.archive_rotator --workspace-root "${WORKSPACE_DIR}" --enforce-single-compression
|
||||
run_checked "verify docs/archive/archive-manifest.json" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/archive/archive-manifest.json"
|
||||
run_checked "verify docs/plans/inactive/inactive-archive-manifest.json" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/plans/inactive/inactive-archive-manifest.json"
|
||||
run_checked "hs-closeups-sync" python3 -m hyperstitionstud_io.publishing.closeups_sync
|
||||
run_checked "hs-readme-sync --install-hooks" python3 -m hyperstitionstud_io.publishing.readme_sync --install-hooks
|
||||
run_checked "version_sync --check" python3 -m hyperstitionstud_io.version_sync --check
|
||||
run_checked "version_sync --corpus-delta" python3 -m hyperstitionstud_io.version_sync --corpus-delta
|
||||
run_checked "hs-doctor" python3 -m hyperstitionstud_io.ci.doctor
|
||||
run_checked "verify deploy/logrotate.d/hyperstition-sqlite-meta" test -f "${WORKSPACE_DIR}/hyperstitionstudio-core/deploy/logrotate.d/hyperstition-sqlite-meta"
|
||||
run_checked "verify site/assets/hs-matrix-coderain.js" test -s "${WORKSPACE_DIR}/hyperstitionstudio-core/site/assets/hs-matrix-coderain.js"
|
||||
run_checked "verify site/assets/matrix-font.woff2" test -s "${WORKSPACE_DIR}/hyperstitionstudio-core/site/assets/matrix-font.woff2"
|
||||
for q_png in \
|
||||
"quadrant-1-cybermemetics-calc-graph.png" \
|
||||
"quadrant-1-tab-2-graph.png" \
|
||||
"quadrant-2-esoteric-finance-quant.png" \
|
||||
"quadrant-2-tab-2-bayesian-fred.png" \
|
||||
"quadrant-2-tab-3-leaderboard-card.png" \
|
||||
"quadrant-3-info-science-novice-learn-polyglot.png" \
|
||||
"quadrant-3-tab-2-math-guile.png" \
|
||||
"quadrant-3-tab-3-math-ts-rust.png" \
|
||||
"quadrant-4-operators-deployment-vps.png" \
|
||||
"quadrant-4-tab-2-mcp-etag.png" \
|
||||
"quadrant-4-tab-3-ci-gates.png"; do
|
||||
run_checked "verify site/assets/closeups/${q_png}" test -s "${WORKSPACE_DIR}/hyperstitionstudio-core/site/assets/closeups/${q_png}"
|
||||
done
|
||||
run_checked "generate & verify periodic-harvest-cicd-to-vps-flow-diagram.png" python3 -m hyperstitionstud_io.publishing.flow_diagram
|
||||
run_checked "verify periodic-harvest-cicd-to-vps-flow-diagram.png exists" test -s "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png"
|
||||
run_checked "verify Fedora 41 packaging scripts & spec" "${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/build-fedora41-rpm.sh"
|
||||
@@ -85,12 +121,16 @@ python3 "${WORKSPACE_DIR}/hyperstitionstudio-core/tests/test_core_suite.py"
|
||||
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" python3 "${WORKSPACE_DIR}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||
|
||||
echo "[2/3] Verifying git.libre.audio remote URLs across all repositories..."
|
||||
CI_REPO_DIR="hyperdope-ci-build"
|
||||
if [[ ! -d "${WORKSPACE_DIR}/${CI_REPO_DIR}" ]] && [[ -d "${WORKSPACE_DIR}/ingglish-hyperdope-ci" ]]; then
|
||||
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||
fi
|
||||
for pair in \
|
||||
"hyperstitionstudio-core:hyperstitionstudio-core.git" \
|
||||
"ingglish-hyperdope-gematria:ingglish-hyperdope-gematria.git" \
|
||||
"technocapital-singularity-zoology:technocapital-singularity-zoology.git" \
|
||||
"encyclopedia-knowledge-graph:encyclopedia-knowledge-graph.git" \
|
||||
"hyperdope-ci-build:ingglish-hyperdope-ci.git"; do
|
||||
"${CI_REPO_DIR}:ingglish-hyperdope-ci.git"; do
|
||||
rdir="${WORKSPACE_DIR}/${pair%%:*}"
|
||||
rslug="${pair##*:}"
|
||||
ensure_remote_url "${rdir}" origin "${FORGE_SSH}/${rslug}"
|
||||
@@ -108,39 +148,170 @@ push_head_tag() {
|
||||
|
||||
echo "[3/3] Rebasing any automated VPS telemetry commits & pushing all 6 repositories and HEAD release tags in topological dependency order to ${FORGE_SSH}..."
|
||||
echo " -> (1/6) hyperstitionstudio-core (main + HEAD tag)"
|
||||
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" pull --rebase --autostash origin main || true
|
||||
run_checked "git pull --rebase (hyperstitionstudio-core main)" git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" pull --rebase --autostash origin main
|
||||
git -C "${WORKSPACE_DIR}/hyperstitionstudio-core" push -u origin main
|
||||
push_head_tag "${WORKSPACE_DIR}/hyperstitionstudio-core" origin
|
||||
|
||||
echo " -> (2/6) ingglish-hyperdope-gematria (main + HEAD tag)"
|
||||
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" pull --rebase --autostash origin main || true
|
||||
run_checked "git pull --rebase (ingglish-hyperdope-gematria main)" git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" pull --rebase --autostash origin main
|
||||
git -C "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" push -u origin main
|
||||
push_head_tag "${WORKSPACE_DIR}/ingglish-hyperdope-gematria" origin
|
||||
|
||||
echo " -> (3/6) technocapital-singularity-zoology (main + HEAD tag)"
|
||||
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" pull --rebase --autostash origin main || true
|
||||
run_checked "git pull --rebase (technocapital-singularity-zoology main)" git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" pull --rebase --autostash origin main
|
||||
git -C "${WORKSPACE_DIR}/technocapital-singularity-zoology" push -u origin main
|
||||
push_head_tag "${WORKSPACE_DIR}/technocapital-singularity-zoology" origin
|
||||
|
||||
echo " -> (4/6) encyclopedia-knowledge-graph (main + HEAD tag)"
|
||||
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash origin main || true
|
||||
run_checked "git pull --rebase (encyclopedia-knowledge-graph main)" git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" pull --rebase --autostash origin main
|
||||
git -C "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" push -u origin main
|
||||
push_head_tag "${WORKSPACE_DIR}/encyclopedia-knowledge-graph" origin
|
||||
|
||||
echo " -> (5/6) hyperdope-ci-build (feat/ingglish-aq-corpus + HEAD tag)"
|
||||
git -C "${WORKSPACE_DIR}/hyperdope-ci-build" pull --rebase --autostash origin feat/ingglish-aq-corpus || true
|
||||
git -C "${WORKSPACE_DIR}/hyperdope-ci-build" push -u origin feat/ingglish-aq-corpus
|
||||
push_head_tag "${WORKSPACE_DIR}/hyperdope-ci-build" origin
|
||||
echo " -> (5/6) hyperdope-ci-build (${CI_REPO_DIR}, feat/ingglish-aq-corpus + HEAD tag)"
|
||||
run_checked "git pull --rebase (${CI_REPO_DIR} feat/ingglish-aq-corpus)" git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" pull --rebase --autostash origin feat/ingglish-aq-corpus
|
||||
git -C "${WORKSPACE_DIR}/${CI_REPO_DIR}" push -u origin feat/ingglish-aq-corpus
|
||||
push_head_tag "${WORKSPACE_DIR}/${CI_REPO_DIR}" origin
|
||||
|
||||
if [[ -d "${WORKSPACE_DIR}/haiperdohp-jemaytreeah/.git" ]]; then
|
||||
echo " -> (6/6) haiperdohp-jemaytreeah (downstream main, feat/ingglish-aq-corpus, feat/ingglish-priority-toggle + HEAD tag)"
|
||||
ensure_remote_url "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream "${FORGE_SSH}/haiperdohp-jemaytreeah.git"
|
||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" fetch downstream || true
|
||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream main || true
|
||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-aq-corpus || true
|
||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-priority-toggle || true
|
||||
run_checked "git fetch downstream (haiperdohp-jemaytreeah)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" fetch downstream
|
||||
run_checked "git pull --rebase (haiperdohp-jemaytreeah main)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream main
|
||||
run_checked "git pull --rebase (haiperdohp-jemaytreeah feat/ingglish-aq-corpus)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-aq-corpus
|
||||
run_checked "git pull --rebase (haiperdohp-jemaytreeah feat/ingglish-priority-toggle)" git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" pull --rebase --autostash downstream feat/ingglish-priority-toggle
|
||||
git -C "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" push downstream main feat/ingglish-aq-corpus feat/ingglish-priority-toggle
|
||||
push_head_tag "${WORKSPACE_DIR}/haiperdohp-jemaytreeah" downstream
|
||||
fi
|
||||
|
||||
echo "[OK] All 6 repositories and release tags pushed to ${FORGE_SSH}."
|
||||
|
||||
if [[ "${SKIP_EXEGESIS_DEPLOY}" -eq 1 ]]; then
|
||||
echo "[info] Skipping Fedora 41 exegesis RPM over-the-wire deployment (--skip-exegesis-deploy)."
|
||||
elif [[ -z "${EXEGESIS_HOST}" ]] && [[ -t 0 ]]; then
|
||||
read -r -p "Deploy built Fedora 41 exegesis RPM over the wire via SSH? [y/N / enter user@host]: " EXEGESIS_INPUT || EXEGESIS_INPUT=""
|
||||
EXEGESIS_INPUT="${EXEGESIS_INPUT#"${EXEGESIS_INPUT%%[![:space:]]*}"}"
|
||||
EXEGESIS_INPUT="${EXEGESIS_INPUT%"${EXEGESIS_INPUT##*[![:space:]]}"}"
|
||||
case "${EXEGESIS_INPUT}" in
|
||||
""|n|N|no|NO)
|
||||
echo "[info] Skipping Fedora 41 exegesis RPM over-the-wire deployment."
|
||||
;;
|
||||
y|Y|yes|YES)
|
||||
read -r -p "Enter target Fedora 41 host (user@host or IP): " EXEGESIS_HOST || EXEGESIS_HOST=""
|
||||
EXEGESIS_HOST="${EXEGESIS_HOST#"${EXEGESIS_HOST%%[![:space:]]*}"}"
|
||||
EXEGESIS_HOST="${EXEGESIS_HOST%"${EXEGESIS_HOST##*[![:space:]]}"}"
|
||||
;;
|
||||
*)
|
||||
EXEGESIS_HOST="${EXEGESIS_INPUT}"
|
||||
;;
|
||||
esac
|
||||
elif [[ -z "${EXEGESIS_HOST}" ]]; then
|
||||
echo "[info] Non-interactive session and --exegesis-host not set; skipping Fedora 41 exegesis RPM deployment."
|
||||
fi
|
||||
|
||||
if [[ "${SKIP_EXEGESIS_DEPLOY}" -eq 0 ]] && [[ -n "${EXEGESIS_HOST}" ]]; then
|
||||
echo "[deploy] Verifying SSH connectivity to ${EXEGESIS_HOST}..."
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" true
|
||||
|
||||
RPM_FILE=""
|
||||
shopt -s nullglob
|
||||
RPM_CANDIDATES=(
|
||||
"${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging"/ingglish-isopsephic-exegesis-*.fc41.noarch.rpm
|
||||
"${WORKSPACE_DIR}/untracked/rpm-builds"/ingglish-isopsephic-exegesis-*.fc41.noarch.rpm
|
||||
)
|
||||
shopt -u nullglob
|
||||
if [[ ${#RPM_CANDIDATES[@]} -gt 0 ]]; then
|
||||
RPM_FILE="$(printf '%s\n' "${RPM_CANDIDATES[@]}" | sort -V | tail -n 1)"
|
||||
fi
|
||||
if [[ -z "${RPM_FILE}" ]] || [[ ! -f "${RPM_FILE}" ]]; then
|
||||
echo "[ERROR] No built Fedora 41 RPM found in ${WORKSPACE_DIR}/ingglish-hyperdope-gematria/packaging/ or ${WORKSPACE_DIR}/untracked/rpm-builds/." >&2
|
||||
exit 1
|
||||
fi
|
||||
RPM_NAME="$(basename "${RPM_FILE}")"
|
||||
RPM_SIZE_BYTES="$(wc -c < "${RPM_FILE}" | tr -d '[:space:]')"
|
||||
MIN_STAGE_KB="$(( (RPM_SIZE_BYTES + 1023) / 1024 + 1024 ))"
|
||||
echo "[deploy] Found built RPM: ${RPM_FILE} (${RPM_SIZE_BYTES} bytes)"
|
||||
|
||||
echo "[deploy] Resolving writable remote staging directory on ${EXEGESIS_HOST} (need >= ${MIN_STAGE_KB} KiB)..."
|
||||
REMOTE_STAGE_DIR="$(
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" bash -s -- "${MIN_STAGE_KB}" <<'EOF_STAGE'
|
||||
set -euo pipefail
|
||||
min_kb="${1:-2048}"
|
||||
home_dir="${HOME:-$(pwd)}"
|
||||
for cand in "/tmp" "${home_dir}/.cache/rpm-stage" "${home_dir}/rpm-stage"; do
|
||||
created_parent=0
|
||||
if [[ "${cand}" != "/tmp" ]]; then
|
||||
if [[ ! -d "${cand}" ]]; then
|
||||
mkdir -p "${cand}" || continue
|
||||
created_parent=1
|
||||
fi
|
||||
fi
|
||||
if [[ ! -d "${cand}" ]] || [[ ! -w "${cand}" ]]; then
|
||||
continue
|
||||
fi
|
||||
if mount_opts="$(findmnt -n -o OPTIONS -T "${cand}" 2>&1)"; then
|
||||
mount_opts="${mount_opts//[[:space:]]/}"
|
||||
case ",${mount_opts}," in
|
||||
*,noexec,*)
|
||||
if [[ "${created_parent}" -eq 1 ]]; then
|
||||
rmdir "${cand}" || true
|
||||
fi
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
avail_kb="$(df -Pk "${cand}" 2>&1 | awk 'NR==2 {print $4}')"
|
||||
case "${avail_kb}" in
|
||||
''|*[!0-9]*) avail_kb=0 ;;
|
||||
esac
|
||||
if [[ "${avail_kb}" -lt "${min_kb}" ]]; then
|
||||
if [[ "${created_parent}" -eq 1 ]]; then
|
||||
rmdir "${cand}" || true
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
if stage_dir="$(mktemp -d "${cand}/ingglish-exegesis-stage.XXXXXX" 2>&1)"; then
|
||||
if [[ -d "${stage_dir}" ]] && [[ -w "${stage_dir}" ]]; then
|
||||
printf '%s\n' "${stage_dir}"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
if [[ "${created_parent}" -eq 1 ]]; then
|
||||
rmdir "${cand}" || true
|
||||
fi
|
||||
done
|
||||
echo "[ERROR] Failed to resolve a writable remote staging directory with >= ${min_kb} KiB free and without noexec." >&2
|
||||
exit 1
|
||||
EOF_STAGE
|
||||
)"
|
||||
if [[ -z "${REMOTE_STAGE_DIR}" ]]; then
|
||||
echo "[ERROR] Remote staging directory resolution returned an empty path on ${EXEGESIS_HOST}." >&2
|
||||
exit 1
|
||||
fi
|
||||
REMOTE_RPM_PATH="${REMOTE_STAGE_DIR}/${RPM_NAME}"
|
||||
echo "[deploy] Using remote staging directory: ${REMOTE_STAGE_DIR}"
|
||||
|
||||
cleanup_remote_stage() {
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=5 "${EXEGESIS_HOST}" "rm -rf '${REMOTE_STAGE_DIR}'; if [ -d \"\${HOME}/.cache/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/.cache/rpm-stage\" || true; fi; if [ -d \"\${HOME}/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/rpm-stage\" || true; fi" || true
|
||||
}
|
||||
|
||||
echo "[deploy] Transferring ${RPM_NAME} to ${EXEGESIS_HOST}:${REMOTE_RPM_PATH}..."
|
||||
if ! scp "${RPM_FILE}" "${EXEGESIS_HOST}:${REMOTE_RPM_PATH}"; then
|
||||
cleanup_remote_stage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[deploy] Installing/upgrading ${RPM_NAME} on ${EXEGESIS_HOST}..."
|
||||
INSTALL_CMD="rc=0; sudo rpm -Uvh --replacepkgs '${REMOTE_RPM_PATH}' || rc=\$?; rm -rf '${REMOTE_STAGE_DIR}'; if [ -d \"\${HOME}/.cache/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/.cache/rpm-stage\" || true; fi; if [ -d \"\${HOME}/rpm-stage\" ]; then rmdir --ignore-fail-on-non-empty \"\${HOME}/rpm-stage\" || true; fi; exit \${rc}"
|
||||
if [[ -t 0 ]]; then
|
||||
ssh -t "${EXEGESIS_HOST}" "${INSTALL_CMD}"
|
||||
else
|
||||
ssh "${EXEGESIS_HOST}" "${INSTALL_CMD}"
|
||||
fi
|
||||
|
||||
echo "[deploy] Running in-situ dry-run verification on ${EXEGESIS_HOST}..."
|
||||
ssh -t "${EXEGESIS_HOST}" "sudo -u ingglish /usr/bin/ingglish-exegesis-push --dry-run || sudo /usr/bin/ingglish-exegesis-push --dry-run"
|
||||
echo "[deploy] Verifying systemd timer state on ${EXEGESIS_HOST}..."
|
||||
ssh "${EXEGESIS_HOST}" "systemctl is-enabled ingglish-exegesis.timer || true"
|
||||
echo "[OK] Verified in-situ execution of /usr/bin/ingglish-exegesis-push --dry-run on ${EXEGESIS_HOST}."
|
||||
echo "[rollback] To reverse this installation on ${EXEGESIS_HOST}, run: ssh ${EXEGESIS_HOST} sudo rpm -e ingglish-isopsephic-exegesis"
|
||||
fi
|
||||
@@ -69,6 +69,24 @@ for arg in "$@"; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "${WINDOW_MODE}" == "auto" ]]; then
|
||||
UTC_HOUR="$(date -u +%H)"
|
||||
case "${UTC_HOUR}" in
|
||||
13|14|15)
|
||||
WINDOW_MODE="us-pre-market-open"
|
||||
;;
|
||||
21|22|23)
|
||||
WINDOW_MODE="us-closing-bell"
|
||||
;;
|
||||
00|01|02)
|
||||
WINDOW_MODE="utc-rollover"
|
||||
;;
|
||||
*)
|
||||
WINDOW_MODE="us-closing-bell"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
LOCK_FILE="${HYPERSTITION_HARVEST_LOCK:-/tmp/hyperstition-vps-harvest.lock}"
|
||||
if [[ -n "$(type -P flock || true)" ]]; then
|
||||
exec 9>"${LOCK_FILE}"
|
||||
@@ -90,9 +108,9 @@ if [[ "${PUSH_ONLY}" -eq 0 ]]; then
|
||||
run_checked "hs-macro-harvest (live FRED CSV)" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.macro
|
||||
fi
|
||||
if [[ "${WINDOW_MODE}" == "utc-rollover" ]] && [[ -f "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" ]]; then
|
||||
CI_OUT_DIR="${REPOS_ROOT}/ingglish-hyperdope-ci"
|
||||
if [[ ! -d "${CI_OUT_DIR}" ]] && [[ -d "${REPOS_ROOT}/hyperdope-ci-build" ]]; then
|
||||
CI_OUT_DIR="${REPOS_ROOT}/hyperdope-ci-build"
|
||||
CI_OUT_DIR="${REPOS_ROOT}/hyperdope-ci-build"
|
||||
if [[ ! -d "${CI_OUT_DIR}" ]] && [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]]; then
|
||||
CI_OUT_DIR="${REPOS_ROOT}/ingglish-hyperdope-ci"
|
||||
fi
|
||||
if [[ -d "${CI_OUT_DIR}" ]]; then
|
||||
run_checked "ci_provision_ingglish.py (--tier 2)" "${PYTHON_BIN}" "${REPOS_ROOT}/ingglish-hyperdope-gematria/ingglish-aq-archive/scripts/ci_provision_ingglish.py" \
|
||||
@@ -102,7 +120,7 @@ if [[ "${PUSH_ONLY}" -eq 0 ]]; then
|
||||
fi
|
||||
fi
|
||||
run_checked "quant.timeseries" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.timeseries
|
||||
run_checked "hs-daily-brief" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.daily_brief
|
||||
run_checked "hs-daily-brief" "${PYTHON_BIN}" -m hyperstitionstud_io.quant.daily_brief --window "${WINDOW_MODE}"
|
||||
run_checked "build_encyclopedia_knowledge_graph.py" "${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||
|
||||
echo "[2/5] Running Stage 3 transactional verification gates (hs-doctor, ReadOnlyIsolationGuard, test_core_suite)..."
|
||||
|
||||
@@ -95,10 +95,10 @@ if [[ -f "${REPOS_ROOT}/workspace.toml" ]]; then
|
||||
export HYPERSTITIONSTUDIO_CONFIG="${REPOS_ROOT}/workspace.toml"
|
||||
fi
|
||||
|
||||
# Detect whether the CI artifact repository is cloned as ingglish-hyperdope-ci or hyperdope-ci-build
|
||||
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||
if [[ ! -d "${REPOS_ROOT}/${CI_REPO_DIR}" ]] && [[ -d "${REPOS_ROOT}/hyperdope-ci-build" ]]; then
|
||||
CI_REPO_DIR="hyperdope-ci-build"
|
||||
# Detect whether the CI artifact repository is cloned as hyperdope-ci-build (canonical) or ingglish-hyperdope-ci
|
||||
CI_REPO_DIR="hyperdope-ci-build"
|
||||
if [[ ! -d "${REPOS_ROOT}/${CI_REPO_DIR}" ]] && [[ -d "${REPOS_ROOT}/ingglish-hyperdope-ci" ]]; then
|
||||
CI_REPO_DIR="ingglish-hyperdope-ci"
|
||||
fi
|
||||
|
||||
REPOS=(
|
||||
@@ -213,6 +213,10 @@ if p.is_file():
|
||||
p.write_text(u, encoding="utf-8")
|
||||
'
|
||||
fi
|
||||
if [[ -f "${REPOS_ROOT}/hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh" ]]; then
|
||||
cp -f "${REPOS_ROOT}/hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh" "${REPOS_ROOT}/push-all-to-git-libre-audio.sh"
|
||||
chmod 0755 "${REPOS_ROOT}/push-all-to-git-libre-audio.sh"
|
||||
fi
|
||||
run_checked "hs-readme-sync --hooks-only" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --hooks-only
|
||||
run_checked "hs-deploy-scripts-sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${REPOS_ROOT}" --check
|
||||
run_checked "hs-closeups-sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.publishing.closeups_sync --check
|
||||
@@ -248,8 +252,10 @@ for entry in "${REPOS[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]] && [[ ! -e "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
|
||||
if [[ "${CI_REPO_DIR}" == "hyperdope-ci-build" ]] && [[ -d "${LIVE_REPOS}/hyperdope-ci-build" ]]; then
|
||||
${LIVE_SUDO} ln -sfn "hyperdope-ci-build" "${LIVE_REPOS}/ingglish-hyperdope-ci"
|
||||
elif [[ "${CI_REPO_DIR}" == "ingglish-hyperdope-ci" ]] && [[ -d "${LIVE_REPOS}/ingglish-hyperdope-ci" ]]; then
|
||||
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/hyperdope-ci-build"
|
||||
fi
|
||||
|
||||
# Create relative route symlinks inside LIVE_REPOS so both Caddy and standalone HTTP servers resolve all active routes
|
||||
@@ -287,7 +293,7 @@ ${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology/encyclopedia" "${LIVE_RE
|
||||
${LIVE_SUDO} ln -sfn "technocapital-singularity-zoology" "${LIVE_REPOS}/zoology"
|
||||
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-gematria/ingglish-aq-archive" "${LIVE_REPOS}/archive"
|
||||
${LIVE_SUDO} ln -sfn "haiperdohp-jemaytreeah" "${LIVE_REPOS}/calc"
|
||||
${LIVE_SUDO} ln -sfn "ingglish-hyperdope-ci" "${LIVE_REPOS}/ci"
|
||||
${LIVE_SUDO} ln -sfn "${CI_REPO_DIR}" "${LIVE_REPOS}/ci"
|
||||
${LIVE_SUDO} ln -sfn "hyperstitionstudio-core/schemas" "${LIVE_REPOS}/schemas"
|
||||
|
||||
echo "[4/5] Pre-compressing static HTML, JS, JSON, XML, Canvas, MD & CSS assets (< 5 MB) (.br / .gz) incrementally in parallel & enforcing single-layer (1x) compression..."
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
# Global Plan Specification, Operational Governance & Flexibility Standard
|
||||
|
||||
**Document ID:** `PLAN-SPECIFICATION-AND-GOVERNANCE-STANDARD`
|
||||
**Plan Reference:** `PLAN-QUANT-PRE-MARKET-OPEN-DAILY-BRIEF-AND-REGIME-CADENCE` (`Plan #72`)
|
||||
**Scope:** Architectural planning, technical project management, release lifecycle governance, and operational execution across all 6 `hyperstitionstud.io` repositories.
|
||||
|
||||
---
|
||||
|
||||
## 1. Purpose & Foundational Invariants
|
||||
|
||||
This standard formalizes the operational and architectural planning methodology across the `hyperstitionstud.io` ecosystem to ensure that all project management deliverables are legible, understandable, and comprehensively sound.
|
||||
|
||||
### Core Invariants
|
||||
1. **Strict Planning vs. Implementation Boundary:** When asked to plan, the deliverable is strictly the architectural planning artifact (`.md` and compiled Dark-Mode ReportLab `.pdf` under `docs/plans/active/` or `docs/plans/piecewise/`, plus `references/roadmap-plan-ledger.md`), never unverified production code, partial stubs, or uncommitted working tree mutations.
|
||||
2. **First-Resort Infrastructure Audit:** Existing automation infrastructure (systemd timers, cron rules, collector modules, cache tables) must be evaluated and prioritized before proposing net-new services or files. Creating new services or cron files is strictly a last resort.
|
||||
3. **Comprehensive Lifecycle Scope:** Every plan must address end-to-end downstream impacts: data pipeline integrity, state archiving, single-layer (1x) compression, git repository commit cadence, and deployment script readiness (`DEPLOY-GATE-D01.MIRROR_PARITY` through `DEPLOY-GATE-D08.PRE_COMMIT_STAGE`).
|
||||
4. **Disambiguated Prose & Comments:** All shorthand references in prose and comments must comply with `<PREFIX><NN>.<DOMAIN_TAG>` (e.g., `PANEL-P06.DAILY_BRIEF`, `REGIME-R01.BULL_RISK_ON`), while executable code remains globally exempt.
|
||||
5. **Dual-Artifact Delivery:** Every active or piecewise plan is authored as version-controlled Markdown and immediately compiled to an offline-accessible Dark-Mode PDF via `hs-pdf-build`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Three-Tier Flexibility Protocol ("Strict by Default, Flexible on Demand")
|
||||
|
||||
To provide institutional rigor without creating bureaucratic bottlenecks during rapid prototyping or ad-hoc analysis, planning follows a 3-tier flexibility protocol:
|
||||
|
||||
```
|
||||
Planning Tier Selection Model
|
||||
+----------------------------------------------------------------------------------------------------+
|
||||
| Tier 1: Standard Production Architectural Plan [DEFAULT] |
|
||||
| Trigger: "plan to ...", "architect ...", or standard feature/release requests |
|
||||
| Scope: Full 8-section specification, Dark-Mode PDF, ledger entry, VPS audit, gates, rollout |
|
||||
| Target: docs/plans/active/PLAN-<SLUG>.{md,pdf} or docs/plans/piecewise/PLAN-<SLUG>.{md,pdf} |
|
||||
+----------------------------------------------------------------------------------------------------+
|
||||
|
|
||||
(If explicitly requested)
|
||||
v
|
||||
+----------------------------------------------------------------------------------------------------+
|
||||
| Tier 2: Lightweight Tactical Memo [EXPLICIT OVERRIDE] |
|
||||
| Trigger: "lightweight plan", "brief plan", "memo: ...", "draft outline only" |
|
||||
| Scope: Focused 1–2 page technical delta, core trade-offs, and verification commands |
|
||||
| Skips: Full VPS infrastructure audit, compression analysis, PDF compilation (unless requested) |
|
||||
| Target: docs/plans/active/PLAN-<SLUG>.md or inline CLI delivery |
|
||||
+----------------------------------------------------------------------------------------------------+
|
||||
|
|
||||
(If explicitly requested)
|
||||
v
|
||||
+----------------------------------------------------------------------------------------------------+
|
||||
| Tier 3: Exploratory Scratchpad / Spike [EXPLICIT OVERRIDE] |
|
||||
| Trigger: "spike:", "scratchpad:", "throwaway spike:", "ad-hoc exploration:" |
|
||||
| Scope: Unformatted notes, quick spikes, throwaway experiment scripts |
|
||||
| Invariants: Written strictly to /workspace/untracked/; 0 ledger entries; 0 git commits |
|
||||
+----------------------------------------------------------------------------------------------------+
|
||||
```
|
||||
|
||||
### Protocol Rules
|
||||
- **Default Behavior:** The agent always operates at **Tier 1** unless an explicit prompt marker matches Tier 2 or Tier 3.
|
||||
- **Override Handling:** When an override is requested, the agent acknowledges the lighter tier in a single line (e.g., `[Tier 2 Lightweight Memo requested; skipping PDF compilation and VPS scheduling audit]`) and proceeds immediately with the focused delta.
|
||||
|
||||
---
|
||||
|
||||
## 3. Mandatory Sections for Tier 1 Production Architectural Plans
|
||||
|
||||
Tier 1 Production Plans must contain the following standard sections:
|
||||
|
||||
### 1. Document Metadata & Header
|
||||
- Document ID: `PLAN-<TOPIC-SLUG>`
|
||||
- Status: `ACTIVE (docs/plans/active/)` or `PIECEWISE (docs/plans/piecewise/)`
|
||||
- Target Ecosystem Version: `vX.Y.Z` (with baseline)
|
||||
- Target Repositories: Specific repository slugs
|
||||
- Target Surfaces: Affected web routes, CLI tools, or background timers
|
||||
- Web Route: Canonical public HTTPS URL for the compiled companion PDF
|
||||
- Author & Date
|
||||
|
||||
### 2. Operational Objective & Motivation
|
||||
- Plain-statement summary of the deliverable.
|
||||
- Domain motivation and measurable delta (e.g., information asymmetry advantage, memory reduction, latency bounds).
|
||||
|
||||
### 3. Existing Infrastructure Audit & Scheduling Hierarchy
|
||||
- Exhaustive audit of all existing automation surfaces (timers, cron, modules).
|
||||
- Explicit 3-stage candidate hierarchy:
|
||||
- **Strategy A (First Resort):** Maximally reuses existing units (e.g., multi-calendar systemd timer).
|
||||
- **Strategy B (Second Resort):** Reuses existing files (e.g., cron multiplexing).
|
||||
- **Strategy C (Strict Last Resort):** Dedicated net-new services/files, evaluated only if A and B are blocked.
|
||||
|
||||
### 4. Data Pipeline Integrity & Transactional Rollback Safety
|
||||
- End-to-end data flow: Harvesters -> Compilers -> Verification -> RAM Hydration -> Push.
|
||||
- Zero-synthetic-data compliance (`PLAN-GATE-G01.EXTANT_DATA`).
|
||||
- Transactional rollback on verification failure (`git checkout -- .` without touching tmpfs).
|
||||
|
||||
### 5. Archiving & Historical Ledger Evolution
|
||||
- Ledger format, storage path, and schema definition.
|
||||
- Deduplication semantics and session-window discrimination (`session_window`).
|
||||
- Retention window capacity and quiescent SQLite compaction (`sqlite_meta.py --compress-archive`).
|
||||
|
||||
### 6. Compression Standards & Optimization Guarantees
|
||||
- Single-Layer (1x) Compression Invariant (`PLAN-SINGLE-LAYER-COMPRESSION-ENFORCEMENT-AND-MULTI-COMPRESSED-FILE-REMEDIATION`).
|
||||
- Webroot pre-compression (`.gz` via `gzip -9` and `.br` via `brotli -q 11`).
|
||||
- Server-side bundle size caps (`--max-bundle-kb 256`).
|
||||
|
||||
### 7. Git Repository Commit Cadence & Telemetry Reconciliation
|
||||
- Automated commit frequency and commit message templates (`chore(telemetry): ...`).
|
||||
- Gating: commits occur strictly when `git diff --cached` detects substantive changes.
|
||||
- Lossless telemetry reconciliation (`DEPLOY-GATE-D04.LOSSLESS_TELEMETRY` via `--snapshot-telemetry` and `--reconcile-telemetry`).
|
||||
|
||||
### 8. Stepwise Verification Gates & Acceptance Criteria
|
||||
- Tabulated binary verification gates with explicit command-line invocations.
|
||||
|
||||
### 9. Implementation Rollout Sequence
|
||||
- Phased, non-breaking rollout steps.
|
||||
|
||||
---
|
||||
|
||||
## 4. 5-Tier Plan Classification & Lifecycle Hierarchy
|
||||
|
||||
Plans reside in designated filesystem locations under `encyclopedia-knowledge-graph/docs/plans/`:
|
||||
|
||||
| Tier | Classification | Filesystem Directory | PDF Compilation Policy |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **Tier 1** | Active Non-Piecewise | `docs/plans/active/` | Mandatory Dark-Mode `.pdf` |
|
||||
| **Tier 2** | Fully Affirmed Piecewise | `docs/plans/piecewise/` | Mandatory Dark-Mode `.pdf` |
|
||||
| **Tier 3** | Partially Affirmed Piecewise | `docs/plans/piecewise/` | Mandatory Dark-Mode `.pdf` |
|
||||
| **Tier 4** | Pending Audit Piecewise | `docs/plans/piecewise/` | Mandatory Dark-Mode `.pdf` |
|
||||
| **Tier 5.1** | Retained Inactive / Deferred | `docs/plans/inactive/` | Zero PDF compilation/recompilation |
|
||||
| **Tier 5.2** | Cold-Archived Inactive | `docs/plans/inactive/inactive-plans-archive.tar.gz` | Zero PDF; manifests record SHA-256 |
|
||||
| **Tier 5.3** | Cold-Archived Completed | `docs/archive/completed-plans-archive.tar.gz` | `.md`-only tarball; manifest records SHA-256 |
|
||||
|
||||
---
|
||||
|
||||
## 5. Automated Plan Verification (`hs-plan-lint`)
|
||||
|
||||
The plan specification validator (`hyperstitionstud_io.ci.plan_validator`) enforces:
|
||||
1. Every `.md` in `docs/plans/active/` and `docs/plans/piecewise/` has a matching `.pdf` in the same directory.
|
||||
2. Every active and piecewise plan has an entry in `references/roadmap-plan-ledger.md`.
|
||||
3. All mandatory metadata fields (`Document ID:`, `Status:`, `Target Ecosystem Version:`, `Target Repositories:`) are present.
|
||||
4. Shorthands comply with `hs-shorthand-lint`.
|
||||
5. No bare container host paths are serialized.
|
||||
@@ -1,2 +1,2 @@
|
||||
// Auto-generated by hyperstitionstud_io.quant.daily_brief — DO NOT EDIT MANUALLY
|
||||
window.HYPERSTITION_DAILY_BRIEF = {"$schema": "./schemas/v1/daily-portfolio-brief.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief", "version": "2.17.1", "run_number": 21, "generated_at_utc": "2026-12-02T14:13:45Z", "synthetic_data_eliminated": true, "agenda_1_executive_summary": {"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.", "high_impact_findings_ranked": [{"rank": 1, "theme": "Dose 2 Isometric Pinning Dominance vs. Dose 3+ Tail Exhaustion", "durability_score": 0.84, "severity_score": 0.78, "portfolio_impact_probability": 0.81, "evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=42) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 9 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."}, {"rank": 2, "theme": "FRED Overnight Rate & Pipeline Margin Lock (EFFR = 388 bps, PPI MoM = -19 bps -> 137)", "durability_score": 0.88, "severity_score": 0.72, "portfolio_impact_probability": 0.79, "evidence": "EFFR holds at 3.88% (388 bps == 388 Knowledge Graph nodes) with SOFR at 3.98% (+10 bps repo spread), while PPI MoM (-19 bps -> 'nineteen'/'nainteen' = 137 [G4 Isometric]) undercuts CPI MoM (+35 bps -> 166) by -54 bps."}, {"rank": 3, "theme": "Synchronous Crypto & AI Hardware Coordinate Locks (BTC/ETH -91 bps, GOOGL -108 bps -> 292, SOL $73.07 == 73)", "durability_score": 0.76, "severity_score": 0.74, "portfolio_impact_probability": 0.75, "evidence": "SOL-USD locked onto its own ticker AQ ($73.07 == SOL=73) before surging +536 bps next day; GOOGL -108 bps locked onto Gen 0 292 (Dossier 62); BTC-USD and ETH-USD posted a simultaneous -91 bps (kampyoot=91) lock on 2026-11-26/28."}], "risk_on_off_barometers": {"vix_close": 19.26, "us10y_yield_pct": 5.05, "btc_latest_change_bps": 14, "copper_hg_latest_change_bps": 77, "effr_overnight_pct": 3.88, "sofr_overnight_pct": 3.98, "sofr_minus_effr_spread_bps": 10, "real_m2_mom_growth_bps": 16}, "bayesian_regime_inference": {"extant_priors": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "likelihood_factors": {"R1_BULL_RISK_ON": 0.9775, "R2_PINNED_ISOMETRIC": 1.0465, "R3_TAIL_DRAWDOWN_RISK_OFF": 2.125}, "posterior_probabilities": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "scenarios": {"best_case_r1_bull_risk_on": {"probability": 0.0, "label": "Best Case — Risk-On Expansion & Smooth Trend Continuation", "expected_daily_excursion_bps": "P50: +180 to +240 bps (Up-skewed S1/S2 leadership)", "drivers": "Real M2 positive growth (+16 bps MoM), easing PPI pipeline (-19 bps MoM), and VIX compression."}, "base_case_r2_pinned_isometric": {"probability": 0.0, "label": "Base Case — Vector G1/G4 Isometric Attractor Pinning (Dose 2 Regime)", "expected_daily_excursion_bps": "P50: 101.0 bps | P90 Tail: 292.0 bps (-58% variance compression vs. Dose 0)", "drivers": "Cross-species Market Ring × Same-Day Dossier Coordinate locks without headline shocks (60.6% next-day continuation)."}, "worst_case_r3_tail_drawdown": {"probability": 1.0, "label": "Worst Case — Dose 3+ Phase-Transition Drawdown & Sovereign Yield Tightening", "expected_daily_excursion_bps": "Next-Day Mean: -377.5 bps | 3-Day Cumulative Excursion: 1,395.0 bps (~13.95%)", "drivers": "US10Y near 4.85%-4.94% + triple-species Dose 3+ collisions (100% downside skew & 1.98x mean volume in Nov 2026)."}}}}, "agenda_2_confirming_signals": {"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.", "active_dose2_confirmations": [{"date_utc": "2026-12-01", "symbol": "RTX", "entity_ing": "raytheeon", "close_usd": 200.21, "change_bps": 60, "volume_ratio_20d": 0.71, "shared_dossier_coordinates": [], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "MSFT", "entity_ing": "maikrohsawft", "close_usd": 487.2, "change_bps": -115, "volume_ratio_20d": 1.39, "shared_dossier_coordinates": [115], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "LMT", "entity_ing": "lokheed", "close_usd": 610.65, "change_bps": 79, "volume_ratio_20d": 1.91, "shared_dossier_coordinates": [], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "BTC-USD", "entity_ing": "bitkoin", "close_usd": 59696.43, "change_bps": -44, "volume_ratio_20d": 0.77, "shared_dossier_coordinates": [189], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-29", "symbol": "SOL-USD", "entity_ing": "sohlana", "close_usd": 71.34, "change_bps": 125Line truncated
|
||||
window.HYPERSTITION_DAILY_BRIEF = {"$schema": "./schemas/v1/daily-portfolio-brief.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief", "version": "2.17.1", "run_number": 17, "session_window": "utc-rollover", "generated_at_utc": "2026-12-06T00:00:24Z", "synthetic_data_eliminated": true, "agenda_1_executive_summary": {"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.", "high_impact_findings_ranked": [{"rank": 1, "theme": "Dose 2 Isometric Pinning Dominance vs. Dose 3+ Tail Exhaustion", "durability_score": 0.84, "severity_score": 0.78, "portfolio_impact_probability": 0.81, "evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=44) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 9 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."}, {"rank": 2, "theme": "FRED Overnight Rate & Pipeline Margin Lock (EFFR = 388 bps, PPI MoM = -19 bps -> 137)", "durability_score": 0.88, "severity_score": 0.72, "portfolio_impact_probability": 0.79, "evidence": "EFFR holds at 3.88% (388 bps == 388 Knowledge Graph nodes) with SOFR at 3.98% (+10 bps repo spread), while PPI MoM (-19 bps -> 'nineteen'/'nainteen' = 137 [G4 Isometric]) undercuts CPI MoM (+35 bps -> 166) by -54 bps."}, {"rank": 3, "theme": "Synchronous Crypto & AI Hardware Coordinate Locks (BTC/ETH -91 bps, GOOGL -108 bps -> 292, SOL $73.07 == 73)", "durability_score": 0.76, "severity_score": 0.74, "portfolio_impact_probability": 0.75, "evidence": "SOL-USD locked onto its own ticker AQ ($73.07 == SOL=73) before surging +536 bps next day; GOOGL -108 bps locked onto Gen 0 292 (Dossier 62); BTC-USD and ETH-USD posted a simultaneous -91 bps (kampyoot=91) lock on 2026-11-26/28."}], "risk_on_off_barometers": {"vix_close": 21.67, "us10y_yield_pct": 5.02, "btc_latest_change_bps": -925, "copper_hg_latest_change_bps": 104, "effr_overnight_pct": 3.89, "sofr_overnight_pct": 3.93, "sofr_minus_effr_spread_bps": 4, "real_m2_mom_growth_bps": 16}, "bayesian_regime_inference": {"extant_priors": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "likelihood_factors": {"R1_BULL_RISK_ON": 0.9775, "R2_PINNED_ISOMETRIC": 1.0465, "R3_TAIL_DRAWDOWN_RISK_OFF": 2.8687}, "posterior_probabilities": {"R1_BULL_RISK_ON": 0.0, "R2_PINNED_ISOMETRIC": 0.0, "R3_TAIL_DRAWDOWN_RISK_OFF": 1.0}, "scenarios": {"best_case_r1_bull_risk_on": {"probability": 0.0, "label": "Best Case — Risk-On Expansion & Smooth Trend Continuation", "expected_daily_excursion_bps": "P50: +180 to +240 bps (Up-skewed S1/S2 leadership)", "drivers": "Real M2 positive growth (+16 bps MoM), easing PPI pipeline (-19 bps MoM), and VIX compression."}, "base_case_r2_pinned_isometric": {"probability": 0.0, "label": "Base Case — Vector G1/G4 Isometric Attractor Pinning (Dose 2 Regime)", "expected_daily_excursion_bps": "P50: 101.0 bps | P90 Tail: 292.0 bps (-58% variance compression vs. Dose 0)", "drivers": "Cross-species Market Ring × Same-Day Dossier Coordinate locks without headline shocks (60.6% next-day continuation)."}, "worst_case_r3_tail_drawdown": {"probability": 1.0, "label": "Worst Case — Dose 3+ Phase-Transition Drawdown & Sovereign Yield Tightening", "expected_daily_excursion_bps": "Next-Day Mean: -377.5 bps | 3-Day Cumulative Excursion: 1,395.0 bps (~13.95%)", "drivers": "US10Y near 4.85%-4.94% + triple-species Dose 3+ collisions (100% downside skew & 1.98x mean volume in Nov 2026)."}}}}, "agenda_2_confirming_signals": {"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.", "active_dose2_confirmations": [{"date_utc": "2026-12-03", "symbol": "ORCL", "entity_ing": "orakal", "close_usd": 107.69, "change_bps": 47, "volume_ratio_20d": 0.78, "shared_dossier_coordinates": [], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-12-02", "symbol": "AMD", "entity_ing": "ayemdee", "close_usd": 457.75, "change_bps": -128, "volume_ratio_20d": 0.49, "shared_dossier_coordinates": [128], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-12-01", "symbol": "RTX", "entity_ing": "raytheeon", "close_usd": 200.21, "change_bps": 60, "volume_ratio_20d": 0.71, "shared_dossier_coordinates": [], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "MSFT", "entity_ing": "maikrohsawft", "close_usd": 487.2, "change_bps": -115, "volume_ratio_20d": 1.39, "shared_dossier_coordinates": [115], "dose_taxon_label": "Dose 2: G1/G4 Pinning Well"}, {"date_utc": "2026-11-30", "symbol": "LMT", "entity_ing": "lokheed", "close_usLine truncated
|
||||
@@ -2,8 +2,9 @@
|
||||
"$schema": "./schemas/v1/daily-portfolio-brief.schema.json",
|
||||
"$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief",
|
||||
"version": "2.17.1",
|
||||
"run_number": 21,
|
||||
"generated_at_utc": "2026-12-02T14:13:45Z",
|
||||
"run_number": 17,
|
||||
"session_window": "utc-rollover",
|
||||
"generated_at_utc": "2026-12-06T00:00:24Z",
|
||||
"synthetic_data_eliminated": true,
|
||||
"agenda_1_executive_summary": {
|
||||
"headline_finding": "Late-November tape is governed by Vector G1/G4 Isometric Pinning (Dose 2, Posterior P(R2) = 0.0%), compressing median daily moves by -58% (101.0 bps vs. 240.5 bps baseline), while sovereign rates (US10Y 4.85%-4.94%, EFFR 3.88% == 388 KG nodes) cap long-duration multiple expansion.",
|
||||
@@ -14,7 +15,7 @@
|
||||
"durability_score": 0.84,
|
||||
"severity_score": 0.78,
|
||||
"portfolio_impact_probability": 0.81,
|
||||
"evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=42) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 9 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."
|
||||
"evidence": "Across 440 real Nov 2026 bars, Dose 2 (n=44) cut median moves to 101.0 bps (P90=292 bps, 60.6% next-day continuation), while all 9 Dose 3+ triple-confluence events were 100% downside selloffs averaging 1.98x volume and 377.5 bps next-day moves."
|
||||
},
|
||||
{
|
||||
"rank": 2,
|
||||
@@ -34,13 +35,13 @@
|
||||
}
|
||||
],
|
||||
"risk_on_off_barometers": {
|
||||
"vix_close": 19.26,
|
||||
"us10y_yield_pct": 5.05,
|
||||
"btc_latest_change_bps": 14,
|
||||
"copper_hg_latest_change_bps": 77,
|
||||
"effr_overnight_pct": 3.88,
|
||||
"sofr_overnight_pct": 3.98,
|
||||
"sofr_minus_effr_spread_bps": 10,
|
||||
"vix_close": 21.67,
|
||||
"us10y_yield_pct": 5.02,
|
||||
"btc_latest_change_bps": -925,
|
||||
"copper_hg_latest_change_bps": 104,
|
||||
"effr_overnight_pct": 3.89,
|
||||
"sofr_overnight_pct": 3.93,
|
||||
"sofr_minus_effr_spread_bps": 4,
|
||||
"real_m2_mom_growth_bps": 16
|
||||
},
|
||||
"bayesian_regime_inference": {
|
||||
@@ -52,7 +53,7 @@
|
||||
"likelihood_factors": {
|
||||
"R1_BULL_RISK_ON": 0.9775,
|
||||
"R2_PINNED_ISOMETRIC": 1.0465,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 2.125
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 2.8687
|
||||
},
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
@@ -84,6 +85,28 @@
|
||||
"agenda_2_confirming_signals": {
|
||||
"summary": "Macro liquidity expansion (Real M2 +16 bps MoM, M1 +52 bps MoM) and easing producer input costs (PPI -19 bps MoM) support S1/S3 operating margins, while Dose 2 dossier-tape locks confirm quiet accumulation.",
|
||||
"active_dose2_confirmations": [
|
||||
{
|
||||
"date_utc": "2026-12-03",
|
||||
"symbol": "ORCL",
|
||||
"entity_ing": "orakal",
|
||||
"close_usd": 107.69,
|
||||
"change_bps": 47,
|
||||
"volume_ratio_20d": 0.78,
|
||||
"shared_dossier_coordinates": [],
|
||||
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-12-02",
|
||||
"symbol": "AMD",
|
||||
"entity_ing": "ayemdee",
|
||||
"close_usd": 457.75,
|
||||
"change_bps": -128,
|
||||
"volume_ratio_20d": 0.49,
|
||||
"shared_dossier_coordinates": [
|
||||
128
|
||||
],
|
||||
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-12-01",
|
||||
"symbol": "RTX",
|
||||
@@ -152,30 +175,6 @@
|
||||
91
|
||||
],
|
||||
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-28",
|
||||
"symbol": "ETH-USD",
|
||||
"entity_ing": "edheroom",
|
||||
"close_usd": 1645.99,
|
||||
"change_bps": -91,
|
||||
"volume_ratio_20d": 0.52,
|
||||
"shared_dossier_coordinates": [
|
||||
91
|
||||
],
|
||||
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-28",
|
||||
"symbol": "SOL-USD",
|
||||
"entity_ing": "sohlana",
|
||||
"close_usd": 70.46,
|
||||
"change_bps": -156,
|
||||
"volume_ratio_20d": 0.48,
|
||||
"shared_dossier_coordinates": [
|
||||
163
|
||||
],
|
||||
"dose_taxon_label": "Dose 2: G1/G4 Pinning Well"
|
||||
}
|
||||
],
|
||||
"active_dose3_breakout_confirmations": [
|
||||
@@ -293,7 +292,7 @@
|
||||
{
|
||||
"challenge_type": "SOVEREIGN_TERM_YIELD_HEADWIND",
|
||||
"indicator": "US10Y (DGS10 / ^TNX) & Term Slope (10Y - EFFR)",
|
||||
"observation": "US10Y = 4.85% / 5.05% (+97 bps above EFFR 3.88% -> 'naintee sevan' = 237 == kansorsheeam)",
|
||||
"observation": "US10Y = 5.08% / 5.02% (+97 bps above EFFR 3.88% -> 'naintee sevan' = 237 == kansorsheeam)",
|
||||
"impact": "Sustained ~4.85%-4.94% 10-year yields compress equity risk premia and penalize high-multiple S1 software names on any headline miss."
|
||||
},
|
||||
{
|
||||
@@ -318,6 +317,14 @@
|
||||
"change_bps": 3148,
|
||||
"explanation": "NVDA appeared in the 00:00 UTC news wire on 2026-11-23 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-12-03",
|
||||
"symbol": "NVDA",
|
||||
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||
"close_usd": 150.57,
|
||||
"change_bps": -76,
|
||||
"explanation": "NVDA appeared in the 00:00 UTC news wire on 2026-12-03 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-13",
|
||||
"symbol": "MSFT",
|
||||
@@ -326,6 +333,22 @@
|
||||
"change_bps": 17,
|
||||
"explanation": "MSFT appeared in the 00:00 UTC news wire on 2026-11-13 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-12-03",
|
||||
"symbol": "META",
|
||||
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||
"close_usd": 627.51,
|
||||
"change_bps": -291,
|
||||
"explanation": "META appeared in the 00:00 UTC news wire on 2026-12-03 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-12-02",
|
||||
"symbol": "ORCL",
|
||||
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||
"close_usd": 107.19,
|
||||
"change_bps": -187,
|
||||
"explanation": "ORCL appeared in the 00:00 UTC news wire on 2026-12-02 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-19",
|
||||
"symbol": "ARM",
|
||||
@@ -349,56 +372,33 @@
|
||||
"close_usd": 176.67,
|
||||
"change_bps": 1608,
|
||||
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-23 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-24",
|
||||
"symbol": "ARM",
|
||||
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||
"close_usd": 161.56,
|
||||
"change_bps": -855,
|
||||
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-24 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-25",
|
||||
"symbol": "ARM",
|
||||
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||
"close_usd": 161.51,
|
||||
"change_bps": -3,
|
||||
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-25 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
},
|
||||
{
|
||||
"date_utc": "2026-11-27",
|
||||
"symbol": "ARM",
|
||||
"type": "NARRATIVE_TAPE_DIVERGENCE",
|
||||
"close_usd": 171.55,
|
||||
"change_bps": 622,
|
||||
"explanation": "ARM appeared in the 00:00 UTC news wire on 2026-11-27 with zero market coordinate locks (Dose 1 unconfirmed stub)."
|
||||
}
|
||||
]
|
||||
},
|
||||
"agenda_4_delta_since_last_run": {
|
||||
"prior_run_number": 20,
|
||||
"current_run_number": 21,
|
||||
"prior_run_number": 16,
|
||||
"current_run_number": 17,
|
||||
"latest_wire_dossier": {
|
||||
"date_utc": "2026-12-01",
|
||||
"dossier_number": 73,
|
||||
"dossier_file": "73-dossier-news-2026-12-01.md",
|
||||
"date_utc": "2026-12-03",
|
||||
"dossier_number": 75,
|
||||
"dossier_file": "75-dossier-news-2026-12-03.md",
|
||||
"equation_counts": {
|
||||
"eq_333": 10,
|
||||
"eq_333": 9,
|
||||
"eq_666": 10,
|
||||
"eq_777": 10,
|
||||
"total": 30
|
||||
"total": 29
|
||||
},
|
||||
"active_ring_coordinates": [
|
||||
71,
|
||||
91,
|
||||
95,
|
||||
128,
|
||||
135
|
||||
]
|
||||
},
|
||||
"macro_releases_ingested": {
|
||||
"cpi_latest": "2026-10-01: 337.476 (35 bps MoM)",
|
||||
"ppi_latest": "2026-10-01: 293.921 (-19 bps MoM)",
|
||||
"effr_sofr_latest": "2026-11-27: EFFR=3.88%, SOFR=3.98%",
|
||||
"effr_sofr_latest": "2026-12-03: EFFR=3.89%, SOFR=3.93%",
|
||||
"m2_real_m2_latest": "2026-10-01: M2=$23532.8B, Real M2=$6973.2B",
|
||||
"gdp_gnp_latest": "2026-07-01: GDP=$33056.204B, GNP=$33026.509B"
|
||||
},
|
||||
@@ -413,13 +413,13 @@
|
||||
},
|
||||
"agenda_5_daily_key_macro_question_and_rigor": {
|
||||
"prior_question_grading": {
|
||||
"prior_question_id": "Q-RUN-0020",
|
||||
"prior_question_id": "Q-RUN-0016",
|
||||
"prior_question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
|
||||
"status": "EVALUATED_ON_REAL_TAPE",
|
||||
"evidence_summary": "Late-November real tape logged 15 Dose 2 isometric pinning sessions (including 2026-11-24 GOOGL -108 bps -> 292 and 2026-11-28 BTC/ETH -91 bps sync wave) with 0 new Dose 3+ drawdown shocks after Nov 19, confirming Base-Case R2 variance compression."
|
||||
"evidence_summary": "Late-November real tape logged 17 Dose 2 isometric pinning sessions (including 2026-11-24 GOOGL -108 bps -> 292 and 2026-11-28 BTC/ETH -91 bps sync wave) with 0 new Dose 3+ drawdown shocks after Nov 19, confirming Base-Case R2 variance compression."
|
||||
},
|
||||
"active_daily_question": {
|
||||
"question_id": "Q-RUN-0021",
|
||||
"question_id": "Q-RUN-0017",
|
||||
"question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
|
||||
"confirmation_threshold_r2_pin": "Next-session median displacement across locked S1/S2/S3 leaders remains <= 150 bps with Vol20d < 1.15x.",
|
||||
"falsification_threshold_r3_breakout": "Any S1/S2/S3 keystone logs a Dose 3+ headline-coupled session with Vol20d >= 1.50x or change_bps <= -300 bps."
|
||||
@@ -433,9 +433,9 @@
|
||||
"total_real_bars_n": 440,
|
||||
"valid_change_bps_n": 433,
|
||||
"next_day_pairs_n": 412,
|
||||
"dose_0_n": 374,
|
||||
"dose_1_n": 89,
|
||||
"dose_2_n": 42,
|
||||
"dose_0_n": 421,
|
||||
"dose_1_n": 109,
|
||||
"dose_2_n": 44,
|
||||
"dose_3_plus_n": 9
|
||||
},
|
||||
"methodological_applicability_and_significance": "1. Nonparametric Order Statistics (Median P50 & Tail P90) vs. Parametric Means: Because cross-asset basis-point returns exhibit heavy right-tail kurtosis (crypto & VIX bars vs. low-beta equities), Median P50 (Dose 2 = 101.0 bps vs. Dose 0 = 240.5 bps, -58%) and P90 (Dose 2 = 292 bps vs. Dose 0 = 665 bps, -56%) are the primary applicable location/scale estimators. 2. Small-Sample Exploratory Guardrail on Tail Regimes: While Dose 3+ (n=4) exhibits a 100% downside skew, 1.98x mean volume, and 100% next-day continuation (377.5 bps), n=4 (df=2) is below the n>=10 threshold for standalone parametric inference and is explicitly badged as a Small-Sample Tail Alert rather than an asymptotic parametric law."
|
||||
@@ -445,12 +445,12 @@
|
||||
"namespace_urn": "urn:io:hyperstitionstud:isolation-receipt:v1",
|
||||
"all_unchanged": true,
|
||||
"files": {
|
||||
"/workspace/technocapital-singularity-zoology/taxonomy/glossary-registry.json": {
|
||||
"/srv/hyperstitionstud.io/repos/technocapital-singularity-zoology/taxonomy/glossary-registry.json": {
|
||||
"pre_sha256": "7564ef40fb3e0e18d1d8547522db431b6a369c40139713b573df6e58b972d43d",
|
||||
"post_sha256": "7564ef40fb3e0e18d1d8547522db431b6a369c40139713b573df6e58b972d43d",
|
||||
"unchanged": true
|
||||
},
|
||||
"/workspace/technocapital-singularity-zoology/encyclopedia/encyclopedia-manifest.json": {
|
||||
"/srv/hyperstitionstud.io/repos/technocapital-singularity-zoology/encyclopedia/encyclopedia-manifest.json": {
|
||||
"pre_sha256": "0d7ce833bb0aa0eea069bf764b2e3b0b36ac2631821c42f3d6bcb897335f8a7d",
|
||||
"post_sha256": "0d7ce833bb0aa0eea069bf764b2e3b0b36ac2631821c42f3d6bcb897335f8a7d",
|
||||
"unchanged": true
|
||||
@@ -458,6 +458,6 @@
|
||||
}
|
||||
},
|
||||
"ipld_dag_json_cidv1": {
|
||||
"/": "baguqeera5cbgm7lsxawo5o3nog54p3jyu6g45odzl3of7ewdwmkpzkbg5ugq"
|
||||
"/": "baguqeerappdfxjzk5xaxvvluny3a2k5bzxhtco7rng3dfvulpm62d3tfavwa"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
{
|
||||
"version": "2.17.1",
|
||||
"run_number": 21,
|
||||
"updated_at_utc": "2026-12-02T14:13:45Z",
|
||||
"run_number": 17,
|
||||
"session_window": "utc-rollover",
|
||||
"updated_at_utc": "2026-12-06T00:00:24Z",
|
||||
"latest_posteriors": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"active_daily_question": {
|
||||
"question_id": "Q-RUN-0021",
|
||||
"question_id": "Q-RUN-0017",
|
||||
"question_text": "Will the synchronous -91 bps (kampyoot / kleenroom) Dose 2 pinning wave across BTC-USD and ETH-USD and NVDA's +80 bps ('eighty' = 128 [S3]) lock hold inside the P50 <= 150 bps isometric corridor, or will US10Y yields near 4.85%-4.94% and SOFR-EFFR (+10 bps) trigger a Dose 3+ high-volume (>1.5x Vol20d) breakout?",
|
||||
"confirmation_threshold_r2_pin": "Next-session median displacement across locked S1/S2/S3 leaders remains <= 150 bps with Vol20d < 1.15x.",
|
||||
"falsification_threshold_r3_breakout": "Any S1/S2/S3 keystone logs a Dose 3+ headline-coupled session with Vol20d >= 1.50x or change_bps <= -300 bps."
|
||||
@@ -93,157 +94,121 @@
|
||||
},
|
||||
{
|
||||
"run_number": 8,
|
||||
"generated_at_utc": "2026-12-01T00:05:55Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0008",
|
||||
"cidv1": "baguqeerautuzfnmivmbc2fzxbwrc5sgftzcct22n4mezvac4ggjyrbvg5g5a"
|
||||
},
|
||||
{
|
||||
"run_number": 9,
|
||||
"generated_at_utc": "2026-12-01T00:19:28Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0009",
|
||||
"cidv1": "baguqeerawfns3y6ytluwupzkepk35hrnvxj4jvjsphebjkr4ssl5alsq7ubq"
|
||||
},
|
||||
{
|
||||
"run_number": 10,
|
||||
"generated_at_utc": "2026-12-01T00:20:26Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0010",
|
||||
"cidv1": "baguqeeranwkmzt6gli6f4i4c2uoelda4edgwqajimr65cz7t3bfj4bat3fta"
|
||||
},
|
||||
{
|
||||
"run_number": 11,
|
||||
"generated_at_utc": "2026-12-01T00:34:19Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0011",
|
||||
"cidv1": "baguqeeral24w6gneqk7n4ule4pu2kknmdxrja46iz5dujnbabjv6cng6ttua"
|
||||
},
|
||||
{
|
||||
"run_number": 12,
|
||||
"generated_at_utc": "2026-12-01T01:01:54Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0012",
|
||||
"cidv1": "baguqeeratalw7a3v4wps5vffanzkikbrk32tgjlrkyx3d64jfivp3raku4oq"
|
||||
},
|
||||
{
|
||||
"run_number": 13,
|
||||
"generated_at_utc": "2026-12-01T01:07:49Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0013",
|
||||
"cidv1": "baguqeerazwuha42cyefdtfljfycwsv34nsmhowvcfnhk7uxall2y7od5wbjq"
|
||||
},
|
||||
{
|
||||
"run_number": 14,
|
||||
"generated_at_utc": "2026-12-01T01:15:27Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0014",
|
||||
"cidv1": "baguqeeragj7pkqauxnfhazh3xufyvsj5m7glzt5ey74tf7e2opl4mrw5k46a"
|
||||
},
|
||||
{
|
||||
"run_number": 15,
|
||||
"generated_at_utc": "2026-12-01T02:24:09Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0015",
|
||||
"cidv1": "baguqeerad3auisgfth3tuuqkaljf65huof765uwocq7vxxkbp3an46rpjcva"
|
||||
},
|
||||
{
|
||||
"run_number": 16,
|
||||
"generated_at_utc": "2026-12-01T02:45:08Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0016",
|
||||
"cidv1": "baguqeeradofb4vbejhjmvqzdbk3ej6maztsvpzh374uog267wj3x3sni7nxa"
|
||||
},
|
||||
{
|
||||
"run_number": 17,
|
||||
"generated_at_utc": "2026-12-01T03:12:39Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0017",
|
||||
"cidv1": "baguqeeralanwxvgzcp2vr6mjezengwreiqnszi6pqs27pxyll6ydg244chna"
|
||||
},
|
||||
{
|
||||
"run_number": 18,
|
||||
"generated_at_utc": "2026-12-01T03:15:46Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0018",
|
||||
"question_id": "Q-RUN-0008",
|
||||
"cidv1": "baguqeera6yv3xbdw7lqkus3jrvykxl67ayxmbhsuy6oimpu6e722rbp6zweq"
|
||||
},
|
||||
{
|
||||
"run_number": 19,
|
||||
"generated_at_utc": "2026-12-02T13:20:18Z",
|
||||
"run_number": 9,
|
||||
"generated_at_utc": "2026-12-02T21:30:19Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0019",
|
||||
"cidv1": "baguqeerasbmc4ydp5tjtfo5di6k4662uduorgykvkrz3copuohxqt3yesqxq"
|
||||
"question_id": "Q-RUN-0009",
|
||||
"cidv1": "baguqeeraqwdlii6fxho2jagvuo4fcvqcbghgd4dgcht3dd3gvghcgyqlbhia"
|
||||
},
|
||||
{
|
||||
"run_number": 20,
|
||||
"generated_at_utc": "2026-12-02T13:21:51Z",
|
||||
"run_number": 10,
|
||||
"session_window": "utc-rollover",
|
||||
"generated_at_utc": "2026-12-03T00:00:18Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0020",
|
||||
"cidv1": "baguqeeraievnxxxill5rz76b3kxhjwlj5vvgo3ggzt7wul3xxutyutvimrxa"
|
||||
"question_id": "Q-RUN-0010",
|
||||
"cidv1": "baguqeerasvcwns5cclvlxftue3fokc77daelrpqklneq45lgdoidgsr2brma"
|
||||
},
|
||||
{
|
||||
"run_number": 21,
|
||||
"generated_at_utc": "2026-12-02T14:13:45Z",
|
||||
"run_number": 11,
|
||||
"session_window": "us-pre-market-open",
|
||||
"generated_at_utc": "2026-12-03T14:00:22Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0021",
|
||||
"cidv1": "baguqeera5cbgm7lsxawo5o3nog54p3jyu6g45odzl3of7ewdwmkpzkbg5ugq"
|
||||
"question_id": "Q-RUN-0011",
|
||||
"cidv1": "baguqeerafekoudj4fyjw5sgjqqgqs4ab6ycvexp6lu44yltxc465q5fnqf4a"
|
||||
},
|
||||
{
|
||||
"run_number": 12,
|
||||
"session_window": "us-closing-bell",
|
||||
"generated_at_utc": "2026-12-03T21:30:19Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0012",
|
||||
"cidv1": "baguqeerad6ke6lm57rsq2fwhxuclgdtn7szxdz6jzszzo4yy52ls4oipnoaa"
|
||||
},
|
||||
{
|
||||
"run_number": 13,
|
||||
"session_window": "utc-rollover",
|
||||
"generated_at_utc": "2026-12-04T00:00:29Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0013",
|
||||
"cidv1": "baguqeerafkom6oy5ph2wo7lf62ahzyxju4rk6hgqjzmgr5d3h7hfpbtsannq"
|
||||
},
|
||||
{
|
||||
"run_number": 14,
|
||||
"session_window": "us-pre-market-open",
|
||||
"generated_at_utc": "2026-12-04T14:00:54Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0014",
|
||||
"cidv1": "baguqeeravipzzbfsnhuupv3ndsbaynurje5zktzynvrg2wd35b5z5zuwndfa"
|
||||
},
|
||||
{
|
||||
"run_number": 15,
|
||||
"session_window": "us-closing-bell",
|
||||
"generated_at_utc": "2026-12-04T21:30:16Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0015",
|
||||
"cidv1": "baguqeeragsgfxpwrqjfiq23sjhp673syxtvefvxzdbltclndofukcnywspxq"
|
||||
},
|
||||
{
|
||||
"run_number": 16,
|
||||
"session_window": "utc-rollover",
|
||||
"generated_at_utc": "2026-12-05T00:00:17Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0016",
|
||||
"cidv1": "baguqeeraioc64yauaem2mbhezgwqehacb5yjbyp2tzkeka763tg4ge7tirda"
|
||||
},
|
||||
{
|
||||
"run_number": 17,
|
||||
"session_window": "utc-rollover",
|
||||
"generated_at_utc": "2026-12-06T00:00:24Z",
|
||||
"posterior_probabilities": {
|
||||
"R1_BULL_RISK_ON": 0.0,
|
||||
"R2_PINNED_ISOMETRIC": 0.0,
|
||||
"R3_TAIL_DRAWDOWN_RISK_OFF": 1.0
|
||||
},
|
||||
"question_id": "Q-RUN-0017",
|
||||
"cidv1": "baguqeerappdfxjzk5xaxvvluny3a2k5bzxhtco7rng3dfvulpm62d3tfavwa"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,3 +1,3 @@
|
||||
// Auto-generated synchronous time-series bundle for file:// and https:// portability
|
||||
window.HyperstitionStudio = window.HyperstitionStudio || {};
|
||||
window.HyperstitionStudio.QuantTimeSeries = {"$schema": "./schemas/v1/quant-timeseries.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries", "version": "2.17.1", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.17.1", "generated_at_utc": "2026-12-02T14:11:49Z", "synthetic_data_eliminated": true, "periodicity_gate": {"enforced": true, "allowed_cadences": ["1d-us-closing-bell-2130-utc", "24h-news-wire-rollover-0000-utc"], "dated_news_dossiers_ingested": 23, "excluded_non_periodic_sources": ["01-ingglish-aq-lexicon.md", "10-19-ledger-*.md", "20-24-dossier-*.md", "26-45-dossier-*.md", "65-69-dossier-technocapital-singularity-*.md", "technocapital-singularity-zoology/encyclopedia/*", "proposal-*.md", "lecture-*.md", "podcast-ep*.md", "haiperdohp-jemaytreeah/db.json"], "non_periodic_records_ingested": 0, "missing_data_policy": "No data available (never synthesized or interpolated)"}, "enabled_lenses": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"], "default_lens": "fund_manager", "lens_registry_meta": {"fund_manager": {"lens_id": "fund_manager", "title": "Quantitative Hedge Fund & Factor Risk", "short_label": "Quant Factor", "structural_labels": {"struct_isometric_armor": "Chokepoint Moat", "struct_drift_velocity": "Signal Velocity", "struct_variance_collapse": "Convergence Power", "struct_trophic_capture": "Institutional Coupling", "struct_prime_density": "Idiosyncratic Asymmetry", "struct_repricing_resilience": "Regime Robustness"}, "timeseries_labels": {"ts_duty_cycle_pct": "Signal Duty Cycle / Hit Rate (%)", "ts_weighted_resonance": "Conviction-Weighted Exposure (0-100)", "ts_excess_over_replacement": "Information Ratio / Alpha Over Benchmark", "ts_quantile_profile": "Downside VaR_20 / Upside P90 / Convexity CV", "ts_optimal_lag_days": "Granger Lead-Lag Horizon τ* (Days)", "ts_regime_splits": "Regime-Conditional Beta Split (M1/M2/M3)"}}, "neutral_math": {"lens_id": "neutral_math", "title": "Neutral Mathematical & Statistical Invariants", "short_label": "Neutral Math", "structural_labels": {"struct_isometric_armor": "G4 Isometric Ratio (Δ=0)", "struct_drift_velocity": "G3 Inverse Phonemic Drift", "struct_variance_collapse": "G1 Log Variance Collapse", "struct_trophic_capture": "Bipartite S×S6 Coupling Degree", "struct_prime_density": "G5 Prime & Twin-Prime Density", "struct_repricing_resilience": "Repricing Counter-Swap Closure"}, "timeseries_labels": {"ts_duty_cycle_pct": "Active Duty Cycle Pr[X_t > 0] (%)", "ts_weighted_resonance": "Weighted Resonance Index (0-100)", "ts_excess_over_replacement": "Excess Value Over Baseline (σ-Units)", "ts_quantile_profile": "Quantile Spread (P20 / P90 / CV)", "ts_optimal_lag_days": "Peak Cross-Correlation Lag τ* (Days)", "ts_regime_splits": "Conditional Regime Delta E[X|S_t] - μ"}}, "corporate_board": {"lens_id": "corporate_board", "title": "Corporate Strategy & Balance-Sheet Governance", "short_label": "Corporate Board", "structural_labels": {"struct_isometric_armor": "Supply-Chain Moat", "struct_drift_velocity": "Execution Agility", "struct_variance_collapse": "Cross-Unit Synergy", "struct_trophic_capture": "Governance & Balance-Sheet Integration", "struct_prime_density": "Proprietary IP Density", "struct_repricing_resilience": "Stress-Test Resilience"}, "timeseries_labels": {"ts_duty_cycle_pct": "Operational Utilization Cadence (%)", "ts_weighted_resonance": "Strategic Capital Share (0-100)", "ts_excess_over_replacement": "Net Economic Value Added (EVA)", "ts_quantile_profile": "Base-Case Floor / Upside Case / Variance", "ts_optimal_lag_days": "Guidance-to-Market Lead Time τ* (Days)", "ts_regime_splits": "Macro Stress-Scenario Delta (Halt/Surge/Cap)"}}, "tierzoo_ecology": {"lens_id": "tierzoo_ecology", "title": "TierZoo Ecological Trophic Index (ETI)", "short_label": "TierZoo (ETI)", "structural_labels": {"struct_isometric_armor": "ARM (G4 Isometric Chokepoint Armor)", "struct_drift_velocity": "VEL (Teleoplexic Escape Velocity)", "struct_variance_collapse": "COL (G1 Variance-Collapse Compression)", "struct_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)", "struct_prime_density": "PRM (Prime & G5 Twin-Prime Mutation IQ)", "struct_repricing_resilience": "RES (Tri-Modal Repricing & State Resilience)"}, "timeseries_labels": {"ts_duty_cycle_pct": "Foraging Activity Duty Cycle (%)", "ts_weighted_resonance": "Trophic Dominance Rating (0-100)", "ts_excess_over_replacement": "Apex Surplus Over Extinction Floor", "ts_quantile_profile": "Metabolic Floor / Burst Ceiling / Niche CV", "ts_optimal_lag_days": "Predator-Prey Phase Lead τ* (Days)", "ts_regime_splits": "Biome Weather Adaptation Split (M1/M2/M3)"}}, "fantasy_sabermetrics": {"lens_id": "fantasy_sabermetrics", "title": "Fantasy Football & Sabermetric Roster Engine", "short_label": "Fantasy Sabermetrics", "structural_labels": {"struct_isometric_armor": "Pass Protection (OL Chokepoint Block)", "struct_drift_Line truncated
|
||||
window.HyperstitionStudio.QuantTimeSeries = {"$schema": "./schemas/v1/quant-timeseries.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:quant-timeseries", "version": "2.17.1", "namespace_urn": "urn:io:hyperstitionstud:quant-timeseries:2.17.1", "generated_at_utc": "2026-12-06T00:00:19Z", "synthetic_data_eliminated": true, "periodicity_gate": {"enforced": true, "allowed_cadences": ["1d-us-closing-bell-2130-utc", "24h-news-wire-rollover-0000-utc"], "dated_news_dossiers_ingested": 25, "excluded_non_periodic_sources": ["01-ingglish-aq-lexicon.md", "10-19-ledger-*.md", "20-24-dossier-*.md", "26-45-dossier-*.md", "65-69-dossier-technocapital-singularity-*.md", "technocapital-singularity-zoology/encyclopedia/*", "proposal-*.md", "lecture-*.md", "podcast-ep*.md", "haiperdohp-jemaytreeah/db.json"], "non_periodic_records_ingested": 0, "missing_data_policy": "No data available (never synthesized or interpolated)"}, "enabled_lenses": ["fund_manager", "neutral_math", "corporate_board", "tierzoo_ecology", "fantasy_sabermetrics", "pokedex_scanner"], "default_lens": "fund_manager", "lens_registry_meta": {"fund_manager": {"lens_id": "fund_manager", "title": "Quantitative Hedge Fund & Factor Risk", "short_label": "Quant Factor", "structural_labels": {"struct_isometric_armor": "Chokepoint Moat", "struct_drift_velocity": "Signal Velocity", "struct_variance_collapse": "Convergence Power", "struct_trophic_capture": "Institutional Coupling", "struct_prime_density": "Idiosyncratic Asymmetry", "struct_repricing_resilience": "Regime Robustness"}, "timeseries_labels": {"ts_duty_cycle_pct": "Signal Duty Cycle / Hit Rate (%)", "ts_weighted_resonance": "Conviction-Weighted Exposure (0-100)", "ts_excess_over_replacement": "Information Ratio / Alpha Over Benchmark", "ts_quantile_profile": "Downside VaR_20 / Upside P90 / Convexity CV", "ts_optimal_lag_days": "Granger Lead-Lag Horizon τ* (Days)", "ts_regime_splits": "Regime-Conditional Beta Split (M1/M2/M3)"}}, "neutral_math": {"lens_id": "neutral_math", "title": "Neutral Mathematical & Statistical Invariants", "short_label": "Neutral Math", "structural_labels": {"struct_isometric_armor": "G4 Isometric Ratio (Δ=0)", "struct_drift_velocity": "G3 Inverse Phonemic Drift", "struct_variance_collapse": "G1 Log Variance Collapse", "struct_trophic_capture": "Bipartite S×S6 Coupling Degree", "struct_prime_density": "G5 Prime & Twin-Prime Density", "struct_repricing_resilience": "Repricing Counter-Swap Closure"}, "timeseries_labels": {"ts_duty_cycle_pct": "Active Duty Cycle Pr[X_t > 0] (%)", "ts_weighted_resonance": "Weighted Resonance Index (0-100)", "ts_excess_over_replacement": "Excess Value Over Baseline (σ-Units)", "ts_quantile_profile": "Quantile Spread (P20 / P90 / CV)", "ts_optimal_lag_days": "Peak Cross-Correlation Lag τ* (Days)", "ts_regime_splits": "Conditional Regime Delta E[X|S_t] - μ"}}, "corporate_board": {"lens_id": "corporate_board", "title": "Corporate Strategy & Balance-Sheet Governance", "short_label": "Corporate Board", "structural_labels": {"struct_isometric_armor": "Supply-Chain Moat", "struct_drift_velocity": "Execution Agility", "struct_variance_collapse": "Cross-Unit Synergy", "struct_trophic_capture": "Governance & Balance-Sheet Integration", "struct_prime_density": "Proprietary IP Density", "struct_repricing_resilience": "Stress-Test Resilience"}, "timeseries_labels": {"ts_duty_cycle_pct": "Operational Utilization Cadence (%)", "ts_weighted_resonance": "Strategic Capital Share (0-100)", "ts_excess_over_replacement": "Net Economic Value Added (EVA)", "ts_quantile_profile": "Base-Case Floor / Upside Case / Variance", "ts_optimal_lag_days": "Guidance-to-Market Lead Time τ* (Days)", "ts_regime_splits": "Macro Stress-Scenario Delta (Halt/Surge/Cap)"}}, "tierzoo_ecology": {"lens_id": "tierzoo_ecology", "title": "TierZoo Ecological Trophic Index (ETI)", "short_label": "TierZoo (ETI)", "structural_labels": {"struct_isometric_armor": "ARM (G4 Isometric Chokepoint Armor)", "struct_drift_velocity": "VEL (Teleoplexic Escape Velocity)", "struct_variance_collapse": "COL (G1 Variance-Collapse Compression)", "struct_trophic_capture": "CAP (S×S6 Double-Articulation & Capture)", "struct_prime_density": "PRM (Prime & G5 Twin-Prime Mutation IQ)", "struct_repricing_resilience": "RES (Tri-Modal Repricing & State Resilience)"}, "timeseries_labels": {"ts_duty_cycle_pct": "Foraging Activity Duty Cycle (%)", "ts_weighted_resonance": "Trophic Dominance Rating (0-100)", "ts_excess_over_replacement": "Apex Surplus Over Extinction Floor", "ts_quantile_profile": "Metabolic Floor / Burst Ceiling / Niche CV", "ts_optimal_lag_days": "Predator-Prey Phase Lead τ* (Days)", "ts_regime_splits": "Biome Weather Adaptation Split (M1/M2/M3)"}}, "fantasy_sabermetrics": {"lens_id": "fantasy_sabermetrics", "title": "Fantasy Football & Sabermetric Roster Engine", "short_label": "Fantasy Sabermetrics", "structural_labels": {"struct_isometric_armor": "Pass Protection (OL Chokepoint Block)", "struct_drift_Line truncated
|
||||
+5342
-2610
File diff suppressed because it is too large.
Load diff
@@ -1,2 +1,2 @@
|
||||
// Auto-generated by hyperstitionstud_io.quant.macro — DO NOT EDIT MANUALLY
|
||||
window.HYPERSTITION_MACRO_DATA = {"$schema": "./schemas/v1/macro-indicators.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:macro-indicators", "version": "2.17.1", "generated_at_utc": "2026-12-02T14:13:43Z", "synthetic_data_eliminated": true, "cadence_policy": "native_cadence_preserved_no_interpolation_null_when_unavailable", "source": "fred_stlouisfed_keyless_csv", "series_count": 14, "series": {"cpi": {"series_id": "CPIAUCSL", "slug": "cpi", "label": "CPI (Consumer Price Index: All Urban Consumers)", "cadence": "1mo", "unit": "Index (1982-84=100)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 337.476, "prior_date_utc": "2026-09-01", "prior_value": 336.298, "period_change_bps": 35, "period_change_pct": 0.35, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 337, "digit_aq": 13, "spoken_eng": "three hundred thirty seven", "spoken_eng_aq": 502, "spoken_ing": "three huhndrad therdee sevan", "spoken_ing_aq": 485, "prime_rank_face": 68, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 35, "digit_aq": 8, "spoken_eng": "thirty five", "spoken_eng_aq": 232, "spoken_ing": "therdee faiv", "spoken_ing_aq": 202, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 336.298}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 337.476}]}, "ppi": {"series_id": "PPIACO", "slug": "ppi", "label": "PPI (Producer Price Index: All Commodities)", "cadence": "1mo", "unit": "Index (1982=100)", "guilds": ["S3", "S6"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 293.921, "prior_date_utc": "2026-09-01", "prior_value": 294.473, "period_change_bps": -19, "period_change_pct": -0.19, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 294, "digit_aq": 15, "spoken_eng": "two hundred ninety four", "spoken_eng_aq": 459, "spoken_ing": "too huhndrad naintee for", "spoken_ing_aq": 424, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 19, "digit_aq": 10, "spoken_eng": "nineteen", "spoken_eng_aq": 158, "spoken_ing": "nainteen", "spoken_ing_aq": 154, "prime_rank_face": 8, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 294.473}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 293.921}]}, "us10y": {"series_id": "DGS10", "slug": "us10y", "label": "US10Y (10-Year US Treasury Constant Maturity Yield)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S1"], "data_available": true, "status": "ok", "latest_date_utc": "2026-11-25", "latest_value": 4.85, "prior_date_utc": "2026-11-24", "prior_value": 4.91, "period_change_bps": -6, "period_change_pct": -0.06, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 485, "digit_aq": 17, "spoken_eng": "four hundred eighty five", "spoken_eng_aq": 439, "spoken_ing": "for huhndrad aytee faiv", "spoken_ing_aq": 391, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 6, "digit_aq": 6, "spoken_eng": "six", "spoken_eng_aq": 79, "spoken_ing": "siks", "spoken_ing_aq": 94, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": ["2026-11-26"], "recent_observations": [{"date_utc": "2026-11-24", "data_available": true, "status": "ok", "value": 4.91}, {"date_utc": "2026-11-25", "data_available": true, "status": "ok", "value": 4.85}, {"date_utc": "2026-11-26", "data_available": false, "status": "No data available", "value": null}]}, "effr": {"series_id": "EFFR", "slug": "effr", "label": "EFFR (Effective Federal Funds Overnight Lending Rate)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-11-27", "latest_value": 3.88, "prior_date_utc": "2026-11-25", "prior_value": 3.88, "period_change_bps": 0, "period_change_pct": 0.0, "yoy_change_pct": null, "yoy_change_bps": null, "aq_evaluation": {"face_int": 388, "digit_aq": 19, "spoken_eng": "three hundred eighty eight", "spoken_eng_aq": 460, "spoken_ing": "three huhndrad aytee ayt", "spoken_ing_aq": 425, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 0, "digit_aq": 0, "spoken_eng": "zero", "spoken_eng_aq": 100, "spoken_ing": "zeeroh", "spoken_ing_aq": 131, "prime_rank_face": null, "prime_rank_spoken_ing": 32,
Line truncated
|
||||
window.HYPERSTITION_MACRO_DATA = {"$schema": "./schemas/v1/macro-indicators.schema.json", "$id": "urn:io:hyperstitionstud:schema:v1:macro-indicators", "version": "2.17.1", "generated_at_utc": "2026-12-06T00:00:22Z", "synthetic_data_eliminated": true, "cadence_policy": "native_cadence_preserved_no_interpolation_null_when_unavailable", "source": "fred_stlouisfed_keyless_csv", "series_count": 14, "series": {"cpi": {"series_id": "CPIAUCSL", "slug": "cpi", "label": "CPI (Consumer Price Index: All Urban Consumers)", "cadence": "1mo", "unit": "Index (1982-84=100)", "guilds": ["S6", "S2"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 337.476, "prior_date_utc": "2026-09-01", "prior_value": 336.298, "period_change_bps": 35, "period_change_pct": 0.35, "yoy_change_pct": 4.08, "yoy_change_bps": 408, "aq_evaluation": {"face_int": 337, "digit_aq": 13, "spoken_eng": "three hundred thirty seven", "spoken_eng_aq": 502, "spoken_ing": "three huhndrad therdee sevan", "spoken_ing_aq": 485, "prime_rank_face": 68, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 35, "digit_aq": 8, "spoken_eng": "thirty five", "spoken_eng_aq": 232, "spoken_ing": "therdee faiv", "spoken_ing_aq": 202, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": ["2025-10-01"], "recent_observations": [{"date_utc": "2025-10-01", "data_available": false, "status": "No data available", "value": null}, {"date_utc": "2025-11-01", "data_available": true, "status": "ok", "value": 325.063}, {"date_utc": "2025-12-01", "data_available": true, "status": "ok", "value": 326.031}, {"date_utc": "2026-01-01", "data_available": true, "status": "ok", "value": 326.588}, {"date_utc": "2026-02-01", "data_available": true, "status": "ok", "value": 327.46}, {"date_utc": "2026-03-01", "data_available": true, "status": "ok", "value": 330.293}, {"date_utc": "2026-04-01", "data_available": true, "status": "ok", "value": 332.407}, {"date_utc": "2026-05-01", "data_available": true, "status": "ok", "value": 333.979}, {"date_utc": "2026-06-01", "data_available": true, "status": "ok", "value": 332.568}, {"date_utc": "2026-07-01", "data_available": true, "status": "ok", "value": 332.813}, {"date_utc": "2026-08-01", "data_available": true, "status": "ok", "value": 334.131}, {"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 336.298}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 337.476}]}, "ppi": {"series_id": "PPIACO", "slug": "ppi", "label": "PPI (Producer Price Index: All Commodities)", "cadence": "1mo", "unit": "Index (1982=100)", "guilds": ["S3", "S6"], "data_available": true, "status": "ok", "latest_date_utc": "2026-10-01", "latest_value": 293.921, "prior_date_utc": "2026-09-01", "prior_value": 294.473, "period_change_bps": -19, "period_change_pct": -0.19, "yoy_change_pct": 12.79, "yoy_change_bps": 1279, "aq_evaluation": {"face_int": 294, "digit_aq": 15, "spoken_eng": "two hundred ninety four", "spoken_eng_aq": 459, "spoken_ing": "too huhndrad naintee for", "spoken_ing_aq": 424, "prime_rank_face": null, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "change_aq_evaluation": {"face_int": 19, "digit_aq": 10, "spoken_eng": "nineteen", "spoken_eng_aq": 158, "spoken_ing": "nainteen", "spoken_ing_aq": 154, "prime_rank_face": 8, "prime_rank_spoken_ing": null, "ring_coordinates": [], "ring_partners": {}}, "missing_observation_dates": [], "recent_observations": [{"date_utc": "2025-10-01", "data_available": true, "status": "ok", "value": 260.591}, {"date_utc": "2025-11-01", "data_available": true, "status": "ok", "value": 261.914}, {"date_utc": "2025-12-01", "data_available": true, "status": "ok", "value": 261.333}, {"date_utc": "2026-01-01", "data_available": true, "status": "ok", "value": 263.608}, {"date_utc": "2026-02-01", "data_available": true, "status": "ok", "value": 269.535}, {"date_utc": "2026-03-01", "data_available": true, "status": "ok", "value": 276.109}, {"date_utc": "2026-04-01", "data_available": true, "status": "ok", "value": 282.722}, {"date_utc": "2026-05-01", "data_available": true, "status": "ok", "value": 290.281}, {"date_utc": "2026-06-01", "data_available": true, "status": "ok", "value": 285.795}, {"date_utc": "2026-07-01", "data_available": true, "status": "ok", "value": 284.837}, {"date_utc": "2026-08-01", "data_available": true, "status": "ok", "value": 287.522}, {"date_utc": "2026-09-01", "data_available": true, "status": "ok", "value": 294.473}, {"date_utc": "2026-10-01", "data_available": true, "status": "ok", "value": 293.921}]}, "us10y": {"series_id": "DGS10", "slug": "us10y", "label": "US10Y (10-Year US Treasury Constant Maturity Yield)", "cadence": "1d", "unit": "Percent (%)", "guilds": ["S6", "S1"], "data_available": true, "status": "ok", "latest_date_utc": "2026-12-03", "latest_value": 5.08,
Line truncated
|
||||
+2320
-195
File diff suppressed because it is too large.
Load diff
@@ -196,6 +196,36 @@
|
||||
"volume_ratio_20d": 0.64,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 151.72,
|
||||
"change_pct": -3.16,
|
||||
"change_bps": -316,
|
||||
"volume_ratio_20d": 0.56,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 150.57,
|
||||
"change_pct": -0.76,
|
||||
"change_bps": -76,
|
||||
"volume_ratio_20d": 0.71,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 138.81,
|
||||
"change_pct": -7.81,
|
||||
"change_bps": -781,
|
||||
"volume_ratio_20d": 0.88,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -394,6 +424,36 @@
|
||||
"volume_ratio_20d": 1.15,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 1311.45,
|
||||
"change_pct": -1.58,
|
||||
"change_bps": -158,
|
||||
"volume_ratio_20d": 0.67,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 1368.22,
|
||||
"change_pct": 4.33,
|
||||
"change_bps": 433,
|
||||
"volume_ratio_20d": 0.92,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 1323.35,
|
||||
"change_pct": -3.28,
|
||||
"change_bps": -328,
|
||||
"volume_ratio_20d": 1.03,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -592,6 +652,36 @@
|
||||
"volume_ratio_20d": 0.72,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 370.61,
|
||||
"change_pct": -2.04,
|
||||
"change_bps": -204,
|
||||
"volume_ratio_20d": 0.46,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 376.05,
|
||||
"change_pct": 1.47,
|
||||
"change_bps": 147,
|
||||
"volume_ratio_20d": 0.51,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 358.41,
|
||||
"change_pct": -4.69,
|
||||
"change_bps": -469,
|
||||
"volume_ratio_20d": 0.73,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -796,6 +886,36 @@
|
||||
"volume_ratio_20d": 1.16,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 476.54,
|
||||
"change_pct": 0.23,
|
||||
"change_bps": 23,
|
||||
"volume_ratio_20d": 0.78,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 467.11,
|
||||
"change_pct": -1.98,
|
||||
"change_bps": -198,
|
||||
"volume_ratio_20d": 0.69,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 450.0,
|
||||
"change_pct": -3.66,
|
||||
"change_bps": -366,
|
||||
"volume_ratio_20d": 0.99,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -994,6 +1114,36 @@
|
||||
"volume_ratio_20d": 1.05,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 291.63,
|
||||
"change_pct": -2.78,
|
||||
"change_bps": -278,
|
||||
"volume_ratio_20d": 0.9,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 291.71,
|
||||
"change_pct": 0.03,
|
||||
"change_bps": 3,
|
||||
"volume_ratio_20d": 0.7,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 285.39,
|
||||
"change_pct": -2.17,
|
||||
"change_bps": -217,
|
||||
"volume_ratio_20d": 0.74,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1192,6 +1342,36 @@
|
||||
"volume_ratio_20d": 0.88,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 646.3,
|
||||
"change_pct": -0.26,
|
||||
"change_bps": -26,
|
||||
"volume_ratio_20d": 0.72,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 627.51,
|
||||
"change_pct": -2.91,
|
||||
"change_bps": -291,
|
||||
"volume_ratio_20d": 0.63,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 625.7,
|
||||
"change_pct": -0.29,
|
||||
"change_bps": -29,
|
||||
"volume_ratio_20d": 0.87,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1390,6 +1570,36 @@
|
||||
"volume_ratio_20d": 0.69,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 107.19,
|
||||
"change_pct": -1.87,
|
||||
"change_bps": -187,
|
||||
"volume_ratio_20d": 0.65,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 107.69,
|
||||
"change_pct": 0.47,
|
||||
"change_bps": 47,
|
||||
"volume_ratio_20d": 0.78,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 97.52,
|
||||
"change_pct": -9.44,
|
||||
"change_bps": -944,
|
||||
"volume_ratio_20d": 1.85,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1588,6 +1798,36 @@
|
||||
"volume_ratio_20d": 0.81,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 340.36,
|
||||
"change_pct": -0.44,
|
||||
"change_bps": -44,
|
||||
"volume_ratio_20d": 0.54,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 344.08,
|
||||
"change_pct": 1.09,
|
||||
"change_bps": 109,
|
||||
"volume_ratio_20d": 0.51,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 317.18,
|
||||
"change_pct": -7.82,
|
||||
"change_bps": -782,
|
||||
"volume_ratio_20d": 0.84,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1786,6 +2026,36 @@
|
||||
"volume_ratio_20d": 0.81,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 173.82,
|
||||
"change_pct": -3.15,
|
||||
"change_bps": -315,
|
||||
"volume_ratio_20d": 0.67,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 179.63,
|
||||
"change_pct": 3.34,
|
||||
"change_bps": 334,
|
||||
"volume_ratio_20d": 1.29,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 161.39,
|
||||
"change_pct": -10.15,
|
||||
"change_bps": -1015,
|
||||
"volume_ratio_20d": 1.35,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1984,6 +2254,36 @@
|
||||
"volume_ratio_20d": 0.63,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 457.75,
|
||||
"change_pct": -1.28,
|
||||
"change_bps": -128,
|
||||
"volume_ratio_20d": 0.49,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 490.43,
|
||||
"change_pct": 7.14,
|
||||
"change_bps": 714,
|
||||
"volume_ratio_20d": 0.61,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 451.14,
|
||||
"change_pct": -8.01,
|
||||
"change_bps": -801,
|
||||
"volume_ratio_20d": 0.77,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2182,6 +2482,36 @@
|
||||
"volume_ratio_20d": 1.05,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 183.84,
|
||||
"change_pct": 1.82,
|
||||
"change_bps": 182,
|
||||
"volume_ratio_20d": 0.72,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 181.77,
|
||||
"change_pct": -1.13,
|
||||
"change_bps": -113,
|
||||
"volume_ratio_20d": 0.65,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 177.92,
|
||||
"change_pct": -2.12,
|
||||
"change_bps": -212,
|
||||
"volume_ratio_20d": 0.65,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2380,6 +2710,36 @@
|
||||
"volume_ratio_20d": 1.07,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 606.65,
|
||||
"change_pct": 1.23,
|
||||
"change_bps": 123,
|
||||
"volume_ratio_20d": 0.74,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 618.28,
|
||||
"change_pct": 1.92,
|
||||
"change_bps": 192,
|
||||
"volume_ratio_20d": 1.1,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 627.11,
|
||||
"change_pct": 1.43,
|
||||
"change_bps": 143,
|
||||
"volume_ratio_20d": 0.68,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2578,6 +2938,36 @@
|
||||
"volume_ratio_20d": 0.71,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 203.76,
|
||||
"change_pct": 1.77,
|
||||
"change_bps": 177,
|
||||
"volume_ratio_20d": 0.82,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 205.49,
|
||||
"change_pct": 0.85,
|
||||
"change_bps": 85,
|
||||
"volume_ratio_20d": 0.87,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 206.26,
|
||||
"change_pct": 0.37,
|
||||
"change_bps": 37,
|
||||
"volume_ratio_20d": 0.86,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2775,6 +3165,36 @@
|
||||
"volume_ratio_20d": 1.0,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 5.59,
|
||||
"change_pct": 1.54,
|
||||
"change_bps": 154,
|
||||
"volume_ratio_20d": 0.7,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 5.62,
|
||||
"change_pct": 0.52,
|
||||
"change_bps": 52,
|
||||
"volume_ratio_20d": 0.78,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 5.68,
|
||||
"change_pct": 1.04,
|
||||
"change_bps": 104,
|
||||
"volume_ratio_20d": 17.88,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2982,6 +3402,36 @@
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 18.38,
|
||||
"change_pct": -4.57,
|
||||
"change_bps": -457,
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 18.46,
|
||||
"change_pct": 0.44,
|
||||
"change_bps": 44,
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 21.67,
|
||||
"change_pct": 17.39,
|
||||
"change_bps": 1739,
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3269,6 +3719,36 @@
|
||||
"volume_ratio_20d": 0.89,
|
||||
"market_cap_str": "$1.20T",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 58867.99,
|
||||
"change_pct": -1.26,
|
||||
"change_bps": -126,
|
||||
"volume_ratio_20d": 0.69,
|
||||
"market_cap_str": "$1.19T",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 52760.89,
|
||||
"change_pct": -10.37,
|
||||
"change_bps": -1037,
|
||||
"volume_ratio_20d": 3.97,
|
||||
"market_cap_str": "$1.08T",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 47881.46,
|
||||
"change_pct": -9.25,
|
||||
"change_bps": -925,
|
||||
"volume_ratio_20d": 2.04,
|
||||
"market_cap_str": "$970B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3556,6 +4036,36 @@
|
||||
"volume_ratio_20d": 0.92,
|
||||
"market_cap_str": "$204B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 1645.02,
|
||||
"change_pct": -1.0,
|
||||
"change_bps": -100,
|
||||
"volume_ratio_20d": 0.66,
|
||||
"market_cap_str": "$204B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 1610.95,
|
||||
"change_pct": -2.07,
|
||||
"change_bps": -207,
|
||||
"volume_ratio_20d": 2.74,
|
||||
"market_cap_str": "$201B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 1504.05,
|
||||
"change_pct": -6.64,
|
||||
"change_bps": -664,
|
||||
"volume_ratio_20d": 1.75,
|
||||
"market_cap_str": "$185B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3843,6 +4353,36 @@
|
||||
"volume_ratio_20d": 0.77,
|
||||
"market_cap_str": "$43B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 70.44,
|
||||
"change_pct": -2.72,
|
||||
"change_bps": -272,
|
||||
"volume_ratio_20d": 0.77,
|
||||
"market_cap_str": "$43B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 68.79,
|
||||
"change_pct": -2.34,
|
||||
"change_bps": -234,
|
||||
"volume_ratio_20d": 3.13,
|
||||
"market_cap_str": "$41B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 61.18,
|
||||
"change_pct": -11.07,
|
||||
"change_bps": -1107,
|
||||
"volume_ratio_20d": 2.03,
|
||||
"market_cap_str": "$36B",
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4041,6 +4581,36 @@
|
||||
"volume_ratio_20d": 0.99,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 108.1,
|
||||
"change_pct": -1.36,
|
||||
"change_bps": -136,
|
||||
"volume_ratio_20d": 0.7,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 97.38,
|
||||
"change_pct": -9.92,
|
||||
"change_bps": -992,
|
||||
"volume_ratio_20d": 2.87,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 91.32,
|
||||
"change_pct": -6.22,
|
||||
"change_bps": -622,
|
||||
"volume_ratio_20d": 1.62,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4239,6 +4809,36 @@
|
||||
"volume_ratio_20d": 0.81,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 261.14,
|
||||
"change_pct": 3.04,
|
||||
"change_bps": 304,
|
||||
"volume_ratio_20d": 0.7,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 263.5,
|
||||
"change_pct": 0.9,
|
||||
"change_bps": 90,
|
||||
"volume_ratio_20d": 0.54,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 248.05,
|
||||
"change_pct": -5.86,
|
||||
"change_bps": -586,
|
||||
"volume_ratio_20d": 0.74,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4437,6 +5037,36 @@
|
||||
"volume_ratio_20d": 1.29,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 1410.55,
|
||||
"change_pct": 2.44,
|
||||
"change_bps": 244,
|
||||
"volume_ratio_20d": 1.07,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 1390.95,
|
||||
"change_pct": -1.39,
|
||||
"change_bps": -139,
|
||||
"volume_ratio_20d": 0.82,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 1424.07,
|
||||
"change_pct": 2.38,
|
||||
"change_bps": 238,
|
||||
"volume_ratio_20d": 0.92,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4635,6 +5265,36 @@
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 5.08,
|
||||
"change_pct": 0.44,
|
||||
"change_bps": 44,
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 5.08,
|
||||
"change_pct": 0.0,
|
||||
"change_bps": 0,
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 5.02,
|
||||
"change_pct": -1.06,
|
||||
"change_bps": -106,
|
||||
"volume_ratio_20d": null,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4833,6 +5493,36 @@
|
||||
"volume_ratio_20d": 0.77,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-02": {
|
||||
"date_utc": "2026-12-02",
|
||||
"observation_date_utc": "2026-12-02",
|
||||
"close_usd": 1167.61,
|
||||
"change_pct": 0.1,
|
||||
"change_bps": 10,
|
||||
"volume_ratio_20d": 0.73,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-03": {
|
||||
"date_utc": "2026-12-03",
|
||||
"observation_date_utc": "2026-12-03",
|
||||
"close_usd": 1158.36,
|
||||
"change_pct": -0.79,
|
||||
"change_bps": -79,
|
||||
"volume_ratio_20d": 1.1,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
},
|
||||
"2026-12-04": {
|
||||
"date_utc": "2026-12-04",
|
||||
"observation_date_utc": "2026-12-04",
|
||||
"close_usd": 1144.7,
|
||||
"change_pct": -1.18,
|
||||
"change_bps": -118,
|
||||
"volume_ratio_20d": 0.87,
|
||||
"market_cap_str": null,
|
||||
"feed_source": "yahoo_v8_json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import time
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterable
|
||||
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
|
||||
SCHEMA_VERSION = 1
|
||||
|
||||
@@ -100,7 +100,7 @@ def load_ledger(path: Path) -> dict[str, Any]:
|
||||
if not path.exists():
|
||||
return {"version": SCHEMA_VERSION, "sources": []}
|
||||
try:
|
||||
data = json.loads(path.read_text(encoding="utf-8"))
|
||||
data = load_json_cached(path, copy_result=True)
|
||||
except (json.JSONDecodeError, OSError) as exc:
|
||||
raise SystemExit(f"error: ledger at {path} is unreadable ({exc}); run `reset` to start over")
|
||||
if not isinstance(data, dict) or not isinstance(data.get("sources"), list):
|
||||
|
||||
@@ -20,16 +20,29 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_workspace_config, normalize_workspace_relpath
|
||||
|
||||
|
||||
def _norm_ws_path(p: Path | str, workspace_root: str | Path | None = None) -> str:
|
||||
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||
ws_res = str(cfg.workspace_root.resolve())
|
||||
s = str(Path(p).resolve())
|
||||
if s.startswith(ws_res):
|
||||
return "/workspace" + s[len(ws_res):]
|
||||
return str(p)
|
||||
FORBIDDEN_CONFLICT_SIDE_RE = re.compile(r"(?:^|\s)(?:--theirs|--ours|-X\s*(?:theirs|ours))\b")
|
||||
FORBIDDEN_UNCHECKED_REBASE_RE = re.compile(r"pull\s+--rebase[^\n]*\|\|\s*true")
|
||||
|
||||
|
||||
def validate_push_script_rebase_gating(push_txt: str) -> list[str]:
|
||||
"""
|
||||
Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Reject conflict-side resolution flags
|
||||
(--theirs, --ours, -X theirs, -X ours) and unchecked pull --rebase ... || true
|
||||
suppressions in push-all-to-git-libre-audio.sh.
|
||||
"""
|
||||
violations: list[str] = []
|
||||
for m_flag in FORBIDDEN_CONFLICT_SIDE_RE.finditer(push_txt):
|
||||
violations.append(
|
||||
f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Forbidden conflict-side flag {m_flag.group(0).strip()!r} in push-all-to-git-libre-audio.sh"
|
||||
)
|
||||
for m_reb in FORBIDDEN_UNCHECKED_REBASE_RE.finditer(push_txt):
|
||||
violations.append(
|
||||
f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Forbidden unchecked rebase suppression {m_reb.group(0)!r} in push-all-to-git-libre-audio.sh"
|
||||
)
|
||||
return violations
|
||||
|
||||
|
||||
def prepare_and_verify_deploy_scripts(
|
||||
@@ -68,7 +81,7 @@ def prepare_and_verify_deploy_scripts(
|
||||
else:
|
||||
ws_push_sh.write_text(upd_push, encoding="utf-8")
|
||||
ws_push_sh.chmod(0o755)
|
||||
modified_files.append(_norm_ws_path(ws_push_sh, workspace_root=ws_root))
|
||||
modified_files.append(normalize_workspace_relpath(ws_push_sh, workspace_root=ws_root))
|
||||
push_txt = upd_push
|
||||
|
||||
tracked_txt = tracked_push_sh.read_text(encoding="utf-8") if tracked_push_sh.is_file() else ""
|
||||
@@ -79,7 +92,7 @@ def prepare_and_verify_deploy_scripts(
|
||||
tracked_push_sh.parent.mkdir(parents=True, exist_ok=True)
|
||||
tracked_push_sh.write_text(push_txt, encoding="utf-8")
|
||||
tracked_push_sh.chmod(0o755)
|
||||
modified_files.append(_norm_ws_path(tracked_push_sh, workspace_root=ws_root))
|
||||
modified_files.append(normalize_workspace_relpath(tracked_push_sh, workspace_root=ws_root))
|
||||
elif tracked_push_sh.is_file():
|
||||
push_txt = tracked_push_sh.read_text(encoding="utf-8")
|
||||
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
|
||||
@@ -89,7 +102,7 @@ def prepare_and_verify_deploy_scripts(
|
||||
else:
|
||||
tracked_push_sh.write_text(upd_push, encoding="utf-8")
|
||||
tracked_push_sh.chmod(0o755)
|
||||
modified_files.append(_norm_ws_path(tracked_push_sh, workspace_root=ws_root))
|
||||
modified_files.append(normalize_workspace_relpath(tracked_push_sh, workspace_root=ws_root))
|
||||
push_txt = upd_push
|
||||
if not check_only:
|
||||
try:
|
||||
@@ -116,7 +129,7 @@ def prepare_and_verify_deploy_scripts(
|
||||
else:
|
||||
sync_vps_sh.write_text(upd_sync, encoding="utf-8")
|
||||
sync_vps_sh.chmod(0o755)
|
||||
modified_files.append(_norm_ws_path(sync_vps_sh, workspace_root=ws_root))
|
||||
modified_files.append(normalize_workspace_relpath(sync_vps_sh, workspace_root=ws_root))
|
||||
sync_txt = upd_sync
|
||||
else:
|
||||
errors.append(f"Gate D1: Missing {sync_vps_sh}")
|
||||
@@ -203,7 +216,7 @@ def prepare_and_verify_deploy_scripts(
|
||||
if not gate_d6_ok:
|
||||
errors.append("Gate D6: Single-layer compression enforcement or Caddyfile media extension parity missing")
|
||||
|
||||
# Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Topological 6-Repository Push & Force-Tag Sync Parity in push-all-to-git-libre-audio.sh
|
||||
# Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Topological 6-Repository Push, Force-Tag Sync & Fail-Fast Rebase Parity in push-all-to-git-libre-audio.sh
|
||||
required_push_markers = (
|
||||
"hyperstitionstudio-core",
|
||||
"ingglish-hyperdope-gematria",
|
||||
@@ -214,10 +227,15 @@ def prepare_and_verify_deploy_scripts(
|
||||
'push --force "${remote_name}" "refs/tags/${head_tag}"',
|
||||
"build-fedora41-rpm.sh",
|
||||
"run_exegesis_and_push_fedora41.sh",
|
||||
"--exegesis-host",
|
||||
"--exegesis-uninstall",
|
||||
"--skip-exegesis-deploy",
|
||||
)
|
||||
gate_d7_ok = all(m in push_txt_cur for m in required_push_markers)
|
||||
if not gate_d7_ok:
|
||||
errors.append("Gate D7: Missing required repository, force-tag, or verification marker in push-all-to-git-libre-audio.sh")
|
||||
d7_rebase_violations = validate_push_script_rebase_gating(push_txt_cur)
|
||||
gate_d7_ok = all(m in push_txt_cur for m in required_push_markers) and len(d7_rebase_violations) == 0
|
||||
if not all(m in push_txt_cur for m in required_push_markers):
|
||||
errors.append("Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Missing required repository, force-tag, or verification marker in push-all-to-git-libre-audio.sh")
|
||||
errors.extend(d7_rebase_violations)
|
||||
|
||||
# Gate DEPLOY-GATE-D08.PRE_COMMIT_STAGE: Automatic Git Staging Prior to Commit (--stage)
|
||||
staged_files: list[str] = []
|
||||
|
||||
@@ -10,7 +10,7 @@ import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import sha256_file
|
||||
from hyperstitionstud_io.publishing.fonts import resolve_font_path
|
||||
|
||||
@@ -55,7 +55,7 @@ def run_diagnostics(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
||||
}
|
||||
|
||||
fb_path = Path(__file__).resolve().parent.parent / "phonetics" / "cmudict_fallback.json"
|
||||
fb_count = len(json.loads(fb_path.read_text(encoding="utf-8"))) if fb_path.is_file() else 0
|
||||
fb_count = len(load_json_cached(fb_path, copy_result=False)) if fb_path.is_file() else 0
|
||||
|
||||
lr_path = cfg.core_dir / "deploy" / "logrotate.d" / "hyperstition-sqlite-meta"
|
||||
lr_txt = lr_path.read_text(encoding="utf-8") if lr_path.is_file() else ""
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
src/hyperstitionstud_io/ci/plan_validator.py
|
||||
Plan Specification & Governance Validator (`hs-plan-lint`).
|
||||
Enforces PLAN-SPECIFICATION-AND-GOVERNANCE-STANDARD across docs/plans/{active,piecewise}/:
|
||||
1. Mandatory companion ReportLab Dark-Mode PDF (.pdf) for every active/piecewise Markdown plan (.md).
|
||||
2. Required metadata fields (Document ID, Status, Target Ecosystem Version, Target Repositories).
|
||||
3. Registration in roadmap-plan-ledger.md.
|
||||
4. Zero container host path serialization.
|
||||
5. Shorthand disambiguation compliance (<PREFIX><NN>.<DOMAIN_TAG>).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
|
||||
REQUIRED_METADATA_KEYS = [
|
||||
"Document ID",
|
||||
"Status",
|
||||
"Target Ecosystem Version",
|
||||
"Target Repositories",
|
||||
]
|
||||
|
||||
CONTAINER_HOST_PATH_PATTERNS = [
|
||||
re.compile(r"/home/[a-zA-Z0-9_-]+/\.hermes"),
|
||||
re.compile(r"/var/lib/docker"),
|
||||
re.compile(r"/tmp/docker"),
|
||||
]
|
||||
|
||||
|
||||
def verify_plan_specifications(workspace_root: str | Path | None = None) -> dict[str, Any]:
|
||||
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||
plans_dir = cfg.knowledge_graph_dir / "docs" / "plans"
|
||||
active_dir = plans_dir / "active"
|
||||
piecewise_dir = plans_dir / "piecewise"
|
||||
|
||||
active_mds = sorted([p for p in active_dir.glob("PLAN-*.md") if p.is_file()])
|
||||
piecewise_mds = sorted([p for p in piecewise_dir.glob("PLAN-*.md") if p.is_file()])
|
||||
all_target_mds = active_mds + piecewise_mds
|
||||
|
||||
ledger_candidates = [
|
||||
Path.home() / ".hermes" / "skills" / "software-development" / "hyperstitionstudio-roadmap-and-release" / "references" / "roadmap-plan-ledger.md",
|
||||
Path("/root/.hermes/skills/software-development/hyperstitionstudio-roadmap-and-release/references/roadmap-plan-ledger.md"),
|
||||
]
|
||||
ledger_text = ""
|
||||
for lc in ledger_candidates:
|
||||
if lc.is_file():
|
||||
ledger_text = lc.read_text(encoding="utf-8")
|
||||
break
|
||||
|
||||
missing_pdfs: list[str] = []
|
||||
missing_ledger_entries: list[str] = []
|
||||
metadata_errors: list[dict[str, Any]] = []
|
||||
host_path_errors: list[dict[str, Any]] = []
|
||||
errors: list[str] = []
|
||||
|
||||
for md_p in all_target_mds:
|
||||
rel_p = md_p.relative_to(cfg.workspace_root).as_posix()
|
||||
pdf_p = md_p.with_suffix(".pdf")
|
||||
if not pdf_p.is_file():
|
||||
missing_pdfs.append(rel_p)
|
||||
|
||||
txt = md_p.read_text(encoding="utf-8")
|
||||
|
||||
# Check metadata fields
|
||||
missing_keys = []
|
||||
for key in REQUIRED_METADATA_KEYS:
|
||||
if not re.search(rf"\*\*{re.escape(key)}:\*\*", txt):
|
||||
missing_keys.append(key)
|
||||
if missing_keys:
|
||||
metadata_errors.append({"file": rel_p, "missing_keys": missing_keys})
|
||||
|
||||
# Check host path leakage
|
||||
for pat in CONTAINER_HOST_PATH_PATTERNS:
|
||||
m = pat.search(txt)
|
||||
if m:
|
||||
host_path_errors.append({"file": rel_p, "leakage": m.group(0)})
|
||||
|
||||
# Check ledger presence if ledger is found
|
||||
if ledger_text:
|
||||
plan_stem = md_p.stem
|
||||
if plan_stem not in ledger_text:
|
||||
missing_ledger_entries.append(plan_stem)
|
||||
|
||||
if missing_pdfs:
|
||||
errors.append(f"Missing companion Dark-Mode PDFs for: {', '.join(missing_pdfs)}")
|
||||
if metadata_errors:
|
||||
errors.append(f"Metadata errors: {metadata_errors}")
|
||||
if host_path_errors:
|
||||
errors.append(f"Host path leakage detected: {host_path_errors}")
|
||||
if missing_ledger_entries:
|
||||
errors.append(f"Plans missing from roadmap-plan-ledger.md: {missing_ledger_entries}")
|
||||
|
||||
return {
|
||||
"ok": len(errors) == 0,
|
||||
"active_plans_checked": len(active_mds),
|
||||
"piecewise_plans_checked": len(piecewise_mds),
|
||||
"total_plans_checked": len(all_target_mds),
|
||||
"missing_pdfs": missing_pdfs,
|
||||
"missing_ledger_entries": missing_ledger_entries,
|
||||
"metadata_errors": metadata_errors,
|
||||
"host_path_errors": host_path_errors,
|
||||
"errors": errors,
|
||||
}
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
ap = argparse.ArgumentParser(prog="hs-plan-lint", description="Validate active/piecewise architectural plans against governance standard.")
|
||||
ap.add_argument("--workspace-root", default=None, help="Root directory of hyperstitionstud.io workspace.")
|
||||
args = ap.parse_args(argv)
|
||||
|
||||
res = verify_plan_specifications(workspace_root=args.workspace_root)
|
||||
print(json.dumps(res, indent=2))
|
||||
return 0 if res["ok"] else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -27,7 +27,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import sha256_file
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA
|
||||
@@ -60,9 +60,7 @@ def _resolve_web_route_to_disk(route: str, cfg: Any) -> Path:
|
||||
core = cfg.core_dir
|
||||
zoo = cfg.zoology_dir
|
||||
kg = cfg.knowledge_graph_dir
|
||||
ci = cfg.paths.get("ci_build_dir") or (cfg.workspace_root / "hyperdope-ci-build")
|
||||
if not ci.is_dir() and (cfg.workspace_root / "ingglish-hyperdope-ci").is_dir():
|
||||
ci = cfg.workspace_root / "ingglish-hyperdope-ci"
|
||||
ci = cfg.ci_build_dir
|
||||
|
||||
if route == "/":
|
||||
return core / "site" / "index.html"
|
||||
@@ -93,10 +91,10 @@ def build_internal_test_baseline_snapshot(workspace_root: str | Path | None = No
|
||||
brf_p = cfg.core_dir / "site" / "quant" / "daily-brief-latest.json"
|
||||
kg_p = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
||||
|
||||
ts_obj = json.loads(ts_p.read_text(encoding="utf-8"))
|
||||
mac_obj = json.loads(mac_p.read_text(encoding="utf-8"))
|
||||
brf_obj = json.loads(brf_p.read_text(encoding="utf-8"))
|
||||
kg_obj = json.loads(kg_p.read_text(encoding="utf-8"))
|
||||
ts_obj = load_json_cached(ts_p, copy_result=False)
|
||||
mac_obj = load_json_cached(mac_p, copy_result=False)
|
||||
brf_obj = load_json_cached(brf_p, copy_result=False)
|
||||
kg_obj = load_json_cached(kg_p, copy_result=False)
|
||||
|
||||
nvda_inst = next(i for i in ts_obj["instruments"] if i["symbol"] == "NVDA")
|
||||
nvda_nov27 = next(b for b in nvda_inst["bars"] if b["date_utc"] == "2026-11-27")
|
||||
@@ -206,7 +204,7 @@ def run_public_regression_suite(
|
||||
|
||||
bp = Path(baseline_path) if baseline_path else get_default_baseline_cache_path()
|
||||
if bp.is_file():
|
||||
baseline = json.loads(bp.read_text(encoding="utf-8"))
|
||||
baseline = load_json_cached(bp, copy_result=False)
|
||||
else:
|
||||
baseline = build_internal_test_baseline_snapshot()
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as _PKG_VERSION
|
||||
|
||||
CORE_REPO_ROOT = Path(__file__).resolve().parents[3]
|
||||
WORKSPACE_ROOT = CORE_REPO_ROOT.parent
|
||||
USER_WORKSPACE_TOML = Path.home() / ".config" / "hyperstitionstud.io" / "workspace.toml"
|
||||
@@ -173,7 +175,7 @@ def load_json_cached(path: str | Path, *, copy_result: bool = True) -> Any:
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class WorkspaceConfig:
|
||||
schema_version: str = "1.2.0"
|
||||
schema_version: str = _PKG_VERSION
|
||||
namespace_urn: str = "urn:io:hyperstitionstud"
|
||||
workspace_root: Path = WORKSPACE_ROOT
|
||||
paths: dict[str, Path] = field(default_factory=dict)
|
||||
@@ -288,7 +290,7 @@ def load_workspace_config(
|
||||
resolved_mounts = {str(_rebase_path(k, ws_root)): str(v) for k, v in raw_cit.items()}
|
||||
|
||||
return WorkspaceConfig(
|
||||
schema_version=str(raw.get("schema_version", "1.2.0")),
|
||||
schema_version=str(raw.get("schema_version", _PKG_VERSION)),
|
||||
namespace_urn=str(raw.get("namespace_urn", "urn:io:hyperstitionstud")),
|
||||
workspace_root=ws_root,
|
||||
paths=resolved_paths,
|
||||
|
||||
@@ -36,7 +36,7 @@ if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(_SRC_DIR))
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
||||
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config # noqa: E402
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard # noqa: E402
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1 # noqa: E402
|
||||
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle # noqa: E402
|
||||
@@ -403,7 +403,7 @@ def build_catalog_sqlite_db(db_path: Path | str | None = None) -> dict[str, Any]
|
||||
|
||||
# 2. Glossary Entries & Bilingual Specimens
|
||||
gl_path = cfg.zoology_dir / "taxonomy" / "glossary-registry.json"
|
||||
gl_data = json.loads(gl_path.read_text(encoding="utf-8"))
|
||||
gl_data = load_json_cached(gl_path, copy_result=False)
|
||||
seen_terms: set[str] = set()
|
||||
glossary_rows = 0
|
||||
|
||||
@@ -500,7 +500,7 @@ def build_catalog_sqlite_db(db_path: Path | str | None = None) -> dict[str, Any]
|
||||
|
||||
# 3. Knowledge Graph Nodes & Edges
|
||||
kg_path = cfg.knowledge_graph_dir / "encyclopedia-graph.json"
|
||||
kg_data = json.loads(kg_path.read_text(encoding="utf-8"))
|
||||
kg_data = load_json_cached(kg_path, copy_result=False)
|
||||
deg_map: dict[str, int] = {}
|
||||
edge_rows = 0
|
||||
for e in kg_data.get("edges", []):
|
||||
@@ -619,7 +619,7 @@ def build_catalog_sqlite_db(db_path: Path | str | None = None) -> dict[str, Any]
|
||||
# 5. Periodic Quantitative Financial Time-Series Bars (24 Tickers x 30 UTC Days = 720 bars)
|
||||
ts_path = cfg.core_dir / "site" / "quant" / "quant-timeseries.json"
|
||||
if ts_path.is_file():
|
||||
ts_bundle = json.loads(ts_path.read_text(encoding="utf-8"))
|
||||
ts_bundle = load_json_cached(ts_path, copy_result=False)
|
||||
else:
|
||||
ts_bundle = build_quant_timeseries_bundle(write_files=False)
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ MCP_TOOLS_SCHEMA: list[dict[str, Any]] = [
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"harvest_mode": {"type": "string", "enum": ["us-closing-bell", "utc-rollover"], "default": "us-closing-bell"},
|
||||
"harvest_mode": {"type": "string", "enum": ["us-pre-market-open", "us-closing-bell", "utc-rollover"], "default": "us-closing-bell"},
|
||||
"symbol_filter": {"type": "string", "default": "", "description": "Optional ticker symbol filter (e.g. 'NVDA', 'ASML', 'BTC-USD')."},
|
||||
},
|
||||
},
|
||||
@@ -683,7 +683,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
||||
b_path = cfg.core_dir / "site" / "quant" / "daily-brief-latest.json"
|
||||
if bool(arguments.get("refresh")) or not b_path.is_file():
|
||||
return build_daily_portfolio_brief(allow_live_network=False, write_files=False)
|
||||
return load_json_cached(b_path)
|
||||
return load_json_cached(b_path, copy_result=False)
|
||||
|
||||
if name == "hs_inspect_engineering_and_math_docs":
|
||||
from hyperstitionstud_io.publishing.engineering_docs import (
|
||||
@@ -760,7 +760,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
||||
{
|
||||
"id": "ONBOARDING-INGGLISH-AQ",
|
||||
"category": "manuals",
|
||||
"md_path": (cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")) / "ONBOARDING-INGGLISH-AQ.md",
|
||||
"md_path": cfg.ci_build_dir / "ONBOARDING-INGGLISH-AQ.md",
|
||||
"web_pdf_route": "/ci/ONBOARDING-INGGLISH-AQ.pdf",
|
||||
},
|
||||
{
|
||||
@@ -1036,7 +1036,7 @@ def call_mcp_tool(name: str, arguments: dict[str, Any]) -> dict[str, Any]:
|
||||
if inc_base:
|
||||
bp = get_default_baseline_cache_path()
|
||||
if bp.is_file():
|
||||
b_obj = json.loads(bp.read_text(encoding="utf-8"))
|
||||
b_obj = load_json_cached(bp, copy_result=False)
|
||||
out_cat["internal_test_baseline"] = {
|
||||
"expected_version": b_obj.get("expected_version"),
|
||||
"expected_mcp_tool_count": b_obj.get("expected_mcp_tool_count"),
|
||||
|
||||
@@ -32,7 +32,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config, normalize_workspace_relpath
|
||||
from hyperstitionstud_io.db.sqlite_meta import ensure_single_layer_gzip_file, parse_size_spec_bytes
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard, sha256_file
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||
@@ -47,15 +47,6 @@ INACTIVE_MANIFEST_FILENAME = "inactive-archive-manifest.json"
|
||||
DEFAULT_MAX_ARCHIVE_BUNDLE_BYTES = 256 * 1024 # 262,144 bytes (256 KB)
|
||||
|
||||
|
||||
def _norm_ws_path(p: Path | str, workspace_root: str | Path | None = None) -> str:
|
||||
cfg = load_workspace_config(workspace_root=workspace_root)
|
||||
ws_res = str(cfg.workspace_root.resolve())
|
||||
s = str(Path(p).resolve())
|
||||
if s.startswith(ws_res):
|
||||
return "/workspace" + s[len(ws_res):]
|
||||
return str(p)
|
||||
|
||||
|
||||
def assert_not_gematria_pipeline_source(target_path: str | Path, workspace_root: str | Path | None = None) -> Path:
|
||||
"""
|
||||
Hard programmatic block guaranteeing that NO file supplying any gematria, phonemic,
|
||||
@@ -571,7 +562,7 @@ def _load_existing_manifest_maps(manifest_p: Path) -> tuple[dict[str, dict[str,
|
||||
existing_manifest: dict[str, Any] = {}
|
||||
if manifest_p.is_file():
|
||||
try:
|
||||
existing_manifest = load_json_cached(manifest_p)
|
||||
existing_manifest = load_json_cached(manifest_p, copy_result=False)
|
||||
except Exception:
|
||||
existing_manifest = {}
|
||||
|
||||
@@ -690,8 +681,8 @@ def rotate_docs_archive_directory(
|
||||
staged_files = sorted(p for p in stage_dir.iterdir() if p.is_file() and p.suffix == ".md")
|
||||
if not staged_files and not long_term_by_name:
|
||||
return {
|
||||
"archive_dir": _norm_ws_path(arc_p),
|
||||
"bundle_path": _norm_ws_path(bundle_p),
|
||||
"archive_dir": normalize_workspace_relpath(arc_p),
|
||||
"bundle_path": normalize_workspace_relpath(bundle_p),
|
||||
"member_count": 0,
|
||||
"rotated_loose_files": 0,
|
||||
"preserved_standalone_pdfs": preserved_standalone_pdfs,
|
||||
@@ -720,9 +711,9 @@ def rotate_docs_archive_directory(
|
||||
lp.unlink()
|
||||
|
||||
return {
|
||||
"archive_dir": _norm_ws_path(arc_p),
|
||||
"bundle_path": _norm_ws_path(bundle_p),
|
||||
"manifest_path": _norm_ws_path(manifest_p),
|
||||
"archive_dir": normalize_workspace_relpath(arc_p),
|
||||
"bundle_path": normalize_workspace_relpath(bundle_p),
|
||||
"manifest_path": normalize_workspace_relpath(manifest_p),
|
||||
"manifest_dag_json_cid": manifest_cid,
|
||||
"max_bundle_bytes": eff_max_bytes,
|
||||
"bundle_size_bytes": bundle_p.stat().st_size,
|
||||
@@ -815,8 +806,8 @@ def rotate_inactive_plans_marked_for_archival(
|
||||
if not staged_files and not long_term_by_name:
|
||||
return {
|
||||
"ok": True,
|
||||
"inactive_dir": _norm_ws_path(inactive_dir, workspace_root=workspace_root),
|
||||
"bundle_path": _norm_ws_path(bundle_p, workspace_root=workspace_root),
|
||||
"inactive_dir": normalize_workspace_relpath(inactive_dir, workspace_root=workspace_root),
|
||||
"bundle_path": normalize_workspace_relpath(bundle_p, workspace_root=workspace_root),
|
||||
"member_count": 0,
|
||||
"rotated_loose_files": 0,
|
||||
"retained_inactive_plans": retained_inactive_plans,
|
||||
@@ -843,9 +834,9 @@ def rotate_inactive_plans_marked_for_archival(
|
||||
return {
|
||||
"ok": True,
|
||||
"version": CURRENT_VERSION,
|
||||
"inactive_dir": _norm_ws_path(inactive_dir, workspace_root=workspace_root),
|
||||
"bundle_path": _norm_ws_path(bundle_p, workspace_root=workspace_root),
|
||||
"manifest_path": _norm_ws_path(manifest_p, workspace_root=workspace_root),
|
||||
"inactive_dir": normalize_workspace_relpath(inactive_dir, workspace_root=workspace_root),
|
||||
"bundle_path": normalize_workspace_relpath(bundle_p, workspace_root=workspace_root),
|
||||
"manifest_path": normalize_workspace_relpath(manifest_p, workspace_root=workspace_root),
|
||||
"manifest_dag_json_cid": manifest_cid,
|
||||
"bundle_size_bytes": bundle_p.stat().st_size,
|
||||
"bundle_sha256": bundle_sha,
|
||||
@@ -949,7 +940,7 @@ def audit_and_fix_multi_compressed_files(
|
||||
cfg.zoology_dir,
|
||||
cfg.knowledge_graph_dir,
|
||||
cfg.paths["gematria_js_dir"],
|
||||
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
|
||||
cfg.ci_build_dir,
|
||||
]
|
||||
for ed in extra_dirs or []:
|
||||
ep = Path(ed)
|
||||
@@ -981,10 +972,10 @@ def audit_and_fix_multi_compressed_files(
|
||||
fp.unlink()
|
||||
else:
|
||||
fp.rename(base_p)
|
||||
removed_double_sidecars.append(_norm_ws_path(fp, workspace_root=workspace_root))
|
||||
removed_double_sidecars.append(normalize_workspace_relpath(fp, workspace_root=workspace_root))
|
||||
continue
|
||||
else:
|
||||
removed_double_sidecars.append(_norm_ws_path(fp, workspace_root=workspace_root))
|
||||
removed_double_sidecars.append(normalize_workspace_relpath(fp, workspace_root=workspace_root))
|
||||
|
||||
if fn.endswith((".gz", ".tgz")):
|
||||
scanned_gz_count += 1
|
||||
@@ -996,7 +987,7 @@ def audit_and_fix_multi_compressed_files(
|
||||
if head.startswith((b"\x1f\x8b", b"\xfd7zXZ\x00")):
|
||||
if fix:
|
||||
ensure_single_layer_gzip_file(fp)
|
||||
peeled_gzip_files.append(_norm_ws_path(fp, workspace_root=workspace_root))
|
||||
peeled_gzip_files.append(normalize_workspace_relpath(fp, workspace_root=workspace_root))
|
||||
|
||||
if fn.endswith((".tar.gz", ".tgz", ".tar.xz")):
|
||||
scanned_tar_count += 1
|
||||
@@ -1025,12 +1016,12 @@ def audit_and_fix_multi_compressed_files(
|
||||
elif bad_members and fix and fn.startswith("ingglish-isopsephic-exegesis-") and fn.endswith((".tar.gz", ".tar.xz")):
|
||||
# Remove legacy 2x-compressed packaging wrapper if still present in an unpulled/live directory
|
||||
fp.unlink()
|
||||
removed_double_sidecars.append(_norm_ws_path(fp, workspace_root=workspace_root))
|
||||
removed_double_sidecars.append(normalize_workspace_relpath(fp, workspace_root=workspace_root))
|
||||
bad_members = []
|
||||
if bad_members:
|
||||
nested_archive_violations.append(
|
||||
{
|
||||
"archive": _norm_ws_path(fp, workspace_root=workspace_root),
|
||||
"archive": normalize_workspace_relpath(fp, workspace_root=workspace_root),
|
||||
"nested_compressed_members": bad_members,
|
||||
}
|
||||
)
|
||||
@@ -1150,7 +1141,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
):
|
||||
mp = d / mf
|
||||
if mp.is_file():
|
||||
out[_norm_ws_path(d, workspace_root=args.workspace_root)] = load_json_cached(mp)
|
||||
out[normalize_workspace_relpath(d, workspace_root=args.workspace_root)] = load_json_cached(mp, copy_result=False)
|
||||
print(json.dumps(out, indent=2))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -30,12 +30,15 @@ from typing import Any
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.config import count_file_lines_cached, load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||
from hyperstitionstud_io.publishing.fonts import (
|
||||
GROUP3_PALETTE,
|
||||
draw_bounded_box_text,
|
||||
draw_bounded_kv_row,
|
||||
draw_group3_chamfered_plate,
|
||||
fit_pillow_text_to_width,
|
||||
load_pillow_font,
|
||||
)
|
||||
|
||||
@@ -126,17 +129,15 @@ def _fit_font_for_width(
|
||||
min_size: int = 8,
|
||||
bold: bool = False,
|
||||
) -> tuple[Any, int, int]:
|
||||
font_file = FONT_MONO_B if bold else FONT_MONO
|
||||
for sz in range(preferred_size, min_size - 1, -1):
|
||||
f = _fnt(font_file, sz)
|
||||
tb = d.textbbox((0, 0), text, font=f)
|
||||
w = int(tb[2] - tb[0])
|
||||
h = int(tb[3] - tb[1])
|
||||
if w <= max_width:
|
||||
return f, w, h
|
||||
f = _fnt(font_file, min_size)
|
||||
tb = d.textbbox((0, 0), text, font=f)
|
||||
return f, int(tb[2] - tb[0]), int(tb[3] - tb[1])
|
||||
return fit_pillow_text_to_width(
|
||||
d,
|
||||
text,
|
||||
max_width,
|
||||
preferred_size=preferred_size,
|
||||
min_size=min_size,
|
||||
bold=bold,
|
||||
font_filename=FONT_MONO_B if bold else FONT_MONO,
|
||||
)
|
||||
|
||||
|
||||
def _draw_box_text(
|
||||
@@ -152,18 +153,19 @@ def _draw_box_text(
|
||||
bold: bool = False,
|
||||
y_pos: int | None = None,
|
||||
) -> tuple[int, int, int, int]:
|
||||
bx1, by1, bx2, by2 = box
|
||||
avail_w = max(16, (bx2 - bx1) - 2 * pad_x)
|
||||
f, tw, th = _fit_font_for_width(d, text, avail_w, preferred_size=preferred_size, min_size=min_size, bold=bold)
|
||||
if align == "center":
|
||||
tx = bx1 + max(pad_x, ((bx2 - bx1) - tw) // 2)
|
||||
elif align == "right":
|
||||
tx = max(bx1 + pad_x, bx2 - pad_x - tw)
|
||||
else:
|
||||
tx = bx1 + pad_x
|
||||
ty = y_pos if y_pos is not None else (by1 + max(2, ((by2 - by1) - th) // 2 - 1))
|
||||
d.text((tx, ty), text, font=f, fill=fill)
|
||||
return d.texts[-1][2]
|
||||
return draw_bounded_box_text(
|
||||
d,
|
||||
box,
|
||||
text,
|
||||
fill,
|
||||
pad_x=pad_x,
|
||||
align=align,
|
||||
preferred_size=preferred_size,
|
||||
min_size=min_size,
|
||||
bold=bold,
|
||||
y_pos=y_pos,
|
||||
font_filename=FONT_MONO_B if bold else FONT_MONO,
|
||||
)
|
||||
|
||||
|
||||
def _draw_kv_row(
|
||||
@@ -181,22 +183,20 @@ def _draw_kv_row(
|
||||
val_bold: bool = False,
|
||||
min_val_x: int | None = None,
|
||||
) -> None:
|
||||
bx1, by1, bx2, by2 = box
|
||||
d.rectangle([bx1, by1, bx2, by2], fill=fill_bg, outline=outline)
|
||||
total_inner = (bx2 - bx1) - 16
|
||||
kf, kw, kh = _fit_font_for_width(d, key_text, max(40, int(total_inner * 0.52)), preferred_size=key_size, min_size=8, bold=True)
|
||||
ky = by1 + max(2, ((by2 - by1) - kh) // 2 - 1)
|
||||
kx = bx1 + 8
|
||||
d.text((kx, ky), key_text, font=kf, fill=key_fill)
|
||||
key_tb = d.texts[-1][2]
|
||||
|
||||
vx_start = max(key_tb[2] + 8, min_val_x if min_val_x is not None else (key_tb[2] + 10))
|
||||
avail_val_w = max(24, (bx2 - 6) - vx_start)
|
||||
vf, vw, vh = _fit_font_for_width(d, val_text, avail_val_w, preferred_size=val_size, min_size=8, bold=val_bold)
|
||||
if vx_start + vw > bx2 - 6:
|
||||
vx_start = max(key_tb[2] + 6, (bx2 - 6) - vw)
|
||||
vy = by1 + max(2, ((by2 - by1) - vh) // 2 - 1)
|
||||
d.text((vx_start, vy), val_text, font=vf, fill=val_fill)
|
||||
draw_bounded_kv_row(
|
||||
d,
|
||||
box,
|
||||
key_text,
|
||||
val_text,
|
||||
fill_bg=fill_bg,
|
||||
outline=outline,
|
||||
key_fill=key_fill,
|
||||
val_fill=val_fill,
|
||||
key_size=key_size,
|
||||
val_size=val_size,
|
||||
val_bold=val_bold,
|
||||
min_val_x=min_val_x,
|
||||
)
|
||||
|
||||
|
||||
def verify_closeup_geometry(tracked_by_filename: dict[str, _TrackedCanvasDraw]) -> dict[str, Any]:
|
||||
@@ -348,7 +348,7 @@ def introspect_live_ui_elements(workspace_root: str | Path | None = None) -> dic
|
||||
core = cfg.core_dir
|
||||
kg = cfg.knowledge_graph_dir
|
||||
calc_dir = cfg.paths["gematria_js_dir"]
|
||||
ci_dir = cfg.paths.get("ci_repo_dir") or (cfg.workspace_root / "hyperdope-ci-build")
|
||||
ci_dir = cfg.ci_build_dir
|
||||
|
||||
surfaces: dict[str, Path] = {
|
||||
"home": core / "site" / "index.html",
|
||||
@@ -408,7 +408,7 @@ def introspect_live_ui_elements(workspace_root: str | Path | None = None) -> dic
|
||||
}
|
||||
|
||||
db_txt_p = calc_dir / "db.txt"
|
||||
db_entries_count = sum(1 for _ in db_txt_p.open(encoding="utf-8")) if db_txt_p.is_file() else 231615
|
||||
db_entries_count = count_file_lines_cached(db_txt_p) if db_txt_p.is_file() else 231615
|
||||
|
||||
ci_rep_p = ci_dir / "ci-audit-report.json"
|
||||
ci_obj = load_json_cached(ci_rep_p, copy_result=False) if ci_rep_p.is_file() else {}
|
||||
@@ -486,7 +486,7 @@ def render_all_quadrant_closeups(
|
||||
prev_fp = ""
|
||||
if manifest_path.is_file():
|
||||
try:
|
||||
prev_obj = json.loads(manifest_path.read_text(encoding="utf-8"))
|
||||
prev_obj = load_json_cached(manifest_path, copy_result=False)
|
||||
prev_fp = prev_obj.get("ui_elements_fingerprint_sha256", "")
|
||||
except Exception:
|
||||
prev_fp = ""
|
||||
|
||||
@@ -9,6 +9,7 @@ clamping (`breach_count == 0`).
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
@@ -20,6 +21,7 @@ from hyperstitionstud_io.publishing.fonts import (
|
||||
GROUP3_PALETTE,
|
||||
chamfer_polygon_points as _chamfer_pts,
|
||||
draw_group3_chamfered_plate as _draw_group3_plate,
|
||||
fit_pillow_text_to_width,
|
||||
load_pillow_font,
|
||||
)
|
||||
|
||||
@@ -55,18 +57,48 @@ def _draw_arrow_right(draw: Any, x0: int, x1: int, y: int, color: tuple[int, int
|
||||
draw.polygon([(x1 - 10, y - 5), (x1 - 10, y + 5), (x1, y)], fill=color)
|
||||
|
||||
|
||||
def _compute_flow_diagram_sha256() -> str:
|
||||
src_bytes = Path(__file__).resolve().read_bytes()
|
||||
h = hashlib.sha256()
|
||||
h.update(f"v{CURRENT_VERSION}:{DIAGRAM_WIDTH}x{DIAGRAM_HEIGHT}:".encode("utf-8"))
|
||||
h.update(src_bytes)
|
||||
return h.hexdigest()
|
||||
|
||||
|
||||
def render_periodic_harvest_cicd_flow_diagram_png(
|
||||
output_path: str | Path | None = None,
|
||||
*,
|
||||
if_changed: bool = True,
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Render the 5-Stage End-to-End Periodic Data Harvest -> CI/CD -> Deployed VPS Infrastructure Flow Diagram
|
||||
to `/workspace/encyclopedia-knowledge-graph/docs/periodic-harvest-cicd-to-vps-flow-diagram.png`.
|
||||
When `if_changed=True` and the existing PNG embeds a matching `hs_diagram_sha256` tEXt chunk,
|
||||
skips rewriting the file.
|
||||
"""
|
||||
from PIL import Image, ImageDraw
|
||||
from PIL.PngImagePlugin import PngInfo
|
||||
|
||||
cfg = load_workspace_config()
|
||||
out_p = Path(output_path) if output_path else (cfg.knowledge_graph_dir / "docs" / "periodic-harvest-cicd-to-vps-flow-diagram.png")
|
||||
out_p = out_p.resolve()
|
||||
diagram_sha256 = _compute_flow_diagram_sha256()
|
||||
|
||||
if if_changed and out_p.is_file():
|
||||
try:
|
||||
with Image.open(out_p) as existing_im:
|
||||
if existing_im.info.get("hs_diagram_sha256") == diagram_sha256:
|
||||
return {
|
||||
"png_path": str(out_p),
|
||||
"dimensions": [DIAGRAM_WIDTH, DIAGRAM_HEIGHT],
|
||||
"size_bytes": out_p.stat().st_size,
|
||||
"breach_count": 0,
|
||||
"skipped_unchanged": True,
|
||||
"hs_diagram_sha256": diagram_sha256,
|
||||
}
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
out_p.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp_p = out_p.with_suffix(f".tmp.{os.getpid()}.png")
|
||||
|
||||
@@ -381,13 +413,17 @@ def render_periodic_harvest_cicd_flow_diagram_png(
|
||||
fit_text(bbox[0] + 12, ly, ln, TXT_PRI, [f_m11, f_m10], max_x=bbox[2] - 10)
|
||||
ly += 20
|
||||
|
||||
img.save(tmp_p, format="PNG")
|
||||
pnginfo = PngInfo()
|
||||
pnginfo.add_text("hs_diagram_sha256", diagram_sha256)
|
||||
img.save(tmp_p, format="PNG", pnginfo=pnginfo)
|
||||
os.replace(tmp_p, out_p)
|
||||
return {
|
||||
"png_path": str(out_p),
|
||||
"dimensions": [DIAGRAM_WIDTH, DIAGRAM_HEIGHT],
|
||||
"size_bytes": out_p.stat().st_size,
|
||||
"breach_count": breach_count,
|
||||
"skipped_unchanged": False,
|
||||
"hs_diagram_sha256": diagram_sha256,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||
from hyperstitionstud_io.mcp.tools import MCP_TOOLS_SCHEMA
|
||||
@@ -44,7 +44,7 @@ def compute_corpus_delta_report(workspace_root: str | Path | None = None) -> dic
|
||||
prior_snap = cur_snap
|
||||
if cache_p.is_file():
|
||||
try:
|
||||
prior_snap = json.loads(cache_p.read_text(encoding="utf-8"))
|
||||
prior_snap = load_json_cached(cache_p, copy_result=False)
|
||||
except Exception:
|
||||
prior_snap = cur_snap
|
||||
|
||||
|
||||
@@ -639,9 +639,7 @@ def discover_web_and_repo_pdf_pairs(workspace_root: str | Path | None = None) ->
|
||||
core = cfg.core_dir
|
||||
zoo = cfg.zoology_dir
|
||||
kg = cfg.knowledge_graph_dir
|
||||
ci = cfg.paths.get("ci_build_dir") or (cfg.workspace_root / "hyperdope-ci-build")
|
||||
if not ci.is_dir() and (cfg.workspace_root / "ingglish-hyperdope-ci").is_dir():
|
||||
ci = cfg.workspace_root / "ingglish-hyperdope-ci"
|
||||
ci = cfg.ci_build_dir
|
||||
|
||||
web_surfaces = [
|
||||
core / "site" / "index.html",
|
||||
|
||||
@@ -39,7 +39,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||
from hyperstitionstud_io.phonetics import translate_batch
|
||||
|
||||
@@ -393,7 +393,7 @@ def build_quant_tour_voice_assets(
|
||||
prev_clips_by_id: dict[str, dict[str, Any]] = {}
|
||||
if not force and manifest_p.is_file():
|
||||
try:
|
||||
prev_man = json.loads(manifest_p.read_text(encoding="utf-8"))
|
||||
prev_man = load_json_cached(manifest_p, copy_result=False)
|
||||
for c_item in prev_man.get("clips") or []:
|
||||
cid = str(c_item.get("clip_id") or "")
|
||||
if cid and (target_dir / f"{cid}.wav").is_file():
|
||||
|
||||
@@ -34,7 +34,7 @@ if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(_SRC_DIR))
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
||||
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
|
||||
from hyperstitionstud_io.config import load_workspace_config, resolve_workspace_repo_dir, run_git_stdout # noqa: E402
|
||||
|
||||
STATUS_START = "<!-- HS-COMMIT-STATUS:START -->"
|
||||
STATUS_END = "<!-- HS-COMMIT-STATUS:END -->"
|
||||
@@ -73,29 +73,8 @@ REPO_SPECS: dict[str, dict[str, str]] = {
|
||||
}
|
||||
|
||||
|
||||
def _git_out(repo_dir: Path, args: list[str], strip_leading: bool = True) -> str:
|
||||
try:
|
||||
res = subprocess.run(
|
||||
["git", "-C", str(repo_dir), *args],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=5,
|
||||
check=False,
|
||||
)
|
||||
if res.returncode == 0:
|
||||
return res.stdout.strip() if strip_leading else res.stdout.rstrip("\r\n")
|
||||
except Exception:
|
||||
pass
|
||||
return ""
|
||||
|
||||
|
||||
def _resolve_repo_dir(ws_root: Path, repo_key: str) -> Path:
|
||||
cand = ws_root / repo_key
|
||||
if cand.is_dir():
|
||||
return cand
|
||||
if repo_key == "hyperdope-ci-build" and (ws_root / "ingglish-hyperdope-ci").is_dir():
|
||||
return ws_root / "ingglish-hyperdope-ci"
|
||||
return cand
|
||||
return resolve_workspace_repo_dir(ws_root, repo_key)
|
||||
|
||||
|
||||
def _introspect_repo_commit_context(repo_dir: Path, version: str) -> dict[str, Any]:
|
||||
@@ -111,11 +90,11 @@ def _introspect_repo_commit_context(repo_dir: Path, version: str) -> dict[str, A
|
||||
}
|
||||
|
||||
# Check staged files first (for pre-commit hook)
|
||||
staged_raw = _git_out(repo_dir, ["diff", "--cached", "--name-only"])
|
||||
staged_raw = run_git_stdout(repo_dir, ["diff", "--cached", "--name-only"])
|
||||
staged = [ln.strip() for ln in staged_raw.splitlines() if ln.strip() and ln.strip() != "README.md"]
|
||||
|
||||
# Check working-tree modified files next (preserve leading status column on line 1!)
|
||||
status_raw = _git_out(repo_dir, ["status", "--porcelain"], strip_leading=False)
|
||||
status_raw = run_git_stdout(repo_dir, ["status", "--porcelain"], strip_leading=False)
|
||||
dirty: list[str] = []
|
||||
for ln in status_raw.splitlines():
|
||||
if not ln.strip():
|
||||
@@ -124,7 +103,7 @@ def _introspect_repo_commit_context(repo_dir: Path, version: str) -> dict[str, A
|
||||
if p and p != "README.md" and not p.startswith("untracked/"):
|
||||
dirty.append(p)
|
||||
|
||||
head_files_raw = _git_out(repo_dir, ["diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"])
|
||||
head_files_raw = run_git_stdout(repo_dir, ["diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"])
|
||||
head_files = [ln.strip() for ln in head_files_raw.splitlines() if ln.strip() and ln.strip() != "README.md"]
|
||||
|
||||
active_files = staged if staged else (dirty if dirty else head_files)
|
||||
@@ -493,8 +472,8 @@ def sync_all_repo_readmes(
|
||||
|
||||
PRE_COMMIT_HOOK_SCRIPT = """#!/usr/bin/env bash
|
||||
# Auto-installed by hyperstitionstud_io.publishing.readme_sync (hs-readme-sync --install-hooks)
|
||||
# Prepares & validates push-all-to-git-libre-audio.sh and deploy/sync-vps-repos.sh (Gates D1-D8),
|
||||
# re-renders homepage UI closeups when page UI elements change, and synchronizes root README.md before every commit.
|
||||
# Path-aware pre-commit hook: runs deploy_scripts_sync & closeups_sync only when staged files
|
||||
# affect their respective surfaces, and synchronizes root README.md + shorthand_lint before every commit.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||
@@ -511,14 +490,19 @@ fi
|
||||
|
||||
if [[ -d "${CORE_SRC}" ]]; then
|
||||
export PYTHONPATH="${CORE_SRC}${PYTHONPATH:+:${PYTHONPATH}}"
|
||||
STAGED_FILES="$(git -C "${REPO_ROOT}" diff --cached --name-only || true)"
|
||||
if [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}" --stage
|
||||
else
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}"
|
||||
if printf '%s\n' "${STAGED_FILES}" | grep -Eq '^(deploy/|pyproject\\.toml|src/hyperstitionstud_io/__init__\\.py)'; then
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}" --stage
|
||||
else
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.deploy_scripts_sync --workspace-root "${WS_ROOT}" --check
|
||||
fi
|
||||
fi
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.publishing.closeups_sync
|
||||
if [[ -d "${WS_ROOT}/hyperstitionstudio-core/site/assets/closeups" ]] && [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
||||
git -C "${REPO_ROOT}" add site/assets/closeups/
|
||||
if printf '%s\n' "${STAGED_FILES}" | grep -Eq '(^site/|^index\\.html$|^config\\.default\\.js$|^ci-audit-report\\.json$|^src/hyperstitionstud_io/(publishing|quant)/)'; then
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.publishing.closeups_sync
|
||||
if [[ -d "${WS_ROOT}/hyperstitionstudio-core/site/assets/closeups" ]] && [[ "${REPO_NAME}" == "hyperstitionstudio-core" ]]; then
|
||||
git -C "${REPO_ROOT}" add site/assets/closeups/
|
||||
fi
|
||||
fi
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.publishing.readme_sync --repo "${REPO_NAME}" --stage
|
||||
"${PYTHON_BIN}" -m hyperstitionstud_io.ci.shorthand_lint --staged-diff --repo "${REPO_ROOT}"
|
||||
|
||||
@@ -39,7 +39,7 @@ from hyperstitionstud_io.ciphers import ( # noqa: E402
|
||||
is_repdigit_37,
|
||||
prime_rank,
|
||||
)
|
||||
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config # noqa: E402
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard # noqa: E402
|
||||
from hyperstitionstud_io.ipld import ( # noqa: E402
|
||||
compute_dag_json_cidv1,
|
||||
@@ -167,6 +167,9 @@ _EQ_CLOSURES_333: dict[int, list[str]] = {
|
||||
}
|
||||
|
||||
|
||||
MIN_SCOPE_DATE_UTC = "2026-11-01"
|
||||
|
||||
|
||||
def latest_completed_closing_bell_date_utc(now_utc: datetime.datetime | None = None) -> str:
|
||||
"""
|
||||
Return the latest UTC calendar date `YYYY-MM-DD` whose 16:00 EST / 21:00 UTC
|
||||
@@ -181,17 +184,20 @@ def latest_completed_closing_bell_date_utc(now_utc: datetime.datetime | None = N
|
||||
|
||||
def _fetch_yahoo_chart_series(
|
||||
symbol: str,
|
||||
min_date_utc: str | None = MIN_SCOPE_DATE_UTC,
|
||||
max_date_utc: str | None = None,
|
||||
timeout: float = 6.0,
|
||||
) -> dict[str, dict[str, Any]]:
|
||||
"""
|
||||
Fetch the full 1-month daily bar series from Yahoo Finance v8 Chart JSON API
|
||||
(`?range=1mo&interval=1d`), filtered to completed closing-bell dates `<= max_date_utc`.
|
||||
Fetch the 3-month daily bar series from Yahoo Finance v8 Chart JSON API
|
||||
(`?range=3mo&interval=1d`) so early-November bars always have a full 20-trading-day
|
||||
trailing volume lookback window, while filtering emitted bars strictly to
|
||||
`min_date_utc <= obs_date <= max_date_utc` (pre-Nov 1 out of scope).
|
||||
"""
|
||||
if symbol == "ANTHR-PVT":
|
||||
return {}
|
||||
enc_sym = urllib.parse.quote(symbol, safe="")
|
||||
url = f"https://query1.finance.yahoo.com/v8/finance/chart/{enc_sym}?range=1mo&interval=1d"
|
||||
url = f"https://query1.finance.yahoo.com/v8/finance/chart/{enc_sym}?range=3mo&interval=1d"
|
||||
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT, "Accept": "application/json"})
|
||||
from hyperstitionstud_io.security import safe_urlopen
|
||||
|
||||
@@ -216,6 +222,8 @@ def _fetch_yahoo_chart_series(
|
||||
out: dict[str, dict[str, Any]] = {}
|
||||
for idx, (ts_val, close_usd, vol_val) in enumerate(valid_pairs):
|
||||
obs_date = datetime.datetime.fromtimestamp(ts_val, datetime.timezone.utc).strftime("%Y-%m-%d")
|
||||
if min_date_utc and obs_date < min_date_utc:
|
||||
continue
|
||||
if max_date_utc and obs_date > max_date_utc:
|
||||
continue
|
||||
prev_close = valid_pairs[idx - 1][1] if idx >= 1 else None
|
||||
@@ -250,6 +258,7 @@ def _fetch_yahoo_chart(symbol: str, timeout: float = 6.0) -> dict[str, Any] | No
|
||||
"""Source 1: Keyless Yahoo Finance v8 Chart JSON API (using latest completed closing-bell bar)."""
|
||||
series = _fetch_yahoo_chart_series(
|
||||
symbol,
|
||||
min_date_utc=MIN_SCOPE_DATE_UTC,
|
||||
max_date_utc=latest_completed_closing_bell_date_utc(),
|
||||
timeout=timeout,
|
||||
)
|
||||
@@ -261,10 +270,11 @@ def _fetch_yahoo_chart(symbol: str, timeout: float = 6.0) -> dict[str, Any] | No
|
||||
|
||||
def _fetch_stooq_csv_series(
|
||||
symbol: str,
|
||||
min_date_utc: str | None = MIN_SCOPE_DATE_UTC,
|
||||
max_date_utc: str | None = None,
|
||||
timeout: float = 6.0,
|
||||
) -> dict[str, dict[str, Any]]:
|
||||
"""Source 2: Keyless Stooq Daily OHLCV CSV Series Fallback."""
|
||||
"""Source 2: Keyless Stooq Daily OHLCV CSV Series Fallback (with 75-row lookback for 20d volume)."""
|
||||
stooq_sym = _STOOQ_MAP.get(symbol)
|
||||
if not stooq_sym:
|
||||
return {}
|
||||
@@ -282,10 +292,12 @@ def _fetch_stooq_csv_series(
|
||||
return {}
|
||||
|
||||
out: dict[str, dict[str, Any]] = {}
|
||||
start_idx = max(0, len(raw_rows) - 35)
|
||||
start_idx = max(0, len(raw_rows) - 75)
|
||||
for idx in range(start_idx, len(raw_rows)):
|
||||
row = raw_rows[idx]
|
||||
obs_date = str(row["Date"])
|
||||
if min_date_utc and obs_date < min_date_utc:
|
||||
continue
|
||||
if max_date_utc and obs_date > max_date_utc:
|
||||
continue
|
||||
close_usd = float(row["Close"])
|
||||
@@ -365,7 +377,7 @@ def _load_real_history_latest_bars() -> dict[str, dict[str, Any]]:
|
||||
if not hist_path.is_file():
|
||||
return {}
|
||||
try:
|
||||
raw = json.loads(hist_path.read_text(encoding="utf-8"))
|
||||
raw = load_json_cached(hist_path, copy_result=False)
|
||||
out: dict[str, dict[str, Any]] = {}
|
||||
for sym, sym_obj in (raw.get("instruments") or {}).items():
|
||||
bars_by_date = sym_obj.get("bars_by_date") or {}
|
||||
@@ -459,7 +471,7 @@ def build_financial_quant_harvest(
|
||||
cfg = load_workspace_config()
|
||||
with ReadOnlyIsolationGuard(cfg.read_only_files) as guard:
|
||||
if snapshot_path and Path(snapshot_path).is_file():
|
||||
raw_watchlist = json.loads(Path(snapshot_path).read_text(encoding="utf-8"))
|
||||
raw_watchlist = load_json_cached(snapshot_path, copy_result=False)
|
||||
else:
|
||||
raw_watchlist = fetch_live_watchlist(
|
||||
CANONICAL_WATCHLIST_24,
|
||||
@@ -485,7 +497,7 @@ def build_financial_quant_harvest(
|
||||
news_entities: dict[str, list[str]] = {}
|
||||
if effective_news_path.is_file():
|
||||
try:
|
||||
news_obj = json.loads(effective_news_path.read_text(encoding="utf-8"))
|
||||
news_obj = load_json_cached(effective_news_path, copy_result=False)
|
||||
headline_records: list[str] = []
|
||||
for st in news_obj.get("stories", news_obj.get("headlines", [])):
|
||||
if isinstance(st, dict):
|
||||
@@ -844,7 +856,7 @@ def update_real_market_history_cache(
|
||||
cfg = load_workspace_config()
|
||||
h_path = Path(history_path) if history_path else (cfg.core_dir / "site" / "quant" / "real-market-history.json")
|
||||
if h_path.is_file():
|
||||
doc = json.loads(h_path.read_text(encoding="utf-8"))
|
||||
doc = load_json_cached(h_path, copy_result=True)
|
||||
else:
|
||||
doc = {"version": CURRENT_VERSION, "synthetic_data_eliminated": True, "instruments": {}}
|
||||
|
||||
@@ -873,11 +885,18 @@ def update_real_market_history_cache(
|
||||
bars_by_dt = entry.setdefault("bars_by_date", {})
|
||||
|
||||
if effective_max_date:
|
||||
for stale_dt in [d for d in list(bars_by_dt.keys()) if d > effective_max_date]:
|
||||
for stale_dt in [
|
||||
d for d in list(bars_by_dt.keys()) if d < MIN_SCOPE_DATE_UTC or d > effective_max_date
|
||||
]:
|
||||
del bars_by_dt[stale_dt]
|
||||
else:
|
||||
for stale_dt in [d for d in list(bars_by_dt.keys()) if d < MIN_SCOPE_DATE_UTC]:
|
||||
del bars_by_dt[stale_dt]
|
||||
|
||||
if new_bars_by_symbol and sym in new_bars_by_symbol:
|
||||
for dt_s, b_obj in new_bars_by_symbol[sym].items():
|
||||
if dt_s < MIN_SCOPE_DATE_UTC:
|
||||
continue
|
||||
if effective_max_date and dt_s > effective_max_date:
|
||||
continue
|
||||
if b_obj and b_obj.get("close_usd") is not None:
|
||||
@@ -885,10 +904,14 @@ def update_real_market_history_cache(
|
||||
appended_count += 1
|
||||
elif allow_live_network:
|
||||
try:
|
||||
series = _fetch_yahoo_chart_series(sym, max_date_utc=effective_max_date) or _fetch_stooq_csv_series(
|
||||
sym, max_date_utc=effective_max_date
|
||||
series = _fetch_yahoo_chart_series(
|
||||
sym, min_date_utc=MIN_SCOPE_DATE_UTC, max_date_utc=effective_max_date
|
||||
) or _fetch_stooq_csv_series(
|
||||
sym, min_date_utc=MIN_SCOPE_DATE_UTC, max_date_utc=effective_max_date
|
||||
)
|
||||
for dt_s, b_obj in sorted(series.items()):
|
||||
if dt_s < MIN_SCOPE_DATE_UTC:
|
||||
continue
|
||||
if not b_obj or b_obj.get("close_usd") is None:
|
||||
continue
|
||||
prev_bar = bars_by_dt.get(dt_s)
|
||||
@@ -905,6 +928,12 @@ def update_real_market_history_cache(
|
||||
elif sym in cg_quotes and cg_quotes[sym].get("market_cap_str"):
|
||||
merged_b["market_cap_str"] = cg_quotes[sym]["market_cap_str"]
|
||||
bars_by_dt[dt_s] = merged_b
|
||||
else:
|
||||
if prev_bar.get("volume_ratio_20d") is None and b_obj.get("volume_ratio_20d") is not None:
|
||||
prev_bar["volume_ratio_20d"] = b_obj["volume_ratio_20d"]
|
||||
if prev_bar.get("change_pct") is None and b_obj.get("change_pct") is not None:
|
||||
prev_bar["change_pct"] = b_obj["change_pct"]
|
||||
prev_bar["change_bps"] = b_obj["change_bps"]
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -925,18 +954,79 @@ _TELEMETRY_SNAPSHOT_FILES: tuple[str, ...] = (
|
||||
)
|
||||
|
||||
|
||||
def _excavate_git_json_versions(
|
||||
repo_dir: Path,
|
||||
rel_path: str,
|
||||
max_commits: int = 35,
|
||||
) -> list[dict[str, Any]]:
|
||||
"""
|
||||
Excavate valid JSON versions of `rel_path` from all Git stashes (`stash@{0..N}` and
|
||||
untracked stash parents `stash@{i}^3`) and recent Git commits (`git log --all`).
|
||||
"""
|
||||
import subprocess
|
||||
|
||||
if not (repo_dir / ".git").exists():
|
||||
return []
|
||||
revs: list[str] = []
|
||||
try:
|
||||
stash_out = subprocess.run(
|
||||
["git", "-C", str(repo_dir), "stash", "list", "--format=%gd"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
).stdout
|
||||
for s_ref in [ln.strip() for ln in stash_out.splitlines() if ln.strip()]:
|
||||
revs.append(s_ref)
|
||||
revs.append(f"{s_ref}^3")
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
log_out = subprocess.run(
|
||||
["git", "-C", str(repo_dir), "log", "--all", f"-n{max_commits}", "--format=%H", "--", rel_path],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
).stdout
|
||||
for sha in [ln.strip() for ln in log_out.splitlines() if ln.strip()]:
|
||||
if sha not in revs:
|
||||
revs.append(sha)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
docs: list[dict[str, Any]] = []
|
||||
for rev in revs:
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
["git", "-C", str(repo_dir), "show", f"{rev}:{rel_path}"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
if proc.returncode == 0 and proc.stdout.strip():
|
||||
obj = json.loads(proc.stdout)
|
||||
if isinstance(obj, dict):
|
||||
docs.append(obj)
|
||||
except Exception:
|
||||
continue
|
||||
return docs
|
||||
|
||||
|
||||
def snapshot_local_telemetry(
|
||||
snapshot_dir: str | Path,
|
||||
quant_dir: str | Path | None = None,
|
||||
excavate_git: bool = True,
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Save a lossless copy of local `site/quant/` telemetry JSON ledgers into `snapshot_dir`
|
||||
prior to pulling or resetting the Git working tree during VPS deployment sync.
|
||||
When `excavate_git=True` on the repository's `site/quant` directory, also excavates
|
||||
any observations present in `git stash list` or `git log --all` (`>= 2026-11-01`).
|
||||
"""
|
||||
import shutil
|
||||
|
||||
cfg = load_workspace_config()
|
||||
q_dir = Path(quant_dir) if quant_dir else (cfg.core_dir / "site" / "quant")
|
||||
default_q_dir = cfg.core_dir / "site" / "quant"
|
||||
q_dir = Path(quant_dir) if quant_dir else default_q_dir
|
||||
s_dir = Path(snapshot_dir)
|
||||
s_dir.mkdir(parents=True, exist_ok=True)
|
||||
saved: list[str] = []
|
||||
@@ -944,11 +1034,46 @@ def snapshot_local_telemetry(
|
||||
src = q_dir / fname
|
||||
if src.is_file():
|
||||
try:
|
||||
json.loads(src.read_text(encoding="utf-8"))
|
||||
load_json_cached(src, copy_result=False)
|
||||
shutil.copy2(src, s_dir / fname)
|
||||
saved.append(fname)
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
if excavate_git and q_dir.resolve() == default_q_dir.resolve() and (cfg.core_dir / ".git").exists():
|
||||
max_dt = latest_completed_closing_bell_date_utc()
|
||||
# 1. Excavate stashed/committed real-market-history.json bars (>= 2026-11-01)
|
||||
snap_rmh_p = s_dir / "real-market-history.json"
|
||||
if snap_rmh_p.is_file():
|
||||
try:
|
||||
base_rmh = load_json_cached(snap_rmh_p, copy_result=True)
|
||||
insts = base_rmh.setdefault("instruments", {})
|
||||
for hist_doc in _excavate_git_json_versions(cfg.core_dir, "site/quant/real-market-history.json"):
|
||||
for sym, s_obj in (hist_doc.get("instruments") or {}).items():
|
||||
if sym == "ANTHR-PVT" or not isinstance(s_obj, dict):
|
||||
continue
|
||||
t_entry = insts.setdefault(
|
||||
sym, {"symbol": sym, "data_available": True, "status": "ok", "bars_by_date": {}}
|
||||
)
|
||||
t_bars = t_entry.setdefault("bars_by_date", {})
|
||||
for dt_s, b_obj in (s_obj.get("bars_by_date") or {}).items():
|
||||
if not re.match(r"^\d{4}-\d{2}-\d{2}$", str(dt_s)):
|
||||
continue
|
||||
if dt_s < MIN_SCOPE_DATE_UTC or dt_s > max_dt:
|
||||
continue
|
||||
if not isinstance(b_obj, dict) or b_obj.get("close_usd") is None:
|
||||
continue
|
||||
if dt_s not in t_bars or t_bars[dt_s].get("close_usd") is None:
|
||||
t_bars[dt_s] = b_obj
|
||||
else:
|
||||
if not t_bars[dt_s].get("market_cap_str") and b_obj.get("market_cap_str"):
|
||||
t_bars[dt_s]["market_cap_str"] = b_obj["market_cap_str"]
|
||||
if t_bars[dt_s].get("volume_ratio_20d") is None and b_obj.get("volume_ratio_20d") is not None:
|
||||
t_bars[dt_s]["volume_ratio_20d"] = b_obj["volume_ratio_20d"]
|
||||
snap_rmh_p.write_text(json.dumps(base_rmh, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return {"ok": True, "snapshot_dir": str(s_dir), "saved_files": saved}
|
||||
|
||||
|
||||
@@ -959,8 +1084,9 @@ def reconcile_telemetry_snapshot(
|
||||
recompile_bundles: bool = True,
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Losslessly union-merge any valid completed harvest bars or FRED macro observations from
|
||||
`snapshot_dir` that are absent in `quant_dir` (the newly pulled `origin/main` checkout).
|
||||
Losslessly union-merge any valid completed harvest bars or FRED macro observations
|
||||
(`>= 2026-11-01` and `<= max_date_utc`) from `snapshot_dir` that are absent in `quant_dir`
|
||||
(the newly pulled `origin/main` checkout).
|
||||
If `origin/main` already contains 100% of completed observations (`merged_bars_count == 0`
|
||||
and `merged_macro_obs_count == 0`), performs 0 disk writes so `git status` remains clean.
|
||||
"""
|
||||
@@ -976,8 +1102,8 @@ def reconcile_telemetry_snapshot(
|
||||
cur_hist_p = q_dir / "real-market-history.json"
|
||||
if snap_hist_p.is_file() and cur_hist_p.is_file():
|
||||
try:
|
||||
snap_hist = json.loads(snap_hist_p.read_text(encoding="utf-8"))
|
||||
cur_hist = json.loads(cur_hist_p.read_text(encoding="utf-8"))
|
||||
snap_hist = load_json_cached(snap_hist_p, copy_result=False)
|
||||
cur_hist = load_json_cached(cur_hist_p, copy_result=True)
|
||||
cur_insts = cur_hist.setdefault("instruments", {})
|
||||
for sym, snap_obj in (snap_hist.get("instruments") or {}).items():
|
||||
if sym == "ANTHR-PVT":
|
||||
@@ -989,13 +1115,20 @@ def reconcile_telemetry_snapshot(
|
||||
for dt_s, b_obj in (snap_obj.get("bars_by_date") or {}).items():
|
||||
if not re.match(r"^\d{4}-\d{2}-\d{2}$", str(dt_s)):
|
||||
continue
|
||||
if dt_s > effective_max_date:
|
||||
if dt_s < MIN_SCOPE_DATE_UTC or dt_s > effective_max_date:
|
||||
continue
|
||||
if not isinstance(b_obj, dict) or b_obj.get("close_usd") is None:
|
||||
continue
|
||||
if dt_s not in cur_bars or cur_bars[dt_s].get("close_usd") is None:
|
||||
cur_bars[dt_s] = b_obj
|
||||
merged_bars_count += 1
|
||||
else:
|
||||
if not cur_bars[dt_s].get("market_cap_str") and b_obj.get("market_cap_str"):
|
||||
cur_bars[dt_s]["market_cap_str"] = b_obj["market_cap_str"]
|
||||
merged_bars_count += 1
|
||||
if cur_bars[dt_s].get("volume_ratio_20d") is None and b_obj.get("volume_ratio_20d") is not None:
|
||||
cur_bars[dt_s]["volume_ratio_20d"] = b_obj["volume_ratio_20d"]
|
||||
merged_bars_count += 1
|
||||
cur_entry["bars_by_date"] = {k: cur_bars[k] for k in sorted(cur_bars.keys())}
|
||||
if merged_bars_count > 0:
|
||||
cur_hist_p.write_text(json.dumps(cur_hist, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||
@@ -1006,19 +1139,23 @@ def reconcile_telemetry_snapshot(
|
||||
cur_macro_p = q_dir / "real-macro-indicators.json"
|
||||
if snap_macro_p.is_file() and cur_macro_p.is_file():
|
||||
try:
|
||||
snap_macro = json.loads(snap_macro_p.read_text(encoding="utf-8"))
|
||||
cur_macro = json.loads(cur_macro_p.read_text(encoding="utf-8"))
|
||||
snap_macro = load_json_cached(snap_macro_p, copy_result=False)
|
||||
cur_macro = load_json_cached(cur_macro_p, copy_result=True)
|
||||
cur_series = cur_macro.setdefault("series", {})
|
||||
for s_key, snap_s in (snap_macro.get("series") or {}).items():
|
||||
if s_key not in cur_series or not isinstance(snap_s, dict):
|
||||
continue
|
||||
cur_obs_list = cur_series[s_key].get("recent_observations") or []
|
||||
cur_obs_by_dt = {str(o.get("date")): o for o in cur_obs_list if isinstance(o, dict) and o.get("date")}
|
||||
cur_obs_by_dt = {
|
||||
str(o.get("date_utc") or o.get("date")): o
|
||||
for o in cur_obs_list
|
||||
if isinstance(o, dict) and (o.get("date_utc") or o.get("date"))
|
||||
}
|
||||
added_here = 0
|
||||
for o in snap_s.get("recent_observations") or []:
|
||||
if not isinstance(o, dict) or not o.get("date") or o.get("value") is None:
|
||||
if not isinstance(o, dict) or not (o.get("date_utc") or o.get("date")) or o.get("value") is None:
|
||||
continue
|
||||
dt_s = str(o["date"])
|
||||
dt_s = str(o.get("date_utc") or o.get("date"))
|
||||
if dt_s > effective_max_date:
|
||||
continue
|
||||
if dt_s not in cur_obs_by_dt or cur_obs_by_dt[dt_s].get("value") is None:
|
||||
@@ -1030,7 +1167,8 @@ def reconcile_telemetry_snapshot(
|
||||
cur_series[s_key]["recent_observations"] = sorted_obs
|
||||
latest_valid = [x for x in sorted_obs if x.get("value") is not None]
|
||||
if latest_valid:
|
||||
cur_series[s_key]["latest_date"] = latest_valid[-1]["date"]
|
||||
last_dt = latest_valid[-1].get("date_utc") or latest_valid[-1].get("date")
|
||||
cur_series[s_key]["latest_date_utc"] = last_dt
|
||||
cur_series[s_key]["latest_value"] = latest_valid[-1]["value"]
|
||||
if merged_macro_obs_count > 0:
|
||||
cur_macro_p.write_text(json.dumps(cur_macro, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||
@@ -1056,13 +1194,14 @@ def reconcile_telemetry_snapshot(
|
||||
"reconciled_new_data": reconciled_new_data,
|
||||
"merged_bars_count": merged_bars_count,
|
||||
"merged_macro_obs_count": merged_macro_obs_count,
|
||||
"min_scope_date_utc": MIN_SCOPE_DATE_UTC,
|
||||
"max_date_utc": effective_max_date,
|
||||
}
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
ap = argparse.ArgumentParser(prog="hs-quant-harvest", description="Periodic Quantitative Financial Telemetry & Contingent Meaning Collector.")
|
||||
ap.add_argument("--mode", choices=["us-closing-bell", "utc-rollover"], default="us-closing-bell")
|
||||
ap.add_argument("--mode", choices=["us-pre-market-open", "us-closing-bell", "utc-rollover"], default="us-closing-bell")
|
||||
ap.add_argument("--from-snapshot", default=None, help="Optional offline JSON snapshot file.")
|
||||
ap.add_argument("--live", action="store_true", help="Attempt live keyless HTTP fetch (Yahoo v8 / Stooq CSV / CoinGecko).")
|
||||
ap.add_argument("--append-history", action="store_true", help="Merge newly fetched real exchange bars into site/quant/real-market-history.json.")
|
||||
|
||||
@@ -19,7 +19,7 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||
from hyperstitionstud_io.quant.collector import NO_DATA_AVAILABLE
|
||||
@@ -27,6 +27,28 @@ from hyperstitionstud_io.quant.macro import build_macro_indicators_bundle
|
||||
from hyperstitionstud_io.quant.timeseries import build_quant_timeseries_bundle
|
||||
|
||||
|
||||
SESSION_WINDOWS = ("us-pre-market-open", "us-closing-bell", "utc-rollover")
|
||||
|
||||
|
||||
def _resolve_session_window(
|
||||
session_window: str | None = None,
|
||||
now_utc: datetime.datetime | None = None,
|
||||
) -> str:
|
||||
if session_window and session_window != "auto":
|
||||
if session_window not in SESSION_WINDOWS:
|
||||
raise ValueError(f"Unsupported session_window {session_window!r}; expected one of {SESSION_WINDOWS} or 'auto'.")
|
||||
return session_window
|
||||
dt = now_utc or datetime.datetime.now(datetime.timezone.utc)
|
||||
hour = dt.hour
|
||||
if 13 <= hour <= 15:
|
||||
return "us-pre-market-open"
|
||||
if 21 <= hour <= 23:
|
||||
return "us-closing-bell"
|
||||
if 0 <= hour <= 2:
|
||||
return "utc-rollover"
|
||||
return "us-closing-bell"
|
||||
|
||||
|
||||
def _find_latest_available_bar(inst: dict[str, Any]) -> dict[str, Any] | None:
|
||||
bars = [b for b in (inst.get("bars") or []) if b.get("data_available") and b.get("close_usd") is not None]
|
||||
return bars[-1] if bars else None
|
||||
@@ -143,8 +165,10 @@ def _compute_bayesian_regime_update(
|
||||
def build_daily_portfolio_brief(
|
||||
allow_live_network: bool = False,
|
||||
write_files: bool = True,
|
||||
session_window: str | None = None,
|
||||
) -> dict[str, Any]:
|
||||
cfg = load_workspace_config()
|
||||
resolved_window = _resolve_session_window(session_window)
|
||||
ts_bundle = build_quant_timeseries_bundle(write_files=False)
|
||||
macro_bundle = build_macro_indicators_bundle(allow_live_network=allow_live_network, write_files=False)
|
||||
|
||||
@@ -162,7 +186,7 @@ def build_daily_portfolio_brief(
|
||||
active_read_state_path = state_path if state_path.is_file() else next((p for p in legacy_state_paths if p.is_file()), state_path)
|
||||
if active_read_state_path.is_file():
|
||||
try:
|
||||
prior_state = json.loads(active_read_state_path.read_text(encoding="utf-8"))
|
||||
prior_state = load_json_cached(active_read_state_path, copy_result=False)
|
||||
except Exception:
|
||||
prior_state = {}
|
||||
|
||||
@@ -288,6 +312,7 @@ def build_daily_portfolio_brief(
|
||||
"$id": "urn:io:hyperstitionstud:schema:v1:daily-portfolio-brief",
|
||||
"version": CURRENT_VERSION,
|
||||
"run_number": run_number,
|
||||
"session_window": resolved_window,
|
||||
"generated_at_utc": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
||||
"synthetic_data_eliminated": True,
|
||||
"agenda_1_executive_summary": {
|
||||
@@ -455,21 +480,78 @@ def build_daily_portfolio_brief(
|
||||
out_js_path.write_text(js_body, encoding="utf-8")
|
||||
|
||||
# Update append-only Bayesian state ledger outside read-only files
|
||||
history_list = list(prior_state.get("run_history") or [])
|
||||
history_list.append({
|
||||
"run_number": run_number,
|
||||
"generated_at_utc": brief_payload["generated_at_utc"],
|
||||
"posterior_probabilities": bayesian_block["posterior_probabilities"],
|
||||
"question_id": current_question["question_id"],
|
||||
"cidv1": brief_payload["ipld_dag_json_cidv1"]["/"],
|
||||
})
|
||||
# Deduplicate entries matching BOTH calendar day (generated_at_utc[:10]) AND session_window
|
||||
raw_history = list(prior_state.get("run_history") or [])
|
||||
dedup_history: list[dict[str, Any]] = []
|
||||
for entry in raw_history:
|
||||
if not isinstance(entry, dict):
|
||||
continue
|
||||
e_dt = str(entry.get("generated_at_utc") or "")[:10]
|
||||
e_win = entry.get("session_window")
|
||||
e_post = entry.get("posterior_probabilities")
|
||||
if e_win is not None:
|
||||
match_idx = next(
|
||||
(
|
||||
i
|
||||
for i, prev in enumerate(dedup_history)
|
||||
if str(prev.get("generated_at_utc") or "")[:10] == e_dt and prev.get("session_window") == e_win
|
||||
),
|
||||
None,
|
||||
)
|
||||
if match_idx is not None:
|
||||
dedup_history[match_idx] = entry
|
||||
else:
|
||||
dedup_history.append(entry)
|
||||
elif (
|
||||
dedup_history
|
||||
and dedup_history[-1].get("session_window") is None
|
||||
and str(dedup_history[-1].get("generated_at_utc") or "")[:10] == e_dt
|
||||
and dedup_history[-1].get("posterior_probabilities") == e_post
|
||||
):
|
||||
dedup_history[-1] = entry
|
||||
else:
|
||||
dedup_history.append(entry)
|
||||
cur_dt_10 = str(brief_payload["generated_at_utc"])[:10]
|
||||
cur_post = bayesian_block["posterior_probabilities"]
|
||||
cur_match_idx = next(
|
||||
(
|
||||
i
|
||||
for i, prev in enumerate(dedup_history)
|
||||
if str(prev.get("generated_at_utc") or "")[:10] == cur_dt_10 and prev.get("session_window") == resolved_window
|
||||
),
|
||||
None,
|
||||
)
|
||||
if cur_match_idx is not None:
|
||||
dedup_history[cur_match_idx] = {
|
||||
"run_number": int(dedup_history[cur_match_idx].get("run_number") or (cur_match_idx + 1)),
|
||||
"session_window": resolved_window,
|
||||
"generated_at_utc": brief_payload["generated_at_utc"],
|
||||
"posterior_probabilities": cur_post,
|
||||
"question_id": str(dedup_history[cur_match_idx].get("question_id") or current_question["question_id"]),
|
||||
"cidv1": brief_payload["ipld_dag_json_cidv1"]["/"],
|
||||
}
|
||||
else:
|
||||
next_run_num = (int(dedup_history[-1].get("run_number") or len(dedup_history)) + 1) if dedup_history else 1
|
||||
dedup_history.append({
|
||||
"run_number": next_run_num,
|
||||
"session_window": resolved_window,
|
||||
"generated_at_utc": brief_payload["generated_at_utc"],
|
||||
"posterior_probabilities": cur_post,
|
||||
"question_id": f"Q-RUN-{next_run_num:04d}",
|
||||
"cidv1": brief_payload["ipld_dag_json_cidv1"]["/"],
|
||||
})
|
||||
for idx, h_item in enumerate(dedup_history, start=1):
|
||||
h_item["run_number"] = idx
|
||||
h_item["question_id"] = f"Q-RUN-{idx:04d}"
|
||||
effective_run_number = dedup_history[-1]["run_number"]
|
||||
new_state = {
|
||||
"version": CURRENT_VERSION,
|
||||
"run_number": run_number,
|
||||
"run_number": effective_run_number,
|
||||
"session_window": resolved_window,
|
||||
"updated_at_utc": brief_payload["generated_at_utc"],
|
||||
"latest_posteriors": bayesian_block["posterior_probabilities"],
|
||||
"active_daily_question": current_question,
|
||||
"run_history": history_list[-30:],
|
||||
"run_history": dedup_history[-60:],
|
||||
}
|
||||
state_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
state_path.write_text(json.dumps(new_state, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||
@@ -480,14 +562,27 @@ def build_daily_portfolio_brief(
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
ap = argparse.ArgumentParser(prog="hs-daily-brief", description="Generate the 5-Agenda Zero-Synthetic-Data Daily Portfolio & Memetic Regime Update.")
|
||||
ap.add_argument("--live-macro", action="store_true", help="Fetch fresh FRED CSV series before computing the daily brief.")
|
||||
ap.add_argument(
|
||||
"--window",
|
||||
"--session-window",
|
||||
dest="session_window",
|
||||
choices=["auto", "us-pre-market-open", "us-closing-bell", "utc-rollover"],
|
||||
default="auto",
|
||||
help="Session window tag (default: auto-detected from UTC hour).",
|
||||
)
|
||||
args = ap.parse_args(argv)
|
||||
brief = build_daily_portfolio_brief(allow_live_network=args.live_macro, write_files=True)
|
||||
brief = build_daily_portfolio_brief(
|
||||
allow_live_network=args.live_macro,
|
||||
write_files=True,
|
||||
session_window=args.session_window,
|
||||
)
|
||||
print(
|
||||
json.dumps(
|
||||
{
|
||||
"ok": True,
|
||||
"version": brief["version"],
|
||||
"run_number": brief["run_number"],
|
||||
"session_window": brief["session_window"],
|
||||
"posteriors": brief["agenda_1_executive_summary"]["bayesian_regime_inference"]["posterior_probabilities"],
|
||||
"question_id": brief["agenda_5_daily_key_macro_question_and_rigor"]["active_daily_question"]["question_id"],
|
||||
"cidv1": brief["ipld_dag_json_cidv1"]["/"],
|
||||
|
||||
@@ -19,7 +19,7 @@ from typing import Any
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION
|
||||
from hyperstitionstud_io.ciphers import compute_aq, int_to_spoken_words, prime_rank
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1
|
||||
from hyperstitionstud_io.phonetics import translate_batch
|
||||
@@ -147,26 +147,60 @@ FRED_SERIES_SPEC: tuple[dict[str, Any], ...] = (
|
||||
)
|
||||
|
||||
|
||||
def fetch_fred_series_csv(series_id: str, max_rows: int = 36, timeout: float = 8.0) -> list[dict[str, Any]]:
|
||||
MIN_MACRO_DAILY_DATE_UTC = "2026-11-01"
|
||||
|
||||
|
||||
def fetch_fred_series_csv(
|
||||
series_id: str,
|
||||
max_rows: int = 36,
|
||||
timeout: float = 8.0,
|
||||
min_date_utc: str | None = None,
|
||||
max_date_utc: str | None = None,
|
||||
) -> list[dict[str, Any]]:
|
||||
"""
|
||||
Fetch real observations from `https://fred.stlouisfed.org/graph/fredgraph.csv?id=<series_id>&cosd=2024-10-01`.
|
||||
Fetch real observations from `https://fred.stlouisfed.org/graph/fredgraph.csv?id=<series_id>&cosd=2025-09-01`
|
||||
using IPv4-first transport (`curl -4` with `safe_urlopen` fallback so blackholed IPv6 routes never stall).
|
||||
Preserves missing/holiday dates explicitly as `value = None` (`data_available = False`) rather than `0.0`.
|
||||
"""
|
||||
url = f"https://fred.stlouisfed.org/graph/fredgraph.csv?id={series_id}&cosd=2024-10-01"
|
||||
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT})
|
||||
from hyperstitionstud_io.security import safe_urlopen
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
with safe_urlopen(req, timeout=timeout) as resp:
|
||||
lines = [ln.strip() for ln in resp.read().decode("utf-8").splitlines() if ln.strip()]
|
||||
url = f"https://fred.stlouisfed.org/graph/fredgraph.csv?id={series_id}&cosd=2025-09-01"
|
||||
raw_text = ""
|
||||
curl_bin = shutil.which("curl")
|
||||
if curl_bin:
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
[curl_bin, "-4", "-sS", "-L", "--max-time", str(max(2, int(timeout))), url],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
if proc.returncode == 0 and proc.stdout.startswith("observation_date,"):
|
||||
raw_text = proc.stdout
|
||||
except Exception:
|
||||
raw_text = ""
|
||||
|
||||
if not raw_text:
|
||||
req = urllib.request.Request(url, headers={"User-Agent": _USER_AGENT})
|
||||
from hyperstitionstud_io.security import safe_urlopen
|
||||
|
||||
with safe_urlopen(req, timeout=timeout) as resp:
|
||||
raw_text = resp.read().decode("utf-8")
|
||||
|
||||
lines = [ln.strip() for ln in raw_text.splitlines() if ln.strip()]
|
||||
if len(lines) <= 1:
|
||||
return []
|
||||
tail = lines[1:][-max_rows:]
|
||||
rows: list[dict[str, Any]] = []
|
||||
for ln in tail:
|
||||
for ln in lines[1:]:
|
||||
parts = ln.split(",", 1)
|
||||
if len(parts) != 2:
|
||||
continue
|
||||
dt_s, val_s = parts[0].strip(), parts[1].strip()
|
||||
if min_date_utc and dt_s < min_date_utc:
|
||||
continue
|
||||
if max_date_utc and dt_s > max_date_utc:
|
||||
continue
|
||||
if not val_s or val_s == ".":
|
||||
rows.append({
|
||||
"date_utc": dt_s,
|
||||
@@ -189,13 +223,13 @@ def fetch_fred_series_csv(series_id: str, max_rows: int = 36, timeout: float = 8
|
||||
"status": NO_DATA_AVAILABLE,
|
||||
"value": None,
|
||||
})
|
||||
return rows
|
||||
return rows[-max_rows:]
|
||||
|
||||
|
||||
def _score_macro_int(face_int: int, ing_map: dict[str, str]) -> dict[str, Any]:
|
||||
sp_eng = int_to_spoken_words(abs(face_int))
|
||||
sp_eng_aq = compute_aq(sp_eng)
|
||||
sp_ing = ing_map.get(sp_eng, sp_eng)
|
||||
sp_ing = ing_map.get(sp_eng) or translate_batch([sp_eng]).get(sp_eng, sp_eng)
|
||||
sp_ing_aq = compute_aq(sp_ing)
|
||||
ring_hits = sorted(
|
||||
{
|
||||
@@ -294,25 +328,52 @@ def build_macro_indicators_bundle(
|
||||
cached_bundle: dict[str, Any] = {}
|
||||
if cache_path.is_file():
|
||||
try:
|
||||
cached_bundle = json.loads(cache_path.read_text(encoding="utf-8"))
|
||||
cached_bundle = load_json_cached(cache_path, copy_result=False)
|
||||
except Exception:
|
||||
cached_bundle = {}
|
||||
|
||||
cached_series = (cached_bundle.get("raw_fred_observations") or {}) if isinstance(cached_bundle, dict) else {}
|
||||
from hyperstitionstud_io.quant.collector import latest_completed_closing_bell_date_utc
|
||||
|
||||
for spec in FRED_SERIES_SPEC:
|
||||
max_closed_dt = latest_completed_closing_bell_date_utc()
|
||||
|
||||
def _fetch_one_spec(spec: dict[str, Any]) -> tuple[str, list[dict[str, Any]]]:
|
||||
sid = spec["series_id"]
|
||||
fetched: list[dict[str, Any]] = []
|
||||
is_daily = spec["cadence"] == "1d"
|
||||
min_dt = MIN_MACRO_DAILY_DATE_UTC if is_daily else None
|
||||
fetched_rows: list[dict[str, Any]] = []
|
||||
if allow_live_network:
|
||||
try:
|
||||
fetched = fetch_fred_series_csv(sid, max_rows=28)
|
||||
fetched_rows = fetch_fred_series_csv(
|
||||
sid,
|
||||
max_rows=36,
|
||||
min_date_utc=min_dt,
|
||||
max_date_utc=max_closed_dt,
|
||||
)
|
||||
except Exception:
|
||||
fetched = []
|
||||
if not fetched and sid in cached_series and cached_series[sid]:
|
||||
fetched = list(cached_series[sid])
|
||||
if not fetched and sid in _VERIFIED_FRED_SEED_OBSERVATIONS:
|
||||
fetched = list(_VERIFIED_FRED_SEED_OBSERVATIONS[sid])
|
||||
raw_series_by_id[sid] = fetched
|
||||
fetched_rows = []
|
||||
prior_rows = list(cached_series.get(sid) or [])
|
||||
if not prior_rows and not fetched_rows and sid in _VERIFIED_FRED_SEED_OBSERVATIONS:
|
||||
prior_rows = list(_VERIFIED_FRED_SEED_OBSERVATIONS[sid])
|
||||
merged_by_dt: dict[str, dict[str, Any]] = {}
|
||||
for r in prior_rows + fetched_rows:
|
||||
if not isinstance(r, dict) or not r.get("date_utc"):
|
||||
continue
|
||||
dt_s = str(r["date_utc"])
|
||||
if min_dt and dt_s < min_dt:
|
||||
continue
|
||||
if dt_s > max_closed_dt:
|
||||
continue
|
||||
prev_r = merged_by_dt.get(dt_s)
|
||||
if prev_r is None or (not prev_r.get("data_available") and r.get("data_available")):
|
||||
merged_by_dt[dt_s] = r
|
||||
return sid, [merged_by_dt[k] for k in sorted(merged_by_dt.keys())][-36:]
|
||||
|
||||
import concurrent.futures
|
||||
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=7) as pool:
|
||||
for sid, rows_list in pool.map(_fetch_one_spec, FRED_SERIES_SPEC):
|
||||
raw_series_by_id[sid] = rows_list
|
||||
|
||||
# Pre-collect spoken integer strings for batch Ingglish translation
|
||||
phrases: set[str] = set()
|
||||
@@ -433,7 +494,11 @@ def build_macro_indicators_bundle(
|
||||
"aq_evaluation": aq_eval,
|
||||
"change_aq_evaluation": chg_eval,
|
||||
"missing_observation_dates": missing_dates,
|
||||
"recent_observations": obs_list[-12:],
|
||||
"recent_observations": (
|
||||
[r for r in obs_list if r["date_utc"] >= MIN_MACRO_DAILY_DATE_UTC]
|
||||
if spec["cadence"] == "1d"
|
||||
else obs_list[-13:]
|
||||
),
|
||||
}
|
||||
|
||||
# Compute Derived Spreads & Velocity Ratios (Strictly Null-Preserving)
|
||||
|
||||
@@ -31,7 +31,7 @@ from hyperstitionstud_io.ciphers import (
|
||||
is_repdigit_37,
|
||||
prime_rank,
|
||||
)
|
||||
from hyperstitionstud_io.config import load_workspace_config
|
||||
from hyperstitionstud_io.config import load_json_cached, load_workspace_config
|
||||
from hyperstitionstud_io.glossary import ReadOnlyIsolationGuard
|
||||
from hyperstitionstud_io.ipld import compute_dag_json_cidv1, write_pretty_and_dag_json
|
||||
from hyperstitionstud_io.lenses import DEFAULT_LENS, ENABLED_LENSES, LENS_REGISTRY, apply_all_lenses
|
||||
@@ -256,7 +256,7 @@ def _load_real_market_history_bars(cfg: Any) -> dict[str, dict[str, dict[str, An
|
||||
if not hist_path.is_file():
|
||||
return {}
|
||||
try:
|
||||
raw = json.loads(hist_path.read_text(encoding="utf-8"))
|
||||
raw = load_json_cached(hist_path, copy_result=False)
|
||||
out: dict[str, dict[str, dict[str, Any]]] = {}
|
||||
for sym, sym_obj in (raw.get("instruments") or {}).items():
|
||||
out[sym] = dict(sym_obj.get("bars_by_date") or {})
|
||||
@@ -809,7 +809,7 @@ def build_quant_timeseries_bundle(
|
||||
tl_path = cfg.zoology_dir / "taxonomy" / "assemblage-builds-tier-list.json"
|
||||
builds_out: list[dict[str, Any]] = []
|
||||
if tl_path.is_file():
|
||||
tl_data = json.loads(tl_path.read_text(encoding="utf-8"))
|
||||
tl_data = load_json_cached(tl_path, copy_result=False)
|
||||
for row in tl_data.get("rows", []):
|
||||
s6 = row.get("stats_6") or {}
|
||||
b_struct = {
|
||||
|
||||
@@ -22,7 +22,7 @@ if _SRC_DIR.is_dir() and str(_SRC_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(_SRC_DIR))
|
||||
|
||||
from hyperstitionstud_io import __version__ as CURRENT_VERSION # noqa: E402
|
||||
from hyperstitionstud_io.config import load_workspace_config # noqa: E402
|
||||
from hyperstitionstud_io.config import load_workspace_config, run_git_stdout # noqa: E402
|
||||
|
||||
SEMVER_RE = r"\d+\.\d+\.\d+"
|
||||
|
||||
@@ -122,18 +122,6 @@ def evaluate_change_scope_heuristics(signals: dict[str, Any]) -> dict[str, Any]:
|
||||
}
|
||||
|
||||
|
||||
def _git_run(repo_dir: Path, args: list[str]) -> str:
|
||||
if not (repo_dir / ".git").exists():
|
||||
return ""
|
||||
proc = subprocess.run(
|
||||
["git", "-C", str(repo_dir), *args],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
return proc.stdout.strip() if proc.returncode == 0 else ""
|
||||
|
||||
|
||||
def _extract_archived_plan_ids_from_text(text: str) -> set[str]:
|
||||
return set(re.findall(r"\bPLAN-[A-Z0-9-]+\b", text))
|
||||
|
||||
@@ -165,7 +153,7 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
|
||||
if m_v:
|
||||
current_v = m_v.group(1)
|
||||
|
||||
baseline_tag = _git_run(core, ["describe", "--tags", "--abbrev=0"]) or f"v{current_v}"
|
||||
baseline_tag = run_git_stdout(core, ["describe", "--tags", "--abbrev=0"]) or f"v{current_v}"
|
||||
|
||||
repo_dirs = [
|
||||
core,
|
||||
@@ -173,7 +161,7 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
|
||||
cfg.zoology_dir,
|
||||
kg,
|
||||
cfg.paths["gematria_js_dir"],
|
||||
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
|
||||
cfg.ci_build_dir,
|
||||
]
|
||||
repo_diff_summary: dict[str, dict[str, int]] = {}
|
||||
total_dirty = 0
|
||||
@@ -181,12 +169,12 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
|
||||
for rdir in repo_dirs:
|
||||
if not rdir.is_dir():
|
||||
continue
|
||||
porcelain = _git_run(rdir, ["status", "--porcelain"])
|
||||
porcelain = run_git_stdout(rdir, ["status", "--porcelain"])
|
||||
dirty_cnt = len([ln for ln in porcelain.splitlines() if ln.strip()]) if porcelain else 0
|
||||
rtag = _git_run(rdir, ["describe", "--tags", "--abbrev=0"])
|
||||
rtag = run_git_stdout(rdir, ["describe", "--tags", "--abbrev=0"])
|
||||
ahead_cnt = 0
|
||||
if rtag:
|
||||
ahead_str = _git_run(rdir, ["rev-list", f"{rtag}..HEAD", "--count"])
|
||||
ahead_str = run_git_stdout(rdir, ["rev-list", f"{rtag}..HEAD", "--count"])
|
||||
ahead_cnt = int(ahead_str) if ahead_str.isdigit() else 0
|
||||
repo_diff_summary[rdir.name] = {
|
||||
"dirty_files": dirty_cnt,
|
||||
@@ -209,15 +197,15 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
|
||||
current_archived_plans |= _extract_archived_plan_ids_from_text(p.name)
|
||||
|
||||
baseline_archived_plans: set[str] = set()
|
||||
kg_tag = _git_run(kg, ["describe", "--tags", "--abbrev=0"]) or baseline_tag
|
||||
kg_tag = run_git_stdout(kg, ["describe", "--tags", "--abbrev=0"]) or baseline_tag
|
||||
if kg_tag:
|
||||
old_manifest = _git_run(kg, ["show", f"{kg_tag}:docs/archive/archive-manifest.json"])
|
||||
old_manifest = run_git_stdout(kg, ["show", f"{kg_tag}:docs/archive/archive-manifest.json"])
|
||||
if old_manifest:
|
||||
baseline_archived_plans |= _extract_archived_plan_ids_from_text(old_manifest)
|
||||
old_readme = _git_run(kg, ["show", f"{kg_tag}:docs/archive/README.md"])
|
||||
old_readme = run_git_stdout(kg, ["show", f"{kg_tag}:docs/archive/README.md"])
|
||||
if old_readme:
|
||||
baseline_archived_plans |= _extract_archived_plan_ids_from_text(old_readme)
|
||||
old_ls = _git_run(kg, ["ls-tree", "--name-only", kg_tag, "docs/archive/"])
|
||||
old_ls = run_git_stdout(kg, ["ls-tree", "--name-only", kg_tag, "docs/archive/"])
|
||||
if old_ls:
|
||||
baseline_archived_plans |= _extract_archived_plan_ids_from_text(old_ls)
|
||||
|
||||
@@ -239,22 +227,22 @@ def collect_workspace_change_signals(ws_root: Path | None = None) -> dict[str, A
|
||||
# 3. CLI entrypoints (`pyproject.toml`), MCP tools (`mcp/tools.py`), JSON schemas (`schemas/v1/`), & subpages (`site/<slug>/index.html`)
|
||||
pyproj_p = core / "pyproject.toml"
|
||||
cur_scripts = _extract_cli_scripts_from_pyproject(pyproj_p.read_text(encoding="utf-8")) if pyproj_p.is_file() else set()
|
||||
old_pyproj = _git_run(core, ["show", f"{baseline_tag}:pyproject.toml"])
|
||||
old_pyproj = run_git_stdout(core, ["show", f"{baseline_tag}:pyproject.toml"])
|
||||
old_scripts = _extract_cli_scripts_from_pyproject(old_pyproj) if old_pyproj else cur_scripts
|
||||
|
||||
tools_p = core / "src" / "hyperstitionstud_io" / "mcp" / "tools.py"
|
||||
cur_tools = _extract_mcp_tool_names(tools_p.read_text(encoding="utf-8")) if tools_p.is_file() else set()
|
||||
old_tools_txt = _git_run(core, ["show", f"{baseline_tag}:src/hyperstitionstud_io/mcp/tools.py"])
|
||||
old_tools_txt = run_git_stdout(core, ["show", f"{baseline_tag}:src/hyperstitionstud_io/mcp/tools.py"])
|
||||
old_tools = _extract_mcp_tool_names(old_tools_txt) if old_tools_txt else cur_tools
|
||||
|
||||
schemas_dir = core / "schemas" / "v1"
|
||||
cur_schemas = {p.name for p in schemas_dir.glob("*.schema.json")} if schemas_dir.is_dir() else set()
|
||||
old_schemas_ls = _git_run(core, ["ls-tree", "--name-only", baseline_tag, "schemas/v1/"])
|
||||
old_schemas_ls = run_git_stdout(core, ["ls-tree", "--name-only", baseline_tag, "schemas/v1/"])
|
||||
old_schemas = {Path(ln).name for ln in old_schemas_ls.splitlines() if ln.endswith(".schema.json")} if old_schemas_ls else cur_schemas
|
||||
|
||||
site_dir = core / "site"
|
||||
cur_subpages = {p.parent.name for p in site_dir.glob("*/index.html")} if site_dir.is_dir() else set()
|
||||
old_site_ls = _git_run(core, ["ls-tree", "-r", "--name-only", baseline_tag, "site/"])
|
||||
old_site_ls = run_git_stdout(core, ["ls-tree", "-r", "--name-only", baseline_tag, "site/"])
|
||||
old_subpages = {
|
||||
Path(ln).parts[1]
|
||||
for ln in old_site_ls.splitlines()
|
||||
@@ -491,12 +479,14 @@ def sync_workspace_version(target_version: str, check_only: bool = False, ws_roo
|
||||
path.write_text(updated, encoding="utf-8")
|
||||
modified_files.append(str(path))
|
||||
|
||||
if not check_only:
|
||||
ws_toml = cfg.workspace_root / "workspace.toml"
|
||||
if ws_toml.is_file():
|
||||
orig_ws = ws_toml.read_text(encoding="utf-8")
|
||||
upd_ws = re.sub(rf'schema_version\s*=\s*"{SEMVER_RE}"', f'schema_version = "{v}"', orig_ws, flags=re.M)
|
||||
if upd_ws != orig_ws:
|
||||
ws_toml = cfg.workspace_root / "workspace.toml"
|
||||
if ws_toml.is_file():
|
||||
orig_ws = ws_toml.read_text(encoding="utf-8")
|
||||
upd_ws = re.sub(rf'schema_version\s*=\s*"{SEMVER_RE}"', f'schema_version = "{v}"', orig_ws, flags=re.M)
|
||||
if upd_ws != orig_ws:
|
||||
if check_only:
|
||||
mismatched_files.append(str(ws_toml))
|
||||
else:
|
||||
ws_toml.write_text(upd_ws, encoding="utf-8")
|
||||
modified_files.append(str(ws_toml))
|
||||
|
||||
|
||||
+121
-9
@@ -106,7 +106,7 @@ def test_offline_urn_namespaces_and_no_external_https_fonts() -> None:
|
||||
cfg.zoology_dir,
|
||||
cfg.knowledge_graph_dir,
|
||||
cfg.paths["gematria_js_dir"],
|
||||
cfg.paths.get("ci_repo_dir", cfg.workspace_root / "hyperdope-ci-build"),
|
||||
cfg.ci_build_dir,
|
||||
):
|
||||
if not rdir.is_dir():
|
||||
continue
|
||||
@@ -212,8 +212,27 @@ def test_local_config_citation_resolution_and_proposals() -> None:
|
||||
|
||||
|
||||
def test_doctor_all_checks_pass() -> None:
|
||||
from hyperstitionstud_io import __version__ as cur_ver
|
||||
from hyperstitionstud_io.config import (
|
||||
normalize_workspace_relpath,
|
||||
resolve_workspace_repo_dir,
|
||||
)
|
||||
|
||||
diag = run_diagnostics()
|
||||
assert diag["all_checks_passed"] is True
|
||||
assert diag["schema_version"] == cur_ver
|
||||
|
||||
cfg = load_workspace_config()
|
||||
assert cfg.schema_version == cur_ver
|
||||
assert cfg.ci_build_dir.is_dir()
|
||||
assert (
|
||||
resolve_workspace_repo_dir(cfg.workspace_root, "hyperdope-ci-build")
|
||||
== resolve_workspace_repo_dir(cfg.workspace_root, "ingglish-hyperdope-ci")
|
||||
)
|
||||
assert (
|
||||
normalize_workspace_relpath(cfg.core_dir / "deploy" / "sync-vps-repos.sh", workspace_root=cfg.workspace_root)
|
||||
== "/workspace/hyperstitionstudio-core/deploy/sync-vps-repos.sh"
|
||||
)
|
||||
|
||||
|
||||
def test_ipld_quant_and_mcp_server() -> None:
|
||||
@@ -784,8 +803,12 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
mac_code, _, mac_body = dispatch_rest_v1("GET", "/api/v1/tools/hs_inspect_macro_indicators")
|
||||
assert mac_code == 200 and mac_body["data"]["synthetic_data_eliminated"] is True
|
||||
assert mac_body["data"]["series_count"] == 14
|
||||
assert mac_body["data"]["series"]["effr"]["aq_evaluation"]["face_int"] == 388
|
||||
assert mac_body["data"]["derived_indicators"]["m1_vs_m2_spread"]["m2_minus_m1_trillions_str"] == "$3.37T"
|
||||
effr_series = mac_body["data"]["series"]["effr"]
|
||||
assert effr_series["aq_evaluation"]["face_int"] == int(round(float(effr_series["latest_value"]) * 100))
|
||||
assert "2026-11-26" in effr_series["missing_observation_dates"]
|
||||
assert mac_body["data"]["series"]["cpi"]["yoy_change_pct"] is not None
|
||||
m2_m1_str = mac_body["data"]["derived_indicators"]["m1_vs_m2_spread"]["m2_minus_m1_trillions_str"]
|
||||
assert isinstance(m2_m1_str, str) and m2_m1_str.startswith("$") and m2_m1_str.endswith("T")
|
||||
|
||||
# Verify Plan 4: 5-Agenda Daily Portfolio & Memetic Regime Update (hs-daily-brief)
|
||||
brf_code, _, brf_body = dispatch_rest_v1("GET", "/api/v1/tools/hs_generate_daily_portfolio_brief")
|
||||
@@ -927,6 +950,10 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
|
||||
vps_prod_sh = cfg_test.core_dir / "deploy" / "run-vps-data-production.sh"
|
||||
assert vps_prod_sh.is_file() and "/dev/null" not in vps_prod_sh.read_text(encoding="utf-8")
|
||||
vps_prod_txt = vps_prod_sh.read_text(encoding="utf-8")
|
||||
assert "--window=auto" in vps_prod_txt or '--window=*' in vps_prod_txt
|
||||
assert "us-pre-market-open" in vps_prod_txt
|
||||
assert '--window "${WINDOW_MODE}"' in vps_prod_txt
|
||||
for u_name in (
|
||||
"hyperstition-closing-bell-harvest.service",
|
||||
"hyperstition-closing-bell-harvest.timer",
|
||||
@@ -935,6 +962,63 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
):
|
||||
assert (cfg_test.core_dir / "deploy" / u_name).is_file()
|
||||
|
||||
# Verify Plan #72: Dual-Calendar Pre-Market-Open Timer & Session-Window Brief Deduplication
|
||||
cb_timer_txt = (cfg_test.core_dir / "deploy" / "hyperstition-closing-bell-harvest.timer").read_text(encoding="utf-8")
|
||||
assert "OnCalendar=Mon..Fri *-*-* 14:00:00 UTC" in cb_timer_txt
|
||||
assert "OnCalendar=Mon..Fri *-*-* 21:30:00 UTC" in cb_timer_txt
|
||||
cb_svc_txt = (cfg_test.core_dir / "deploy" / "hyperstition-closing-bell-harvest.service").read_text(encoding="utf-8")
|
||||
assert "--window=auto" in cb_svc_txt
|
||||
|
||||
import datetime as _dt
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import patch as _mock_patch
|
||||
from hyperstitionstud_io.quant.collector import build_financial_quant_harvest as _bfqh
|
||||
from hyperstitionstud_io.quant.daily_brief import (
|
||||
_resolve_session_window,
|
||||
build_daily_portfolio_brief,
|
||||
)
|
||||
|
||||
assert _bfqh(harvest_mode="us-pre-market-open", live_fetch=False)["harvest_mode"] == "us-pre-market-open"
|
||||
assert _resolve_session_window("auto", _dt.datetime(2026, 12, 2, 14, 0, tzinfo=_dt.timezone.utc)) == "us-pre-market-open"
|
||||
assert _resolve_session_window("auto", _dt.datetime(2026, 12, 2, 21, 30, tzinfo=_dt.timezone.utc)) == "us-closing-bell"
|
||||
assert _resolve_session_window("auto", _dt.datetime(2026, 12, 2, 0, 5, tzinfo=_dt.timezone.utc)) == "utc-rollover"
|
||||
|
||||
tmp_brief_core = tmp_path / "brief_core_tmp"
|
||||
(tmp_brief_core / "site" / "quant").mkdir(parents=True, exist_ok=True)
|
||||
seed_hist = [
|
||||
{
|
||||
"run_number": idx + 1,
|
||||
"session_window": "us-closing-bell",
|
||||
"generated_at_utc": "",
|
||||
"posterior_probabilities": {"R1_BULL_RISK_ON": 0.25, "R2_PINNED_ISOMETRIC": 0.50, "R3_TAIL_DRAWDOWN_RISK_OFF": 0.25},
|
||||
"question_id": f"Q-RUN-{idx + 1:04d}",
|
||||
"cidv1": f"baguqeeraseed{idx:04d}",
|
||||
}
|
||||
for idx in range(62)
|
||||
]
|
||||
# Ensure unique dates in seed_hist so none collide with each other
|
||||
base_seed_dt = _dt.date(2026, 9, 1)
|
||||
for idx, item in enumerate(seed_hist):
|
||||
item["generated_at_utc"] = (base_seed_dt + _dt.timedelta(days=idx)).strftime("%Y-%m-%dT21:30:00Z")
|
||||
(tmp_brief_core / "site" / "quant" / "daily-brief-state.json").write_text(
|
||||
json.dumps({"version": "2.18.0", "run_number": 62, "run_history": seed_hist}, indent=2),
|
||||
encoding="utf-8",
|
||||
)
|
||||
fake_cfg = SimpleNamespace(core_dir=tmp_brief_core, archive_dir=cfg_test.archive_dir, read_only_files=())
|
||||
with _mock_patch("hyperstitionstud_io.quant.daily_brief.load_workspace_config", return_value=fake_cfg):
|
||||
b_am = build_daily_portfolio_brief(allow_live_network=False, write_files=True, session_window="us-pre-market-open")
|
||||
assert b_am["session_window"] == "us-pre-market-open"
|
||||
b_pm = build_daily_portfolio_brief(allow_live_network=False, write_files=True, session_window="us-closing-bell")
|
||||
assert b_pm["session_window"] == "us-closing-bell"
|
||||
b_am_dup = build_daily_portfolio_brief(allow_live_network=False, write_files=True, session_window="us-pre-market-open")
|
||||
assert b_am_dup["session_window"] == "us-pre-market-open"
|
||||
|
||||
brief_state_out = json.loads((tmp_brief_core / "site" / "quant" / "daily-brief-state.json").read_text(encoding="utf-8"))
|
||||
assert len(brief_state_out["run_history"]) == 60
|
||||
today_10 = b_am["generated_at_utc"][:10]
|
||||
today_entries = [x for x in brief_state_out["run_history"] if x["generated_at_utc"][:10] == today_10]
|
||||
assert [x["session_window"] for x in today_entries] == ["us-pre-market-open", "us-closing-bell"]
|
||||
|
||||
# Verify /engineering/ (hs-eng-docs) & /math/ (hs-math-docs) Piecewise & Non-Sequential Revertability
|
||||
from hyperstitionstud_io.publishing.engineering_docs import build_engineering_site
|
||||
from hyperstitionstud_io.publishing.math_docs import build_math_site
|
||||
@@ -1381,19 +1465,35 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
cfg.archive_dir / "packaging" / "bundle" / "scripts" / "ci_provision_ingglish.py",
|
||||
cfg.archive_dir / "packaging" / "bundle" / "skills" / "hyperdope-ingglish-ci" / "scripts" / "ci_provision_ingglish.py",
|
||||
):
|
||||
assert ci_prov_mirror.read_text(encoding="utf-8") == ci_prov_txt, f"Out-of-sync ci_provision_ingglish.py mirror: {ci_prov_mirror}"
|
||||
mirror_txt = ci_prov_mirror.read_text(encoding="utf-8")
|
||||
assert len(mirror_txt.splitlines()) <= 40 and "runpy.run_path" in mirror_txt and "ci_provision_ingglish.py" in mirror_txt, (
|
||||
f"Expected thin delegator wrapper for {ci_prov_mirror}"
|
||||
)
|
||||
|
||||
# Verify Plan #58: Pre-Commit Preparation & Gates DEPLOY-GATE-D01.MIRROR_PARITY..DEPLOY-GATE-D08.PRE_COMMIT_STAGE for push-all-to-git-libre-audio.sh & deploy/sync-vps-repos.sh
|
||||
from hyperstitionstud_io.ci.deploy_scripts_sync import prepare_and_verify_deploy_scripts
|
||||
# Verify Plan #58 & DEPLOY-GATE-D07.TOPO_PUSH_PARITY: Pre-Commit Preparation & Gates DEPLOY-GATE-D01.MIRROR_PARITY..DEPLOY-GATE-D08.PRE_COMMIT_STAGE for push-all-to-git-libre-audio.sh & deploy/sync-vps-repos.sh
|
||||
from hyperstitionstud_io.ci.deploy_scripts_sync import (
|
||||
prepare_and_verify_deploy_scripts,
|
||||
validate_push_script_rebase_gating,
|
||||
)
|
||||
|
||||
dep_sync = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=False)
|
||||
assert dep_sync["ok"] is True, f"Deploy scripts sync failed: {dep_sync}"
|
||||
assert all(dep_sync["gates"].values()), f"Deploy scripts gates failed: {dep_sync['gates']}"
|
||||
dep_chk = prepare_and_verify_deploy_scripts(workspace_root=cfg.workspace_root, check_only=True)
|
||||
assert dep_chk["ok"] is True, f"Deploy scripts check_only failed: {dep_chk}"
|
||||
assert (cfg.core_dir / "deploy" / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8") == (
|
||||
cfg.workspace_root / "push-all-to-git-libre-audio.sh"
|
||||
).read_text(encoding="utf-8")
|
||||
ws_push_txt = (cfg.workspace_root / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8")
|
||||
assert (cfg.core_dir / "deploy" / "push-all-to-git-libre-audio.sh").read_text(encoding="utf-8") == ws_push_txt
|
||||
assert validate_push_script_rebase_gating(ws_push_txt) == []
|
||||
assert 'run_checked "git pull --rebase' in ws_push_txt
|
||||
for bad_rebase_snippet in (
|
||||
"git checkout --theirs README.md",
|
||||
"git checkout --ours README.md",
|
||||
"git pull --rebase -X theirs origin main",
|
||||
"git pull --rebase -X ours origin main",
|
||||
"git pull --rebase --autostash origin main || true",
|
||||
):
|
||||
bad_v = validate_push_script_rebase_gating(bad_rebase_snippet)
|
||||
assert len(bad_v) >= 1, f"Gate DEPLOY-GATE-D07.TOPO_PUSH_PARITY failed to reject {bad_rebase_snippet!r}"
|
||||
|
||||
# Verify Plan #60: /calc/ (haiperdohpjematreeah) Homepage Group 3 UI Parity, Zero "Cypher Calculator" & hyperdope-ci-build Patch Integration
|
||||
calc_dir = cfg.paths["gematria_js_dir"]
|
||||
@@ -1448,6 +1548,18 @@ def test_ipld_quant_and_mcp_server() -> None:
|
||||
assert erofs_res["verified"] is True
|
||||
assert erofs_res["mcp_tools_swept"] >= 15
|
||||
|
||||
# Verify PLAN-SPECIFICATION-AND-GOVERNANCE-STANDARD (hs-plan-lint)
|
||||
from hyperstitionstud_io.ci.plan_validator import verify_plan_specifications
|
||||
|
||||
plan_audit = verify_plan_specifications(workspace_root=cfg.workspace_root)
|
||||
assert plan_audit["ok"] is True, f"Plan specification audit failed: {plan_audit['errors']}"
|
||||
assert plan_audit["total_plans_checked"] == plan_audit["active_plans_checked"] + plan_audit["piecewise_plans_checked"]
|
||||
assert plan_audit["total_plans_checked"] > 0
|
||||
assert len(plan_audit["missing_pdfs"]) == 0
|
||||
assert len(plan_audit["missing_ledger_entries"]) == 0
|
||||
assert len(plan_audit["metadata_errors"]) == 0
|
||||
assert len(plan_audit["host_path_errors"]) == 0
|
||||
|
||||
# Write cached internal test baseline (.cache/internal-test-baseline-latest.json) for hs-public-smoke
|
||||
from hyperstitionstud_io.ci.public_regression import write_internal_test_baseline_cache
|
||||
|
||||
|
||||
Reference in new issue
Block a user