Set MALLOC_ARENA_MAX=2 and MALLOC_TRIM_THRESHOLD_ on the langgraph-python and
langgraph-fastapi entrypoints to curb glibc arena fragmentation on the many-core
Railway host, and NODE_OPTIONS --max-old-space-size=1536 scoped to the
langgraph-typescript agent process (not the sibling Next.js server) to cap the
V8 heap. All values use ${VAR:-default} so explicit Railway overrides win.
Real demo-time bugs in the langgraph-python integration:
- `interrupt-headless` was rendering hardcoded stale slot dates from a
`DEFAULT_SLOTS` constant instead of reading `payload.slots` that the
backend `interrupt(...)` already supplies. Sibling `gen-ui-interrupt`
does this correctly. Headless variant now matches.
- `_shared/interrupt-fallback-slots.ts` (new) — the JS fallback for
when the backend returns no `slots` array. Generates relative to
Date.now() so the picker never shows past dates. Used by both
`interrupt-headless` and `gen-ui-interrupt`. Deletes the old stale-
literal `gen-ui-interrupt/fallback-slots.ts` (dates from April that
had already decayed).
- `interrupt_agent.py` — replaced hardcoded `timezone(timedelta(-7))`
PDT with `zoneinfo.ZoneInfo("America/Los_Angeles")` so the demo
doesn't lie about offsets in winter. Also fixed a Sunday edge case
where `next_monday` collapsed to the same date as `tomorrow` (both
Python and the JS fallback) — added a `<= 1` skip-a-week guard.
- `package.json#dev` ran `uvicorn agent_server:app --port 8000` but
`src/agent_server.py` was a 3-line stub with no `app` symbol AND the
API route pointed at port 8123. Replaced with the canonical
`langgraph_cli dev --port 8123` invocation; deleted the dead stub.
- `entrypoint.sh:47` smoke-checked `src/agents/tools.py` (a file that
never existed) so every Railway boot logged a phantom ERROR. Dropped.
- `reasoning_agent.py` and `tool_rendering_reasoning_chain_agent.py`
intentionally omit `CopilotKitMiddleware` (they exercise only
reasoning-token streaming, no frontend tools / app context). Added a
one-line comment so a future maintainer doesn't cargo-cult it back in.
- `subagents._invoke_sub_agent` text-block walker had a regression
where a `{"type":"text","text":null}` payload (a known provider
quirk) would crash `"".join(parts)` with `TypeError: sequence item
N: expected str instance, NoneType found`. Restored the
`isinstance(block.get("text"), str)` guard.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace sys.path.insert hacks in Python agent files with direct
imports via symlinks to shared/{python,typescript}/tools.
Update Dockerfiles, entrypoints, and configs to support the new
symlink-based tool resolution. Add PARITY_NOTES for frameworks
that have known gaps.
The showcase framework directories better reflect their role as
integration examples rather than distributable packages.
Renames showcase/packages/ -> showcase/integrations/ and updates
the test docker-compose file reference accordingly.