Spaces:
Sleeping
Sleeping
Commit History
-
feat: LangGraph best-practices refactor (Sprint 8 Epics 2-3-4)
- Fix state mutation anti-pattern: all 4 workflow agent nodes + debug wrappers now return partial dicts instead of mutating state - Add Annotated reducers (operator.add) to candidates/candidate_scores list fields in AgentState - Replace deprecated set_entry_point / set_conditional_entry_point with START edges across agent.py, whale_hunter.py, workflow.py - Refactor gatekeeper routing to Command pattern, removing separate check_status functions in agent.py and whale_hunter.py - Add InMemorySaver checkpointer to all 3 graph compile() calls with thread_id config on every invoke/ainvoke - Add RetryPolicy(max_attempts=3) to all graph nodes and recursion_limit=30 to all invoke calls - Add InvestmentVerdict Pydantic model (src/models/verdict.py) with structured output via with_structured_output, graceful fallback to plain LLM - Simplify portfolio_tracker verdict parsing when structured_verdict is provided - Clean up requirements.txt: LangChain 1.0 LTS range pinning, remove …d5ba3a3