Skip to content

Add skeleton/hydration pattern for third-party dataset indexes#34

Merged
maxine-at-forecast merged 3 commits intodevelopfrom
feature/skeleton-hydration-getindexskeleton
Feb 26, 2026
Merged

Add skeleton/hydration pattern for third-party dataset indexes#34
maxine-at-forecast merged 3 commits intodevelopfrom
feature/skeleton-hydration-getindexskeleton

Conversation

@maxine-at-forecast
Copy link
Copy Markdown
Contributor

Summary

  • Add index_providers table and full CRUD support for science.alt.dataset.index records (schema, upsert, ingestion, delete)
  • Add getIndexSkeleton XRPC query that fetches URI stubs from an upstream index provider endpoint, following Bluesky's getFeedSkeleton pattern
  • Add getIndex XRPC query that fetches the skeleton then hydrates entries from the local DB, preserving skeleton ordering and silently omitting missing entries
  • Add listIndexes paginated query and publishIndex procedure with HTTPS URL validation
  • Fix row_to_label and row_to_lens missing did field (consistency bug across all serializers)
  • Add index_providers to query_active_publishers UNION, fix import ordering, add missing tests

Test plan

  • 18 new tests in test_index.py covering skeleton fetch, hydration, list, publish, and ingestion
  • 2 new row_to_index_provider serializer tests in test_models.py
  • Integration test expectations updated for index_providers table and indexes
  • All 163 tests pass, lint clean

🤖 Generated with Claude Code

maxinelevesque and others added 3 commits February 26, 2026 01:01
Implement index provider registration and the getIndexSkeleton/getIndex
query endpoints following Bluesky's feed generator pattern. Third parties
can register curated dataset index endpoints; the AppView fetches URI
skeletons from them and hydrates entries from the local database.

- Add index_providers table to schema.sql
- Add upsert/query functions in database.py with COLLECTION_TABLE_MAP entry
- Add row_to_index_provider serializer and response models in models.py
- Add getIndexSkeleton, getIndex, listIndexes query endpoints
- Add publishIndex procedure with HTTPS URL validation
- Route science.alt.dataset.index records through ingestion processor
- Add 18 tests covering happy paths, error cases, and ingestion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cal fixes

- Add did field to row_to_label and row_to_lens serializers for
  consistency with row_to_entry, row_to_schema, row_to_index_provider
- Add index_providers to query_active_publishers UNION query
- Fix import ordering in queries.py and procedures.py (PEP 8)
- Add row_to_index_provider unit tests to test_models.py
- Add index_providers table/indexes to integration test expectations
- Remove unnecessary mock patch from test_get_index_skeleton_invalid_uri

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ydration-getindexskeleton

# Conflicts:
#	src/atdata_app/ingestion/processor.py
#	src/atdata_app/xrpc/procedures.py
@maxine-at-forecast maxine-at-forecast merged commit 6b35a1f into develop Feb 26, 2026
9 checks passed
@maxine-at-forecast maxine-at-forecast deleted the feature/skeleton-hydration-getindexskeleton branch February 26, 2026 14:46
@maxine-at-forecast maxine-at-forecast linked an issue Feb 26, 2026 that may be closed by this pull request
4 tasks
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.

Skeleton/hydration for third-party dataset indexes (getIndexSkeleton)

2 participants