Skip to content

πŸ› fix: preserve PR attribution before Hive identity footer - #10705

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
mendezr:fix/10686-attribution-identity-footer
Oct 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
mendezr:fix/10686-attribution-identity-footer

Conversation

@mendezr

@mendezr mendezr commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Recognize the exact terminal Hive Agent/optional Instance/SHA block emitted by gh-wrapper.sh before applying the existing final-attribution-line rule.
  • Keep rejecting trailing prose, malformed identity blocks, quoted attribution, and fenced examples.
  • Add regression coverage for the production Astra/Codex body, open/closed PR collection, and the five-merged-PR effective-model ranking threshold for all/contributor filters.
  • Existing affected PRs within the closed-PR scan window regain attribution on rescan; no body rewrite is required.

Refs #10686. Not deployed yet; reporter confirmation should follow deployment and rescan.

Validation

  • gofmt -l on all changed Go files: clean.
  • Tests not run locally per AGENTS.md; CI is the test verdict.

β€” hive: backend=pi model=openai-codex/gpt-6.1-sol


🐝 Hive Agent: contributor | SHA: 89e7ca3a6

Recognize only the terminal identity block emitted by gh-wrapper, then keep the existing final-attribution-line rule. Cover production footer variants, rejected prose and quoted examples, open/closed PR collection, and effective-model ranking eligibility.

Hive-Run: hivecommons#10686
Hive-Plan: identity-footer-attribution
Hive-Spec: issue-10686#expected-behavior
Co-authored-by: arteeh <35239587+arteeh@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@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 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. labels Oct 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 parser and the emitter it has to match. This looks correct to me.

  • bin/gh-wrapper.sh:1061-1067 β€” _identity_footer emits exactly ---\n🐝 **Hive Agent**: + optional `name` + optional | **Instance:** `id` + | **SHA:** `sha`. The new attributionIdentityFooter regex in src/pkg/github/attribution.go:301 mirrors that shape token-for-token, including both optional groups, and is anchored to end-of-body so a footer followed by prose is still rejected (covered by TestParseAttributionTrailerDoesNotScanPastOrdinaryContent).
  • HIVE_SHA is ${HIVE_SHA:-$(git rev-parse --short HEAD) || unknown} (gh-wrapper.sh:1058), so the `[^`\n]+` SHA group can't fail on an empty value.
  • Stripping happens before the existing last-non-blank-line scan at attribution.go:305-313, so the rest of the parser β€” including the "earlier mentions are ignored" rule β€” is unchanged. HasAttributionTrailer is untouched.
  • The \r\n normalisation now happens before the regex runs, so CRLF bodies (tested) work.

Minor: the diff fully fixes #10686 β€” Closes #10686 rather than Refs would close it on merge; "reporter confirmation after rescan" isn't a reason to keep the issue open.

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

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

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

PR Title Relation Files
#10716 πŸ› fix: Most effective models filters, run rates and local-registry labels same files src/pkg/dashboard/contribute_effective_models_test.go

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