Skip to content

chore(showcase/starters): regenerate to pick up #4101 fixes for langgraph + entrypoint - #4102

Merged
jpr5 merged 1 commit into
mainfrom
fix/langgraph-fastapi-tools-init
Apr 19, 2026
Merged

jpr5 merged 1 commit into
mainfrom
fix/langgraph-fastapi-tools-init

Conversation

@jpr5

@jpr5 jpr5 commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #4101 updated the resolution-aware import rewriter and the entrypoint $! -> agent PID fix, but the regeneration in that merge didn't include all affected files. After merge, origin/main at 2087950ee still had stale output — and showcase-starter-langgraph-fastapi-production has been returning 503 {"agent":"down"} on /api/health as a result.

Root cause:

  • showcase/starters/langgraph-fastapi/src/agents/tools/*.py still imported from src.agents.types / src.agents.get_weather / etc. (old flat-rewrite output). src/agents/src/agent.py imports src.agents.tools, which loads tools/__init__.py, which fails with ModuleNotFoundError: No module named 'src.agents.types'. The agent subprocess crashes during langgraph_cli's graph import step; /api/health flips to 503.
  • langgraph-python has the same broken imports in its tools/ barrel.
  • All 15 generated entrypoint.sh files still used 2>&1 | sed 's/^/[agent] /' &, so $! (used for kill -0 $AGENT_PID and wait -n) tracked sed, not the agent. Stack traces also got line-buffered inside the pipe and never reached the container log.

Fix: rerun pnpm -C showcase/scripts generate-starters (the script already on main from #4101). Pure regeneration — no source changes.

Verified locally:

  • tools/__init__.py now emits from src.agents.tools.types import ... (resolution-aware rewrite finds <agentDest>/tools/types.py one parent away).
  • entrypoint.sh now emits &> >(awk '{print "[agent] " $0; fflush()}').

Once merged, the Railway drift rebuild will pick up the new image for langgraph-fastapi and /api/health should return green within one redeploy cycle.

Test plan

  • CI green
  • After merge + drift rebuild, curl https://showcase-starter-langgraph-fastapi-production-c7d2.up.railway.app/api/health returns 200 {"agent":"up"}
  • langgraph-python health stays green (same tools/ fix applied, same container architecture)

…ntrypoint fixes

PR #4101 updated both the resolution-aware import rewriter and the
entrypoint `$!` -> agent PID fix, but the regeneration in the merged
commit didn't include all affected files. `origin/main` at 2087950
still contained:

- langgraph-fastapi + langgraph-python: `src/agents/tools/*.py` importing
  `from src.agents.types`, `from src.agents.get_weather`, etc. — the
  old flat-rewrite output, which crashes with
  `ModuleNotFoundError: No module named 'src.agents.types'` at agent
  import time. langgraph-fastapi on Railway was failing its health probe
  with `agent: down` for this reason.
- All 15 generated entrypoint.sh files still had the old
  `2>&1 | sed 's/^/[agent] /' &` pattern, meaning `$!` pointed at `sed`
  instead of the agent subprocess. Every `kill -0 $AGENT_PID` /
  `wait -n` check was monitoring the wrong process, and Python crash
  output was also line-buffered inside the pipe so tracebacks never hit
  the container log.

Re-running `pnpm -C showcase/scripts generate-starters` with #4101's
resolution-aware rewriter produces the correct `src.agents.tools.*`
imports for both langgraph starters and the intended
`&> >(awk '{print "[agent] " $0; fflush()}')` process-substitution form
for every entrypoint.sh. No generator changes — purely regenerated
output catching up to the script that's already on main.
@vercel

vercel Bot commented Apr 19, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment Apr 19, 2026 8:03pm
docs Ready Ready Preview, Comment Apr 19, 2026 8:03pm
form-filling Ready Ready Preview, Comment Apr 19, 2026 8:03pm
research-canvas Ready Ready Preview, Comment Apr 19, 2026 8:03pm
travel Ready Ready Preview, Comment Apr 19, 2026 8:03pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@jpr5
jpr5 merged commit b680fba into main Apr 19, 2026
15 checks passed
@jpr5
jpr5 deleted the fix/langgraph-fastapi-tools-init branch April 19, 2026 20:04
ataibarkai added a commit that referenced this pull request Apr 19, 2026
…n merge

Re-ran generate-registry + validate-pins after merging main (which brought
in PR #4098 langroid + #4100/#4101/#4102 starter regens) and the non-root
+ PID-capture column sweep. FAIL count unchanged at 110; hash drifts
because the FAIL set is the same strands entries but ordering normalized.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zeekay pushed a commit to Dream-AI-4444/CopilotKit that referenced this pull request Sep 11, 2026
… for langgraph + entrypoint (CopilotKit#4102)

## Summary

PR CopilotKit#4101 updated the resolution-aware import rewriter and the entrypoint
`$!` -> agent PID fix, but the regeneration in that merge didn't include
all affected files. After merge, `origin/main` at `2087950ee` still had
stale output — and `showcase-starter-langgraph-fastapi-production` has
been returning `503 {"agent":"down"}` on `/api/health` as a result.

Root cause:
- `showcase/starters/langgraph-fastapi/src/agents/tools/*.py` still
imported `from src.agents.types` / `src.agents.get_weather` / etc. (old
flat-rewrite output). `src/agents/src/agent.py` imports
`src.agents.tools`, which loads `tools/__init__.py`, which fails with
`ModuleNotFoundError: No module named 'src.agents.types'`. The agent
subprocess crashes during langgraph_cli's graph import step;
`/api/health` flips to 503.
- langgraph-python has the same broken imports in its tools/ barrel.
- All 15 generated `entrypoint.sh` files still used `2>&1 | sed
's/^/[agent] /' &`, so `$!` (used for `kill -0 $AGENT_PID` and `wait
-n`) tracked `sed`, not the agent. Stack traces also got line-buffered
inside the pipe and never reached the container log.

Fix: rerun `pnpm -C showcase/scripts generate-starters` (the script
already on main from CopilotKit#4101). Pure regeneration — no source changes.

Verified locally:
- `tools/__init__.py` now emits `from src.agents.tools.types import ...`
(resolution-aware rewrite finds `<agentDest>/tools/types.py` one parent
away).
- `entrypoint.sh` now emits `&> >(awk '{print "[agent] " $0;
fflush()}')`.

Once merged, the Railway drift rebuild will pick up the new image for
langgraph-fastapi and `/api/health` should return green within one
redeploy cycle.

## Test plan
- [ ] CI green
- [ ] After merge + drift rebuild, `curl
https://showcase-starter-langgraph-fastapi-production-c7d2.up.railway.app/api/health`
returns `200 {"agent":"up"}`
- [ ] langgraph-python health stays green (same tools/ fix applied, same
container architecture)

This branch was successfully deployed

5 active deployments
Preview – research-canvas — 55b1445f Deployed Apr 19, 2026 by vercel[bot]
Preview – travel — 55b1445f Deployed Apr 19, 2026 by vercel[bot]
Preview – docs — 55b1445f Deployed Apr 19, 2026 by vercel[bot]
Preview – form-filling — 55b1445f Deployed Apr 19, 2026 by vercel[bot]
Preview – chat-with-your-data — 55b1445f Deployed Apr 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant