forked from AnalogJ/scrutiny
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Summary
Several verified gaps were found in the attribute override system during a code review against upstream discussion AnalogJ#922.
Why
These issues affect correctness (silent duplicate overrides), visibility (config file overrides invisible in UI), safety (missing threshold validation), and confidence (no handler-level tests).
Acceptance Criteria
- Add unique index on
(protocol, attribute_id, wwn)in theattribute_overridesmigration to prevent silent duplicates - Config file overrides are returned by
GET /api/settings/overridesso they appear in the settings UI (read-only, source: config) - Handler validates that
warn_above < fail_above, values are non-negative, and at least one threshold is set whenaction == "" - Add handler-level tests for
GET/POST/DELETE /api/settings/overrides - UI form default action changed from
ignoreto""(Custom Threshold) so threshold fields are visible by default; form resets to same - Fix misleading comment in
applier.gothat says thresholds "can be combined with force_status" — they are mutually exclusive in practice - Add basic WWN format validation in handler
Additional Context
- Migration file:
webapp/backend/pkg/database/migrations/m20260122000000/attribute_override.go - Handler:
webapp/backend/pkg/web/handler/attribute_overrides.go - Applier:
webapp/backend/pkg/overrides/applier.go - DB repo:
webapp/backend/pkg/database/scrutiny_repository_overrides.go - UI:
webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels