fix(hub): stop "Needs attention" items from perpetually reappearing#2
Merged
Merged
Conversation
Root cause: the dashboard surfaced decay-driven states as actionable, but the actions never reset the underlying counters (sessions_since_validation / confidence), so acting on them was futile and everything came back. Critical (stop the reappearance): - review approve now resets sessions_since_validation + last_validated, so an approved memory no longer bounces back to pending-review on the next decay tick - migration 034: partial unique indexes dedup auto-generated skill_proposals and design_system_scans (INSERT OR IGNORE never fired before due to fresh-random ids); session_end / addDesignSystemScan made idempotent - "Decaying" redefined as confidence<4 AND sessions_since_validation>=5 (real decay, not memories born below threshold); excludes the M-_system_* row Data integrity: - skills upsert (INSERT OR REPLACE) now COALESCEs confidence/usage_count/ useful_count/sessions_since_validation/last_validated and status from the existing row, so re-import / dashboard edit / proposal-apply no longer wipe autolearning state or resurrect deprecated / auto-approve pending skills UX: - non-destructive "Reinforce" action (confidence +1, reset staleness) in the memory detail view (previously only Deprecate/Delete) - Hub "Needs attention" band now live-refreshes every 30s (was frozen after the first render and diverged from the System Health rows) - review badge uses authoritative totals, not array lengths capped at 100 Tests: +9 regression tests (attention-reappearance-fix), updated attention-counts for the new decay predicate. Full suite green (codegraph 294, storage 14). One-time prod remediation: scripts/remediate-attention-backlog.sh (auto-approve in-place, with automatic backup) to drain the historical 308/30 backlog. Run AFTER deploying so migration 034 + the new logic are live. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Root cause: the dashboard surfaced decay-driven states as actionable, but the actions never reset the underlying counters (sessions_since_validation / confidence), so acting on them was futile and everything came back.
Critical (stop the reappearance):
Data integrity:
UX:
Tests: +9 regression tests (attention-reappearance-fix), updated attention-counts for the new decay predicate. Full suite green (codegraph 294, storage 14).
One-time prod remediation: scripts/remediate-attention-backlog.sh (auto-approve in-place, with automatic backup) to drain the historical 308/30 backlog. Run AFTER deploying so migration 034 + the new logic are live.