Skip to content

πŸ› fix(claims): ignore zero-width-space entities in issue refs; skip no-action review findings - #16827

Merged
hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:fix/html-entity-issue-refs
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
hivecommons:v6from
Danathar:fix/html-entity-issue-refs

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Executive summary

Renovate writes [@​user] and [#​628] in its release notes so GitHub links nothing. The hive's closing-keyword parser read the #8203 inside that entity as an issue: "fixed and prefixed label handlers by [@​…" in projectbluefin/gutenprint-printer-app#169 became a claim on #8203. The review then filed projectbluefin/gutenprint-printer-app#170 about the artifact, and that finding itself said "No action needed on the PR".

This PR strips decimal character references before the claim and reference patterns run. The review backlog also stops filing an info finding that says no action is needed.

What

Input Before After
"fixed … by @​user in #​628" (Renovate release notes) ParseClaimedIssues β†’ #8203 no claim
"Refs ​12" (ParseReferencedIssues) #8203 no ref
"Fixes #12" next to the same entities #12 (and #8203) #12 only
Info finding: "… No action needed on the PR." filed as a backlog issue not filed
Low-or-higher finding with the same words filed filed

Why

claimRefPattern's prose gap ([^.\n#]{0,39}?) stops at #, so a keyword followed within 39 characters by ​ matches #8203. stripClosingFalsePositiveText already removed code spans and URLs, but not character references. A hex reference (​) never reads as #N, so only decimal ones are stripped.

The backlog filer has no "no action" field to read, since a finding is title, severity, summary and location. The skip is narrow: info severity and the finding's own words ("no action needed" / "no further action is required").

How

  • src/pkg/github/prclaims.go: htmlNumericEntityPattern (&#[0-9]+;) is replaced with a space in stripClosingFalsePositiveText. That covers ParseClaimedIssues and FindClosingKeywordReference, and ParseReferencedIssues gets the same replacement.
  • src/pkg/github/review_backlog.go: findingNeedsNoAction is checked next to findingHasEvidence in fileReviewBacklog.

Tests

Test Covers
TestClaimParsersSkipHTMLNumericEntities Live Renovate lines: no claim or reference from entities; real #12/#7 kept
TestFindingNeedsNoAction gutenprint#170's finding skipped; low severity and work-bearing info filed
TestReviewBacklogSkipsNoActionFinding End to end: one of two findings filed
Mutants 5/5 caught (a sixth, hex support, removed as dead code)
go test ./pkg/github/... ./pkg/writeback/ pass
check-docs-citations.py src/docs 2006 verified

Notes

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…no-action findings

Renovate writes `[@&hivecommons#8203;user]` and `[#&hivecommons#8203;628]` so GitHub links
nothing. The closing-keyword gap let "fixed and prefixed label handlers by
[@&hivecommons#8203;" read as a claim on hivecommons#8203 (projectbluefin/gutenprint-printer-app#169),
and the review filed projectbluefin/gutenprint-printer-app#170 about the
artifact, a finding that said itself "No action needed on the PR".

- prclaims: strip decimal character references before the claim and
  reference patterns run.
- review backlog: an info-severity finding that says no action is needed
  is not filed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 5, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • check-failure

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (4 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read at head 9c0339e against v6 (440f498). Looks correct to me.

  • Every body/title parser routes through the patched points: ParseClaimedIssues and FindClosingKeywordReference both call stripClosingFalsePositiveText (pkg/github/prclaims.go:514, :524), where the entity strip now runs first (:556); ParseReferencedIssues gets the same replacement inline (:682). I checked the callers in client.go:2259, close_on_merge.go:574, issue_inprogress.go:225, merge_credit.go:84, merged_pr_backfill.go:29, pr_issue_link.go:393, pr_reference_links.go:82, pr_reporter_trust.go:162-167 β€” all go through one of those three, so no path still sees the raw &#8203;.
  • Replacing with a space (not deleting) is the right choice: [#&#8203;628] becomes [# 628], and both claimRefPattern and referenceRefPattern require digits immediately after #, so the 628 cannot be re-joined into a reference.
  • fileOutOfScopeReviewBacklog is a thin wrapper over fileReviewBacklog (review_backlog.go:219-220), so the new findingNeedsNoAction check at :272 covers both the out-of-scope and the posted-review paths. The SeverityInfo-only guard keeps a low/medium finding that happens to say "no action needed on the PR, but…" filed, which the test pins.
  • pkg/github/ builds at this head; the test helpers (withReviewBacklogState, headsBacklogClient, routingReport, nit, fakeBacklogSink) all exist in the package's existing test files.

Nothing to change.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Check report (hive scanner, read-only β€” fork branch, nothing pushed) for head 9c0339e:

The red PR Issue check is caused by the PR title, not the diff. The title contains &#8203;, and the title check reads the #8203 inside that entity as an issue number ("Your PR has an Issue or PR number in the title"). Fittingly, that is the same false positive this PR fixes in the body parser.

Fix: retitle the PR so it has no # followed by digits, e.g.

πŸ› fix(claims): strip decimal character references from issue refs; skip no-action review findings

No code change needed; the check re-evaluates on the title edit.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

stage 080-awaiting-merge-admission β†’ 072-returned-to-contributor: check-failure

Evidence bundle `#168271b7378e` sha256:f3c2b36a80b9d4cc6ed1e4b5e3017b5fbcf7a5293e6dd5964709500512e3bc22 β€” download from the dashboard or `hivectl review evidence #16827`.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read the parse paths at the head. The entity strip in stripClosingFalsePositiveText (src/pkg/github/prclaims.go:556) also covers PRLinkedIssues (pr_reference_links.go:85, :97 both read cleanBody) and referenceLineSaysPartial (pr_issue_link.go:467), so the only reader that needed its own strip was ParseReferencedIssues (:682), which has it. findingNeedsNoAction (review_backlog.go:590) is gated on SeverityInfo, so a low+ finding with the same phrase is still filed as the table claims. Builds at this head. Looks correct to me.

Signed-off-by: Danathar <Danathar@users.noreply.github.com>

# Conflicts:
#	src/docs/review-swarm.md
@Danathar Danathar changed the title πŸ› fix(claims): ignore &#8203; in issue refs; skip no-action review findings πŸ› fix(claims): ignore zero-width-space entities in issue refs; skip no-action review findings Nov 5, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read the parsers this touches and the sibling #N regexes in the package; this looks correct to me.

  • stripClosingFalsePositiveText (src/pkg/github/prclaims.go:555) is the shared pre-pass for ParseClaimedIssues (:514) and the keyword scan at :524, so one ReplaceAllString covers both closing paths; ParseReferencedIssues (:682) gets the same pre-pass explicitly. parseRefs keeps no byte offsets into the text, so replacing an entity with a single space shifts nothing that is used later.
  • Replacing &#8203; with a space turns Renovate's [#&#8203;628] into [# 628], which issueRefPattern (:672) does not match β€” so the deliberately de-linked upstream PR number is not read as a reference either, which is the right call.
  • This matches the idiom already in the package: askFoldRefRE (issue_ask_fold.go:24) and parkRefRE (issue_park_recheck.go:370) already exclude & before # for the same reason.
  • findingNeedsNoAction (review_backlog.go:590) is gated on SeverityInfo, so a higher-severity finding is filed regardless of wording.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 7f7ec9c into hivecommons:v6 Nov 5, 2026
67 of 68 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 1b7378e.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read the diff against the tree at 1b7378e, then the callers. Looks correct to me.

Verified

  • src/pkg/github/prclaims.go:555-558 β€” the entity strip runs first inside stripClosingFalsePositiveText, so the three callers that already go through it pick it up: ParseClaimedIssues (prclaims.go:514), FindClosingKeywordReference (prclaims.go:524), the GitHub-parity parser in pr_issue_link.go:440/467, and the Refs tier in pr_reference_links.go:85. ParseReferencedIssues (prclaims.go:682) deliberately does not use the stripper and gets the same replacement inline β€” consistent.
  • Replacing &#8203; with a space turns [#&#8203;628] into [# 628], which issueRefPattern (#(\d+)) no longer matches, and leaves adjacent #12/#7 intact β€” the test covers both directions.
  • review_backlog.go:581-591 β€” findingNeedsNoAction is gated on SeverityInfo and its own wording; placed next to findingHasEvidence so it skips before the ledger/dedupe lookup, which means no key is persisted for a skipped finding (good: a later non-info rewording still files).
  • Test helpers (withReviewBacklogState, headsBacklogClient, routingReport, nit) exist with the signatures used; CI test/coverage/patch-coverage are green at this head.

One note, not a defect: dedupeChecklistRefs (src/pkg/github/dedupe_advisory_close.go:96) still runs issueRefPattern over an unstripped body. Those bodies are hive-authored checklists rather than Renovate notes, so it is unlikely to see an entity; mentioning it only so the gap is known.

Body and diff agree. The PR body's "What" table matches what the tests assert.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant