Skip to content

fix(signals): stop closing signals that only dipped for a night or changed kind - #853

Merged
gkhngyk merged 1 commit into
mainfrom
fix/signal-resolution-hysteresis
Sep 29, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
fix/signal-resolution-hysteresis

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Stops the nightly pass from closing signals that did not end.

On the first two nights of the V1 library the pass closed 74 and 79 signals. Of the first night's 74, 64 had lived a single night. That is the signals page telling users problems were solved and then raising them again. There are two causes.

1. One quiet night closed a signal. Values near a threshold dip under it and come back. For example, a source at 21 results against a threshold of 20 drops to 19. The signal was resolved on the dip and reopened the next morning. An undetected signal now stays open until it has been missing for resolveAfterHours (36h, in library thresholds), so it takes two missed nights to close it. Detector failures (unreadKinds) and outages are still never treated as endings.

2. A subject that changed kind was "resolved". Some kinds are exclusive choices of one classifier for the same subject:

  • topic gap / uncovered / slipping / drop
  • platform slipping / drop
  • the five source classes
  • owned page slipping / lost

When tonight's pass files a subject under a different kind of its group, the old signal is now closed at once (no grace, so the subject is never listed twice) with payload.supersededBy naming its successor. The web shows it as Changed instead of Resolved. Groups that are not exclusive stay independent. For example, a competitor can lead and gain at the same time.

signal_runs.detail.signals gains a superseded count beside autoResolved.

Checked against last night on the hosted database: 71 of the 79 closures were library signals. Under this rule, 21 would have closed as Changed, and the other 50 would have stayed open for another night instead of closing.

Related issue

Follow-up to #843 · tracking #818

Type of change

  • fix — Bug fix

How to test

  • cd server && npx vitest run → 861 passing. signals/resolution.test.js covers grace, supersede, exclusivity, and the group registry.
  • cd web && yarn test → 361 passing
  • After deploy, the next night's signal_runs.detail.signals shows autoResolved well below the ~75 of the last two nights, plus a superseded count.
  • On the Signals page, a signal closed because its subject changed kind shows a Changed badge in the table, the signal drawer and the action drawer's Signals tab.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes
  • yarn typecheck passes
  • yarn format:check passes
  • Changes are focused — one concern per PR

🤖 Generated with Claude Code

…anged kind

Two nights of the V1 library closed 74 and 79 signals; most had lived one
night. Two causes:

- A value near its threshold dipped under it for a night and the signal
  was resolved, then raised again the next morning. An undetected signal
  now stays open until it has been missing for resolveAfterHours (36), so
  one quiet night no longer closes it.
- A subject moved between kinds one classifier chooses between (a topic
  slipping, then dropped; a source cited, then winning). The old signal
  was resolved and a new one opened. It is now closed at once as
  superseded, naming its successor, and the web labels it Changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gkhngyk
gkhngyk merged commit 6288a4b into main Sep 29, 2026
6 checks passed
@gkhngyk
gkhngyk deleted the fix/signal-resolution-hysteresis branch September 29, 2026 17:42
@gkhngyk gkhngyk mentioned this pull request Oct 2, 2026
33 of 37 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant