Skip to content

πŸ› fix(dedupe): never fold a dedupe checklist; name the shared path in "Same file as" - #16834

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/dedupe-checklist-no-fold
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/dedupe-checklist-no-fold

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Executive summary

This fixes two dedupe faults, both verified live:

What

Case Before After
Request body carries <!-- hive:dedupe-checklist repo=… --> path folds apply (file set, component, subject) skipped, like a DAG child; exact-title twin still reused
Same-file cross-link, match on one component path names the finding's own file names the shared component path
Same-file cross-link, equal file sets names the finding's file unchanged (every cited path is shared)

Why

How

  • createIssue (src/pkg/github/issue_request_watcher.go) sets SkipSharedPathFold when the body carries dedupeChecklistMarkerPrefix.
  • CreateIssueResult.SameFilePath is the component path when SameFileAs came from the component match. It is carried through ReviewBacklogRef.SameFilePath into reviewBacklogSameFileComment, which falls back to the finding's file for an equal file set.

Tests

Test Covers
TestDedupeChecklistIsNeverPathFolded actions#543 shape files its own issue; the same body without the marker folds
TestReviewBacklogSameFileNamesSharedPath utah-packages#868 shape: note names docs/skills/factory-build-backlog.md
TestReviewBacklogSameFileCommentFallsBackToFindingFile equal file set keeps the finding's file
Existing TestReviewBacklogGitHubSinkFilesSeparatelyForSameFileDifferentFinding unchanged
Mutants 5/5 caught
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

- A body carrying `<!-- hive:dedupe-checklist repo=… -->` skips the path
  folds (file-set, component, canonical subject) like a DAG child (hivecommons#16065).
  projectbluefin/actions#543, a data-loss bug, received the repo's whole
  checklist as a "Folded finding" on 10-24.
- The review backlog's "Same file as #N" cross-link names the path the two
  items share (CreateIssueResult.SameFilePath, the component path). On
  projectbluefin/utah-packages#868 it named the finding's own
  config/factory-build-backlog.toml, which hivecommons#852 never cites; the shared
  file was docs/skills/factory-build-backlog.md.

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 clubanderson 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.

PR Title Relation Files
#16842 πŸ› fix(labels): a later hive/verified-open or hive/already-done replaces the other same files src/pkg/github/issue_request_watcher.go
#16827 πŸ› fix(claims): ignore &#8203; in issue refs; skip no-action review findings CONFLICT src/docs/review-swarm.md
#16811 πŸ› fix(workflows): verify "the App cannot push workflows" before parking on it same files src/docs/hive-open-issue.md
src/pkg/github/issue_request_watcher.go
#16816 πŸ› fix(adoption): refuse a fixer push that undoes the adopted PR's change same files src/pkg/github/issue_request_watcher.go

@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 v6 tree and the callers; this looks correct to me.

  • createIssue (src/pkg/github/issue_request_watcher.go:1536) sets SkipSharedPathFold before any gate that reads it (:1618, :1646, the claim key at :1776, and reconcileIssueCreate at :1799), so a checklist takes exactly the DAG-child path. Using strings.Contains rather than the HasPrefix that dedupe_advisory_close.go:66 uses is the right call here: the body arriving at createIssue has already been through issueOwnerStepBody (:948), which can prepend text.
  • sameFilePath is only set on the component branch (:1728), and reviewBacklogSameFileComment falls back to f.File for the file-set case where every path is shared β€” matches the table in the body.
  • TestDedupeChecklistIsNeverPathFolded has a control run without the marker that must fold, so the test fails without the change.

Optional: the doc comment on ReviewBacklogRef.SameFilePath (src/pkg/github/review_backlog_routing.go:79) is truncated mid-sentence ("when every cited path is (CreateIssueResult.SameFilePath)").

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

@hivecommons-hive
hivecommons-hive Bot merged commit 9ae082d into hivecommons:v6 Nov 5, 2026
71 of 74 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Evidence bundle `#1683443f9bb6` sha256:f58bed0e52469b520244e2a55f2233fd96229f8d5b03002f68326a41da7a63e1 β€” download from the dashboard or `hivectl review evidence #16834`.

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

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR 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