feat(11-C1): embed + stage hero_tracing.py on server startup #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/11-phase-c1-embed-stage-tracing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase C1 of #11 — smallest piece of the executor work. Wires the Phase B SDK (hero_logic#16, merged) into the server binary so subsequent Phase C work (socket listener, subprocess spawn, RPC handlers) has a stable on-disk SDK location to point Python
PYTHONPATHs at.What's here
engine/python_executor.rsHERO_TRACING_PYconstant (include_str!),flows_sdk_dir()resolver (env-overridable),stage_sdk(),stage_sdk_at(dir),PythonFlowExecutorplaceholder for C2/C3/C4.hero_logic_servermainpython_executor::stage_sdk()after domain registration. Idempotent on every startup. Failure is fatal — no SDK ⇒ no Python flow can ever run.dirs(workspace),tempfileas dev-dep.Why stage rather than ship a wheel
Flow authors should
python my_flow.pywithoutpip install hero_tracing. Embedding + staging guarantees the on-disk SDK always matches the running server's wire protocol — eliminates the "wheel out of sync with server" drift class. Cost is ~20 KiB of static text in the binary.What this PR is NOT
play_startto the Python path yet (C4).Playend-to-end.PythonFlowExecutoris a struct with a singlesdk_dirfield — placeholder so the type exists when C2 starts adding methods.Phase plan (#11)
hero_tracing.pySDK (#16, merged)play_startroutingTest plan
cargo build --workspacecleancargo test -p hero_logic --lib python_executor— 4/4 passcargo test --workspace --libgreen🤖 Generated with Claude Code