Notechondria

Version: 0.1.30 Build Date: 2026-04-18T08:00

What's Changed

§1.7 migration: Backend.Mcp.Protocol round

Every user-facing error path in backend/mcp/views.py and backend/mcp/protocol.py now emits the canonical "<consequence>: <module>/<process> \u2014 <cause>" shape documented in docs/AGENTS.md.

Migrated surfaces:

  • Backend.Mcp.Protocol/authenticate \u2014 missing/invalid API key on POST /mcp/.
  • Backend.Mcp.Protocol/parse \u2014 wrong Content-Type, malformed JSON, non-object body, missing/invalid jsonrpc field.
  • Backend.Mcp.Protocol/sse_get \u2014 405 for GET (SSE unimplemented).
  • Backend.Mcp.Protocol/session.delete \u2014 200 acknowledgement for DELETE.
  • Backend.Mcp.Protocol/tools.call \u2014 unknown tool name.
  • Backend.Mcp.Protocol/tools.call.<tool_name> \u2014 tool handler raised an exception; detail now names the failing tool + exception class.
  • Backend.Mcp.Protocol/dispatch \u2014 unknown method on the JSON-RPC envelope.

§1.7 migration: Backend.Gptutils round

  • Backend.Gptutils/chat.generate \u2014 _AI_DISABLED_MESSAGE pointer used by the deferred AI microservice stubs (get_openai_client / generate_message / generate_stream_message) in backend/gptutils/gpt_request_parser.py.
  • Backend.Gptutils/resize_validate \u2014 image-crop size mismatch raise in backend/gptutils/forms.py::ResizedImageValidator.validate.
  • Backend.Gptutils/validate_user_name \u2014 duplicate-username raise in backend/gptutils/forms.py::validate_user_name.

§1.7 migration: Backend.Creators.forms round

Legacy Django form-based registration UI shares the same shape as the DRF path migrated in 0.1.29:

  • Backend.Creators.Auth/register.validate_repassword \u2014 RepassValidator.validate.
  • Backend.Creators.Settings/avatar.validate \u2014 ResizedImageValidator.validate in backend/creators/forms.py.
  • Backend.Creators.Auth/register.validate_user_name \u2014 validate_user_name helper.
  • Backend.Creators.Auth/register.validate_registration_code \u2014 invitation/registration code helper.

Files Changed

New

  • docs/versions/0.1.30.md (this file).

Modified

  • VERSION: 0.1.29 \u2192 0.1.30.
  • docs/TODO.md: \u00a71.7 migration checklist marks Backend.Mcp.*, Backend.Gptutils, and Backend.Creators.forms rounds done.
  • backend/mcp/views.py: 4 _json_error and 2 JsonResponse({"detail": ...}) branches rewritten; 3 protocol._error_response calls gained \u00a71.7-shaped messages.
  • backend/mcp/protocol.py: tools/call unknown-tool and handler-error branches rewritten; trailing METHOD_NOT_FOUND dispatch fall-through rewritten.
  • backend/gptutils/forms.py: 2 ValidationError raises rewritten.
  • backend/gptutils/gpt_request_parser.py: _AI_DISABLED_MESSAGE pointer rewritten.
  • backend/creators/forms.py: 4 ValidationError raises rewritten.

Verification

  • DJANGO_SETTINGS_MODULE=notechondria.settings_test python manage.py test creators notes mcp gptutils -v 1 \u2014 122 tests pass.
  • No test in these modules asserts substring matches on error message text, so rewrites are safe. The bind sentinel in creators.tests.OAuthBindRejectionTests remains untouched (covered by the 0.1.26 migration, still satisfied).

Notes / follow-ups

  • Frontend \u00a71.7 rounds still open:
    • Editor.Sync.*, Editor.LocalStore, Editor.UI cosmetic rounds \u2014 the high-volume "Opened category X" / "Saved locally" / sync-failure info logs.
    • Planner.Sync.*, Planner.UI, Portal.Sync.*, Portal.UI \u2014 same shape for planner and portal.
    • Shared.AuthDialog \u2014 auth-dialog error surfaces in frontend/notechondria_shared/lib/src/components/auth_dialogs.dart.
  • Backend \u00a71.7 migration is now complete across every Django app that the frontend talks to (creators, notes, mcp, gptutils).