Skip to content

[codex] Harden MiniMax content generation fallbacks#10

Merged
g5n-dev merged 3 commits into
mainfrom
fix-minimax-ci-hardening
Apr 3, 2026
Merged

[codex] Harden MiniMax content generation fallbacks#10
g5n-dev merged 3 commits into
mainfrom
fix-minimax-ci-hardening

Conversation

@g5n-dev
Copy link
Copy Markdown
Owner

@g5n-dev g5n-dev commented Mar 30, 2026

What changed

  • hardened MiniMax response parsing so blocks with text but no explicit type are still treated as text
  • enabled structural fallback for metadata and tag_intro requests when MiniMax returns thinking-only responses
  • changed post generation to drop guard-failed sections and keep publishing when the remaining body is still valid
  • added regression coverage for MiniMax compatibility parsing and guard-based post degradation

Why it changed

The content pipeline was failing in CI when MiniMax returned thinking-only or malformed compatibility responses. That surfaced as tagging failures, generation retries, and eventually 0 Markdown posts with a fatal output-guard error.

Root cause

  • the compatibility parser assumed text blocks always had a type="text"
  • metadata/tagging requests did not get the same fallback path as generation/classification requests
  • guard failures on a few sections caused the entire post to be skipped even when the rest of the article was still publishable

Impact

  • tagging and metadata calls are more resilient to MiniMax compatibility quirks
  • content generation no longer fails the whole run just because engaging_intro or deep_comment is unusable
  • invalid guarded sections are removed instead of being published

Validation

python3 -m pytest tests/test_ai_filter_fallback.py tests/test_anthropic_response_parsing.py tests/test_generate_content_guards.py tests/test_generator_guard_repair.py tests/test_markdown_normalizer.py tests/test_runtime_profiles.py tests/test_search_fallback.py tests/test_tag_graph_runtime.py -q

Result: 42 passed in 1.94s

@g5n-dev g5n-dev marked this pull request as ready for review April 3, 2026 03:08
@g5n-dev g5n-dev merged commit e9e5a4e into main Apr 3, 2026
1 check passed
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.

1 participant