Skip to content

Use Pixeltable query routes directly - #4

Merged
pierrebrunelle merged 2 commits into
mainfrom
codex/pixeltable-query-routes
Sep 12, 2026
Merged

pierrebrunelle merged 2 commits into
mainfrom
codex/pixeltable-query-routes

Conversation

@pierrebrunelle

@pierrebrunelle pierrebrunelle commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Pixelbot carried two implementations of the same memory and persona reads: declarative @pxt.query functions plus a plain-Python queries.py layer used by legacy FastAPI endpoints. The duplicate layer could drift, and the frontend-facing query routes required a user_id parameter that the frontend did not send.

This change makes the app entry a clearer Pixeltable example:

  • declares endpoint-facing queries beside their FastAPIRouter routes in pixelbot/app.py
  • serves canonical GET/POST resources at /api/memory and /api/personas, with semantic search at /api/memory/search
  • keeps custom FastAPI handlers for validation-heavy writes and user-scoped deletes
  • removes queries.py, the versioned v2 reads, the duplicate manual-write alias, and the backend-only download endpoint
  • generates memory exports in the client from the canonical query result
  • removes ten unused frontend API wrappers and their orphaned types
  • reads notification results directly from Pixeltable, scopes both log sources to the local user, caps the request at 100 rows, and removes a duplicate tool-name list
  • updates developer guidance, tests, and the bundled SPA

Validation:

  • Ruff format/check and mypy pass
  • pytest: 13 passed
  • frontend lint and 5 contract tests pass
  • frontend production build passes; initial chunk remains 271.64 kB
  • wheel and sdist build; lock check passes
  • pxt schema check passes
  • a catalog created from merged main remains fully in agreement: 19/19 models, zero schema operations
  • a real pxt service update served health, canonical memory/persona reads, and the notification log; valid responses returned 200, removed v2 paths returned 404, and notification limits above 100 returned 422

No provider or hosted calls were made.

@pierrebrunelle
pierrebrunelle merged commit 4f92f85 into main Sep 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant