Repository navigation
fix: alert again when a change watch returns to a seen page - #147
Merged
jerelvelarde merged 2 commits intoOct 6, 2026
Merged
Conversation
A change-condition watch keyed its dedup notice on the page content hash alone, so a page that changed A→B→A never alerted on the return to A. The alertSequence mechanism already added for contains/price conditions in 96c2525 now covers change too: every notification-worthy observation bumps the committed sequence and keys the notice on sequence+hash, so publication replays still deduplicate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jerelvelarde
approved these changes
Oct 6, 2026
jerelvelarde
left a comment
Collaborator
There was a problem hiding this comment.
Value: change watches alert again for A→B→A while outcome replay still deduplicates against a persisted sequence. Twenty-nine monitor-recovery/agent API tests passed. Template: problem, behavior, checks and sample-path limits are stated. Updated-main diff reviewed; no actionable security/correctness findings. Merge after required CI.
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.
Problem
A watch with condition
changekeys its dedup notice on the page content hash alone. When a page oscillates A→B→A, the return to A produces a notice key that already exists, soinsertIfAbsentsilently swallows the alert and the user is never told the page changed back.Commit 96c2525 fixed exactly this clears-and-reappears case for
contains/price_belowby committing analertSequencewith the outcome; thechangebranch was left content-hash-keyed.Fix
alertSequencefor every notification-worthy observation, includingchange.sequence:hashfor all conditions, so a change back to previously seen content is a new alert while outcome-replay retries still deduplicate on the same committed key.Verification
tests/monitor-recovery.test.ts:changewith pages A→B→A→B alerts exactly 3 times; unchanged repeats stay quiet.tests/agent-api.test.ts(a change back to a seen page now alerts; identical consecutive checks still deduplicate).Co-authored-by: Claude noreply@anthropic.com