Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/issue-29-prd-gaps"
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?
Closes #29 (the load-bearing items) and #30. Brings the codebase closer to PRD framing.
#29 — implementation gaps to match PRD
Schema renames (
logic.oschema)ExecutionStatus→PlayStatusFlowInput→FlowField(single value type used for both inputs/outputs)FlowField.input_type→field_typeSpan gets a kind + source location (PRD §7)
SpanKindvalue type (flow_root | step | rpc | subflow | other)Span.kind(defaultstep),Span.source_file,Span.source_linekindon every span:flow_rootfor the root span,stepfor@flow/flow.step/flow.span,rpcforinstrument()-wrapped client method calls,subflowforflow.invoke(spawn=True)@flowwrapper capturessource_file+source_linefromfn.__code__Step-key version invalidation (PRD §5)
step_keynow mixesHERO_FLOW_VERSION_SIDinto the SHA. Workflow version bump invalidates the memoization cache globally — paused plays resuming against a fresh version see fresh execution instead of stale cached outputs.Unified sub-flow API (PRD §3)
flow.invoke(name, *, spawn=False, version_sid="", **inputs)on the SDK. Single explicit API for both execution modes:spawn=False(default) → in-process; resolves via the existing workflow-library lookup, exec's the source, calls the entry@flow.spawn=True→ callsplay_run_async+play_wait; returns the child'soutput_dataparsed as JSON. Opens akind=subflowspan on the parent carryingchild_play_sid._HeroFlowImportermeta-path importer per the issue's recommendation. Migrated the seed flows (service_agent.py,service_code_gen.py) fromfrom <flow_name> import <fn>toflow.invoke("<name>", ...).Prefill fail-fast (PRD §6)
Play.prefill_onlyfield, settruewhenplay_startis invoked withprefill_resumes_jsonnon-empty.play_resumeso subsequent unanswered pauses still park the play.HERO_PREFILL_ONLY=1env var plumbs the flag to the SDK;flow.pauseraisesFailedinstead of_AwaitingResumewhen set + no cached payload.Admin UI graph polish (PRD §6 / #29 §6)
#30 — hygiene sweep
Deleted
src/logic/at repo root (duplicate ofcrates/hero_logic/src/logic/, never wired into the workspace).Terminology — "DAG control flow engine" → "Python flow runtime" everywhere the framing applied to the engine itself. Kept "DAG" hits that refer to legitimate concepts (e.g. the previously-removed DAG node executor in historical comments).
Deferred (called out explicitly)
herolib_baselifecycle migration for all three binaries (#29 §7) — sizeable refactor touchingservice.toml+main.rsin three crates. Worth a focused follow-up PR.Workflow.outputsauto-populated from@flow(outputs=...)(#29 §4) — needs a Rust-side Python decorator parser. Left to a follow-up so the regex parser gets dedicated review.child_play_sidlink already lands users on the child.Test plan
cargo build --workspacecleancargo test -p hero_logic --lib— 50 tests pass including the pause/replay integration testpython3 examples/pause_resume_demo.py→ ✓ pause→resume→replay round trip passedpython3 examples/pause_resume_prefill.py→ ✓ prefill_resumes_json round trip passed🤖 Generated with Claude Code