Skip to content

feat(rolegraph): make TriggerIndex threshold and stopwords configurable#739

Merged
AlexMikhalev merged 1 commit intomainfrom
task/137-configurable-trigger-index
Mar 30, 2026
Merged

feat(rolegraph): make TriggerIndex threshold and stopwords configurable#739
AlexMikhalev merged 1 commit intomainfrom
task/137-configurable-trigger-index

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Add DEFAULT_TRIGGER_THRESHOLD constant (0.3) replacing hardcoded magic number
  • Add with_stopwords() constructor for custom stopword sets that replace the default
  • Add set_threshold()/threshold() for runtime threshold adjustment
  • Add is_default_stopword() for introspecting the built-in stopword list
  • Change tokenise() and is_stopword() from static to instance methods to support per-index stopwords

Fixes #137

Test plan

  • All 20 existing rolegraph unit tests pass
  • All 18 trigger index tests pass (14 existing + 4 new)
  • New tests: default threshold constant, set_threshold, custom stopwords, default stopwords filter
  • cargo clippy -- clean
  • cargo fmt -- clean

Generated with Terraphim AI

- Add DEFAULT_TRIGGER_THRESHOLD constant (0.3) replacing hardcoded value
- Add with_stopwords() constructor for custom stopword sets
- Add set_threshold()/threshold() for runtime threshold adjustment
- Add is_default_stopword() for introspecting the built-in list
- Add 4 new unit tests for configurability

Fixes #137

Co-Authored-By: Terraphim AI <noreply@anthropic.com>
@AlexMikhalev AlexMikhalev merged commit 6f0af86 into main Mar 30, 2026
11 checks passed
@AlexMikhalev AlexMikhalev deleted the task/137-configurable-trigger-index branch March 30, 2026 14:53
AlexMikhalev added a commit that referenced this pull request Apr 25, 2026
…le (#739)

- Add DEFAULT_TRIGGER_THRESHOLD constant (0.3) replacing hardcoded value
- Add with_stopwords() constructor for custom stopword sets
- Add set_threshold()/threshold() for runtime threshold adjustment
- Add is_default_stopword() for introspecting the built-in list
- Add 4 new unit tests for configurability

Fixes #137

Co-authored-by: Terraphim AI <noreply@anthropic.com>
AlexMikhalev added a commit that referenced this pull request Apr 25, 2026
…nce' (#739) from task/docs-adf-model-selection into main
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