Skip to content

ci: move conflict comment state after advisory#7453

Merged
PastaPastaPasta merged 2 commits into
dashpay:developfrom
thepastaclaw:ci-conflict-comment-marker-last
Jul 14, 2026
Merged

ci: move conflict comment state after advisory#7453
PastaPastaPasta merged 2 commits into
dashpay:developfrom
thepastaclaw:ci-conflict-comment-marker-last

Conversation

@thepastaclaw

@thepastaclaw thepastaclaw commented Jul 13, 2026

Copy link
Copy Markdown

Issue being fixed or feature implemented

Conflict advisory comments begin with a hidden HTML block containing base64-encoded state. GitHub hides this block in the web UI, but Slack's raw comment preview shows it before the useful conflict information.

What was done?

  • Move the hidden state block to the end of the comment so notification previews begin with the human-readable advisory.
  • Continue parsing existing comments that use the legacy marker-first layout.
  • Run the focused conflict-handler tests from the PR-head lint job.

How Has This Been Tested?

  • python3 .github/workflows/test_handle_potential_conflicts.py (15 tests)
  • python3 -m py_compile .github/workflows/handle_potential_conflicts.py .github/workflows/test_handle_potential_conflicts.py
  • test/lint/lint-python.py
  • test/lint/lint-whitespace.py
  • YAML parse of .github/workflows/lint.yml
  • git diff --check upstream/develop...HEAD

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

The hidden state block was rendered first, so raw notification previews of
the managed conflict comment started with an opaque base64 blob instead of
the advisory text. Render it after the advisory instead.

Reading it back can no longer take the first marker in the body, since
advisory content (a PR title, say) may contain marker-like text ahead of the
real block. Anchor on the last marker instead, unless the body starts with
one, which is how comments in the old marker-first layout are still read.
@thepastaclaw
thepastaclaw force-pushed the ci-conflict-comment-marker-last branch from 0b199db to e86bacf Compare July 13, 2026 09:26
Comment thread .github/workflows/lint.yml Outdated
Comment on lines +35 to +41
- name: Test workflow scripts
run: |
# The conflict handler and its tests import requests, which the lint container does not ship.
python3 -m pip install --quiet requests
python3 .github/workflows/test_handle_potential_conflicts.py
shell: bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@thepastaclaw seems as irrelevant changes ; why did you change this?

@thepastaclaw thepastaclaw Jul 13, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is meant to make the tests for this change non-dead. Before this PR, .github/workflows/test_handle_potential_conflicts.py was not invoked by any workflow; predict-conflicts.yml only runs the handler itself. Without this step, the new legacy-layout and marker-in-title regressions would only be run manually.

I put it in the existing lint job because that job checks out the PR head, and the requests install is needed by the handler/test imports in that container.

One caveat I verified while answering: the current PR pull_request_target run used the base revision of lint.yml, so the new step did not execute on this PR; once merged, it will enforce the focused tests for future PR heads. So it is related CI coverage, but I agree it broadens the PR. I can split/remove the workflow wiring if you prefer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed — removed this from the lint workflow. The unit test remains in the PR but is no longer run as part of linting.

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

utACK 754ffa6

@PastaPastaPasta
PastaPastaPasta marked this pull request as ready for review July 14, 2026 04:57
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6bb57910-a116-468a-9dbe-e1090c2345ac

📥 Commits

Reviewing files that changed from the base of the PR and between f343d58 and 754ffa6.

📒 Files selected for processing (2)
  • .github/workflows/handle_potential_conflicts.py
  • .github/workflows/test_handle_potential_conflicts.py

Walkthrough

The conflict workflow now anchors managed state extraction to the first marker only when the comment begins with it, otherwise using the last marker occurrence. Comment rendering places the advisory content before the encoded managed state block. Tests cover marker-like content in titles, delimiter placement, state round-tripping, and legacy comments with the marker segment first.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • dashpay/dash#7422: Introduced the related managed-comment state logic refined by this pull request.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving conflict comment state after the advisory text.
Description check ✅ Passed The description accurately describes the comment layout change, legacy support, and testing performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Jul 14, 2026

Copy link
Copy Markdown
Author

🔍 Review in progress — actively reviewing now (commit 754ffa6)

@knst knst left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

utACK 754ffa6

@PastaPastaPasta
PastaPastaPasta merged commit 94d00f7 into dashpay:develop Jul 14, 2026
49 checks passed
@UdjinM6 UdjinM6 modified the milestone: 24 Jul 14, 2026
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.

4 participants