-
Real incident (2026-08-15, task b243dfe8): this exception's message used to truncate the failing response to [:2000] chars -- fine for the "process exited nonzero" error paths in this same file, where a short excerpt is enough, but actively counterproductive here: diagnosing a real production extraction failure with only the 2000-char preview, it was impossible to tell "the model's response was genuinely cut off mid-generation" from "this is just where the display limit happened to land" -- both look identical (text stopping mid-word) without the full text. No length cap now: this flows into task_execution._mark_blocked's str(exc), stored as a plain TEXT execution_event column with no practical size limit, so keeping the complete response is the honest, actually-diagnosable choice -- the same investigation that found this needed the full text and didn't have it. New test confirms a >2000-char failing response is preserved whole in the exception, not truncated. 20/20 in this file; every file today's fixes touch stays green (the only failures anywhere in the full suite are 15 pre-existing ones in a concurrent, unrelated task's own test file, confirmed identical before and after this change). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-
Implements docs/done/work-graph-node-execution-deblackbox-requirements.md end to end. The three documented call sites (e2e_pipeline.py:: _check_prd_consistency, work_graph_orchestrate.py::_llm_judgment_verify_fn, work_graph_orchestrate.py::_make_run_fn) all used to render a one-off Dynamic Workflow .js script and run it via `claude -p 'Run /<name>...'` purely to get "agent identity + schema-shaped output" -- a workaround for --json-schema silently conflicting with --agent (05 §5.4.1.1). That workaround was never actually necessary: work_graph_plan.py:: plan_work_graph() solved the identical problem from day one with a flat `claude --agent ... -p ...` call + ```json-fence extraction from free text, already validated in production. New org_node_trigger.trigger_org_node_structured() unifies all three call sites onto that same flat-call approach. extract_json_payload() generalizes work_graph_plan.py's fence-extraction algorithm; _extract_graph_manifest is now a thin wrapper over it. Two more call sites not in the original design doc (written before they existed) were found and migrated too: _run_reflection_perspective and _fix_skill_for_node (Phase 2a's Reflection-review/Fix-Skill). work_graph_fork.py needed no changes -- it only reaches _make_run_fn indirectly via run_graph(), so it benefits automatically. FR-4's real-agent verification (RUN_REAL_AGENT_E2E=1, mandatory, not optional -- src/test_org_node_trigger_e2e.py) confirmed persona loading, --model override, and JSON-fence extraction all work against a real model. write_workflow_script/execute_work_graph/execute_work_graph_with_usage_ limit_retry are confirmed to have no remaining production callers; docstrings mark them historical, the file is kept (not deleted). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-
trigger_org_node(org_node, prompt, target_folder_path): shells out `claude --agent <org_node> -p ... --permission-mode auto` with cwd=target project, parses the JSON result, raises OrgNodeTriggerError on nonzero exit or is_error. Skeleton only, per development-plan.md ("不含完整状态机") -- TASK_NOT_READY/CONCURRENCY_LIMIT_REACHED/USAGE_LIMIT_REACHED handling is U-010's job. Also refactors test_agent_e2e.py (U-004) to call this real function instead of its own ad-hoc subprocess invocation, so the gated real-agent test now exercises U-005's actual production code path -- confirmed still passing against a real `claude --agent planner` call. 5 new mocked stdlib unittest cases (CLAUDE.md Testing constraint: mock the subprocess boundary in normal tests). 46 total across U-001-005, all passing; the 1 gated real-agent test re-verified manually. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>