Skip to content

[codex] Move OGM backend changes into parent app#203

Draft
ewlarson wants to merge 2 commits intodevelopfrom
codex/migrate-ogm-api-backend-changes
Draft

[codex] Move OGM backend changes into parent app#203
ewlarson wants to merge 2 commits intodevelopfrom
codex/migrate-ogm-api-backend-changes

Conversation

@ewlarson
Copy link
Copy Markdown
Contributor

@ewlarson ewlarson commented May 7, 2026

Summary

This draft PR moves the backend changes that were accidentally made in the child ogm-api repo into the parent geobtaa/api backend app.

It includes:

  • durable-first thumbnail cache priming behavior
  • public OGM repository dashboard at /api/v1/ogm/repos/dashboard
  • richer public OGM repo summary fields for GitHub metadata, harvest freshness, and API availability counts
  • nightly OGM repo discovery + harvest trigger script
  • GitHub Actions workflow to run the nightly sync on production over SSH
  • scheduled nightly watch-mode defaults while retaining existing weekly, webhook, both, and manual support
  • separate throttling bucket for analytics event ingestion and CORS preflight bypass behavior
  • docs and tests for the migrated OGM/rate-limit behavior

Notes

The Nominatim implementation from the child repo was already present in geobtaa/api, so this PR does not copy that service over. I also avoided wholesale file replacement where the parent app had newer local changes.

Validation

Passed locally from the parent checkout:

DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/testdb \
DB_HOST=localhost \
DB_PORT=5432 \
TEST_DB_NAME=testdb \
python -m pytest \
  tests/middleware/test_rate_limit_middleware.py \
  tests/middleware/test_rate_limit_integration.py \
  tests/tasks/test_ogm_harvest_tasks.py \
  tests/api/v1/test_ogm_public_endpoints.py

Result: 36 passed in 0.79s.

Also passed:

git diff --check
python -m compileall backend/app/api/v1/endpoint_modules/ogm.py backend/app/middleware/rate_limit_middleware.py backend/app/services/ogm_harvest/repository.py backend/app/tasks/ogm_harvest.py backend/scripts/populate_ogm_repos.py backend/scripts/trigger_ogm_nightly_sync.py

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