Problem
Attention-sink trimming is critical behavior. It’s currently implemented but should be reinforced by naming to prevent accidental removal.
Evidence
assembler.rs (line 69) explains the trimming rule in comments. The rule is important, but the function can carry more of the explanation through names.
Scope & constraints
No response
Proposed approach
Rename/extract helpers like:
trim_context_tail_preserving_attention_sink
fits_budget
preserve_attention_sink_head
Acceptance criteria
- No behavior change.
- Policy is encoded in names (self-documenting).
Test plan
cargo test llm::assembler.
Problem
Attention-sink trimming is critical behavior. It’s currently implemented but should be reinforced by naming to prevent accidental removal.
Evidence
assembler.rs(line 69) explains the trimming rule in comments. The rule is important, but the function can carry more of the explanation through names.Scope & constraints
No response
Proposed approach
Rename/extract helpers like:
trim_context_tail_preserving_attention_sinkfits_budgetpreserve_attention_sink_headAcceptance criteria
Test plan
cargo test llm::assembler.