Skip to content

✨ Governor: opt-in advisory report in every repo (default off) - #18583

Merged
kubestellar-prow[bot] merged 2 commits into
v5from
feat/advisory-per-repo-optin
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 2 commits into
v5from
feat/advisory-per-repo-optin

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Summary

Owner decision on #18448: per-repo advisory reports become an opt-in setting. Default off keeps the #18568 rule (one Hive Advisory Report, in project.primary_repo, covering all repos).

  • New setting governor.advisory.per_repo (bool, default false). HIVE_ADVISORY_PER_REPO sets the default when the key is absent; an explicit value or a Settings change always wins.
  • Settings, Governor Config, Advisory (owner-only): toggle Advisory report in every repo, help text "Off: one Hive Advisory Report in your primary repo covers all repos. On: each monitored repo also gets its own report." Changes are audit-logged with before/after (per_repo=false->true).
  • When on, each non-primary repo gets exactly one report via the new EnsureSecondaryAdvisoryIssue:
    • looks up the report by title plus the hive/advisory label or the new <!-- hive:advisory-report --> body marker, in any state, before creating, so a restart never re-creates it; a lookup failure is an error, never "none";
    • a report a person closed returns AdvisoryReportClosedError: never reopened, never replaced, and no longer posted to (also detected mid-run by an hourly open check before posting). The 🐛 certus: advisory digest stale since 2026-08-13 (not refreshing) #4167 reopen stays primary-only;
    • Issues-disabled / no-write-access / archived / moved repos are skipped with one warning log and a dashboard warning, rechecked at most hourly.
  • When switched off: no secondary ensure or post runs, per-repo alerts clear, and existing secondary reports are left as they are (documented).
  • The eval-cycle guard from 🐝 Governor opens a Hive Advisory Report in every monitored repo instead of only the primary #18568 is extended: a new AST test pins that both per-repo helpers are fed only advisoryPerRepoSecondaryRepos(cfg) (empty unless opted in), and the wiring-count test allows exactly the one extra opt-in wiring.
  • Docs: advisory.md (new "One report, or one per repo" section), env-vars.md, operator-reference, hive.yaml.example, dashboard/openapi.json. changelog.d fragment included.

Tests

  • default off creates nothing outside the primary (absent and explicit false; env only applies when unset)
  • on creates one report per repo, once, across cycles
  • restart idempotency (cmd seam and pkg/github against a stateful fake forge)
  • human-closed secondary not reopened or replaced, labelled or marker-only, across restarts; closed mid-run stops posting
  • Issues-disabled repo skipped, logged once, other repos unaffected
  • dashboard GET/PUT round trip, audit detail, Settings toggle text; config resolver

Refs #18448, follows #18568 (#18570).

🤖 Generated with Claude Code

Add governor.advisory.per_repo (Settings > Governor Config > Advisory,
"Advisory report in every repo", owner-only, audited; env default
HIVE_ADVISORY_PER_REPO). Off keeps the #18568 rule: one report in the
primary repo. On, each other monitored repo gets exactly one report,
found by title plus the hive/advisory label or a hive marker in any
state, so restarts never re-create it. A report a person closed is left
closed and no longer posted to. Issues-disabled or unwritable repos are
skipped with one warning and an hourly recheck. Switching off stops
updates without closing anything.

Refs #18448, #18568

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 17, 2026
@clubanderson

Copy link
Copy Markdown
Member Author

@nate-double-u FYI, for #18448: a hive keeps one Hive Advisory Report in its primary repo by default; this adds an owner setting (Settings, Governor) to also get one in every repo.

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

@github-actions

github-actions Bot commented Nov 17, 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
#18536 ✨ feature: choose remote repository write identity same files dashboard/openapi.json
src/docs/operator-reference/README.md
src/pkg/dashboard/static/index.html
#18571 ✨ Hand workflow-model states to their agent profiles (claim first, dispatch once) same files src/cmd/hive/main_eval_cycle.go
src/hive.yaml.example
src/pkg/config/config.go
#18576 ✨ Owner-only Send to on model-owned stage-tracker rows same files dashboard/openapi.json
src/cmd/hive/main_eval_cycle.go
src/hive.yaml.example
src/pkg/config/config.go
src/pkg/dashboard/static/index.html
#18594 🐛 Meetings: consent posted only on a confirmed delivery; speak it or leave same files src/pkg/dashboard/static/index.html
#18584 ✨ Show why a calendar-email proof failed on its Settings row same files dashboard/openapi.json
src/pkg/dashboard/static/index.html
#18562 🐛 Dashboard: keep the Collaborate sidebar group and place it after Dashboard same files src/pkg/dashboard/static/index.html
#18592 🐛 Betty closes the loop on deep dives; research agents survive config reloads same files src/pkg/dashboard/static/index.html

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

18 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/cmd/hive/advisory_repo_issues.go 297 CONDITIONALS_NEGATION
src/cmd/hive/advisory_repo_issues.go 298 ARITHMETIC_BASE
src/cmd/hive/advisory_repo_issues.go 371 CONDITIONALS_NEGATION
src/cmd/hive/advisory_repo_issues.go 378 CONDITIONALS_NEGATION
src/cmd/hive/advisory_repo_issues.go 381 CONDITIONALS_NEGATION
src/cmd/hive/advisory_repo_issues.go 384 CONDITIONALS_NEGATION
src/cmd/hive/advisory_repo_issues.go 385 CONDITIONALS_NEGATION
src/pkg/github/advisory.go 210 ARITHMETIC_BASE
src/pkg/github/advisory.go 211 ARITHMETIC_BASE
src/pkg/github/advisory.go 212 ARITHMETIC_BASE
src/pkg/github/advisory.go 213 ARITHMETIC_BASE
src/pkg/github/advisory.go 214 ARITHMETIC_BASE
src/pkg/github/advisory_secondary.go 34 ARITHMETIC_BASE
src/pkg/github/advisory_secondary.go 35 ARITHMETIC_BASE
src/pkg/github/advisory_secondary.go 36 ARITHMETIC_BASE
src/pkg/github/advisory_secondary.go 37 ARITHMETIC_BASE
src/pkg/github/advisory_secondary.go 38 ARITHMETIC_BASE
src/pkg/github/advisory_secondary.go 159 CONDITIONALS_NEGATION

Verdict: uncovered (#17349).

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • build-go
  • test (rest 3/4)
  • test (rest 4/4)

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

…ndex

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@clubanderson clubanderson added the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2026
@kubestellar-prow
kubestellar-prow Bot merged commit 8704496 into v5 Nov 17, 2026
97 of 99 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/advisory-per-repo-optin branch November 17, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant