mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
d768d0612c
Three defects, all in the credential this branch renames. Twelve integration quickstarts read `CPK_INTELLIGENCE_API_KEY=your_license_key`, eleven of them under "The runtime reads the license key from step 1". The project API key and the self-hosted license token are different credentials with different lifetimes, and ENT-1151 exists to take the license token out of managed setup -- so a reader who goes looking for a license key to paste finds a dead end on the very page meant to connect them. Now `cpk-...`, and "reads the project API key from step 1". The placeholder prefix was wrong in the other direction on five pages, and newly pinned that way by a test: `cpk_...`, with `cpk-...` asserted absent. A provisioned key is `cpk-<projectId>_<short>_<long>` -- see the `cpk-` keyPrefix in Intelligence's `apps/app-api/src/api-keys.ts` and the `parseApiKeyToken` fixtures. No key the platform issues starts with `cpk_`, so the placeholder taught a reader to distrust their own key. Both assertions are flipped. The new copy guard scans every MDX page rather than listing the twelve, so a page added next month is covered the day it lands. It reports the offending file and value, which is how the twelve above were enumerated. Finally, the retired-name boundary check is extracted to an exported `retiredNameReference` and unit-tested. It is the load-bearing half of that rule and it fails in one direction only: the canonical name ends with the retired one, so a plain substring match reports all ~250 correct sites and the guard gets switched off. The repo-wide scan cannot cover this -- it can say "clean", not that the boundary is what made it clean, and it goes green either way once the last old name is gone. Verified: guard script exit 0; guard tests 20 passed; managed-starter-docs 10 passed (was 9); oxfmt and oxlint clean on the three changed TypeScript files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>