fix(P03): l3b_agent_stub reads body from rest[0] not argv[1] (T-3.9)

---ci---
phase: 3
milestone: v1.0
status: execute
persona: backend-engineer
task: T-3.9
requirements:
  covered: [REQ-12]
---/ci---

Wave 2, task T-3.9. parse_output_flag strips -o; read_issue_body now reads body from rest[0] (after -o removed) instead of sys.argv[1].
This commit is contained in:
Jon Chery
2026-07-21 13:27:26 +00:00
parent 1de274c35c
commit 985e8f32d5
+6 -5
View File
@@ -62,11 +62,12 @@ def render_contract(stack: str) -> str:
)
def read_issue_body(argv: list) -> str:
"""Read issue body from argv[1] or stdin. Empty -> error."""
if len(argv) >= 2 and argv[1].strip():
return argv[1]
# Fall back to stdin if argv[1] is absent or empty.
def read_issue_body(args: list) -> str:
"""Read issue body from args[0] (already-stripped argv, no script name)
or stdin. Empty -> error."""
if len(args) >= 1 and args[0].strip():
return args[0]
# Fall back to stdin if argv body is absent or empty.
if not sys.stdin.isatty():
data = sys.stdin.read()
if data.strip():