Repository navigation
fix(codex): keep live commentary tables and code blocks readable - #129828
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 12:27 AM ET / 04:27 UTC. ClawSweeper reviewWhat this changesThe PR stops collapsing internal whitespace in streamed Codex commentary and adds regression coverage for a live Markdown table and fenced code block. Merge readinessThe PR cleanly repairs the lossy producer boundary and resolves the prior changelog/proof follow-ups, but it remains maintainer-handled: the branch is behind main, an exact-head build check is in progress, and the required direct Codex-source inspection could not run because the sibling checkout and network access were unavailable. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Codex app-server projector receives assistant commentary and emits keyed progress events for the active run. The Control UI stores those events as live stream segments and renders their text as streaming Markdown. flowchart LR
A[Codex commentary delta] --> B[Commentary projector]
B --> C[Keyed progress event]
C --> D[Control UI stream segment]
D --> E[Streaming Markdown renderer]
E --> F[Readable tables and code blocks]
Decision needed
Why: Repository policy requires direct inspection of the cited Codex protocol before a merge recommendation, but the required checkout could not be accessed in this review environment. Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +12. Total +12 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the producer-boundary repair, re-run the direct Codex protocol inspection from an available sibling checkout, and merge only after exact-head CI is green. Do we have a high-confidence way to reproduce the issue? Yes: current main's whitespace replacement at the commentary producer deterministically flattens multiline Markdown before the live event is emitted. Is this the best way to solve the issue? Yes in OpenClaw: preserving structure at the producer is the narrow canonical repair because the downstream UI intentionally renders the progress text as Markdown; upstream Codex-source verification remains outstanding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 215de48bd51a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
1055e3c to
d235c3c
Compare
|
Merged via squash.
|
…nclaw#129828) * fix(codex): preserve markdown in live commentary * chore: keep release-owned changelog out of bug fix
What Problem This Solves
Fixes an issue where users watching live Codex commentary would see Markdown tables, paragraph breaks, indentation, and fenced code blocks collapse into one unreadable paragraph while an agent was working. The same commentary looked correct after the response completed because persisted transcript entries retained the original Markdown.
Why This Change Was Made
Preserve the original whitespace at the Codex commentary event producer instead of flattening every whitespace run into a space. The upstream Codex app-server protocol forwards assistant-message deltas verbatim (
codex-rs/app-server-protocol/src/protocol/event_mapping.rs:362-370), declares each delta as an unmodified string (codex-rs/app-server-protocol/src/protocol/v2/item.rs:1348-1356), and assembles completed agent-message text without whitespace normalization (codex-rs/app-server-protocol/src/protocol/v2/item.rs:826-837). The existing Control UI Markdown renderer already correctly handles multiline streamed tables and fenced code. Outer trimming and per-item duplicate suppression remain unchanged.User Impact
Live Codex progress updates now keep readable Markdown tables, paragraphs, fenced code blocks, and code indentation instead of becoming a wall of literal pipes and inline code.
Evidence
progressTextflattened the complete message into one line; after the fix both owner-boundary projector suites pass: 44 tests across two files.node scripts/run-vitest.mjs extensions/codex/src/app-server/event-projector.commentary.test.ts extensions/codex/src/app-server/event-projector.assistant.test.tsnode scripts/check-changed.mjs -- extensions/codex/src/app-server/event-projector-assistant.ts extensions/codex/src/app-server/event-projector.commentary.test.tsBefore: live commentary flattened into one paragraph
After: live commentary preserves the table and fenced code block
Production LOC: +1/-1 (net 0). Tests: +17/-5.