Repository navigation
feat(root): proxy source's MQTT resync for system admins - #454
Merged
Merged
Conversation
Replaces POST /reindex and POST /backfill, no-ops since search moved to PostgreSQL (PPT-2644), with: - POST /source/resync?clear= publishes every module's state and every model's metadata to the MQTT brokers again, after removing everything source publishes from them when `clear` is set. 202 once started, 409 while one is running. - GET /source/resync reports where the last one got to. Source's API is unauthenticated and internal, so these are how an admin reaches it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the deprecated
POST /reindexandPOST /backfill(no-ops since search moved to PostgreSQL, PPT-2644) with admin access to source's MQTT resync (PlaceOS/source#67):POST /api/engine/v2/source/resync?clear=publishes every module's state and every model's metadata to the MQTT brokers again, after removing everything source publishes from them whenclear=true. Use it when the brokers' retained state has drifted. It returns 202 once started, or 409 with the running one's status.GET /api/engine/v2/source/resyncreports where the last one got to (state,clear,started_at,finished_at,cleared,metadata,error).Both need a system admin (
check_admin). Source's API is internal and unauthenticated, so this is the way in.Heads up:
@placeos/ts-clientstill exportsreindexandbackfill, which will now 404. No PlaceOS frontend calls them.Testing
./testlocally. The Crystal compiler was SIGKILLed in Docker Desktop's 7.75 GiB, even with--threads 1. The spec type-checks (crystal build --no-codegen spec/controllers/root_spec.cr), so CI is the first real run.OPENAPI_DOC.ymlregenerated. The only changes are the two removed routes, the two new ones and theSourceResyncStatusschema.🤖 Generated with Claude Code