refactor: phases 3-5 architectural refactoring (#84)#87
Merged
maxine-at-forecast merged 2 commits intodevelopfrom Apr 1, 2026
Conversation
Phase 3 — Internal delegation + AppView + temporal coupling: - Move insert_dataset/write_samples logic from Index to Repository - Extract with_appview_fallback() helper to atmosphere/_appview.py - Switch _AtmosphereBackend to eager init, remove _ensure_loaders() Phase 4 — Provider fixes: - Fix Redis label resolution with created_at timestamp ordering - Fix Redis N+1 query in iter_entries using pipeline batch fetch - Add SQLite indexes for schema (name,version) and labels (name,created_at) Phase 5 — Atmosphere namespacing + cleanup: - Add RecordOps, BlobOps, XrpcClient namespace classes on Atmosphere - Switch all 18 DeprecationWarning sites to FutureWarning (visible by default) - Fix thread-safety of _atproto_client_class with double-checked locking - Split StubManager into SchemaStubManager/LensStubManager with _StubWriter base All 1735 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Implements Phases 3-5 of the architectural refactoring plan from #84:
Phase 3 — Internal Delegation + AppView + Temporal Coupling:
insert_dataset/write_sampleslogic fromIndextoRepository, making Index methods thin dispatcherswith_appview_fallback()helper toatmosphere/_appview.py, narrowingexcept Exceptionto specific httpx/AppView errors_AtmosphereBackendto eager initialization, removing temporal coupling from_ensure_loaders()Phase 4 — Provider Fixes:
created_attimestamp ordering (old labels without it sort last)iter_entriesusing pipeline batch fetch(name, version)and labels(name, created_at DESC)Phase 5 — Atmosphere Namespacing + Cleanup:
RecordOps,BlobOps,XrpcClientnamespace classes onAtmosphere(exposed as.records,.blobs,.xrpclazy properties)DeprecationWarningsites toFutureWarning(visible by default in user code)_atproto_client_classwith double-checked locking viathreading.LockStubManagerintoSchemaStubManager/LensStubManagerwith shared_StubWriterbase classTest plan
ruff check src/clean🤖 Generated with Claude Code