add rule generalization, sized LLM defaults, ops docs, and UI polish

Feedback rules can now be suggested for merging when a human has already
reviewed the same pattern multiple times (never guesses about new values).
LLM defaults sized for constrained VRAM instead of llama3.3/llama3.1.
Adds systemd units, a state backup script, and reverse-proxy auth guidance
for production deployment. Findings view is collapsible and sorts
suggested-review rows to the top for a quicker overview.
This commit is contained in:
larssand
2026-09-23 13:04:53 +02:00
parent c3e482f9ab
commit bf1109be81
14 changed files with 446 additions and 14 deletions

View File

@@ -94,6 +94,35 @@ class DashboardTests(unittest.TestCase):
self.assertIn("openDetailIds", HTML)
self.assertIn("addEventListener('toggle'", HTML)
def test_dashboard_field_deviations_are_collapsible_and_open_by_default(self):
start = HTML.index("Field Baseline Deviations")
preceding = HTML[max(0, start - 80):start]
self.assertIn('<details class="collapsible-section" open>', preceding)
self.assertIn('id="findingSummaryBadge"', HTML)
def test_dashboard_sorts_likely_worth_confirming_rows_first(self):
self.assertIn('const suggestPriority', HTML)
self.assertIn('suggestPriority(left) - suggestPriority(right)', HTML)
def test_dashboard_has_generalization_suggestion_panel(self):
self.assertIn('id="feedbackGeneralizationSuggestions"', HTML)
def test_dashboard_generalization_merge_button_confirms_before_widening_scope(self):
self.assertIn('merge-feedback-generalization', HTML)
self.assertIn('Merge into one field-wide rule', HTML)
self.assertIn('will be revoked', HTML)
def test_dashboard_generalization_merge_only_ever_posts_field_scope(self):
start = HTML.index("querySelectorAll('.merge-feedback-generalization')")
end = HTML.index('}));', start)
merge_handler = HTML[start:end]
self.assertIn("scope: 'field'", merge_handler)
self.assertNotIn("scope: 'entity'", merge_handler)
self.assertNotIn("scope: 'stream'", merge_handler)
def test_dashboard_exposes_feedback_generalization_setting(self):
self.assertIn('name="feedback_generalization_min_values"', HTML)
def test_dashboard_suggests_review_from_detector_history(self):
self.assertIn("label:'Suggested', render:suggestReview", HTML)
self.assertIn("likely false positive", HTML)