The main branch at current HEAD is currently unrunnable due to broken imports between the legacy/ application layer and the potpie/context-engine workspace package. Two symbol renames/removals in context-engine were never propagated to the consumers in legacy/.
Environment
Steps to Reproduce
- Clone the repo:
git clone https://github.com/potpie-ai/potpie.git
cd potpie/legacy && cp .env.template .env
- Install deps (either via
legacy/scripts/start.sh or manually):
- Try to import the app:
uv run --project . python -c "import app.main"
Expected Behavior
The import should succeed and the application should boot.
Actual Behavior
Import fails with two separate ImportErrors:
##%3 Error 1 — bundle_to_agent_envelope
ImportError: cannot import name 'bundle_to_agent_envelope' from 'domain.agent_context_port'
(/potpie/potpie/context-engine/domain/agent_context_port.py)
Called from: legacy/app/modules/intelligence/tools/context_tools/agent_context_tools.py:14
Missing symbol location: potpie/potpie/context-engine/domain/agent_context_port.py does not define bundle_to_agent_envelope.
##%3 Error 2 — handle_apply_episode
ImportError: cannot import name 'handle_apply_episode' from 'application.use_cases.context_graph_jobs'
(/potpie/potpie/context-engine/application/use_cases/context_graph_jobs.py)
Called from: legacy/app/modules/context_graph/tasks.py:9
Also expected: handle_backfill_pot, handle_ingest_pr
Missing symbol location: context_graph_jobs.py only defines handle_process_batch.
Suspected Cause
PR #889 ("Restore detached context-engine daemon lifecycle") or a related refactoring changed the internal API surface but the legacy/ module imports were not updated to match.
Workaround
Check out the latest stable tag instead of main:
The
mainbranch at current HEAD is currently unrunnable due to broken imports between thelegacy/application layer and thepotpie/context-engineworkspace package. Two symbol renames/removals incontext-enginewere never propagated to the consumers inlegacy/.Environment
main(latest HEAD)602f4dbc— Restore detached context-engine daemon lifecycle (Restore detached context-engine daemon lifecycle #889)uvSteps to Reproduce
git clone https://github.com/potpie-ai/potpie.gitcd potpie/legacy && cp .env.template .envlegacy/scripts/start.shor manually):uv sync --project .Expected Behavior
The import should succeed and the application should boot.
Actual Behavior
Import fails with two separate
ImportErrors:##%3 Error 1 —
bundle_to_agent_envelopeCalled from:
legacy/app/modules/intelligence/tools/context_tools/agent_context_tools.py:14Missing symbol location:
potpie/potpie/context-engine/domain/agent_context_port.pydoes not definebundle_to_agent_envelope.##%3 Error 2 —
handle_apply_episodeCalled from:
legacy/app/modules/context_graph/tasks.py:9Also expected:
handle_backfill_pot,handle_ingest_prMissing symbol location:
context_graph_jobs.pyonly defineshandle_process_batch.Suspected Cause
PR #889 ("Restore detached context-engine daemon lifecycle") or a related refactoring changed the internal API surface but the
legacy/module imports were not updated to match.Workaround
Check out the latest stable tag instead of
main: