Skip to content

Commit 8b65c4e

Browse files
fix(personal_export): resolve snapshot cache path via env, not a hardcoded owner path
_DEFAULT_SNAPSHOT_CACHE was hardcoded to "IWE/DS-my-strategy/inbox/WP-425/...", the platform author's own personal governance-repo path and RP number. Every other installation's fallback snapshot read silently pointed at a path that only exists on the author's machine. Now resolves via IWE_ROOT/IWE_WORKSPACE and IWE_GOVERNANCE_REPO, the same convention the FMT-exocortex-template side already uses for the same cache file, and moves off "inbox/WP-425/" to ".cache/" for the same reason that side did (FMT-exocortex-template#1132): WP-425 is the author's own RP number, meaningless elsewhere. Found while fixing FMT-exocortex-template#1132 (vendored copy drift check caught this file as edited in place — this is the actual fix, applied upstream instead).
1 parent c52e5ef commit 8b65c4e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎generator/personal_export.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@
3535
# Fallback for fetch_stage() when the live platform is unreachable (WP-149
3636
# bug-2026-07-12): a periodic local snapshot (WP-425, launchd Sunday 08:00),
3737
# used only if the platform round-trip fails outright.
38+
# issue #1132 (FMT-exocortex-template): was hardcoded to the platform
39+
# author's own personal governance-repo path — wrong for every other
40+
# installation. Resolves via IWE_ROOT/IWE_WORKSPACE and IWE_GOVERNANCE_REPO,
41+
# same convention scripts/update-derived-snapshot.py uses on the FMT side,
42+
# and the same ".cache/" location that replaces "inbox/WP-425/" there.
43+
_IWE_ROOT = pathlib.Path(
44+
os.environ.get("IWE_ROOT") or os.environ.get("IWE_WORKSPACE") or (pathlib.Path.home() / "IWE")
45+
).expanduser()
46+
_GOVERNANCE_REPO = os.environ.get("IWE_GOVERNANCE_REPO", "DS-strategy")
3847
_DEFAULT_SNAPSHOT_CACHE = str(
39-
pathlib.Path.home() / "IWE/DS-my-strategy/inbox/WP-425/cache/derived_snapshot.json"
48+
_IWE_ROOT / _GOVERNANCE_REPO / ".cache/derived_snapshot.json"
4049
)
4150
_SNAPSHOT_STALE_DAYS = 14 # weekly refresh + one missed run of slack
4251

0 commit comments

Comments
 (0)