Skip to content

Per-category supersession tracking in scoring #70

Description

@asvarnon

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)

  1. 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.
  2. Stricter superseded flag — Only set superseded = true when the passage is superseded for all of its categories.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions