Repository navigation
feat(object-store): D165 transient object-store failures answer a retryable 503 - #695
Merged
Merged
Conversation
…ailableError (D165) Define ObjectStoreUnavailableError as a direct Exception subclass in rememberstack.model.object_store (re-exported from rememberstack.model only) with a fixed Rule-4-safe message and closed-allowlist diagnostic attributes. Map transient S3 ClientErrors and botocore transport/stream failures across all MinIOObjectStore network calls and StreamingBody.read() sites while keeping retries disabled (total_max_attempts=1) and all semantic/permanent paths unchanged. Co-Authored-By: Gemini 4 Neon <noreply@google.com>
…P, MCP, and workers (D165) - Register HTTP 503 handler on FastAPI app answering retryable object_store_unavailable with one Rule-4-safe D158 ERROR record. - Map ObjectStoreUnavailableError in in-process MCP write/archive backends with the same single D158 ERROR log record and retryable ToolError. - Add ObjectStoreUnavailableError to workers._dependency_unavailable so WorkLedger.fail applies staggered dependency-outage backoff. - Add HTTP, MCP, worker, and WorkLedger acceptance tests and refresh the storage-capture source-digest fixture. Co-Authored-By: Gemini 4 Neon <noreply@google.com>
…pt clients (D165) Decode HTTP 503 object_store_unavailable before /query/* and /readiness branches in both SDKs, taking retryable from the wire boolean, rejecting non-503 statuses, and preserving no-auto-retry on writes. Add SDK unit, HTTP, and Python-TypeScript parity tests and regenerate client metadata. Co-Authored-By: Gemini 4 Neon <noreply@google.com>
…elds (D165) Update the six docs pages specified in D165 §7 (errors, HTTP API, ingest, Python SDK, TypeScript SDK, observability) and regenerate llms-full.txt. Co-Authored-By: Gemini 4 Neon <noreply@google.com>
Member
Author
Implementation review, round 1 (independent Claude reviewer; head e5d1bb7): APPROVEThe code matches D165:
Non-blocking findings, addressed before merge:
|
- Strengthen test_before_write_guard_failure_propagates_unchanged to raise translator-wrappable errors (SlowDown/503, EndpointConnectionError), assert identity, and cover single-part, multipart (create, upload_part, complete), abort_uploads, remove_empty_folder_markers, and purge_objects paths. - Add real UploadIngestor E0 retry tests for post-write and post-commit purge_objects ObjectStoreUnavailableError with zero duplicate rows. - Mark D165 accepted; implemented in decisions.md and the design header. - Clarify observability/page.mdx:82 for unexpected MCP tool failures (internal_error) and regenerate website/public/llms-full.txt. - Make _object_store_unavailable(*, error=...) keyword-only in mcp.py. - Drop the unreachable SSLError guard in _translate_transient_errors and document concrete subclass exclusion on _TRANSIENT_BOTOCORE_ERRORS. - Regenerate src/tests/fixtures/storage_capture/live_corpus_profile.json. Co-Authored-By: Gemini 4 Neon <noreply@google.com>
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.
Implements the accepted D165 design (#693,
plan/designs/object_store_unavailable_design.md).Why
On 2026-11-28 08:30 UTC, one ingest of an unchanged document answered HTTP 500 on remember.dev, from a botocore
ClientErrorin the raw-original write. The S3 client deliberately makes one attempt per request, so a transientobject-store failure surfaced as an unhandled 500 that clients could not tell from a bug. The SDKs did not decode
retryableon/ingest.What changes
adapters/selfhost/minio.py): transient provider failures are classified per call and raised asObjectStoreUnavailableError. These are HTTP 5xx, throttling,RequestTimeout, connect/read timeouts, closedconnections and stream errors. The error is a direct
Exceptionsubclass exported fromrememberstack.modeland keeps theprovider cause chained. Existing-key, absence and
NotImplementedhandling is unchanged. Automatic boto retries stay off.{"detail": {"code": "object_store_unavailable", "message", "retryable": true}}and logs once at ERRORunder D158, without provider text.
retryabletaken from the wire. They stillnever replay writes automatically.
Nothing touches retrieval, extraction or identity.
Tests
The design's §8 tests:
and the base class and export boundary;
backoff.
Local results (Antigravity run):
docs-truth (public and cloud) and the llms check all pass.
The PostgreSQL and MinIO integration tests run in CI.
Process
then.
Contributor agreement
Signing on behalf of a legal entity (leave blank if accepting individually):
🤖 Generated with Claude Code
https://claude.ai/code/session_01VYytLf2PUQ2RVpEZYENzsq