Collapse near-duplicate lessons at briefing time so a pair does not take two slots
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
Research direction
Start by reading core.find_duplicates and duplicate_score, then trace how okl check fetches, ranks, and trims lessons, including the --format agent --interests path used by the harness. First complete prerequisite #177 step 1 so duplicate detection is symmetric. Done means the briefing names the lower-ranked duplicate, fills the freed slot with the next distinct lesson, leaves okl dedup unchanged, and passes the registered harness run.
Written by the indexing model from the issue text.
Description
Problem
okl dedup reports near-duplicate pairs, and by design never merges them. The report is advisory, and nothing reads it at briefing time. When both members of a pair match a task they both take a slot, and a distinct lesson further down the ranking is the one trimmed at twelve.
Where it stands (verified 2026-10-20)
core.find_duplicates/duplicate_scorebackokl dedup("never auto-merges") and the seed-time advisory; nothing else calls them.okl checkfetches three times the limit, filters scope and interests, and cuts at twelve. Two near-duplicates that both survive the cut are briefed in full, one after the other.- The score is asymmetric today (#177): three seed pairs cross the threshold in one argument order only. A collapse keyed on "pair above the threshold" would inherit that.
Proposal
At briefing time, when two hits form a dedup pair above the threshold, keep the higher-ranked one and name the other by id on its line (also [id2]), so the slot goes to the next distinct lesson. Nothing is merged, edited or hidden from okl show; the report stays as it is.
Prerequisite: #177 step 1, a symmetric score, so the pair is the same pair whichever lesson ranked first.
Measurement
This changes which lessons a single briefing contains, so it goes through the harness as a pre-registered run before it ships, after the deterministic pre-check that the change alters the harness's briefings (the harness shells out to okl check --format agent --interests, so the collapse must be on in that path and stamped in the receipt).
Acceptance
- A planted near-duplicate pair: one appears, naming the other; the twelfth slot holds a lesson that was thirteenth before. Fails before the change.
okl dedup's report is unchanged.
Related: #177 (symmetric score), #25 (two lessons that disagree, which is a different pair), #94 (not re-briefing within a session is tracked there, behind its multi-turn reservation).
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 5h 10m
- Merged PRs (30d)
- 127
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from emeraldleaf/okl
-
enhancement loop-review
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
emeraldleaf/okl#190 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
emeraldleaf/okl#147 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 50/100
emeraldleaf/okl#356 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
emeraldleaf/okl#349 ·
Maintainers usually reply within 1 day
-
okl's own CI against the from-scratch guide: Sonar coverage, format gate, locked installsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
emeraldleaf/okl#331 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
elviskahoro/sdk-python-attio#144 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
RenyiELBO raises TypeError when model has no sample sitesPossibly taken @alibb007 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day