feat(overrides): add acknowledge action pinned to an attribute's current value - #804
Merged
Merged
Conversation
…ent value Ignore and force_status both mask an attribute permanently, so a user who has looked at one bad value and accepted it loses the signal for every later change too. Acknowledge accepts the value as it stands: the attribute passes only while its value equals the pinned one, and any change restores the normal verdict. The pinned value is resolved server-side from the device's latest SMART submission rather than sent by the client. Which field an attribute is evaluated against differs by protocol - ATA compares the raw value, every other protocol the normalized one - and that rule already lives in the evaluation path. Restating it in the frontend would let the two drift apart silently, so it is exported as measurements.AttributeThresholdValue and the handler pins whatever it returns. A manufacturer SMART failure is never masked, matching ApplyDeltaEvaluation: the drive reporting its own failure is not a Scrutiny verdict a user can acknowledge away. Acknowledge also requires a device, because a fleet-wide rule cannot express a pinned value - the same attribute holds a different value on every device. The pinned_value column is nullable rather than defaulted, since 0 is a legitimate acknowledged value and a defaulted column would read every pre-existing override as acknowledged at zero. Closes #775
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #775
Problem
ignoreandforce_statusboth mask an attribute permanently. A user who has looked at one bad value and accepted it - reallocated sectors that settled a year ago, a packed Command Timeout value that Scrutiny misreads - loses the signal for every later change too. The request in #775 is to accept the current state without giving up on the next one.Solution
A third action,
acknowledge, pinned to a value:ApplyDeltaEvaluation: the drive reporting its own failure is not a Scrutiny verdict a user can acknowledge away.device_idorwwn). A fleet-wide rule cannot express a pinned value, because the same attribute holds a different value on every device.The status reason distinguishes the two states:
Acknowledged at value 3, orAcknowledgement no longer applies: value changed from 3 to 4.Where the pinned value comes from
The server resolves it from the device's latest SMART submission rather than trusting a client-sent value. Which field an attribute is evaluated against differs by protocol - ATA compares the raw value, every other protocol the normalized one - and that rule already lives in the evaluation path. Restating it in the frontend would let the two drift apart silently, so it is exported as
measurements.AttributeThresholdValueand the handler pins whatever that returns. The UI sends no value at all.Sending
pinned_valuewith any other action is rejected.Migration
m20260906000000addspinned_valueviaAutoMigrate, which only adds the missing column and is a no-op on a database that already has it. The column is nullable rather than defaulted:0is a legitimate acknowledged value, and a defaulted column would read every pre-existing override as acknowledged at zero.UI
Device detail page:
Acknowledge current valuein the attribute actions menu and beside the inlineIgnorebutton. Active overrides now describe themselves through oneoverrideDescriptionhelper, so an acknowledge row readsAcknowledged at 3rather than falling through to a wrong label.Dashboard settings: the action is selectable and the form requires a device for it.
The menu icon is
check_circle_outline;task_altwas tried first and is not present inmaterial-twotone.svg, which fails silently at runtime.Testing
go build ./webapp/...clean;go vetclean on all changed packages.AttributeStatusFailedSmart,AttributeThresholdValuereturns the field each protocol is evaluated on.pinned_valuerejected for other actions, pinned value resolved from the latest submission, attribute absent from that submission rejected.pinned_valueNULL, and0round-trips as0.webapp/backend/pkg/{overrides,models,web/handler,database}suites pass.ng buildclean, 193 specs pass.Docs
README override table and both UI walkthroughs,
docs/openapi.yamlschema (including the previously missingdevice_id), and a config-file example.CHANGELOG.mdis left alone - semantic-release generates it.