Repository navigation
feat(lookups): typed category overview module (#137) - #139
Merged
Atrium0804 merged 2 commits intoNov 17, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Atrium0804
merged commit Nov 17, 2026
c227204
into
feature/102-category-overview-v2
9 of 10 checks passed
Atrium0804
added a commit
that referenced
this pull request
Nov 18, 2026
) (#142) * feat(categories): add gender-specific gearing data (#134) Co-authored-by: Copilot <[email protected]> * test(categories): reject unknown source gear values (#134) Co-authored-by: Copilot <[email protected]> * feat(lookups): typed category overview module (#137) (#139) * feat(lookups): add typed category overview module (#137) Co-authored-by: Copilot <[email protected]> * fix(lookups): tighten category recognition and intake (#137) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Ivo Stieltjes <[email protected]> Co-authored-by: Copilot <[email protected]> * feat(chat): integrate category overview lookups with safe state ordering (#136) (#140) * feat(chat): integrate category overview lookups with safe state ordering (#136) Chat, intake and eval now share recognize_turn, complete_with_intake and render_answer. Each conversation keeps a revisioned lookup state, separate from feedback history; a background intake job only publishes its state if its revision is still current. Intake can complete only NeedsInformation, never rescue rejected input. The legacy match_lookup/resolve_lookup_message adapters are removed. Co-authored-by: Copilot <[email protected]> * refactor(chat): address review of lookup integration (#136) Route becomes a tagged union with one shared route_reason for app and eval; the accepted turn travels to the job as one LookupTurn. The eval replay now completes an earlier incomplete beurt with the intake, like the app. GLOSSARY no longer says the intake fills in discipline or works with the regex lookup. Co-authored-by: Copilot <[email protected]> * test(chat): give every chat-test client one long-lived event loop (#136) A bare TestClient runs each request in its own event loop, so a background chat job could be stranded and time out (seen in CI on test_chat_sends_language_level_context). Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Ivo Stieltjes <[email protected]> Co-authored-by: Copilot <[email protected]> * Category overview v2: final validation, docs and review fixes (#135) (#141) * feat(lookups): name each source once and label the club source (#135) The bypass source line listed ALGEMENE BEPALINGEN twice (age categories and licences). Each document now appears once; at B2 its articles are merged. The old-category mapping source is labelled as club source. Co-authored-by: Copilot <[email protected]> * docs(categories): reference, routing, ADR-0009 amendment and drift notes (#135) Add docs/reference/categorieoverzicht.md, link it from the routing explanation, record the B1 source exception for every bypass answer as an ADR-0009 amendment, add Peiljaar to the glossary, document the stale_revision trace event and the approved-correction rule for document changes. Co-authored-by: Copilot <[email protected]> * feat(lookups): data-only lookup messages and closing question (#135) Recognize messages that contain only lookup data, e.g. 'jongen uit 2015, U12, weg' (the #102/#125 example), as a first message and as a reply to a pending lookup; a bare year in such a message is a birth year. Routecontract rows added. Bypass answers now end with 'Moet ik de KNWU-documenten doorzoeken voor een gedetailleerder antwoord?'. Error messages in max_gear, complete_with_intake, render_answer and decide_route now state an action (CODING_PRINCIPLES). Co-authored-by: Copilot <[email protected]> * docs(categories): data-only input and closing question (#135) Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Ivo Stieltjes <[email protected]> Co-authored-by: Copilot <[email protected]> * fix((bypass): niet verwijzen naar clubsite fix(bypass): geen bronregel in taalniveau B1 * fix(UI): liggende achtergrond t.b.v. bredere schermformaten * chore(contributing): geen worktree aanmaken, werk altijd op een featurebranch * chore: code-review lookups.py * refactor(routing): beschrijvende namen voor de bypassbeslissing (#143) Ready -> ReadyForBypass, NeedsInformation -> NeedsInputForBypass, NotEligible -> NotEligibleForBypass, LookupDecision -> BypassDecision, eligible -> eligible_for_bypass, revision -> accepted_turn_count. Trace-redenen en route_reden blijven ongewijzigd. Co-authored-by: Copilot <[email protected]> * test(routecontract): los gegeven na een inhoudelijke beurt (#143) Tien regels falen bewust: een kaal jaartal, alleen gegevens of een fragment na een inhoudelijke beurt gaat nu naar de bypass in plaats van naar de agent. Twee regels bewaken bestaand gedrag (#102: los jaartal als eerste beurt; #91: zelfstandige lookupvraag midden in een gesprek). Co-authored-by: Copilot <[email protected]> * fix(routing): los gegeven is alleen in de eerste beurt een eigen lookup (#143) Een kaal jaartal, alleen gegevens ("2014, meisje") of een losse oude categorie zonder open of voltooide lookup is een vervolgbericht op de vorige beurt. recognize_turn krijgt daarvoor is_first_turn, afgeleid van accepted_turn_count. Na een inhoudelijke beurt gaat zo'n bericht naar de agent; als eerste beurt en als vervolg op een lookup blijft de bypass (#102, #91/#136). Glossary: Gesprek, Beurt, Agentgesprek en Vervolgbericht. Co-authored-by: Copilot <[email protected]> * test: verouderde verwachtingen na slotvraag en liggende achtergrond B1-bypass eindigt op de slotvraag zonder Bron-regel (4cd5190); de achtergrond is sinds 2ad94d8 liggend. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Ivo Stieltjes <[email protected]> Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the pure typed lookup module and focused tests, including paired-category semantics, safe follow-ups, grounded intake completion, and translation recognition. Chat/eval integration remains a later slice.
Evidence
pytest app/tests tests→ 517 passed, 7 skipped; Pyright → 0 errors.Merge Danger
Door: Two-way
Blast Radius: Limited
The module is not wired into chat routing in this slice.
Closes #137