Uh oh!
There was an error while loading. Please reload this page.
feat(tool-scraper): scrape Kennametal's whole ER collet catalog - #97
Merged
Conversation
`COLLET_FAMILIES` holds fourteen Kennametal families where it held two — the standard metric and inch lines, twelve coolant-through lines one per series per unit, and the two tap-collet lines — covering 443 parts against 120. `ToolholdingDefinition` carries a `familyCode`, so a re-scrape reads the code out of config rather than out of a browser. `kennametal --collets` walks the three ER collet category trees through the new `vendors/kennametal/catalog.ts` and prints every family they link to with the CSV whose `familyCode` claims it, or `(not configured)`. The listing component is a page-indexed AEM GET whose `pageSize` counts families rather than parts; `docs/KENNAMETAL_PRODUCT_LISTING.md` records the endpoint and the two response shapes a walk has to handle. `ColletRecord` carries `clampingLength` and its millimetre twin from `L9` — the bore depth that is `@toolpath/tool-support`'s `Collet.clampLength`, which no Kennametal collet filled before — plus `squareSize` from `S10` and the vendor's verbatim `tapRange`. A tap collet publishes no `CCCN`/`CCCX` at all. `colletCapacity` reads its `D1` as a zero-width band, the shape a sealed collet already has, keyed on the vendor publishing a square rather than on the family's style. `checkCollet` allows a nominal size to sit `NOMINAL_SLACK` outside the capacity it names. A designation is not a measurement: `40ERSS1000` is designated one inch and clamps 0.9938 in both unit columns, and ten of that family's twelve rows do the same. The bound is relative because the gap scales with the collet — widest 1.14 % against the 96 % a cell in the wrong unit system is out by. A square size at or past what the collet clamps is refused. In `@toolpath/tool-support`, `Collet` carries an optional `squareSize` and `holderTakesTool` reads it: a square bore drives a tap, so a shank-diameter test alone would seat an end mill of that size in something holding it by nothing. `holderTakesTool` takes an optional `form` for that test, and a collet stating no square is unchanged. `TAP_FORMS` and `isTapForm` are exported.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
standard, coolant-through and tap lines.
toolpath-scrape kennametal --colletswalks the three ER collet categories and prints everyfamily they link to with the configured CSV that claims its code, or
(not configured).familyCode, so a re-scrape needs no browser.ColletRecordgainsclampingLength/clampingLengthMm(L9),squareSize(S10) andtapRange.holderTakesToolrefuses anything but a tap in a collet that publishes a square drive.Two decisions worth a reviewer's attention:
checkCollet's nominal-inside-capacity gate was wrong, not just tight. Fourteen rows ofthe real catalog sit outside their own band; the sealed ER40 inch line does it on ten of
twelve.
40ERSS1000is designated one inch and clamps 0.9938 — in both unit columns, so it isthe vendor stating an undersized sealed collet rather than one cell rounded differently.
NOMINAL_SLACKis relative because the gap scales with the collet: widest legitimate 1.14 %,against the 96 % a cell in the wrong unit system is out by.
D1becomes a zero-width one. Thebranch is keyed on the vendor publishing a square, not on the family's
style.The four collet kits (26 parts) are excluded — they publish a range string and no capacity, and
minting one would mean deriving a band from it.
kennametal --colletslists them every run.Public package release
pnpm changesetand committed the generated Changeset.@toolpath/tool-scraperminor and@toolpath/tool-supportminor. Nothing is removed ornarrowed;
holderTakesTool's newformargument is optional and every existing caller compiles.Validation
pnpm check— green except two pre-existingtests/maritool-corpus.test.tsfailures onthis machine's corpus (
BT30-ER25-60MandCAT40-ER25-3.0MDcarry seriesER25M, whichthe test's
/^ER\d+$/rejects). That CSV was scraped 2026-09-02 and nothing here touchesMariTool; those assertions skip in CI, where the CSVs are not committed.
TOOLPATH_REQUIRE_CORPUS=1 pnpm --filter @toolpath/tool-scraper testover all fourteennewly scraped families: every row becomes a record, and each family's count matches the
rowsdeclared for it.kennametal --colletsagainst the live site: 20 families under 3 category trees, 4 notconfigured — the kits.