---
title: Change checklist
summary: Pre-merge engineering checklist for Catalog API, schema, caching, search, and integration contract changes.
version: 1.0.0
type: engineering
order: 2
badges:
  - content: Architecture
    backgroundColor: green
    textColor: green
---

## Purpose & Scope

This checklist defines the mandatory verification steps for engineers modifying [[service|catalog-api]] or [[service|catalog-ingestion]] within the [[domain|catalog]] subdomain. Use it before merging changes to HTTP v1 endpoints, gRPC contracts, [[container|catalog-database]] schemas, [[container|catalog-cache]] keys, [[container|catalog-vector]] indexing, or Kafka integration events.

## Core Invariants & Design Rules

- **Backward-compatible contract evolution:** Keep REST (`/api/v1/{books,authors,categories,publishers}`), gRPC (`book.v1.BookGrpcService`), and CloudEvents schemas additive; version breaking changes explicitly under `ApiVersions` or a new protobuf package version.
- **Authorization & rate-limit boundaries:** Preserve Microsoft Entra ID policies (`catalog_read` default, `business_user` for catalog mutations, `admin` for dashboard and privileged routes) and endpoint rate-limiting middleware.
- **End-to-end traceability:** Keep book-identity, pricing, and availability mutations traceable by `BookId` in OpenTelemetry traces and structured logs.
- **No direct cross-domain writes:** Never allow external services to write to [[container|catalog-database]], and never bypass [[service|catalog-api]] when mutating catalog state.

:::note
Checked-in OpenAPI and SQL schema documentation assets in the catalog are not auto-regenerated by CI. Update them in the same pull request whenever HTTP contracts or [[container|catalog-database]] tables change.
:::

## Boundaries & Guarantees

| Concern         | Strategy & Guarantee                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Failure / Edge-Case Behavior                                                                                                                                                                                           | Related Resources                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Persistence** | EF Core migrations for <ResourceLink id="catalog-database" type="container">catalog-database</ResourceLink> must use `snake_case` identifiers and preserve database triggers feeding the pending vector-update queue.                                                                                                                                                                                                                                                                                                                | Missing triggers or mismatched column names silently drop book edits from <ResourceLink id="catalog-vector" type="container">catalog-vector</ResourceLink> indexing.                                                   | <ResourceLink id="catalog-database" type="container">catalog-database</ResourceLink>, <ResourceLink id="book" type="entity">book</ResourceLink>, <ResourceLink id="author" type="entity">author</ResourceLink>, <ResourceLink id="category" type="entity">category</ResourceLink>, <ResourceLink id="publisher" type="entity">publisher</ResourceLink>                                                                                                                                                                               |
| **Caching**     | Book mutations must invalidate `book:{id}`, `book:summary:{id}`, `books:list`, and `books:search` in <ResourceLink id="catalog-cache" type="container">catalog-cache</ResourceLink>; DTO shape changes require bumping the `v1` key version.                                                                                                                                                                                                                                                                                         | Failing to bump versioned keys causes deserialization errors or stale shapes across rolling deployments.                                                                                                               | <ResourceLink id="catalog-cache" type="container">catalog-cache</ResourceLink>, <ResourceLink id="adr-004-fusioncache-redis-for-catalog-reads" type="adr">adr-004-fusioncache-redis-for-catalog-reads</ResourceLink>                                                                                                                                                                                                                                                                                                                 |
| **Messaging**   | Integration events (<ResourceLink id="FeedbackCreatedIntegrationEvent" type="event">FeedbackCreatedIntegrationEvent</ResourceLink>, <ResourceLink id="FeedbackDeletedIntegrationEvent" type="event">FeedbackDeletedIntegrationEvent</ResourceLink>, <ResourceLink id="BookUpdatedRatingFailedIntegrationEvent" type="event">BookUpdatedRatingFailedIntegrationEvent</ResourceLink>, <ResourceLink id="ProcessVectorBatchIntegrationEvent" type="event">ProcessVectorBatchIntegrationEvent</ResourceLink>) must remain Pact-verified. | Breaking schema changes fail consumer-driven contract tests or route payloads to <ResourceLink id="bookworm.{env}.catalog.dead-letter-queue" type="channel">`bookworm.{env}.catalog.dead-letter-queue`</ResourceLink>. | <ResourceLink id="bookworm.{env}.rating.feedback-create" type="channel">`bookworm.{env}.rating.feedback-create`</ResourceLink>, <ResourceLink id="bookworm.{env}.rating.feedback-delete" type="channel">`bookworm.{env}.rating.feedback-delete`</ResourceLink>, <ResourceLink id="bookworm.{env}.catalog.book-update-rating-failed" type="channel">`bookworm.{env}.catalog.book-update-rating-failed`</ResourceLink>, <ResourceLink id="scheduler.process-vector-batch" type="channel">scheduler.process-vector-batch</ResourceLink> |
| **Concurrency** | Preserve discount price bounds (`0 <= DiscountPrice <= OriginalPrice`), `DeleteBehavior.Restrict` on authors with books, and `24h` Redis idempotency on rating event handlers.                                                                                                                                                                                                                                                                                                                                                       | Removing idempotency guards allows duplicate Kafka deliveries to double-count `average_rating` and `total_reviews`.                                                                                                    | <ResourceLink id="catalog-api" type="service">catalog-api</ResourceLink>, <ResourceLink id="catalog-ingestion" type="service">catalog-ingestion</ResourceLink>, <ResourceLink id="adr-006-reviews-rating-projection-on-book" type="adr">adr-006-reviews-rating-projection-on-book</ResourceLink>                                                                                                                                                                                                                                     |

## Safe Change & Verification Checklist

<Steps title="Pre-merge verification workflow">
	<Step title="Verify HTTP, gRPC, and Kafka contract compatibility">
		Confirm additive compatibility across REST endpoints, `book.v1.BookGrpcService` (consumed by
		[[service|basket-api]], [[service|order-api]], and [[service|mcp-server]]), and all Pact
		contract suites with [[service|rating-api]] and [[service|scheduler-service]].
	</Step>
	<Step title="Validate PostgreSQL migrations and vector triggers">
		Ensure any [[container|catalog-database]] migration preserves `snake_case` naming, updates
		pending-update triggers if searchable attributes changed, and plans a
		[[container|catalog-vector]] rebuild when indexed text changes.
	</Step>
	<Step title="Audit cache keys, tags, and authorization policies">
		Confirm write paths invalidate affected [[container|catalog-cache]] keys/tags, DTO changes bump
		key versions, and Entra ID policies (`catalog_read`, `business_user`, `admin`) remain enforced.
	</Step>
	<Step title="Run formatting, build, and test suites">
		Execute `mise run format`, `mise run build`, and `mise run test` to verify Catalog unit tests,
		architecture tests, and Pact contract tests pass with zero warnings.
	</Step>
</Steps>

## Related Resources

- [[service|catalog-api]] — Authoritative catalog REST/gRPC API
- [[service|catalog-ingestion]] — Scheduled vector indexing worker
- [[flow|product-ingestion]] — Vector indexing and advisory-lock pipeline
- [[query|GetBook]], [[query|GetBooksGrpc]], [[query|GetBookDetailsGrpc]], [[query|ListBooks]] — Key read and gRPC contracts
- [[doc|platform/006-api-and-contracts]] — Consolidated HTTP, gRPC, and Kafka contracts
