Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] code review found 17 items only commented 3 on PR #328

Open
joelsprunger opened this issue Mar 18, 2024 · 2 comments
Open

[BUG] code review found 17 items only commented 3 on PR #328

joelsprunger opened this issue Mar 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@joelsprunger
Copy link

Current Behavior:

I added LangSmith tracing to my github action.

    env:
      LANGCHAIN_TRACING_V2: "true"
      LANGCHAIN_ENDPOINT: "https://api.smith.langchain.com"
      LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }}
      LANGCHAIN_PROJECT: "code_review_gpt"

In looking over the traces outputs for my large PR, I see 17 comments in 5 or 6 groups. However the Summary chain to generate emojis) only has 3 of these comments as input. These are the ones that go to the PR comments. The other 15 seem to be discarded.

Expected Behavior:

The PR comments should contain ALL the Risk items found in code review. Perhaps the emoji summarizer needs to randomly select the comments to add, or add a finite number of comments prioritized by risk level.

Steps To Reproduce:

Hmm. Tough. Big PR. Check the tracing.

Suggestions on the root cause

I am guessing the root cause is the finite context window for the summary. You can still limit the comments used in the summary, but add ALL comments to the PR.

@joelsprunger joelsprunger added the bug Something isn't working label Mar 18, 2024
@joelsprunger
Copy link
Author

joelsprunger commented Mar 18, 2024

I suggest generating a github artifact code-review-gpt-details.md with all the PR comments.

If there are more than 3, the action could generate the artifact, and add a comment:

More comments are available in your github artifacts

Please follow these steps to view the artifact:

  1. Navigate to the Actions tab of this repository.
  2. Click on the workflow run that corresponds to your PR.
  3. Find the Artifacts section at the bottom of the workflow run page.
  4. Click on the code-review-gpt-details.md artifact

@mattzcarey
Copy link
Owner

Sounds like a great addition. When I built this I wanted to reduce the cognitive load on a human reviewer hence the whole ranking and limiting to 3 comments. Happy to generate an artifacts file that makes a lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants