Skip to content

fix(canary): skip HTML-comment identity marker when extracting title#219

Merged
hdamker merged 1 commit intocamaraproject:validation-frameworkfrom
hdamker:fix/ra-canary-skip-html-comment-marker
Apr 23, 2026
Merged

fix(canary): skip HTML-comment identity marker when extracting title#219
hdamker merged 1 commit intocamaraproject:validation-frameworkfrom
hdamker:fix/ra-canary-skip-html-comment-marker

Conversation

@hdamker
Copy link
Copy Markdown
Contributor

@hdamker hdamker commented Apr 23, 2026

What type of PR is this?

bug

What this PR does / why we need it:

The RA bot's post-bot-comment action prepends an identity marker of the form <!-- release-bot:<release-tag> --> as line 1 of every reply (programmatic lookup key). The canary's _first_nonblank_line + _match_comment_title grabbed that marker as the "title" and failed to match the visible **✅ Snapshot created … line beneath it.

Observed on run 24821023555 (post-tooling#218 merge). The round-trip actually executed green on ReleaseTest — snapshot r1.2-7c6a6e8 was created, PR #96 opened — but the canary misclassified the result as fire-phase FAIL.

Rename _first_nonblank_line_first_visible_line and skip lines that are pure HTML comments (anchored ^\s*<!--.*?-->\s*$). Lines that mix content with an inline comment are not skipped.

Which issue(s) this PR fixes:

Fixes #

Related to camaraproject/ReleaseManagement#379.

Special notes for reviewers:

73/73 tests pass. New coverage: single marker + title, multiple markers + blank lines, inline-comment line (not skipped), empty body, and marker-only body.

Post-merge I'll manually /discard-snapshot on ReleaseTest#93 to clear the stale snapshot-active left from the last canary attempt, then dispatch the canary to confirm the round-trip scores as 5/5 green.

Changelog input

 release-note
 none (canary bug fix; no behavior change to the RA workflow itself)

Additional documentation

This section can be blank.

docs

The RA bot's post-bot-comment action prepends an identity marker of the
form '<!-- release-bot:<release-tag> -->' as line 1 of every reply.
_first_nonblank_line/_match_comment_title returned that marker as the
title and failed to match the visible '**✅ Snapshot created …' line
beneath it. Observed on run 24821023555 where the round-trip actually
executed successfully but the canary scored it as a fire-phase FAIL.

Rename _first_nonblank_line → _first_visible_line and skip lines that
are pure HTML comments (anchored '^\s*<!--.*?-->\s*$'). Lines that mix
content with a comment are NOT skipped — keeps the regex strict.
Comprehensive test coverage for single-marker, multi-marker, inline-
comment, empty body, and marker-only body.
@hdamker hdamker requested review from Kevsy and rartych as code owners April 23, 2026 07:21
@hdamker hdamker merged commit 24b64f0 into camaraproject:validation-framework Apr 23, 2026
1 check passed
@hdamker hdamker deleted the fix/ra-canary-skip-html-comment-marker branch April 25, 2026 08:41
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