Skip to content

✨ selfreport: carry the affected repositories and owners in self-reported issues - #12343

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/selfreport-affected-repos
Oct 16, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/selfreport-affected-repos

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #12338

What

Self-reported issues now say which repositories and owners are affected, not just which hives.

Evidence table (new rows, runtime-error reports):

Field Value
repos 3: acme/tools, hivecommons/hive, hivecommons/pluk
owners 2: acme, hivecommons
repo acme/widgets
ref acme/widgets#42

repos/owners come from project.repos (normalised to owner/name, deduped, sorted, capped at 20 in the table with +N more); repo/ref are the triggering item when the class carries one — advisory_post_failed now records the digest's repo via the new fleetreport.ObserveItem. Unset fields render —.

Affected block — union across joining hives, idempotent:

<!-- hive:selfreport-affected -->
**Affected hives (2):** hive-a, hive-b
**Affected repos (3):** acme/widgets, hivecommons/hive, hivecommons/pluk
**Affected owners (2):** acme, hivecommons
seen_count: 2
<!-- /hive:selfreport-affected -->
  • UpdateAffectedBlockWithRepos merges the joining hive's Report.Repos into the parsed union; owners are always re-derived, never parsed back. A re-report with nothing new returns changed=false (no body edit); a known hive bringing a new repo edits only the block.
  • The repos/owners lines are omitted when no hive contributed repos, so pre-existing issues and opted-out hives keep exactly the old block shape.

Fingerprint unchanged — RuntimeFingerprint is still class + normalised message + version; TestRuntimeFingerprintIgnoreReposAndItem pins that two hives with different repos/items land on one issue.

Privacy — the report repo is public and hive.yaml does not record repo visibility, so there is no per-repo filter to honour. New governor.fleet_report.include_repos (default true; Settings → Governor → Self-Reported Issues toggle, PUT /api/config/governor/fleet-report {"include_repos":false}) turns the attribution off entirely: Observation.Repos is nil, table cells render —, the hive's joins add nothing to the union. Documented in fleet-report.md (new "Repositories and owners" section) and operator-reference.md.

Tests

  • pkg/fleetreport: body rendering with/without repos, union merge + idempotence + legacy block shape, fingerprint stability, ObserveItem → evidence, repo normalisation rejects token-shaped input.
  • pkg/dashboard: include_repos GET default / PUT persistence gates FleetReportRepos(); settings-parity passes with the real toggle (no allowlist entry).

Not touched: the hub relay join path (it only comments; it forwards new report bodies, which already carry the block).

…rted issues

A [selfreport] issue named the hive but not the repositories or owners it
serves, so a maintainer could not tell whether a fleet issue was confined to
one project or org. The evidence table gains repos / owners (the hive's
project.repos and their distinct owners) and repo / ref for item-scoped
classes (advisory_post_failed records the digest's repo via ObserveItem).
The hive:selfreport-affected block carries Affected repos (N) and Affected
owners (N) as a union across joining hives, re-derived idempotently; the
fingerprint is untouched so dedupe is unchanged. governor.fleet_report
.include_repos (default true, Settings toggle) turns the attribution off
for hives whose watched repos are private.

Closes #12338

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 16, 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 Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 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
#12158 ✨ review: add review.shadow to record would_have_held for the review gate same files src/pkg/config/config.go
src/pkg/dashboard/static/index.html
#12346 ✨ nous: clarify passive baseline snapshots in Strategy Lab same files src/pkg/dashboard/static/index.html
#12332 ✨ feature: Add cadence templates for quickly setting cadence for all agents (#12300) same files src/pkg/dashboard/static/index.html
#12328 ✨ feat(dashboard): close settings dialog when clicking Save & close with no changes same files src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor
de6ebf1

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head de6ebf165850) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • remote_code_execution — adds a remote-fetch-and-execute, decoded payload, reverse shell or embedded credential (Adds curl|sh, eval of encoded payloads, reverse shells or embedded private keys)
    • src/pkg/fleetreport/runtime_test.go

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Another agent tried to open a PR from scanner/fix-12338, but this PR already closes #12338. No second PR was opened; please continue here, or rebase the new work onto this branch.

@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#12343de6ebf1` sha256:566673219cd25963ccbfa2467edfd8589f8c522316fef86725c1437a3bcf383a — download from the dashboard or `hivectl review evidence #12343`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at de6ebf1.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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.

✨ selfreport: carry the affected repositories and owners in self-reported issues

1 participant