Skip to content

feature: explicit route removal and endpoint-level lifecycle #39

Closed

Description

@mojtaba-arvin

Problem

The package deliberately inherits unchanged route registrations forward. That is useful for reducing duplication, but it creates an important inverse case: when an endpoint or ViewSet action is intentionally removed in a later API version, the earlier route remains inherited unless there is an explicit removal contract.

Version-wide lifecycle metadata cannot fully express the lifecycle of one endpoint while the rest of that API version remains active.

Goal

Allow applications to declare that a logical endpoint stops existing from a specific version, without accidentally removing earlier versions or unrelated routes.

Research and design questions

  • Should the API be a router-level tombstone such as router.unregister("orders", "order-archive", version=3), a decorator-level @endpoint(..., removed_from=3), or a registry primitive with higher-level APIs?
  • Should a removed route return 404, 410, or be configurable? A 410 response may be appropriate only when clients need a clear migration signal.
  • How should removal interact with explicit versions=[...], route-matrix snapshots, api_reverse(), OpenAPI schemas, and endpoint migrations?
  • Should endpoint-level deprecated_at / sunset metadata override or complement the current version-wide lifecycle policy?
  • How can the registry distinguish an intentional tombstone from a missing import or accidental route omission?

Acceptance criteria

  1. A route declared in v1 and v2 can be explicitly absent in v3 while remaining available in v1/v2.
  2. Removing one custom action does not remove list/detail or unrelated actions.
  3. The route matrix reports intentional removal distinctly from an unregistered/missing route.
  4. Strict snapshots and CI can detect unexpected removal.
  5. Reversal of a removed route fails deterministically for the affected version.
  6. OpenAPI generation excludes removed routes from the affected version.
  7. Lifecycle response semantics are documented and tested; no silent 404/410 behavior.
  8. Existing decorator and router registration precedence remains backward-compatible.

Priority

Research/design after PR #37 stabilizes. This is a product-level complement to forward route inheritance, not a prerequisite for the initial ViewSet router release.

Parent roadmap: #36.

Activity

  1. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Initial design assessment (2026-11-18), based on the current registry and VersionedRouter implementation:

    The removal feature must be a first-class registry declaration, not implemented by deleting URLPattern objects ad hoc. The registry currently stores only effective URLPatterns; once a pattern is physically removed, the version matrix cannot distinguish intentional removal from an unimported/missing declaration. That would undermine the package's CI guardrail.

    Proposed direction for the design phase:

    1. Model a removal as a versioned tombstone keyed by logical endpoint identity and concrete API version, with source-version precedence equivalent to normal declarations. A later explicit reintroduction at a newer source version should be able to restore the route from that version onward.
    2. Keep physical URL routing absent by default after removal, yielding ordinary 404 behavior. Do not add a 410 route by default: a 410 callback would still exist in URL resolution and could leak into schema generation. Applications needing a migration-specific 410 can temporarily declare that response explicitly; revisit a first-class 410 policy only with a clear schema exclusion contract.
    3. Extend the route matrix/snapshot format to represent an intentional removal separately from a missing declaration, and preserve strict-mode detection of accidental disappearance.
    4. Make removal route/action-specific. Removing a ViewSet custom action must not remove list/detail or sibling actions.
    5. Ensure api_reverse() fails deterministically for removed versions, and ensure version-specific OpenAPI generation excludes tombstoned operations.

    Likely first public surface: a router-level removal declaration targeting an explicit DRF route name and from_version, because that maps directly to generated SimpleRouter action names. Do not implement until route identity, declaration ordering, duplicate registrations, and snapshot migration behavior are specified and tested. This is a design proposal, not a committed API contract yet.

  2. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Research update — production API lifecycle policies support treating operation removal as a deliberate contract transition, but they do not imply one universal HTTP status for every endpoint-level removal.

    Evidence:

    Design direction:

    1. The registry should store an explicit tombstone keyed by stable logical endpoint identity + concrete API version, rather than deleting URLPattern objects or inferring removal from a newer ViewSet's missing action.
    2. A tombstone should be route/action-specific. Removing an archive action must not remove list/detail or other actions. For VersionedRouter, logical identity should be based on router prefix + DRF route name/action identity, not generated regex text alone (regex strings can change with converters/trailing-slash settings).
    3. Keep the distinction between 'not registered/missing' and 'intentionally removed' in the version matrix and strict snapshots. Snapshot serialization must be deterministic.
    4. Reversal must fail with the normal deterministic no-match behavior for a tombstoned version; it must never fall back to an earlier implementation.
    5. Schema generation must omit the operation for the tombstoned version; this must be tested through the Issue feature: version-specific OpenAPI schemas and breaking-change CI #38 sample rather than implemented as a separate schema-only filter.
    6. Default runtime behavior should be route absence (404), not 410. 410 is appropriate only when the server intentionally retains a tombstone dispatch endpoint and has a clear endpoint-level sunset/migration contract. Version-wide 410 remains the responsibility of LifecycleMiddleware. Do not conflate those two scopes.
    7. A later explicit reintroduction should be allowed and must be tested, as should removal from an explicit versions=[...] registration.
    8. Do not overload current version-wide API_VERSION_LIFECYCLE settings with endpoint-level metadata until there is a concrete consumer requirement and a separate header/status contract.

    Before public API design, add failing tests for FBV/CBV and DRF ViewSet custom-action removal, inherited route preservation, explicit version sets, reverse behavior, matrix states, and OpenAPI exclusion.

  3. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Proposed registry semantics for implementation (refined after reviewing the current registry, matrix snapshot, and api_reverse() contracts):

    Declaration model

    • Generic endpoints: a direct module-level declaration such as remove_endpoint("orders/", from_version=3, app_name="shop").
    • DRF router: router.remove("orders", "order-archive", from_version=3), where the second argument is the stable DRF URL name/action identity (not a regex).
    • Both APIs write the same registry tombstone primitive.

    Segment semantics

    A tombstone is a version boundary, not merely a one-version flag:

    • It suppresses an older source declaration from from_version through API_MAX_VERSION.
    • A later registration with source_version >= from_version explicitly reintroduces the route from that new source version onward.
    • A later-imported older declaration must not resurrect the route. Results must be independent of module import order, matching the existing route precedence guarantee.
    • For explicit versions=[...], only the versions explicitly registered exist; a tombstone still suppresses any matching concrete version until a later declaration reintroduces it.

    Identity and route matching

    • Decorator registrations use their existing logical endpoint identity (app_name + postfix).
    • DRF registrations use router prefix + generated route name/action identity. Do not key on regex strings; regex/path-converter/trailing-slash settings can change without changing the logical operation.
    • A removal targets one logical operation. It cannot remove a whole ViewSet when only one action is named.

    State and public observability

    • Keep active URLPattern objects in urlpatterns only. A tombstoned route must not resolve and must not be available to api_reverse().
    • Add explicit removed-state records to the matrix/snapshot representation. The CLI should display "removed" rather than treating the operation as an accidental missing route.
    • Preserve the existing build_version_matrix() format for old consumers if necessary; add a versioned state-aware snapshot API/format rather than silently changing a committed snapshot's schema.
    • A missing route (no declaration and no tombstone) remains distinct from an intentional tombstone. Strict snapshots must detect both changes.

    HTTP and schema

    • Default behavior is route absence (404). Do not synthesize 410 for an endpoint-level tombstone. Existing LifecycleMiddleware continues to own version-wide deprecation/sunset/410.
    • No reverse fallback: api_reverse(name, version=removed_version) must raise NoReverseMatch.
    • drf-spectacular must omit the removed operation because it is absent from the active URLconf. The Issue feature: version-specific OpenAPI schemas and breaking-change CI #38 executable contract fixture should add a removed-action case to prove this end to end.
    • Reintroduction after a tombstone must restore the route and schema only from the reintroduction version.

    Before implementing the public API, the first PR should add focused registry tests for both registration orders, a tombstone between source segments, reintroduction, explicit versions, duplicate route names, and DRF custom actions. Keep the registry primitive independent of HTTP status and OpenAPI packages.

  4. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Implementation is now in draft PR #43: #43

    The registry tombstone primitive and both public entry points are implemented:

    • remove_endpoint(postfix, from_version=..., app_name=...) for decorator registrations.
    • VersionedRouter.remove(prefix, route_name, from_version=...) for one DRF operation/action.

    The implementation keeps tombstoned URLPatterns out of the active registry, prevents late older registrations from resurrecting them, permits reintroduction only from a higher source version, makes api_reverse fail for removed versions, and adds a stable marker to version-matrix snapshots and check_versions output.

    The first full test run passed, including the new tests for order independence, explicit version sets, reintroduction, stale registration precedence, action-level removal with 404 behavior, and strict snapshot state. Package build and website build have also passed. The full compatibility matrix and lint are still running on the latest docs-updated commit; this PR remains draft until every gate is green.

  5. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Implementation is in progress in PR #44: #44

    The API shape selected from the design work is:

    • Decorator registry: remove_endpoint("orders/", from_version=3).
    • DRF router: router.remove("orders", "order-archive", from_version=3), scoped to one generated operation/action.
    • Removal is a tombstone keyed by logical endpoint and concrete version, not deletion of arbitrary URLPattern objects.
    • Earlier versions remain available; routes are absent from later URL resolution (404), and api_reverse() must fail for the removed version.
    • A later declaration can reintroduce the route only from a strictly higher source version.
    • The matrix distinguishes from an undeclared/missing route; strict snapshots can therefore catch accidental omissions separately.
    • 410 is not the default: it requires an explicit endpoint lifecycle contract and client migration policy. Version-wide lifecycle middleware remains separate.

    Research-informed constraints:

    • The Zalando RESTful API Guidelines emphasize backward-compatible additive evolution, consumer coordination for incompatible changes, and versioned contracts rather than silently changing a published contract.
    • oasdiff's current guidance treats the OpenAPI document as the consumer contract, distinguishes definite errors from uncertain warnings, and has recently improved nullability handling across oneOf/anyOf/allOf (v1.39.0). We will keep the tool pinned and evaluate that newer release in a separate controlled upgrade, not float to latest in CI.

    The PR is still draft while full CI runs. Remaining acceptance work includes explicit schema exclusion of removed operations, edge cases around reused route names/paths, and a clean regression run on the merged OpenAPI integration.

  6. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    The endpoint-removal implementation is in PR #44, currently draft and not merged.

    Latest head 7666fbba71545e3146428cac329106f8ca29f18d passed the complete PR gate, OpenAPI contract workflow, and both CodeQL languages:

    The executable OpenAPI consumer example checks the tombstoned action remains in V1, returns 404 in V2, and is absent from the V2 schema. The route matrix, reversal, import-order, and action-isolation regression tests are also included. PR #44 remains draft pending final review; no merge has been performed.

  7. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    The endpoint-removal/tombstone portion of this issue is now delivered in consolidated PR #58 and merged to main (a8b39343c478bb5a8afbe1de20d95a2b10630f37). This issue remains open for the distinct endpoint-level lifecycle metadata scope: per-endpoint deprecation/Sunset, precedence against version-wide lifecycle, OpenAPI representation, and response semantics. Continue as a separate parallel design track; do not duplicate the already-merged removal API or change its 404/reverse/tombstone contract without a new ADR and compatibility tests.

  8. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Parallel follow-up branch created from the integrated main: design/endpoint-level-lifecycle. This is a design-only track for the remaining endpoint-level lifecycle metadata scope. No runtime implementation should be added until an ADR settles metadata shape, precedence versus version-wide policy, per-route OpenAPI representation, and 404/410 semantics; then add acceptance tests and compatibility checks. The removal/tombstone API itself is already delivered in #58 and must not be duplicated.

  9. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    A design-only follow-up is now open as PR #59, based on current main. It separates endpoint-level deprecation/Sunset metadata from the already-merged tombstone/404 contract and version-wide lifecycle/410 behavior. It records stable operation identity, precedence constraints, HTTP/OpenAPI semantics, acceptance tests, and unresolved product decisions. No runtime implementation is proposed until the ADR is accepted and executable tests are agreed.

  10. mojtaba-arvin commented on Nov 18, 2026

    @mojtaba-arvin
    OwnerAuthor

    Endpoint lifecycle design decision update (2026-11-19): the companion Draft ADR in PR #59 now resolves the first-release product semantics: concrete-version scope; resolver/registry-derived operation identity (no path guessing); monotonic composition with version-wide retirement taking precedence; endpoint sunset is headers-only; OpenAPI emits standard deprecated: true without a vendor extension; route-matrix snapshots remain focused on route existence. The only remaining gate is code-level verification of the existing decorator/DRF canonical identities and schema extension points, followed by executable tests. This does not reopen or duplicate the merged tombstone/404 behavior.

  11. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Endpoint lifecycle research update (2026-11-19):

    • Confirmed against the exact pinned drf-spectacular 0.30.0 source used by the consumer fixture: SchemaGenerator.parse() calls modify_for_versioning() before AutoSchema.get_operation(). For NamespaceVersioning, the library resolves the version-adjusted path through Django and sets view.request.resolver_match. Our VersionedRouterVersioning subclasses NamespaceVersioning, so a resolver-backed schema mixin can see the real route, method, and ViewSet action.
    • The decorator/URLPathVersioning schema path does not populate resolver_match; its adapter must use logical endpoint metadata carried by the decorator and the schema view's version kwarg. Path/regex heuristics remain prohibited.
    • PR feat: add resolver-backed operation identity for endpoint lifecycle #67 is the first implementation slice: an immutable normalized operation record plus fail-closed resolver lookup for nested routes, route names, namespace/version consistency, and DRF method/action mapping. It remains Draft while its full CI and consumer tests are validated; it does not yet change middleware or OpenAPI output.
  12. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    PR #67's exact head 6a37e6fcfb3a5ab8ade36d2eb266596611ed71a0 now passes the complete PR gate (44428413061) and CodeQL (44428412923). The resolver-backed identity tests cover nested includes/path converters, URL-name mismatch, ambiguous route suffixes, namespace/version conflict, and DRF multi-method action mapping. It remains Draft; next implementation work is the decorator logical-identity adapter and the optional drf-spectacular AutoSchema integration, with middleware/header behavior still gated.

  13. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    PR #68's exact head 81e77047ae85762597c95031be48aabe566ee704 passed PR gate 44429926877 and CodeQL 44429926712. The declaration layer now has a strict UTC-normalized metadata model, concrete-version decorator declarations, DRF route/action/method declarations validated against the router action map, monotonic scope composition, and conflict/date validation. Next slice is middleware headers: earliest Deprecation/Sunset instants win across version-wide and endpoint scopes; version-wide past-sunset 410 remains authoritative; endpoint past-sunset stays headers-only.

  14. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Endpoint lifecycle implementation has now progressed through three independently reviewable Draft slices, all targeting main and intentionally not merged while the API surface remains under review:

    1. feat: add resolver-backed operation identity for endpoint lifecycle #67 — resolver-backed logical operation identity (ResolverMatch + method/action mapping); exact-head PR gate and CodeQL passed.
    2. feat: add endpoint lifecycle declaration registry and adapters #68 — normalized lifecycle declarations and decorator/DRF adapters; exact-head PR gate and CodeQL passed.
    3. feat: apply endpoint lifecycle metadata to HTTP responses #69 — endpoint Deprecation/Sunset response headers; exact-head commit 7774d5b17f91e3284570f4254f7ebf800274ccff passed PR gate 44433723210 and CodeQL 44433723198.

    The implementation preserves version-wide past-Sunset 410 Gone precedence and deliberately does not make endpoint-level past Sunset return 410. Real Django client tests cover concrete decorator versions, DRF list/create action isolation, past endpoint Sunset, version-wide precedence, and earliest-date composition.

    Next implementation gate: resolver-backed OpenAPI deprecated: true mapping for both VersionedRouter and decorator endpoints, using only supported drf-spectacular extension points. No path/operationId guessing. Keep all PRs Draft until the complete public contract and consumer proof are reviewed.

  15. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Endpoint lifecycle progress update: PR #70 adds the first optional drf-spectacular adapter for VersionedRouter/NamespaceVersioning. It resolves the exact operation through ResolverMatch + HTTP method/action and emits only standard OpenAPI deprecated: true; no path/operationId guessing or runtime dependency was added. The pinned 0.30.0 consumer scenario has passed on the initial PR gate run, including action and version isolation. The decorator/URLPathVersioning schema adapter remains explicitly outstanding. PR #70 is Draft pending the latest exact-head gate and CodeQL. Related implementation stack: #67, #68, #69, #70.

  16. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Endpoint lifecycle OpenAPI implementation update: PR #70 (VersionedRouter/NamespaceVersioning) and PR #71 (decorator endpoints/URLPathVersioning) now both pass their full PR gate and CodeQL on exact heads. PR #70 head 5d7ffe3dc3f0a97560a5b5ae865e3b1187059c40: gate 44436149712, CodeQL 44436149742. PR #71 head 11c4d8af1ace63691081b372ace94944b10ef8c7: gate 44437657372, CodeQL 44437657205. The consumer contract verifies action-scoped V1 deprecation for VersionedRouter and version-scoped V1 deprecation for @endpoint decorators, with no V2/sibling false positives. Both PRs remain Draft and unmerged as they are stacked on #67–#69; no branch-protection or merge gates were bypassed. Next: complete the lifecycle docs/consumer guidance, reconcile the ADR, and then handle the stacked PR sequence through the normal review/merge gates.

  17. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    ADR #59 has now been reconciled with the implemented contract: concrete-version declarations, earliest-date monotonic composition, version-wide 410 precedence, endpoint past-Sunset headers-only, and standard OpenAPI deprecated: true only when deprecated_at exists. The public API is adapter-specific over one normalized registry: set_endpoint_lifecycle() for decorator routes and VersionedRouter.set_lifecycle() for DRF routes. The canonical reference and executable consumer docs were updated in the stacked PR #71. Implementation remains Draft/unmerged (#67–#71); main is unchanged.

  18. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Final exact-head verification after the reference/consumer documentation updates: PR #71 head 9557a566c27b5295ba4d9bb3a58fc55e9932ac0e — PR gate 44438317304 Passed; CodeQL 44438317226 Passed. This includes the published-reference static-link check, executable OpenAPI consumer contract, package tests, Windows/macOS, Python 3.10/Django 4.2 and Python 3.15/Django 6.1 smoke, lint, build, and website artifacts. PR #70 also has its own exact-head gate and CodeQL passed. Both remain Draft and unmerged; no merge/readiness gate was bypassed.

  19. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Implementation progress (2026-11-19): the route-removal/tombstone half of this issue was integrated in PR #58 (merge commit a8b39343c478bb5a8afbe1de20d95a2b10630f37), and the endpoint-level lifecycle half is now merged in PR #71 (merge commit 1db0358c1600f97eaabb03c2436551c030dc93af). The delivered lifecycle contract is concrete-version scoped, resolves operation identity through Django's resolver/registry and DRF method/action map, emits Deprecation/Sunset headers, preserves version-wide 410 precedence, and maps deprecation to standard OpenAPI deprecated: true through optional drf-spectacular adapters. Exact-head PR gate and CodeQL passed for #71; mainline push CI also passed the full compatibility matrix, build, unit/integration tests, website verification and CodeQL. I am keeping this issue open until the post-merge acceptance audit covers reintroduction semantics, declaration ordering, multi-router namespace collisions and async endpoint-level middleware behavior; async coverage is now in PR #76.

  20. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Correction to the async follow-up reference: the original async test PR #76 passed its exact-head checks but was closed after main advanced with PR #75. The current, refreshed candidate is PR #77, based on the post-#75 mainline. It carries the same endpoint-level async middleware test and is running a fresh PR gate.

  21. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Post-merge acceptance progress — 2026-11-19

    • PR test: cover endpoint lifecycle headers on async requests #77 merged to main as 3a19c39feee61a6baef0a32ecb1a1c22d863a3de. It adds real Django AsyncClient coverage for endpoint-level Deprecation headers through the async middleware path; exact-head PR gate 44443302307 passed.
    • PR test: cover lifecycle declaration ordering and reintroduction #78 adds real integration tests for declaration-before/after-registration equivalence and remove/reintroduce lifecycle isolation. Unit/integration tests, tox/workflow consistency, package build, macOS smoke and lint have passed so far on exact head 6cb4c7737fbf14ca78eef67396c38c374070bd4a; Windows and Python 3.10/3.15 smoke jobs are still running.
    • The remaining acceptance items are multi-router/namespace collision behavior and a focused audit of action identity across duplicated route names. These require a distinct test-first investigation; no runtime behavior is being assumed or changed yet.

    The issue remains open until the remaining resolver/namespace acceptance cases are either proven by tests or explicitly constrained/documented.

  22. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Confirmed multi-router namespace collision on mainline: two VersionedRouter instances with identical internal route pattern (api/v2/orders/) but distinct outer Django namespaces (primary and secondary) silently share the global registry entry. The secondary registration replaces the first callback, so /primary/api/v2/orders/ executes the secondary ViewSet. Exact-head CI on exploratory PR #80 reproduced this on Linux and macOS: 363 tests passed, the new isolation test failed. This is a correctness/security boundary; the next change will make duplicate internal route keys across router instances fail closed with a clear VersioningError, rather than silently dispatching the wrong ViewSet. Distinct route patterns remain independently registerable. PR #80 remains Draft as the reproducer until the fix and regression contract are validated.

  23. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Additional post-merge acceptance results (2026-11-19): PR #81 merged as 26e0a9d after its exact-head gate passed all unit/integration tests, tox consistency, package build, website verification, Windows/macOS, Python 3.10/3.15 smoke and lint. It proves declaration-before/after-registration equivalence and v1→v2 tombstone→v3 reintroduction without stale lifecycle headers. The multi-router reproducer in #80 then confirmed silent cross-router dispatch (primary namespace ran the secondary ViewSet). PR #83 is the refreshed current-mainline fix candidate: it tags router-owned patterns, rejects identical internal route patterns across different router instances with VersioningError, documents the constraint, and adds regression coverage. Its PR gate and CodeQL are queued. This intentionally chooses fail-closed behavior; distinct internal route prefixes remain supported.

  24. mojtaba-arvin commented on Nov 19, 2026

    @mojtaba-arvin
    OwnerAuthor

    Acceptance audit — complete on main (2026-11-19)

    All acceptance criteria for explicit route removal and endpoint-level lifecycle have now been verified against the merged mainline:

    1. Version-scoped removal / earlier versions preserved: route-removal tests prove v1/v2 remain active while v3+ is tombstoned; the executable OpenAPI consumer proves the V1-only action remains available in V1 and is absent at V2.
    2. Action-specific removal: test_router_removal_is_action_specific removes only order-archive; list, detail, and availability remain routable in v3.
    3. Removed vs missing state: the route matrix emits the explicit <removed> marker; strict snapshot tests detect the state change and preserve it as a committed snapshot.
    4. Strict snapshots: verified by test_strict_snapshot_distinguishes_removed_from_missing.
    5. Deterministic reversal: removed-version api_reverse() raises NoReverseMatch; earlier and explicitly reintroduced versions reverse successfully.
    6. OpenAPI exclusion: examples/openapi_contract/verify.py generates and validates both versioned schemas; it asserts the removed legacy action is present in V1 and absent from V2. The same fixture verifies the active route behavior.
    7. Lifecycle semantics: real Django client tests cover Deprecation/Sunset headers, endpoint-level past-Sunset headers-only behavior, version-wide 410 precedence, earliest-date composition, async middleware, and OpenAPI deprecated: true.
    8. Declaration order and reintroduction: merged PR test: cover lifecycle declaration ordering and reintroduction #81 proves declaration-before/after-registration equivalence and v1 → removed v2 → explicitly reintroduced v3 behavior without stale lifecycle headers.
    9. Multi-router isolation boundary: the collision was reproduced in test: define namespace isolation for multiple versioned routers #80 and fixed in merged PR fix: reject duplicate route patterns across versioned routers #83. Distinct router-owned patterns remain usable; duplicate internal patterns across independent routers fail closed with VersioningError.

    Evidence:

    Closing this implementation issue. Any future change to tombstone semantics or lifecycle policy should be tracked as a new, narrowly scoped issue rather than reopening this completed delivery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions