Repository navigation
feat(glossary): discover candidates and refine terminology checks - #2014
Merged
Merged
Conversation
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.
Description
Document authors can review unregistered terminology with
glossary-candidatesandjust glossary-candidates. Advisory JSON lines provide locations, per-file counts, original-source context and the closest canonical term with a similarity score. Candidate discovery subtracts registered names, aliases and part numbers case-insensitively.The blocking terminology scan preserves code boundaries: backticks become spaces, so code-adjacent plurals and prefixes cannot hide violations. Registered occurrences protect exact, sentence-case and title-case forms unless an explicit casing rule forbids a derived form; ALLCAPS forms require explicit line suppression. Protection applies when a registered span crosses an edge of the forbidden hit or contains it; a registered word contained inside a forbidden phrase does not disable that rule.
Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentationtest-- Regression and precision fixturesModifiers
!)Changes Made
--allow).--stopwordsand--allowcontrols; allow takes precedence and can restore standards prefixes such as EN.Changelog Entry
Added
Testing
pre**input pump**test (1 failed/8 passed, exit 1). Allowing emphasis to span a newline fails its new regression (1 failed, exit 1). The previous M9 closing-guard mutation remains covered.uv run --with pytest-xdist pytest packages/vig-utils/tests/test_glossary.py tests/test_typst_docs.py tests/test_typst_reconcile.py -n 4 --basetemp=$HOME/.cache/devkit-pytest/1994c-r5-greenManual Testing Details
The reviewed precision/recall corpora continue passing their >=75% thresholds. The lowercase
service manifoldremains an intentional heuristic miss. These fixture thresholds are not arbitrary-prose accuracy claims. The earlier benchmark scripts remain available inpackages/vig-utils/tests/benchmark_glossary.pyandbenchmark_nearest.py.Repository hooks run inside
nix developwithout bypasses. Container-dependent and Nix-evaluation suites are left to CI. No merge or workflow dispatch.Checklist
Additional Notes
Extraction is a documented lexical heuristic. Nested markup, complex links, non-pipe tables and unusual name/standard formats require reviewer judgment. Conservative name-line boundaries can separate wrapped names. Names appearing only in filtered regions are intentionally missed. This round updates the already-reviewed feature on the same branch and PR. Simple emphasis is limited to one line and 1,024 content characters to bound scanning cost. No merge or workflow dispatch.
CI is green on round-5 pushed head
f8207bdb82c1bc354bdce807bd7a92d34f01fa48: run 41687813051. All checks, including Test Summary, project tests, image/integration tests, BATS, flake gates, consumer matrix, lint, security and CodeQL, passed. The CI watcher exited 0; no rerun was required. Local isolated basetemps were removed. No merge or workflow dispatch.Refs: #1994