Repository navigation
docs: document the deprecated-vs-removed API mocking policy - #457
Merged
Merged
Conversation
commit: |
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
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 free
to 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.
Documents the approved policy on mocking provider surfaces that upstream has deprecated versus removed.
New docs page —
docs/deprecation-policy/index.html, registered indocs/sidebar.jsunder 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
## Licensestating the policy in a couple of sentences and linking to the full page. The subtitle used bypublish-release.ymlforpackage.json.descriptionis untouched.Docs and README only — no source, tests, or fixtures changed.
Gates (exit codes captured by redirect, not through a pipe):
npx prettier --check→ 0npx eslint .→ 0pnpm typecheck→ 0npx vitest run→ 0 (196 files passed / 1 skipped; 6003 tests passed / 46 skipped) — includesdocs-clean-urls.test.ts, which link-checks every internal href and asserts each page dir has anindex.htmlnpx commitlint --from origin/main --to HEAD→ 0🤖 Generated with Claude Code
https://claude.ai/code/session_015QWy4PB5DCVZp6tQt1mw4x