Repository navigation
Delete the function the docs-gate fix orphaned, and pin display-name uniqueness - #444
Conversation
The previous commit replaced frontmatterOnly's only shQuiet call with execFileSync and left shQuiet defined, called by nothing - and left the call-site comment reading "see the note on shQuiet". So the next reader is told stderr suppression comes from a function that no longer participates, goes looking for it, and finds dead code; and if they "restore" the call they reintroduce the shell-string interpolation of a git-derived path that the same commit removed on purpose. Deleted, and the comment now says what actually suppresses the noise: stdio ["ignore", "pipe", "ignore"], and why that noise exists at all - a file the PR ADDS has no base blob, so git prints a fatal line per new page and forty of them ahead of the gate's output reads as a crash rather than as forty new pages. `display` is a map key in four places - FRAMEWORK_URL_PATH and FRAMEWORK_SLUG in SkillsCallout, FRAMEWORK_DISPLAY_TO_SLUG in utils/frameworks.ts, and the features/products/skills cross-check in verify-frameworks.cjs - and its own doc comment says so. Nothing enforced that it is unique, while `slug` uniqueness was pinned. A duplicate is easy to introduce from a copy-pasted entry, Object.fromEntries silently keeps the last one, and SkillsCallout would then build the OTHER framework's agent-skills link and report the wrong framework to analytics - with verify:frameworks still green, because it only asks whether a display is IN the registry, never whether it appears once. Now pinned, and mutation-checked: duplicating a display fails the new row. test:frameworks 17 passed, test:docs-gate 37 passed, verify:frameworks OK, tsc clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
57ee573 to
7348bbc
Compare
|
Heads-up: I force-pushed this branch to clear the conflicts. Previous head was Cause: #430 was squash-merged, so What I did: cherry-picked your This PR is now 1 commit, 2 files, +29 -14 — just the change you meant it to be, and Verified on the rebased tree before pushing: no If you had local work on top of the old head, |
|
Two small follow-ups to #430, split out so that PR could keep the approval it had already earned. Both were found by a review round that ran after #430 was approved; neither is urgent, and neither changes behaviour today.
Base note: this targets
fix/framework-frontmatter-ssotso the diff shows only these two files. GitHub retargets it tomainautomatically once #430 merges.1.
shQuiet()is dead, and a comment still points at it#430's last commit replaced
frontmatterOnly's onlyshQuietcall withexecFileSync("git", [...])— deliberately, to stop interpolating a git-derived path into a shell string — but left the function defined and left the call-site comment reading "see the note on shQuiet".The cost is not the dead function, it is the instruction attached to it: the next reader is told stderr suppression comes from
shQuiet, goes looking, finds nothing calling it, and if they "restore" the call they reintroduce exactly the class #430 removed.Deleted. The comment now says what actually suppresses the noise —
stdio: ["ignore", "pipe", "ignore"]— and why there is noise to suppress: a file the PR adds has no base blob, so git printsfatal: path ... exists on disk, but not in ...once per new page. That failure is expected and handled (the catch treats the file as body-changed, which is right for a new file), but forty such lines ahead of the gate's own output reads as a crashed gate rather than as forty new pages.2.
displayis a map key in four places and nothing pinned its uniquenesssluguniqueness was asserted.displaywas not, despite being keyed off in:FRAMEWORK_URL_PATHandFRAMEWORK_SLUG(SkillsCallout)FRAMEWORK_DISPLAY_TO_SLUG(utils/frameworks.ts)features.json/products.json/skills.jsoncross-check inverify-frameworks.cjsThe field's own doc comment already says "Used as a map key by SkillsCallout, so it is load-bearing."
A duplicate is easy to introduce — a copy-pasted entry whose
displaywas not updated.Object.fromEntriessilently keeps only the last one, soSkillsCalloutwould build the other framework's/sdks/<routeSegment>/agent-skillslink and report the wrong framework to analytics.yarn verify:frameworksstays green throughout, because it only ever asks whether adisplayis in the registry, never whether it appears once.Verification
yarn test:frameworks→ 17 passed (16 + the new row)yarn test:docs-gate→ 37 passedyarn verify:frameworks→ OKnpx tsc --noEmit→ cleanlinux's display to"Web"fails the new assertion. It bites.🤖 Generated with Claude Code