Skip to content

fix(cli): preserve Markdown validation error cells - #7978

Merged
morluto merged 3 commits into
morluto:mainfrom
WenyuChiou:codex/fix-markdown-validation-7440-20261029
Nov 4, 2026
Merged

morluto merged 3 commits into
morluto:mainfrom
WenyuChiou:codex/fix-markdown-validation-7440-20261029

Conversation

@WenyuChiou

@WenyuChiou WenyuChiou commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem and outcome

Fixes #7440. Markdown validation errors with enum choices containing | split a table cell when rendered. Encode the field cells using the existing Markdown encoder, but only after explicitly declared sensitive values have been redacted. JSON fields and exit status remain unchanged.

Approach

Keep validation fields raw through sensitive-argument redaction, then encode them at the outer Markdown presentation boundary. Share the current upstream table encoder, including its whitespace and renderer-extension protections. The branch incorporates main at cac6e061.

Verification

  • Before the redaction fix, the public CLI exposed a synthetic pipe-containing declaration in Markdown while JSON redacted it; the regression failed as expected.
  • During conflict resolution, a synthetic validation-field regression failed with the old encoder because edge tabs were not encoded; it passes with the upstream encoder. It checks raw and rendered Markdown, pipe and markup literals, declared-sensitive redaction and JSON controls.
  • On exact final tree 8507a9873996b4882704ff42079c82879eddc393 at head c04df43, the built CLI and three related boundary suites passed 32/32 using a bounded single-worker run. Module boundaries, changed-file formatting, test discovery and git diff --check passed; an independent review found no blocking issue.
  • Local standalone npm run typecheck was killed (exit 137). A prior full focused rerun exited 1 without individual results; the bounded serial rerun passed. No full local npm run check pass is claimed.
  • Hosted CI required passed for c04df43, including all eight test shards, static checks, build, source and portable tests, and native package checks. Greptile reported no new actionable issue.
  • No real provider was exercised; HTTP and MCP JSON paths were inspected in source, not dynamically exercised.

Author readiness

Human owner: @WenyuChiou

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The reviewed changes appear safe to merge, subject to the required checks and human readiness declaration.

Summary

Preserves Markdown validation cells by sharing the existing table encoder and applying it after declared-sensitive-value redaction.

  • Markdown validation errors keep their fields inside their table cells.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Raw validation fields"] --> B["Argument guidance"]
  B --> C["Redact declared values"]
  C --> D{"Markdown?"}
  D -- Yes --> E["Encode table cells"]
  D -- No --> F["Keep raw fields"]
  E --> G["Incur error output"]
  F --> G
Loading

Reviews (3) · Last reviewed commit: "fix(cli): preserve upstream Markdown esc..." · Reviewed by Greptile

Comment thread src/cli/argumentErrors.ts Resolved
Merge current main while preserving the existing Markdown table fix.
Merge current main and share its complete cell encoder after redaction.
@greptile-apps

greptile-apps Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@WenyuChiou
WenyuChiou marked this pull request as ready for review October 29, 2026 15:04
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-29T15:05:02.445358Z
We couldn’t complete this review. Comment @codex review to try again.
c04df43 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto
morluto merged commit e416ce1 into morluto:main Nov 4, 2026
46 of 54 checks passed
@morluto morluto added area: cli CLI adapter and one-shot commands bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] search --format md hides allowed enum values in rendered argument errors

2 participants