Skip to content

Drop the pre-v0.18.0 legacy_router; rename schema/ package #1116

Closed

Description

@phernandez

Closes out the two decisions deferred from #1107 (2026-07 architecture review). Both are now decided: drop the legacy router, rename schema/ — leaving schemas/, index/, and indexing/ alone.

1. Drop the legacy_router

api/app.py:147-151 registers three explicit routes for CLI v0.18.0 and earlier — GET/POST /projects/projects and POST /projects/config/sync — added as explicit routes because a router mount's 307 redirect breaks the proxy. Decision: drop pre-v0.18.0 CLI compat.

  • Delete the legacy_router registration in api/app.py
  • Delete its three tests (tests/api/v2/test_project_router.py:638-693)
  • Note the compat drop in the next release's changelog (pre-v0.18.0 CLIs must upgrade)

Out of scope: the separate /proxy/projects mount at api/app.py:143 (web-app proxy compat) — different consumer, decide separately.

2. Rename schema/ (Picoschema engine)

schema/ (typed-note validation engine) vs schemas/ (Pydantic API DTOs) are indistinguishable by name, and schemas/schema.py exists inside the plural package. Rename cost measured on #1107: schema/ has only 11 external import sites (api/v2/routers/schema_router.py + 10 files under tests/schema/ and test-int/test_schema/), vs 163 for schemas/.

  • Rename src/basic_memory/schema/ → picoschema/ (or agreed name — it implements Picoschema parsing/validation/inference/diff)
  • Update the 11 external import sites + rename tests/schema/, test-int/test_schema/ directories
  • Update ARCHITECTURE.md/AGENTS.md references

Sequencing: land before #1108 (god-file splits) so imports only move once.

Activity

  1. added
    arch-review
    on Jul 20, 2026
  2. claude commented on Jul 20, 2026

    @claude
    Contributor

    Claude finished @phernandez's task in 1m 19s —— View job


    Triage complete

    • Read issue and repo context
    • Classify type/priority/component/complexity
    • Check for duplicate issues
    • Apply labels
    • Post triage summary

    Type: Enhancement (technical debt / architecture cleanup — labeled enhancement; repo has no separate refactor/chore label). Already carries arch-review.

    Priority: Medium. No user-facing breakage today; the legacy-router removal is an intentional, planned compat drop (pre-v0.18.0 CLIs), and the rename is pure internal reorganization. Sequencing matters (must land before #1108) but nothing is blocking or broken right now. (Repo has no priority:* label to attach — noting here instead.)

    Component: Spans api (app.py router registration) and core package layout (schema/ → proposed rename). Neither maps cleanly to the given component set (cli, mcp, database, cloud, docs, testing), so I left component unlabeled rather than force a poor fit.

    Complexity: Medium. Part 1 (drop legacy_router) is simple — delete ~5 lines in src/basic_memory/api/app.py:147-151 and 3 tests in tests/api/v2/test_project_router.py:638-693. Part 2 (rename schema/) is bounded but touches more surface: 11 external import sites (api/v2/routers/schema_router.py + tests/schema/, test-int/test_schema/), two test directory renames, and doc updates in ARCHITECTURE.md/AGENTS.md. (No complexity:* label exists in the repo to attach.)

    Verification against codebase: Confirmed both claims are accurate as of main:

    • src/basic_memory/api/app.py:143-151 shows the /proxy/projects mount (out of scope, correctly excluded) followed by the legacy_router registering the two v0.18.0-and-earlier routes described.
    • src/basic_memory/schema/ currently contains __init__.py, diff.py, inference.py, parser.py, resolver.py, validator.py — confirming the name collision with src/basic_memory/schemas/, which separately contains schema.py.

    Duplicate check: No duplicate or overlapping open issues found. This issue correctly closes out the two deferred decisions from #1107 (closed, 2026-07 architecture review) — it's a legitimate follow-up, not a duplicate.

    Labels applied: enhancement

    This is a well-specified, already-decided cleanup task with clear acceptance criteria and a checklist — no clarification or reproduction steps needed. Per triage scope, no implementation, branch, or commits were made.

  3. added
    enhancement
    on Jul 20, 2026
  4. added this to the v0.23 milestone on Aug 11, 2026
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

    arch-reviewenhancement

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions