fix(review): prevent generated test markdown breakout - #4383
Merged
JSONbored merged 1 commit intoJul 9, 2026
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4383 +/- ##
=======================================
Coverage 93.95% 93.95%
=======================================
Files 400 400
Lines 36817 36821 +4
Branches 13451 13451
=======================================
+ Hits 34592 34596 +4
Misses 1569 1569
Partials 656 656
🚀 New features to boost your workflow:
|
JSONbored
deleted the
codex/fix-markdown-fence-injection-in-ai-test-comments
branch
July 9, 2026 06:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
markdownFenceFor(source: string)and use a fence length that is one backtick longer than any run found in the generated source so the renderer no longer emits a fixed triple-backtick opener/closer (src/review/e2e-test-gen-render.ts).fencewhen rendering the AI-generated test body so nested backtick runs cannot break out of the code block (src/review/e2e-test-gen-render.ts).test/unit/e2e-test-gen-render.test.ts).Testing
npx vitest run test/unit/e2e-test-gen-render.test.tsand all tests in that file passed.npm run typecheckandgit diff --check, both succeeded with no errors.npm run test:coverage; the tests passed but coverage remapping failed in this container under Nodev24.15.0while the repo expects Node22, so a full unsharded coverage run /npm run test:cishould be executed in the project CI or a Node 22 environment before pushing.Codex Task