Skip to content

fix(#404): preserve non-English Monitor feedback in retry artifacts - #405

Merged
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-l61gys
Aug 9, 2026
Merged

fix(#404): preserve non-English Monitor feedback in retry artifacts#405
azalio merged 1 commit into
mainfrom
claude/compassionate-cerf-l61gys

Conversation

@azalio

@azalio azalio commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #404_filter_blocker_retry_feedback used English-only keyword lists as a hard gate: any feedback whose lines matched no BLOCKER term was silently replaced by a generic placeholder, making non-English (e.g. Russian) Monitor feedback permanently invisible to the Actor retry.

The root cause: .map/scripts/map_orchestrator.py BLOCKER_FEEDBACK_TERMS / NON_BLOCKING_FEEDBACK_TERMS are English-only literals, and _filter_blocker_retry_feedback returned a generic placeholder when kept_lines was empty — dropping the operator's original text entirely.

Changes

src/mapify_cli/templates_src/map/scripts/map_orchestrator.py.jinja (source of truth) and its two rendered copies:

  • _filter_blocker_retry_feedback now uses the keyword filter as a ranking hint, not a gate:
    • BLOCKER keywords match: highlight those lines at the top + append a "Full Monitor feedback:" section with the complete original text.
    • No keywords match (non-English / non-standard phrasing): forward the full original text with a note that classification did not match, instead of the old English-only placeholder.

tests/test_map_orchestrator.py:

  • test_feedback_file_forwards_only_blocker_items → renamed and updated: blocker lines are still highlighted, but non-blocking lines are now present in the full-feedback section (intentional behavior change).
  • test_wave_feedback_forwards_only_blocker_items → same update.
  • test_feedback_file_non_english_feedback_preserved — new regression test: Russian-language feedback survives into the retry artifact unchanged.
  • test_wave_feedback_non_english_preserved — same for the wave path.

Test plan

  • uv run ruff check src/ tests/ — 0 errors
  • uv run python -m pyright src/ — 0 errors, 0 warnings
  • uv run pytest tests/ -x -q — 4320 passed, 4 skipped
  • make check — exit 0
  • make check-render — no diff (rendered copies match jinja source)

Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Retry guidance now preserves complete monitoring feedback instead of omitting non-blocking details.
    • Critical blocker messages are highlighted first for easier troubleshooting.
    • Feedback without identified blockers now includes guidance to verify required behavior while avoiding cosmetic changes.
  • Tests

    • Expanded coverage for wave-monitor failures, blocker highlighting, full feedback preservation, and non-English text.

`_filter_blocker_retry_feedback` used English-only keyword lists as a
hard gate: any feedback whose lines matched no BLOCKER term was silently
replaced by a generic placeholder, making non-English feedback (Russian,
etc.) permanently inaccessible to the Actor retry.

The fix makes the keyword filter a *ranking hint*, not a gate:

- When BLOCKER keywords match: keep the highlighted lines at the top,
  then append a "Full Monitor feedback:" section with the complete
  original text, so nothing is ever dropped.
- When no keywords match (non-English / non-standard phrasing): forward
  the full original text with a note that classification did not match,
  instead of replacing it with the placeholder.

Tests updated to reflect the new contract: non-blocking lines now appear
in the full-feedback section (previously dropped), and two new regression
tests assert that Russian-language feedback survives into the retry artifact
and is never replaced by the old English-only placeholder.

Closes #404

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UnGW5EaWsfZ5rKNKmSiiDX
@azalio
azalio merged commit ed48f1a into main Aug 9, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c25febe-8077-473d-9239-4b98be976235

📥 Commits

Reviewing files that changed from the base of the PR and between db028b6 and 44f06b3.

📒 Files selected for processing (4)
  • .map/scripts/map_orchestrator.py
  • src/mapify_cli/templates/map/scripts/map_orchestrator.py
  • src/mapify_cli/templates_src/map/scripts/map_orchestrator.py.jinja
  • tests/test_map_orchestrator.py

📝 Walkthrough

Walkthrough

Changes

Monitor retry feedback

Layer / File(s) Summary
Retry feedback preservation
.map/scripts/map_orchestrator.py, src/mapify_cli/templates/map/scripts/map_orchestrator.py, src/mapify_cli/templates_src/map/scripts/map_orchestrator.py.jinja
_filter_blocker_retry_feedback prioritizes blocker lines and appends the complete Monitor response. The fallback preserves all feedback and adds guidance for non-English or non-standard phrasing.
Retry feedback validation
tests/test_map_orchestrator.py
Tests verify complete feedback retention, blocker highlighting, cosmetic feedback preservation, and non-English feedback handling for standard and wave monitor failures.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Monitor
  participant _filter_blocker_retry_feedback
  participant RetryArtifact
  Monitor->>_filter_blocker_retry_feedback: Return Monitor feedback
  _filter_blocker_retry_feedback->>RetryArtifact: Write prioritized blockers and full feedback
Loading

Poem

A rabbit checks the Monitor note,
Keeps every line afloat.
Blockers hop to the front of the queue,
While full feedback comes through too.
No lost words in retries anew.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compassionate-cerf-l61gys

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

monitor_failed drops non-English Monitor feedback entirely: English-only keyword gate classifies it as 'no BLOCKER detected'

2 participants