Skip to content

#140 Phase 5: migrate coder follow-ups and human-requirements handling#169

Merged
wwind123 merged 1 commit into
mainfrom
codex/issue-156-structured-coder-followups
May 26, 2026
Merged

#140 Phase 5: migrate coder follow-ups and human-requirements handling#169
wwind123 merged 1 commit into
mainfrom
codex/issue-156-structured-coder-followups

Conversation

@wwind123
Copy link
Copy Markdown
Owner

Summary

  • add strict structured coder_followup parsing with required AGENT_STATE footer/state matching
  • validate structured human-requirements acknowledgement and unresolved-item addressed/remaining mapping in PR follow-up turns
  • document the preferred structured follow-up contract while keeping markdown fallback instructions and expand regression coverage

Testing

  • python3 -m pytest tests/test_agent_loop.py

Fixes #156

@wwind123
Copy link
Copy Markdown
Owner Author

Implemented the approved Phase 5 plan for issue #156 and opened PR #169.

Key changes:

  • added strict structured coder_followup parsing with required state, AGENT_STATE footer/signature enforcement, and hard failures for invalid structured candidates
  • moved human-requirements acknowledgement onto a structured validation path while preserving the legacy markdown fallback during migration
  • updated PR follow-up validation to prefer structured coder responses, verify addressed_items/remaining_items against live unresolved item IDs, and keep stored structured coder comments re-parseable on resume
  • revised follow-up prompts to document the preferred structured JSON contract while retaining compatibility instructions for markdown fallback
  • expanded regression coverage across protocol, prompts, orchestrator follow-up validation, and resume handling

Tests: python3 -m pytest tests/test_agent_loop.py (passed)

-- OpenAI Codex

@wwind123
Copy link
Copy Markdown
Owner Author

{
  "schema_version": 1,
  "kind": "pr_review",
  "state": "approved",
  "summary": "Phase 5 structured coder follow-up migration is well-implemented. All 410 tests pass, CI green. Key behaviour changes are intentional and correct: strict fail-fast parsing for malformed structured candidates (via `_extract_structured_coder_followup_payload` replacing the lenient `_extract_structured_response_object`), clean extraction of `validate_structured_human_requirements_acknowledgement` enabling both structured and markdown paths to share validation, and a correct `_validate_coder_followup_response` combined validator. Resume path remains safe because `_reconcile_human_requirements_ack_item` catches `AgentLoopError` from re-parsing stored outputs. Integration test replacements maintain equivalent coverage via more targeted unit tests plus a new `test_pr_loop_accepts_structured_coder_followup_in_pr_round` end-to-end test.",
  "blocking_items": [],
  "same_pr_followups": [],
  "future_followups": [],
  "prior_item_dispositions": []
}

-- Anthropic Claude

@wwind123
Copy link
Copy Markdown
Owner Author

{
  "schema_version": 1,
  "kind": "pr_review",
  "state": "approved",
  "summary": "PR #169 successfully migrates coder follow-ups and human-requirements handling to a structured format. The implementation is robust, featuring strict JSON validation, consistency checks for unresolved items, and backward compatibility for markdown responses. The changes are well-integrated into the orchestrator and covered by extensive tests, which I have verified pass locally.",
  "blocking_items": [],
  "same_pr_followups": [],
  "future_followups": [],
  "prior_item_dispositions": []
}

-- Google Gemini

@wwind123 wwind123 merged commit 6ccebe9 into main May 26, 2026
1 check passed
@wwind123 wwind123 deleted the codex/issue-156-structured-coder-followups branch May 26, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#140 Phase 5: Migrate coder follow-ups and human-requirements handling

1 participant