Skip to content

Preserve complete input in automated PR reviews - #926

Closed
Gajesh2007 wants to merge 6 commits into
masterfrom
fix/review-diff-coverage
Closed

Gajesh2007 wants to merge 6 commits into
masterfrom
fix/review-diff-coverage

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Threat-model review dropped deleted files because it only recorded a +++ b/ header. It could also mistake header-looking added text for a new path, and its excerpts exceeded their declared total budget. Parse paths only in the header section, retain deleted and metadata-only changes, decode Git-quoted paths and unquoted names with spaces, and account for complete truncation markers inside the excerpt limits. Renames and copies carry the union of the source and destination threat mappings; Unicode line separators in hunk content cannot invent a diff header. File-to-threat mappings remain visible after the excerpt budget runs out.

The Codex workflow also truncated or rejected PR bodies containing a standalone EOF line. Store the metadata as compact JSON in one GitHub output, then decode it in the prompt and fetch steps; literal shell examples and trailing newlines now survive.

The review prompt now describes the documented hop-by-hop encryption boundary accurately. This changes local input preparation; model choice, API credentials and workflow permissions are unchanged.

flowchart LR
  subgraph Before
    J[PR body containing EOF] --> K[Fixed-delimiter metadata outputs]
    K --> T[Truncated metadata or rejected output]
    D[Git diff] --> P[parse_diff_by_file watches every +++ line]
    P --> L[Deleted files omitted or hunk text changes path]
    P --> B[build_focused_diff appends unbudgeted markers]
    B --> R[Review input exceeds excerpt limit]
  end
  subgraph After
    J2[Same PR body] --> K2[Compact JSON metadata output]
    K2 --> T2[fromJSON restores exact title and body]
    D2[Same Git diff] --> H[Header-only path parsing and Git path decoding]
    H --> M[Deleted files and rename sources retain threat mapping]
    M --> C[Excerpts include markers within file and total limits]
    C --> R2[Review input retains mappings and bounded excerpts]
  end
Loading

Validation: eight offline fixture tests pass using Python standard library, Git, Bash and jq. Baseline failures reproduce missing paths/mappings, hunk identity confusion, truncated omission markers and actual workflow metadata truncation. A temporary Git repository exercises real space, Unicode, tab and newline filename encoding; tiny excerpt budgets of 1, 2 and 16 characters preserve full omission notices. An independent source review and fixture rerun found no introduced blockers. Docs lint passes for 278 pages; Release Integrity CI runs these fixtures. No model or external API call is made by the fixtures.

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 12, 2026 12:22am UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 12:22am UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 12:22am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

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 ✅ Completed 2026-09-12T00:33:44.920603Z 4e8deda Manual request
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b6a795017

ℹ️ 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".

Comment thread .github/scripts/threat-model-review.py Resolved
Comment thread .github/scripts/threat-model-review.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a47cf1813

ℹ️ 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".

Comment thread .github/scripts/threat-model-review.py Resolved
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Please review current head 4e8deda62. All three previous findings are fixed, with regressions for actual Git path separators, tiny remaining excerpt budgets, and source/destination rename threat mappings. Eight offline fixtures and an independent source review pass; each thread contains the fix details.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 4e8deda62b

ℹ️ 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".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1096, the combined tooling, benchmark and E2E refactor PR. Your latest head 4e8deda62b017c0f0bcf866c1f64f3bcaac5985f is preserved in aggregate 9d2160bb370e8a0dbf3810e61a5e48fe66345651, along with the relevant review fixes. Continue review and merge at #1096 (after provider #1094 and web #1095). Closing this duplicate merge path; the source branch and review history are retained.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch is waiting to be deployed

3 active and 1 waiting deployments
Preview – d-inference-console-ui-dev — 4e8deda6 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference — 4e8deda6 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — 4e8deda6 Deployed Sep 12, 2026 by vercel[bot]
benchmarks — 4e8deda6 Waiting Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1014
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