Skip to content

Harden markdown response parsing against formatting drift#166

Merged
wwind123 merged 1 commit into
mainfrom
codex/fix-issue-144
May 26, 2026
Merged

Harden markdown response parsing against formatting drift#166
wwind123 merged 1 commit into
mainfrom
codex/fix-issue-144

Conversation

@wwind123
Copy link
Copy Markdown
Owner

Summary

  • accept parenthesized empty placeholders like (none) and (n/a) in follow-up and prior-disposition sections
  • preserve raw prior-disposition prose for validation, add precise malformed-bullet errors with section and line context, and keep contradictory active placeholders invalid
  • add a narrow prose-only fallback for explicit blanket resolution language and cover the new parser/validator behavior with regressions

Testing

  • python3 -m pytest tests/test_agent_loop.py -k "plan_review or approved_followups or unresolved_item_dispositions"
  • python3 -m pytest

Fixes #144

@wwind123
Copy link
Copy Markdown
Owner Author

Implemented the hardening for issue #144 in PR #166.

The parser now accepts parenthesized empty placeholders like (none) and (n/a) in follow-up and prior-disposition sections, preserves raw prior-disposition prose for validation, and reports malformed prior-disposition bullets with the exact section heading and source line. The validators now also accept a narrow prose-only blanket-resolution fallback for exact phrases like all carried-forward items are resolved, while still rejecting mixed bullet-plus-prose coverage and ambiguous wording.

Tests:

  • python3 -m pytest tests/test_agent_loop.py -k "plan_review or approved_followups or unresolved_item_dispositions"
  • python3 -m pytest

-- OpenAI Codex

@wwind123
Copy link
Copy Markdown
Owner Author

{
  "schema_version": 1,
  "kind": "pr_review",
  "state": "approved",
  "summary": "The implementation correctly addresses all three hardening goals from issue #144: parenthesized empty-placeholder support, a narrow blanket-prose fallback for prior-dispositions sections, and precise section/line error messages. All 380 tests pass including the new targeted regressions. The mechanics are deterministic and well-scoped.",
  "blocking_items": [],
  "same_pr_followups": [],
  "future_followups": [],
  "prior_item_dispositions": []
}

-- Anthropic Claude

@wwind123
Copy link
Copy Markdown
Owner Author

=== AGENT_LOOP_PUBLIC_RESPONSE_BELOW ===
{
"schema_version": 1,
"kind": "pr_review",
"state": "approved",
"summary": "The PR successfully hardens the markdown response parser as planned. It adds support for parenthesized placeholders like (none) and (n/a), improves error diagnostics with section and line metadata, and implements a narrow prose fallback for blanket resolutions of carry-forward items. Comprehensive regression tests confirm the new behavior and ensure no regressions in existing parsing logic.",
"blocking_items": [],
"same_pr_followups": [],
"future_followups": [],
"prior_item_dispositions": []
}

-- Google Gemini

@wwind123 wwind123 merged commit 51b4583 into main May 26, 2026
1 check passed
@wwind123 wwind123 deleted the codex/fix-issue-144 branch May 26, 2026 02:03
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.

Harden markdown response parsing against harmless formatting drift

1 participant