feat: progressive_drift_fraction as a per-request InsightsOptions knob - #68
Merged
Conversation
…ons knob The walk-vs-dwell sensitivity (ADR 0014) was a module constant (_PROGRESSIVE_DRIFT_FRACTION=0.5). Expose it as InsightsOptions. progressive_drift_fraction (default 0.5, gt=0 le=10) and thread it through detect_stops -> _is_progressive_translation. A cluster is movement when its half-to-half centroid drift exceeds fraction*stop_radius_m; lower rejects more aggressively, a large value effectively disables the filter. Backward-compatible (same default); direct detect_stops callers keep the module-constant default. Verified: default (0.5) rejects a slow walk (0 stops); 10.0 keeps its chunks (2 stops); dwell still 1 stop; out-of-range values are a clean 422. Co-Authored-By: Claude Opus 4.8 <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.
Exposes the walk-vs-dwell sensitivity (ADR 0014) as
InsightsOptions.progressive_drift_fraction(default 0.5,gt=0 le=10), threaded throughdetect_stops→_is_progressive_translation. Lower rejects movement more aggressively; a large value effectively disables the filter. Backward-compatible (same default). Verified: default rejects a slow walk (0 stops), 10.0 keeps its chunks (2), dwell still 1, out-of-range → 422. Adversary suite 63 passed.