Skip to content

Enforce human requirement ledgers in PR follow-ups#567

Merged
wwind123 merged 2 commits into
mainfrom
issue-559-coder-followup-human-requirements
Jul 14, 2026
Merged

Enforce human requirement ledgers in PR follow-ups#567
wwind123 merged 2 commits into
mainfrom
issue-559-coder-followup-human-requirements

Conversation

@wwind123

Copy link
Copy Markdown
Owner

Fixes #559

Implements the approved plan for auditable human-requirement handling in post-plan-approval PR coder follow-ups.

  • Requires and validates the top-level disposition ledger.
  • Preserves direct-discussion fallback acknowledgement semantics.
  • Threads fallback context through repair and renders evidenced ledgers in public comments.
  • Updates regression coverage and structured fixtures.

@wwind123

Copy link
Copy Markdown
Owner Author

{
"schema_version": 1,
"kind": "coder_followup",
"state": "blocking",
"summary": "Implemented the approved human-requirement ledger flow for PR coder follow-ups and opened PR #567.",
"addressed_items": [],
"remaining_items": [],
"human_requirement_dispositions": [],
"human_requirements": {
"addressed_ids": [],
"checked_discussion_directly": false
},
"tests_run": [
"python3 -m pytest tests/test_response_validation.py tests/test_protocol.py tests/test_prompts.py tests/test_repair.py tests/test_comment_rendering.py tests/test_human_requirement_dispositions.py",
"python3 -m pytest"
]
}

-- OpenAI Codex: gpt-5.6-luna

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The PR-review coder-followup flow correctly gains a per-requirement human_requirement_dispositions ledger (validated with duplicate/unknown/missing checks, rendered in public comments, wired through the repair pass) reusing the machinery from the plan-review flow. Logic and new/updated tests look sound, but the documented coder_followup JSON schema in README.md and docs/local_agent_loop.md was not updated for the new required field, and a couple of touched test/prompt files carry mechanical-edit artifacts.

Blocking issues

  • README.md (~lines 592-597) and docs/local_agent_loop.md (~lines 1100-1119) still show the coder_followup structured JSON example/description without the new required human_requirement_dispositions field. Following the documented example as-is would now fail schema validation (the field is required per _expect_exact_keys in protocol.py). Update both docs to include the field and describe the addressed/blocked/not-applicable + evidence ledger.

Same-PR follow-ups

  • tests/test_protocol.py has several dict literals where "human_requirement_dispositions": [] was accidentally duplicated as a key (e.g. lines 2101-2102, 2164-2165, 2191-2192, 2226-2227), plus inconsistent indentation from the mechanical edit (e.g. lines 2134-2136, 2360-2362, 2386-2388, 2412-2414); tests/test_orchestrator_pr.py has similar misindentation around lines 3309-3319. Please clean these up.
  • In _coder_followup_human_requirements_instruction (src/coding_review_agent_loop/repair.py, ~lines 1316-1318), the trailing sentence "When the list is (none) without direct-discussion acknowledgement, both ledgers must be empty." is appended unconditionally, including in the branch where surfaced requirement IDs are non-empty, which makes the repair prompt reference a (none) case that doesn't apply there. Scope that sentence to the actually-empty-list branch.

-- Anthropic Claude: claude-sonnet-5

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The PR correctly implements human requirement ledgers for coder follow-ups, but introduces several duplicate dictionary keys and formatting issues in the tests that should be fixed before merge.

Same-PR follow-ups

  • Remove duplicated "human_requirement_dispositions": [], keys in the test payloads in tests/test_protocol.py (e.g. test_validate_structured_coder_followup_accepts_v1_payload, test_validate_structured_coder_followup_rejects_note_for_unlisted_item, etc.).
  • Fix incorrect indentation for the newly added human_requirement_dispositions keys in tests/test_protocol.py (e.g. lines ~2135, 2361, 2387, 2413).
  • Fix incorrect indentation for the human_requirement_dispositions list comprehension in structured_coder_followup inside tests/agent_loop_helpers.py.
  • Consider renaming test_non_plan_prompts_do_not_request_plan_disposition_json in tests/test_prompts.py since prompts[0] and prompts[1] now explicitly request human_requirement_dispositions.

-- Google Antigravity: Gemini 3.1 Pro (High)

@wwind123

Copy link
Copy Markdown
Owner Author

Coder follow-up

Addressed all requested documentation, fixture, indentation, repair-prompt, and test-name follow-up findings.

Addressed items

  • item-1: Blocking issue from Anthropic Claude: claude-sonnet-5, round 1: README.md (~lines 592-597) and docs/local_agent_loop.md (~lines 1100-1119) still show the `coder_...
    • Resolution: Updated README.md and docs/local_agent_loop.md with the required human_requirement_dispositions field and its per-requirement evidence ledger rules.
  • item-2: Same-PR follow-up from Anthropic Claude: claude-sonnet-5, round 1: tests/test_protocol.py has several dict literals where "human_requirement_dispositions": [] was...
    • Resolution: Removed duplicated payload keys and corrected inconsistent test fixture indentation in tests/test_protocol.py.
  • item-3: Same-PR follow-up from Anthropic Claude: claude-sonnet-5, round 1: In _coder_followup_human_requirements_instruction (src/coding_review_agent_loop/repair.py, ~lin...
    • Resolution: Scoped the empty-list ledger sentence in _coder_followup_human_requirements_instruction to the actually empty surfaced-ID branch.
  • item-4: Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Remove duplicated "human_requirement_dispositions": [], keys in the test payloads in `tests/tes...
    • Resolution: Removed all duplicated human_requirement_dispositions keys from the affected protocol test payloads.
  • item-5: Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Fix incorrect indentation for the newly added human_requirement_dispositions keys in `tests/tes...
    • Resolution: Corrected indentation of the affected human_requirement_dispositions and related fields in tests/test_protocol.py.
  • item-6: Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Fix incorrect indentation for the human_requirement_dispositions list comprehension in `structu...
    • Resolution: Corrected indentation of the structured_coder_followup disposition list comprehension in tests/agent_loop_helpers.py.
  • item-7: Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Consider renaming test_non_plan_prompts_do_not_request_plan_disposition_json in `tests/test_pro...
    • Resolution: Renamed the prompt test to describe its human-requirement disposition behavior accurately.

Remaining items

  • None.

Tests run

  • python3 -m pytest tests/test_protocol.py tests/test_repair.py tests/test_prompts.py tests/test_orchestrator_pr.py tests/test_agent_loop.py
  • python3 -m pytest

-- OpenAI Codex: gpt-5.6-luna

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

All round-1 findings are resolved: README.md and docs/local_agent_loop.md now document the required human_requirement_dispositions ledger for coder follow-ups, the repair.py prompt wording only mentions the (none) case when the list is actually empty, and the duplicate-key/indentation mechanical-edit artifacts in tests/test_protocol.py, tests/test_orchestrator_pr.py, and tests/agent_loop_helpers.py are cleaned up, with tests/test_prompts.py renamed to reflect its updated assertions. No new issues found in this round's diff.

Prior unresolved item dispositions

  • [item-1] Blocking issue from Anthropic Claude: claude-sonnet-5, round 1: README.md (~lines 592-597) and docs/local_agent_loop.md (~lines 1100-1119) still show the `coder_... -> resolved
  • [item-2] Same-PR follow-up from Anthropic Claude: claude-sonnet-5, round 1: tests/test_protocol.py has several dict literals where "human_requirement_dispositions": [] was... -> resolved
  • [item-3] Same-PR follow-up from Anthropic Claude: claude-sonnet-5, round 1: In _coder_followup_human_requirements_instruction (src/coding_review_agent_loop/repair.py, ~lin... -> resolved
  • [item-4] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Remove duplicated "human_requirement_dispositions": [], keys in the test payloads in `tests/tes... -> resolved
  • [item-5] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Fix incorrect indentation for the newly added human_requirement_dispositions keys in `tests/tes... -> resolved
  • [item-6] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Fix incorrect indentation for the human_requirement_dispositions list comprehension in `structu... -> resolved
  • [item-7] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Consider renaming test_non_plan_prompts_do_not_request_plan_disposition_json in `tests/test_pro... -> resolved

-- Anthropic Claude: claude-sonnet-5

@wwind123

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

All prior issues regarding human_requirement_dispositions documentation, schema validation tests, duplication, indentation, prompt instructions, and test renaming have been successfully addressed.

Prior unresolved item dispositions

  • [item-1] Blocking issue from Anthropic Claude: claude-sonnet-5, round 1: README.md (~lines 592-597) and docs/local_agent_loop.md (~lines 1100-1119) still show the `coder_... -> resolved
  • [item-2] Same-PR follow-up from Anthropic Claude: claude-sonnet-5, round 1: tests/test_protocol.py has several dict literals where "human_requirement_dispositions": [] was... -> resolved
  • [item-3] Same-PR follow-up from Anthropic Claude: claude-sonnet-5, round 1: In _coder_followup_human_requirements_instruction (src/coding_review_agent_loop/repair.py, ~lin... -> resolved
  • [item-4] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Remove duplicated "human_requirement_dispositions": [], keys in the test payloads in `tests/tes... -> resolved
  • [item-5] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Fix incorrect indentation for the newly added human_requirement_dispositions keys in `tests/tes... -> resolved
  • [item-6] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Fix incorrect indentation for the human_requirement_dispositions list comprehension in `structu... -> resolved
  • [item-7] Same-PR follow-up from Google Antigravity: Gemini 3.1 Pro (High), round 1: Consider renaming test_non_plan_prompts_do_not_request_plan_disposition_json in `tests/test_pro... -> resolved

-- Google Antigravity: Gemini 3.1 Pro (High)

@wwind123
wwind123 merged commit 8923672 into main Jul 14, 2026
1 check passed
@wwind123
wwind123 deleted the issue-559-coder-followup-human-requirements branch July 14, 2026 06:52
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.

Follow up future plan-review note: The PR-review (post-plan-approval implementation) flow still gates HUMAN_REQUIREMENTS

1 participant