Skip to content

docs: document the deprecated-vs-removed API mocking policy - #457

Merged
jpr5 merged 1 commit into
mainfrom
docs/deprecation-removal-policy
Sep 15, 2026
Merged

jpr5 merged 1 commit into
mainfrom
docs/deprecation-removal-policy

Conversation

@jpr5

@jpr5 jpr5 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Documents the approved policy on mocking provider surfaces that upstream has deprecated versus removed.

New docs page — docs/deprecation-policy/index.html, registered in docs/sidebar.js under Orchestration (after Drift Detection). Covers the deprecated-is-not-removed distinction, why deprecated surfaces stay (migration is when scaffolding matters most; users test their own code; add-vs-delete asymmetry), why a removed API is different (false green is worse than no mock), the drift consequence (dead surfaces can't be drift-tested and produce vacuous passes), the upstream-state matrix, the three rules, and what a contributor should expect.

README — a short section before ## License stating the policy in a couple of sentences and linking to the full page. The subtitle used by publish-release.yml for package.json.description is untouched.

Docs and README only — no source, tests, or fixtures changed.

Gates (exit codes captured by redirect, not through a pipe):

  • npx prettier --check → 0
  • npx eslint . → 0
  • pnpm typecheck → 0
  • npx vitest run → 0 (196 files passed / 1 skipped; 6003 tests passed / 46 skipped) — includes docs-clean-urls.test.ts, which link-checks every internal href and asserts each page dir has an index.html
  • npx commitlint --from origin/main --to HEAD → 0

🤖 Generated with Claude Code

https://claude.ai/code/session_015QWy4PB5DCVZp6tQt1mw4x

@pkg-pr-new

pkg-pr-new Bot commented Sep 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@457

commit: 9ee8863

@jpr5
jpr5 merged commit 4d6170d into main Sep 15, 2026
14 checks passed
@jpr5
jpr5 deleted the docs/deprecation-removal-policy branch September 15, 2026 16:55
jpr5 added a commit that referenced this pull request Sep 15, 2026
…l release (#458)

The deprecation policy published in #457 had one row of its matrix
wrong. **Removed / sunset** x **surface already shipped** read *"Keep
serving, warn, delete only on a major."* That row is replaced:

> **Convert to the sunset behaviour in a normal release**

Return what the real API returns now — the 404/410/rejection — so the
surface stays useful for testing shutdown handling instead of lying.

### Why the old row was wrong

- **Upstream's removal is not our breaking change.** The endpoint is
gone whether or not aimock reflects it. The user is already broken; the
only thing we control is whether they find out in CI or in production.
- **It got semver backwards.** A major protects aimock's *own* interface
— the CLI, the configuration, how you start it and point a client at it.
Fidelity to upstream is not our interface, it is our job, and correcting
a mock to match reality is not an API break on our part.
- **It was impractical.** Providers remove things constantly. Tying
every upstream removal to a major bump makes majors either meaningless
or perpetual.
- **It contradicted rule 1** — "never mock success for an endpoint that
no longer serves" — outright. A shipped surface mocking a dead endpoint
for success is exactly the false-green the policy exists to prevent.

### What else changed

- **Rule 1** now states that faithfulness binds a shipped surface
exactly as it binds one being proposed — the scope the old matrix row
carved an exception out of.
- **Rule 2** makes the sunset conversion the *required* path for shipped
surfaces, not merely a permitted reframing for new contributions.
- **The add-vs-delete asymmetry paragraph** no longer calls deleting a
shipped surface "a breaking change." The surviving asymmetry is narrower
and now stated precisely: still quick to decline and slow to delete, but
that governs deletion, not honesty — the route is converted to tell the
truth rather than ripped out.
- **The contributor-facing closing paragraph** ("it keeps serving, it
gains a warning… deleted only on a major") now describes the conversion,
the drift exclusion, and the normal release.
- **Two paragraphs added** to *Why a Removed API Is Different*, carrying
the not-our-breaking-change and not-a-major reasoning above.

### README

Verified, unchanged. It already says aimock "declines to mock the
success path of APIs that have actually been removed" without
qualification — that is the stricter corrected reading, and it never
mentioned majors or keeping shipped success mocks. No conflict. The
subtitle `publish-release.yml` extracts is untouched.

### Notion

https://www.notion.so/copilotkit/3dc3aa38185281e995c8c06d508f8998
updated to match.

### Gates (exit codes by redirect, not through a pipe)

- `npx prettier --check .` -> 0
- `npx eslint .` -> 0
- `pnpm typecheck` -> 0
- `npx vitest run` -> 0 (197 files passed / 1 skipped; 6011 tests passed
/ 46 skipped), including `docs-clean-urls.test.ts`
- `npx commitlint --from origin/main --to HEAD` -> 0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_015QWy4PB5DCVZp6tQt1mw4x
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