Fix special-forms.sx path resolution in container

Three levels of ../ overshot from /app/sxc/pages/ to /. Use same
two-level pattern with /app/shared fallback as _read_spec_file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 23:16:21 +00:00
parent eee2954559
commit 9d0cffb84d

View File

@@ -42,10 +42,10 @@ def _special_forms_data() -> dict:
from shared.sx.parser import parse_all, serialize
from shared.sx.types import Symbol, Keyword
spec_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"..", "..", "..", "shared", "sx", "ref", "special-forms.sx",
)
ref_dir = os.path.join(os.path.dirname(__file__), "..", "..", "shared", "sx", "ref")
if not os.path.isdir(ref_dir):
ref_dir = "/app/shared/sx/ref"
spec_path = os.path.join(ref_dir, "special-forms.sx")
with open(spec_path) as f:
exprs = parse_all(f.read())