Skip to content

fix(vocabulary): coverage measured, list corrected (M19a) - #30

Open
jgrodziski wants to merge 3 commits into
feat/m19a-vocabulary-commandfrom
feat/m19a-vocabulary-coverage
Open

jgrodziski wants to merge 3 commits into
feat/m19a-vocabulary-commandfrom
feat/m19a-vocabulary-coverage

Conversation

@jgrodziski

Copy link
Copy Markdown
Contributor

Fifth and last step of milestone M19a in PLAN.md §20 (word cloud / glossary, #6). Stacked on #29 (itself on #28, #27 and #26): review those first; this PR's diff is the two commits after #29.

It measures the vocabulary on real codebases, which is the M19a item left open, and corrects the shared technical list where the measurement showed it leaking.

The coverage table

Whole repositories as cloned, tests included. build is buildVocabulary alone over a built graph (median of five, Apple M1 Max, Node 26); artifact is the compact vocabulary.json.

corpus kept entities distinct terms (domain) artifact build
BroadleafCommerce 26208e01de (Java) 76 310 3 381 (3 191) 2.9 MB 290 ms
codegraph 294e5cc (TypeScript) 30 873 2 143 (1 994) 0.8 MB 71 ms
Mastodon 2bc820fb84 (Ruby) 20 358 2 447 (2 294) 3.2 MB 100 ms
Plausible 9bc90b0063 (Elixir) 16 435 1 999 (1 845) 1.8 MB 68 ms

PLAN §20.1 has the full table: each fixture, the counts by role, and the skipped entities. Findings:

  • The unnamed entities are Broadleaf's constructors and lambdas, codegraph's arrow functions (a fifth of its entities) and Mastodon's and Plausible's anonymous parameters.
  • The artifact grows with scopes, not entities. Mastodon's 5 739 scopes (each Ruby file is a module) outweigh Broadleaf's 3 807 on a quarter of the entities.
  • No cap is needed. The full command takes 2.2 s on Broadleaf, and loading the model is most of it.

The technical list: 125 → 138 words

The plan's sanity check is that Broadleaf's top ten must read as a commerce vocabulary. Under the old list it read order name type field item customer offer extension value product. Each word was judged from the names that carry it, never from its spelling:

  • name type value key map property field: the data vocabulary of every language (getName, propertyName, cacheKey, parsedValue, itemMap).
  • extension extensions: Broadleaf's …ExtensionManager/…ExtensionHandler pattern. Moved from the C# profile, since a word two lists hold belongs to the shared one, and a test keeps them disjoint.
  • read: the R of CRUD, missing from a list that claimed the CRUD verbs (readStaticAssetById).
  • serializer worker index: from Mastodon's top ten (app/serializers/, app/workers/, search indexes). index names machinery in all four corpora: database indexes, array positions, index.ts, the controller action.

Broadleaf's top ten now: order item customer offer product admin group fulfillment category payment.

Worth a look in review:

  • codegraph pays for the change. Its domain is code, so it loses type, name and index; a --technical file gives them back.
  • Mixed words stay domain: policy (Mastodon's authorization policies, but also its privacy and quote-approval policies), change, query, collection.
  • Product names stay domain even though they rank high: plausible and broadleaf are every module's namespace, as acme is the fixtures'.

Effect on the fixtures

Only value, name and index change class, and no weight moves. The six vocabulary.json snapshots are regenerated. Five hand-pinned counts in the CLI tests drop by one or two. The website's vocabulary page shows the new list size and digest, and its two examples were diffed against real output. The profiles page is regenerated for C#.

Verification

  • pnpm -r build and pnpm -r typecheck green; eslint clean on every changed file; pnpm run gen:schemas leaves schemas/ unchanged; the Hugo site builds.
  • vocabulary 285 tests, core 544, cli 973; every other package passes except the Node 26 node:sqlite warning test noted on feat(core): language lexicons on profiles (M19a) #26.

PLAN §20.4's last M19a item is checked and the milestone row marked done.

Part of #6.

🤖 Generated with Claude Code

Jérémie Grodziski and others added 2 commits October 26, 2026 10:19
Measured on BroadleafCommerce, Mastodon, Plausible and codegraph itself
(PLAN.md §20.1), each word read off the names that carry it: 13 words
named the program's machinery, not the business, in a real corpus's top
ten, and join the shared technical list (125 → 138).

- name type value key map property field: the data vocabulary of every
  language (getName, propertyName, cacheKey, parsedValue, itemMap).
- extension extensions: Broadleaf's …ExtensionManager pattern. Moved
  from the C# profile, since a word two lists hold is the shared list's.
- read: the R of CRUD, missing from a list that claimed the CRUD verbs.
- serializer worker index: Mastodon's app/serializers/, app/workers/
  and search indexes; index is machinery in all four corpora.

Broadleaf's top ten now reads order item customer offer product admin
group fulfillment category payment. In the fixtures only value, name and
index change class; no weight moves. Snapshots, the C# profile page and
the CLI page's examples follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The §20.1 table filled on the five fixtures, BroadleafCommerce,
codegraph, Mastodon and Plausible (commits, machine and method stated),
what their unnamed entities are, the Broadleaf top ten reviewed and the
list correction argued word by word. The last M19a item is checked and
the milestone row marked done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
codegraph 449f2fc Commit Preview URL

Branch Preview URL
Oct 27 2026, 10:01 AM

From feat/m19a-vocabulary-command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant