Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e14fbc0e55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| icon = "⏭️ SKIP" | ||
| } | ||
| fmt.Fprintf(sb, "| %s | %s | %s |\n", e.Text, icon, e.Evidence) | ||
| fmt.Fprintf(sb, "| %s | %s | %s |\n", markdownTableCell(e.Text), icon, markdownTableCell(e.Evidence)) |
There was a problem hiding this comment.
Escape existing backslashes before adding pipe escapes
When an assertion contains a literal-pipe regex escape, as in examples/code-stats/evals/cases/exclude-dependencies.yaml:36-39, markdownTableCell changes \| into \\|. Markdown interprets the doubled backslash as an escaped backslash, leaving the pipe as a column delimiter. These existing regex assertions previously produced three-cell rows but now split into extra columns, so the result and evidence no longer align with their headers. Escape existing backslashes before escaping pipes, and add a regression case containing \|.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 11cebca. Backslashes are escaped before pipes, so \| renders as written in one cell. Checked with pandoc's GFM reader: the old output dropped the backslash rather than splitting the row.
A regex assertion such as `count \| wc` became `count \\| wc` in the table. GFM renders that as a bare pipe, and renderers that pair backslashes first split the row. Escaping the backslash as well keeps the cell intact and shows the assertion as written.
Summary
An expectation such as
read | writecreated an extra column inbenchmark.md, and a line break in the evidence split the row in two.The benchmark table now uses the existing Markdown report cell formatter for expectation text and evidence.
The formatter now also escapes backslashes before it escapes pipes. Before this change, a regex assertion such as
count \| wcbecamecount \\| wc. GFM renders that as a bare pipe and drops the backslash, and renderers that pair backslashes first split the row. The shared formatter also feeds the case table in the Markdown report, so backslashes there now render as written too.Test plan
The regression calls
WriteBenchmarkMarkdownand checks two complete output rows:\|in the expectation, plus a Windows path in the evidence.I rendered the old and new escaping with pandoc's GFM reader. The new escaping renders
count \| wcin one cell, and the old one renderedcount | wc.Local checks:
make verifyandgo test -race ./....