Skip to content

fix: resolve issue #290 - Reduce Bert-e's verbosity by updating comment - #292

Closed
matthiasL-scality wants to merge 3 commits into
mainfrom
fix/issue-290
Closed

matthiasL-scality wants to merge 3 commits into
mainfrom
fix/issue-290

Conversation

@matthiasL-scality

Copy link
Copy Markdown
Contributor

Automated Fix for Issue #290

Issue: Reduce Bert-e's verbosity by updating comment

Description:
When Bert-e runs, it publishes a new message with the updated status : “History conflict”, “mismatched version”, “reset”, “integration branch created”….

When the PR is updated, this creates a large number of comments, most of whose are outdated and thus not useful.

→ it would be better to keep updating the same comment, so that it displays the relevant status only. Github allows viewing earlier versions of a comment, so nothing will be lost anyway.


Changes Made

This PR was automatically generated by Claude Code based on the issue analysis.

AI Evaluation

  • Relevance: true
  • Confidence: 75%
  • Reason: Feature request bien spécifiée pour améliorer le comportement de Bert-e en mettant à jour un commentaire existant au lieu d'en créer plusieurs. Amélioration UX claire et techniquement réalisable via l'API GitHub.

Files Modified

[
"bert_e/server/api/pr_commands.py",
"bert_e/server/api/github.py",
"bert_e/lib/git_host.py",
"bert_e/workflow.py",
"bert_e/jobs/create_integration_branches.py"
]

Tests Created

[
"tests/test_comment_update.py",
"tests/test_github_comment_api.py",
"tests/integration/test_pr_comment_verbosity.py"
]


Generated by n8n automation workflow

@matthiasL-scality
matthiasL-scality requested a review from a team as a code owner October 1, 2026 09:42
@matthiasL-scality
matthiasL-scality deleted the fix/issue-290 branch October 1, 2026 09:43
@upsun-dispatch

upsun-dispatch Bot commented Oct 1, 2026

Copy link
Copy Markdown

Note

Upsun Dispatch™ — this review was canceled. No review was posted for this update.

View the full trace

self.client.delete(self.data['url'])

def edit(self, text: str) -> None:
updated = type(self).update(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing UPDATE_SCHEMA on the Comment class — edit() calls type(self).update(), which falls back to cls.SCHEMA (schema.Comment with id = fields.Int(required=True)) for serializing the outgoing payload. This works today only because dumps() uses marshmallow 3's validate() which returns an errors dict rather than raising ValidationError, making the try/except dead code. If that validation is ever tightened, edit() will break. Add UPDATE_SCHEMA = schema.CreateComment to the Comment class.

— Claude Code

@claude

claude Bot commented Oct 1, 2026

Copy link
Copy Markdown

Good feature — the Client.patch bugfix (POST→PATCH) is a real pre-existing bug, the status-comment editing logic is clean, and the fallback for hosts that can't edit is well handled.

One issue found:

- Comment class is missing UPDATE_SCHEMA — edit() serializes via the full Comment schema (which requires id), working only because marshmallow 3's validate() silently returns errors instead of raising. Add UPDATE_SCHEMA = schema.CreateComment.

Review by Claude Code

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.

2 participants