Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
runs-on: ubuntu-latest
needs: get-new-tag
env:
POETRY_VERSION: 1.2.2
POETRY_VERSION: 2.3.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poetry 2.3.2 doesn't exist - latest stable is 1.8.x

Suggested change
POETRY_VERSION: 2.3.2
POETRY_VERSION: 1.8.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

currently poetry 2.3.2 is the latest stable version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

currently poetry 2.3.2 is the latest stable version

Answer:

This is a “version fact-checking” failure (the model/bot asserted an incorrect “latest stable” and suggested a downgrade). You can reduce these mistakes by adding a hard rule to the improve tool instructions: don’t claim “latest version” (or suggest downgrades/upgrades) unless the version is explicitly present in the PR diff or the PR explicitly links an authoritative source; otherwise ask the author to confirm.

Add this to your repo’s .pr_agent.toml:

[pr_code_suggestions]
extra_instructions="""\
- When commenting on dependency/tool versions (e.g., Poetry), do NOT assert "latest stable" or "doesn't exist" unless the exact version is present in the PR diff or the PR links an authoritative source.
- If uncertain, phrase it as a question and ask to confirm with the linked release notes/history page.
- Avoid suggesting version downgrades/upgrades solely based on memory; only propose a change if the PR explicitly targets that version or a source is provided in the PR context.
"""

Note: this type of error can’t be fully eliminated via configuration because it’s an inherent limitation of LLMs/bots (they can be confidently wrong on evolving external facts). The config above mainly nudges the output to be cautious and to defer to the PR-provided link (like the Poetry history page) instead of guessing.

Relevant Sources:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.10
- name: Install dependencies
run: |
pip install poetry==${{ env.POETRY_VERSION }}
Expand Down Expand Up @@ -77,14 +77,14 @@ jobs:
runs-on: ubuntu-latest
needs: [get-new-tag, publish]
env:
POETRY_VERSION: 1.2.2
POETRY_VERSION: 2.3.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poetry 2.3.2 doesn't exist - latest stable is 1.8.x

Suggested change
POETRY_VERSION: 2.3.2
POETRY_VERSION: 1.8.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

currently poetry 2.3.2 is the latest stable version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

currently poetry 2.3.2 is the latest stable version

Answer:

This kind of mismatch (the bot confidently asserting a “latest stable” version) is best mitigated by constraining how Qodo Merge phrases version-related suggestions, but it can’t be fully “fixed” by configuration—LLMs can still be wrong about fast-changing external facts unless they’re explicitly told to avoid/qualify such claims.

Recommended configuration (add to your repo’s .pr_agent.toml) to reduce incorrect package-version assertions in improve suggestions:

[pr_code_suggestions]
extra_instructions = """\
- When suggesting dependency/tool version changes (e.g., Poetry, Node, Python, actions), do NOT claim “latest stable/latest version” unless it is explicitly shown in the PR diff or repository files.
- Prefer suggesting: “Set POETRY_VERSION to the version documented/used by this repo” and point to the exact file/line (e.g., pyproject.toml, lockfile, CI workflow) as evidence.
- If you can’t verify the correct version from the PR context, ask a clarifying question or suggest leaving the version unchanged.
- Avoid contradicting user-provided links; if a conflict is possible, phrase it as uncertainty and request confirmation.
"""

If you want the bot to be especially conservative, add an additional rule like “never propose changing tool versions in CI unless the PR explicitly intends to update tooling.”

To validate the effective settings used in a run, you can trigger:
/improve --config.output_relevant_configurations=true

Relevant Sources:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.10
- name: Install dependencies
run: |
pip install poetry==${{ env.POETRY_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
Comment thread
ramirobarraco marked this conversation as resolved.
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -15,7 +15,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry==1.2.2
pip install poetry==2.3.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poetry 2.3.2 doesn't exist - latest stable is 1.8.x

Suggested change
pip install poetry==2.3.2
pip install poetry==1.8.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

currently poetry 2.3.2 is the latest stable version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

currently poetry 2.3.2 is the latest stable version

Answer:

This is a factual/version-claim mistake (Poetry releases change over time). You can reduce these by instructing Qodo Merge’s improve suggestions to avoid asserting external tool versions unless they’re verified from an authoritative source in the PR itself (lockfile, constraints, existing CI, etc.), and otherwise to phrase the suggestion generically (e.g., “pin to the latest stable Poetry 2.x per official docs” or “use the repo’s currently supported Poetry version”).

Add something like this to your repo’s .pr_agent.toml:

[pr_code_suggestions]
extra_instructions = """\
- When suggesting dependency/tool versions (e.g., Poetry), do NOT claim a version “doesn't exist” or “latest stable is X” unless the PR/repo contains a definitive source (e.g., pyproject.toml, lockfiles, constraints, CI config).
- If the version cannot be verified from the repo context, suggest the change without hardcoding a specific version, or ask the author to confirm the correct version per the official release notes.
- Prefer wording like: “Use the project’s supported Poetry version” / “Pin Poetry to a verified stable version (per official Poetry history/release notes)”.
"""

Note: configuration can reduce overconfident version statements, but it can’t guarantee the model will always be up-to-date with external release timelines—so the safest behavior is “don’t hardcode unless repo context confirms.”

Relevant Sources:

poetry install --no-interaction --no-ansi
- name: QA with flake8, black, isort and mypy
run: |
Expand Down
5 changes: 5 additions & 0 deletions .pr.agent.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[github]
handle_push_trigger = true
push_commands = [
"/agentic_review"
]
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ repos:
- id: isort
files: (databooks/|tests/)
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 5.0.0
hooks:
- id: flake8
args: ["--extend-ignore=W604,E231"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Adding --extend-ignore=W604,E231 suppresses flake8 warnings. W604 warns about backticks (deprecated in Python 3), E231 is missing whitespace after delimiter. Consider fixing the underlying code instead of ignoring these rules.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

there is no issue with the code they are false positives because of lines of code like :
f"Unsupported operand types for `-`: `{type(self).name}` and"
databooks/data_models/base.py:131:49: W604 backticks are deprecated, use 'repr()'
here the line the backticks will be mistakenly assume to be repr() function but is actually only how we decided to format the string

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question:

there is no issue with the code they are false positives because of lines of code like : fUnsupported operand types for `-`: `{type(self).name}` and databooks/data_models/base.py:131:49: W604 backticks are deprecated, use 'repr()' here the line the backticks will be mistakenly assume to be repr() function but is actually only how we decided to format the string

Answer:

You can reduce this kind of “fix flake8 by ignoring W604 / switch to repr()” guidance by adding explicit tool instructions that backticks inside string literals are intentional formatting in your repo, and that the bot should not recommend changing them or suppressing the rule unless it’s actually using the deprecated Python-2 backtick operator.

Add to your repo’s .pr_agent.toml (or wiki .pr_agent.toml) something like:

[pr_code_suggestions]
extra_instructions = """\
- Our codebase intentionally uses backticks (`) inside *string literals* (including f-strings) for formatting.
- Do NOT suggest replacing these with repr(), and do NOT suggest ignoring flake8 W604 when the flagged backticks are inside strings.
- Only flag W604 / repr-related issues if you see the actual deprecated backtick operator usage (not backticks in strings).
- Prefer explaining that it may be a linter false-positive and suggest validating the specific flake8 warning location/context.
"""

[pr_reviewer]
extra_instructions = """\
- Treat backticks (`) inside string literals (including f-strings) as intentional formatting.
- Avoid recommending repr() conversions or flake8 extend-ignore (W604) unless the deprecated backtick operator is actually used.
"""

If you want to confirm which settings Qodo Merge actually applies for /improve, run:
/improve --config.output_relevant_configurations=true

Relevant Sources:

files: (databooks/|tests/)
additional_dependencies:
- flake8-docstrings==1.6.0
Expand All @@ -30,7 +31,6 @@ repos:
- id: mypy
files: databooks/
additional_dependencies:
- types-all==1.0.0
- typer==0.3.2
- rich==10.16.2
- pydantic==2.3.*
Expand Down
Loading