Problem
score_passages() filters out all passages where superseded == true, but ClassifiedPassage::superseded means "superseded in at least one category" (see classification.rs lines 67-72). A multi-category passage (e.g., both Corrective and Stateful) marked superseded due to its Stateful aspect may still be the latest representative of Corrective.
Currently, these passages are dropped entirely from scoring output.
Proposed Solutions (pick one)
- Per-category supersession tracking — Add a
superseded_categories: Vec<ImportanceCategory> field to ClassifiedPassage so scoring can drop only the superseded categories and retain the passage for its non-superseded ones.
- Stricter
superseded flag — Only set superseded = true when the passage is superseded for all of its categories.
- Filter adjustment in scoring — Retain the passage but zero out the
category_weight contribution from superseded categories.
Context
Acceptance Criteria
- Multi-category passages are not incorrectly dropped when only some categories are superseded
- Existing single-category supersession behavior is preserved
- Tests cover the multi-category edge case
Problem
score_passages()filters out all passages wheresuperseded == true, butClassifiedPassage::supersededmeans "superseded in at least one category" (seeclassification.rslines 67-72). A multi-category passage (e.g., both Corrective and Stateful) marked superseded due to its Stateful aspect may still be the latest representative of Corrective.Currently, these passages are dropped entirely from scoring output.
Proposed Solutions (pick one)
superseded_categories: Vec<ImportanceCategory>field toClassifiedPassageso scoring can drop only the superseded categories and retain the passage for its non-superseded ones.supersededflag — Only setsuperseded = truewhen the passage is superseded for all of its categories.category_weightcontribution from superseded categories.Context
scoring.rs:102)c79fd9adocumenting the limitationapply_supersession()(classification.rs)Acceptance Criteria