refactor: remove target projection cache#25
Merged
dutifulbob merged 2 commits intomainfrom Apr 25, 2026
Merged
Conversation
Member
Author
|
Final implementation-loop report:
Ready to merge and deploy. |
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.
Summary
prtagsno longer needs its own PR and issue metadata cache.This change removes the
target_projectionstable and thetarget_projection_refreshworker path, then reads PR and issue summaries directly from the sharedghreplicamirror tables.That makes group metadata, search hydration, annotation filtering, and GitHub comment sync use one source of truth for GitHub object metadata.
It also updates the docs and tests so the repo describes the new shared-database architecture instead of the old projection-cache design.
What Changed
The runtime now asks the
ghreplicamirror reader for batched PR and issue summaries when metadata is needed.The local
prtagsdatabase keeps curation state and derived search/comment state, but not duplicate PR/issue display rows.ghreplicaclient.TargetProjection, projection freshness responses, and all target projection refresh River workers and queue methods.000005_drop_target_projectionsto delete stale projection jobs/queues and droptarget_projectionssafely.Testing
I ran the local CI-shaped checks before opening this PR.
The release validation used
go runbecausegoreleaserwas not installed as a local binary.npx --yes @simpledoc/simpledoc@0.1.6 checkgo vet ./...go test ./..../scripts/check-go-coverage.shgolangci-lint run --timeout=5mgo run github.com/goreleaser/goreleaser/v2@latest checkgo run github.com/goreleaser/goreleaser/v2@latest release --snapshot --clean --skip=publishRisks
The main risk is the schema cutover because the production table is dropped.
The migration deletes stale projection jobs first, and the new binary has no runtime references to the dropped table.
prtagsprocess as one unit so old code cannot run after the table is dropped.ghreplicaschema being available for metadata-bearing reads.