Skip to content

Decode Codex JSONL before extracting news reports#3

Merged
hamzamerzic merged 1 commit into
mobius-os:mainfrom
hamzamerzic:fix/news-codex-output
Jul 22, 2026
Merged

Decode Codex JSONL before extracting news reports#3
hamzamerzic merged 1 commit into
mobius-os:mainfrom
hamzamerzic:fix/news-codex-output

Conversation

@hamzamerzic

Copy link
Copy Markdown
Contributor

Summary

  • Decode the current item.completed Codex JSONL envelope before report HTML extraction.
  • Preserve the older agent-message and plain-text formats for compatibility.
  • Fail closed on unknown JSON transport instead of scanning its serialized bytes as HTML.
  • Add regression coverage for literal \n output, legacy envelopes, and safe failure.

Why

News only recognized older Codex agent-message envelopes. With the current CLI format, it fell back to scanning raw JSONL; serialized newlines appeared as visible \n text and escaped link attributes were removed by the HTML sanitizer. Treating transport decoding as a separate, fail-closed boundary prevents malformed reports if the envelope changes again.

Testing

  • npm test (83 tests)
  • bash -n fetch.sh
  • python3 -m py_compile codex_output.py
  • python3 /app/scripts/validate-app.py .
  • git diff --check upstream..HEAD

Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
@hamzamerzic
hamzamerzic merged commit 2b07f1e into mobius-os:main Jul 22, 2026
1 check passed
@hamzamerzic
hamzamerzic deleted the fix/news-codex-output branch July 22, 2026 15:41
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