CourseModel Context Protocol · Module 9: Production and Ecosystem · part 67 of 83
Part 67 · Module 9: Production and Ecosystem

Topic 10: Module 9 milestone and interview questions

8 min read·22 Sept 2026

Project Milestone

The canonical notes_assistant/ package is unchanged by this module; production concerns live beside it. Your working copy now contains:

text
notes-assistant/
  notes_assistant/                 unchanged: store, server, host, auth, pinning, config, llm
  examples/
    m09_app.py                     create_app(): one replica (health, replica id, shared key,
                                   rate limit, tool deadline, redacted logs, graceful shutdown)
    m09_bulk_import.py             import_notes tool: confirmation, progress, idempotency key, checkpoints
    m09_ratelimit.py               token bucket ASGI middleware (setup and replies exempt)
    m09_redact.py                  RedactingFilter for all log handlers
    m09_balancer.py                round-robin proxy with optional sticky sessions
    m09_fleet.py                   start and stop replicas plus balancer for demos
    m09_tracing.py                 one trace across host, server, and a downstream API
    m09_versioning.py              tool contract classifier and deprecated alias
    m09_registry_check.py          server.json validation
    m09_loadtest.py                200 calls at concurrency 10, 1 versus 2 replicas
    m09_lab.py                     the Module Lab
    m09_wire.sh, m09_eras.py, m09_replicas.py, m09_mrtr_replicas.py, m09_import_client.py,
    m09_ratelimit_demo.py, m09_ratelimit_pitfall.py, m09_deadline_demo.py,
    m09_shutdown_demo.py, m09_cancel_demo.py, m09_redact_demo.py
    data/m09_import_batch.json     six literature notes to import
  registry/
    server.json                    registry metadata for io.github.nare-lab/notes-assistant
    server.schema.2025-12-11.json  the registry's schema, for offline validation
    bad-server.json                a deliberately broken example
  tests/
    test_redaction.py, test_ratelimit.py, test_bulk_import.py   (15 tests, all passing)

Code explained

  • In simple words: a map of what you built in this module and where it sits next to the untouched core.
  • What happens: everything production-specific wraps build_server from the outside, so Module 11 can adopt it piece by piece: create_app for HTTP deployments, the redacting filter for every entry point, and the checklist and server.json for publishing.
  • Comes out: python -m pytest -q tests reports 15 passed, and python examples/m09_lab.py prints the lab output above.

Three things are worth carrying into the capstone: give build_server a version and a request_state_security parameter instead of patching them from outside, install the redacting filter in main(), and keep import_notes behind the host's approval gate (its annotations already mark it as not read-only).

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.