Aser serialization: aser-call/fragment now return SxExpr instead of String. serialize/inspect passes SxExpr through unquoted, preventing the double- escaping (\" → \\\" ) that broke client-side parsing when aser wire format was output via raw! into <script> tags. Added make-sx-expr + sx-expr-source primitives to OCaml and JS hosts. Binary blob protocol: eval, aser, aser-slot, and sx-page-full now send SX source as length-prefixed blobs instead of escaped strings. Eliminates pipe desync from concurrent requests and removes all string-escape round-trips between Python and OCaml. Bridge safety: re-entrancy guard (_in_io_handler) raises immediately if an IO handler tries to call the bridge, preventing silent deadlocks. Fetch error logging: orchestration.sx error callback now logs method + URL via log-warn. Platform catches (fetchAndRestore, fetchPreload, bindBoostForm) also log errors instead of silently swallowing them. Transpiler fixes: makeEnv, scopePeek, scopeEmit, makeSxExpr added as platform function definitions + transpiler mappings — were referenced in transpiled code but never defined as JS functions. Playwright test infrastructure: - nav() captures JS errors and fails fast with the actual error message - Checks for [object Object] rendering artifacts - New tests: delete-row interaction, full page refresh, back button, direct load with fresh context, code block content verification - Default base URL changed to localhost:8013 (standalone dev server) - docker-compose.dev-sx.yml: port 8013 exposed for local testing - test-sx-build.sh: build + unit tests + Playwright smoke tests Geography content: index page component written (sx/sx/geography/index.sx) describing OCaml evaluator, wire formats, rendering pipeline, and topic links. Wiring blocked by aser-expand-component children passing issue. Tests: 1080/1080 JS, 952/952 OCaml, 66/66 Playwright Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
70 lines
2.5 KiB
YAML
70 lines
2.5 KiB
YAML
# Standalone dev mode for sx_docs only
|
|
# Replaces ~/sx-web production stack with bind-mounted source + auto-reload
|
|
# Accessible at sx.rose-ash.com via Caddy on externalnet
|
|
|
|
services:
|
|
sx_docs:
|
|
image: registry.rose-ash.com:5000/sx_docs:latest
|
|
environment:
|
|
SX_STANDALONE: "true"
|
|
SECRET_KEY: "${SECRET_KEY:-sx-dev-secret}"
|
|
REDIS_URL: redis://redis:6379/0
|
|
WORKERS: "1"
|
|
ENVIRONMENT: development
|
|
RELOAD: "true"
|
|
SX_USE_REF: "1"
|
|
SX_USE_OCAML: "1"
|
|
SX_OCAML_BIN: "/app/bin/sx_server"
|
|
SX_BOUNDARY_STRICT: "1"
|
|
SX_DEV: "1"
|
|
ports:
|
|
- "8013:8000"
|
|
volumes:
|
|
- /root/rose-ash/_config/dev-sh-config.yaml:/app/config/app-config.yaml:ro
|
|
- ./shared:/app/shared
|
|
- ./sx/app.py:/app/app.py
|
|
- ./sx/sxc:/app/sxc
|
|
- ./sx/bp:/app/bp
|
|
- ./sx/services:/app/services
|
|
- ./sx/content:/app/content
|
|
- ./sx/sx:/app/sx
|
|
- ./sx/path_setup.py:/app/path_setup.py
|
|
- ./sx/entrypoint.sh:/usr/local/bin/entrypoint.sh
|
|
# Spec + web SX files (loaded by OCaml kernel for aser, parser, render)
|
|
- ./spec:/app/spec:ro
|
|
- ./web:/app/web:ro
|
|
# OCaml SX kernel binary (built with: cd hosts/ocaml && eval $(opam env) && dune build)
|
|
- ./hosts/ocaml/_build/default/bin/sx_server.exe:/app/bin/sx_server:ro
|
|
- ./sx/__init__.py:/app/__init__.py:ro
|
|
# sibling models for cross-domain SQLAlchemy imports
|
|
- ./blog/__init__.py:/app/blog/__init__.py:ro
|
|
- ./blog/models:/app/blog/models:ro
|
|
- ./market/__init__.py:/app/market/__init__.py:ro
|
|
- ./market/models:/app/market/models:ro
|
|
- ./cart/__init__.py:/app/cart/__init__.py:ro
|
|
- ./cart/models:/app/cart/models:ro
|
|
- ./events/__init__.py:/app/events/__init__.py:ro
|
|
- ./events/models:/app/events/models:ro
|
|
- ./federation/__init__.py:/app/federation/__init__.py:ro
|
|
- ./federation/models:/app/federation/models:ro
|
|
- ./account/__init__.py:/app/account/__init__.py:ro
|
|
- ./account/models:/app/account/models:ro
|
|
- ./relations/__init__.py:/app/relations/__init__.py:ro
|
|
- ./relations/models:/app/relations/models:ro
|
|
- ./likes/__init__.py:/app/likes/__init__.py:ro
|
|
- ./likes/models:/app/likes/models:ro
|
|
- ./orders/__init__.py:/app/orders/__init__.py:ro
|
|
- ./orders/models:/app/orders/models:ro
|
|
networks:
|
|
- externalnet
|
|
- default
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
externalnet:
|
|
external: true
|