Skip to content

fix(decay-rules): exclusion rule upsert recomputes valid_until on every re-ingestion, bypassing the score-unchanged guard #16365

@ericWadeFord

Description

@ericWadeFord

Description

PR #15525 (shipped in 7.260422.0) added a short-circuit to the indicator upsert path that skips decay recomputation when the incoming score matches the stored score. The guard resolves #15476 for indicators using the classic decay rule, but it does not cover indicators with a decay exclusion rule. For excluded indicators, the upsert path continues to recompute valid_until and flip is_detected on every re-ingestion cycle, even when nothing about the indicator has changed.

The editField (UI) path already has the correct early-return for excluded indicators. The upsert path does not. The guards are asymmetric.

Environment

Steps to Reproduce

  1. Configure an external feed (e.g. a TAXII or stream connector) that ingests indicators on a recurring playbook cycle.
  2. Apply a decay rule with an exclusion predicate so that matching indicators bypass classic decay (expected valid_until set far in the future by the source).
  3. Let the playbook re-ingest the same indicator on its next cycle with an unchanged score.
  4. Inspect the indicator history.

Expected Behavior

The upsert short-circuit added by PR #15525 fires: valid_until and is_detected are left untouched when the incoming score equals the stored score. Excluded indicators should behave at least as conservatively as classic-decay indicators — ideally more so, since exclusion is an explicit opt-out of decay recomputation.

Actual Behavior

On every re-ingestion cycle, the AUTOMATION MANAGER user overwrites valid_until with a decay-computed date and flips is_detected from No to Yes. If the source then re-asserts the original values on its own cycle, the field flaps back. In observed cases, consecutive AUTOMATION MANAGER overwrites occur with identical scores (down to the same timestamp on the incoming bundle), confirming the score-unchanged guard from PR #15525 is never reached on this code path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugType: something isn't working (fix:).decay rulesLinked to the Decay rules featuresolvedResolved (should be linked to the solving PR).

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions