Skip to content

✨ review_feedback.rules.* settings in hive.yaml plus owner-only Settings card - #19178

Closed
Danathar wants to merge 1 commit into
v5from
feat/review-rules-settings-19138
Closed

Danathar wants to merge 1 commit into
v5from
feat/review-rules-settings-19138

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Closes #19138

Part of #19135.

What

  • New review_feedback.rules.* keys in hive.yaml: enabled, trusted_associations, extra_phrases, disabled_signals. Additive only; the HIVE_REVIEW_FEEDBACK_RULES and HIVE_REVIEW_FEEDBACK_RULE_TRUSTED_ASSOCIATIONS environment variables keep working and win when set.
  • Owner-only GET/PUT /api/config/review-feedback/rules and a Rules from review feedback card in Settings, Features, Review. The card shows when an environment variable overrides a value, refuses to save an empty trusted set (which the server reads as "default"), and shows server validation errors verbatim.
  • reviewrules.Policy / Resolve merge yaml and env. ClassifyWith and ExtractRuleTextWith honour extra phrases (a new extra-phrase signal, quoted so they are never patterns) and disabled built-in signals. Store.SetPolicy applies a change to the open store, and the sweep re-reads hive.yaml on every pass, so an edit takes effect on the next pass without a restart.
  • Validation (config.NormalizeReviewFeedbackRules): known associations and signals only, phrases 4 to 100 characters, at most 50.
  • Docs (review-feedback-rules.md, settings.md, operator reference, API reference), a changelog fragment, and regenerated static/index.html.

Behaviour notes

  • enabled: false in yaml stops capture only; rules already recorded keep loading into kicks until retracted. HIVE_REVIEW_FEEDBACK_RULES=off keeps its old, stronger effect (the channel is also left out of the primer), so turning capture back on from the card needs no restart.
  • Route registration lives in registerReviewFeedbackRulesRoutes at the end of RegisterAPI, so no existing api.go:NNN citation shifts.

Testing

Per AGENTS.md the Go suite was not run locally; CI is the verdict. Locally: gofmt, go vet on the touched packages, the docs and API-reference citation guards, the static-index generator check, and node --test pkg/dashboard/review_feedback_rules_editor.test.js (6 passing).

-- hive: backend=claude model=claude-sonnet-5-5

🤖 Generated with Claude Code


🐝 Hive Agent: contributor | SHA: 06121ce4d

…ngs card

Add review_feedback.rules.{enabled,trusted_associations,extra_phrases,
disabled_signals} to hive.yaml and an owner-only "Rules from review
feedback" card in Settings, Features, Review that edits them in place.

The sweep resolves the policy from hive.yaml on every pass and hands it to
the open rule store, so an edit applies without a restart. The keys are
additive: HIVE_REVIEW_FEEDBACK_RULES and
HIVE_REVIEW_FEEDBACK_RULE_TRUSTED_ASSOCIATIONS keep working and win when
set, and the card and API report that. Extra phrases are quoted, never
patterns; disabled signals name the built-in classifier signals.

Tests for the config block, the policy and classifier, the live store, the
owner-only API and the card; docs and a changelog fragment.

Closes #19138

Hive-Run: #19138
Hive-Plan: #19135 review-rule capture fixes, settings step
Hive-Spec: review-feedback-rules#settings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 18, 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 kellyaa 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 18, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 18, 2026
@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.

Review asks:

  • the branch conflicts with the base and needs a rebase

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.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

@Danathar

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #19143 (@clubanderson, opened earlier against v5). Both add the review_feedback.rules.* config, the Settings API and the owner-only Settings card, editing the same files with different implementations, so they can't both land. #19143 is the one to keep. The only part unique to this PR is the new src/pkg/reviewrules/policy.go package; if it's still wanted after #19143 merges, it can come as a small follow-up on top.

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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

[scanner] review_feedback.rules.* settings in hive.yaml plus owner-only Settings card

1 participant