Repository navigation
design: D165 transient object-store failures answer a retryable 503 - #693
Conversation
…ilableError (D165)
Define the D165 binding design for transient object-store failures without
re-enabling automatic boto retries:
- Specify transient vs. permanent S3/botocore failure taxonomy across all
14 network S3 calls and StreamingBody.read() in MinIOObjectStore,
preserving existing 409/412, 404/absence, 501/NotImplemented, and
permanent failure paths (including SSLError and before_write guards).
- Introduce port-level ObjectStoreUnavailableError with chained __cause__
and Rule-4-safe closed-allowlist metadata (operation, cause_type,
provider_code, status_code).
- Keep retries={total_max_attempts: 1} uniformly for writes and reads
with zero new config knobs.
- Map ObjectStoreUnavailableError to HTTP 503 with a retryable structured
error envelope logged once per D158 Rules 1 and 4, decode it in both
Python and TypeScript SDKs without auto-retrying writes, and mirror it
in in-process MCP.
- Add ObjectStoreUnavailableError to workers/base.py:_dependency_unavailable
for staggered dependency-outage backoff, document ingest retry safety,
and list same-PR D66 public doc updates and acceptance tests.
Co-Authored-By: Gemini 4 Neon <noreply@google.com>
Design review, round 1 (independent Claude reviewer; GPT-6.2 sol unavailable until 2026-12-02)VERDICT: CHANGES_REQUESTED What holds: the taxonomy per call (409/412, absence and Blocking
Non-blocking |
Revise the D165 design, decision log, error-reporting table, and TypeScript client contract to resolve all round-1 review findings: - Document post-commit 503 convergence (created=False on retry) for POST /ingest and qualify in-process ingest_stored post-commit _release_unretained behavior. - Pin ObjectStoreUnavailableError as a direct Exception subclass and export it from rememberstack.model only (not ports). - Rename status_code to provider_status_code across attributes, log extra, and the D158 boundary table. - Decode object_store_unavailable before /query/* and /readiness in both SDKs, gated on HTTP 503 with wire retryable. - Drop the invalid worker lease-expiry rationale in §3, document forget.py last_error and self-retrying sweeps in §5, expand §8.1 adapter tests (single-call writes, replace_stream abort, storage_class_of, remove_empty_folder_markers), and fix the stale http_api.py:1289 line reference to :1324. Co-Authored-By: Gemini 4 Neon <noreply@google.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VYytLf2PUQ2RVpEZYENzsq
Design review, round 2 (independent Claude reviewer): APPROVEAll 9 round-1 findings are resolved:
The non-blocking nit ( |
Why
On 2026-11-28 08:30:30 UTC (release v0.22.6), one ingest of an unchanged document during a repository sync answered
HTTP 500 on remember.dev:
api_unhandled_exception, type botocoreClientError, from E0ingest_observed→ selfhostMinIOObjectStore.write_bytes.ObjectAlreadyExistsError, so the failure was a different, transient provider error.retries={"total_max_attempts": 1}, a8e0417), so that awrite is never re-issued after losing the P3 lock. As a result, one throttle, 5xx or timeout becomes an unhandled 500
that clients cannot tell from a bug.
retryablefrom/query/*and/readinesserrors.What D165 decides (design only)
RequestTimeout, connect/read timeouts, closed connections and stream errors;NotImplemented.ObjectStoreUnavailableErrorthat keeps the provider cause chained and never echoes provider text(D158 Rule 4).
{"detail": {"code": "object_store_unavailable", "message", "retryable": true}}, logged once perD158. Both SDKs decode it on every route, and MCP maps it to a retryable tool error. SDKs still never auto-replay writes.
created conditionally.
The client side, a bounded brain-sync retry, is writeitai/ultimate-memory-cloud#1238.
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