You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from PR #309 after merge. Public contract: #318.
Context
PR #309 added runtime usage quota gate and metering support. A post-merge review against #318 found two remaining contract/behavior gaps that should be handled explicitly.
Follow-ups
Terminal 404 handling after success
#318 says reservation_not_found / reservation_not_committed should become terminal reconciliation once the mem9 operation already succeeded and there is no valid local commit-pending state. Current code maps quota finalization 404 through UnavailableError, and metering 404 through retryable delivery failure, which can leave rows retrying forever.
Expected direction:
distinguish runtime usage 404 responses from transient availability errors
mark post-success commit 404 as terminal/manual-reconciliation
mark metering 404 as terminal when there is no explicit local commit-pending state for the same operation
Async 202 Accepted durability boundary
Async message ingest and async content create reserve before returning 202, then finalize in an in-process goroutine. If the process exits after 202 and before finalization, the accepted operation has no durable pre-success state to commit, release, or reconcile.
Expected direction:
either document this release as best-effort with reservation TTL fallback and a product follow-up
or add durable pre-success state / durable async queue before returning 202
Bounded post-success context for async success finalization
The async success paths still call AfterMemoryCreateSuccess(context.Background(), ...). If async 202 paths remain in this implementation, use the same detached bounded post-success context helper used by sync paths.
Acceptance criteria
Runtime usage 404 responses after successful mem9 work no longer retry forever.
Follow-up from PR #309 after merge. Public contract: #318.
Context
PR #309 added runtime usage quota gate and metering support. A post-merge review against #318 found two remaining contract/behavior gaps that should be handled explicitly.
Follow-ups
#318 says
reservation_not_found/reservation_not_committedshould become terminal reconciliation once the mem9 operation already succeeded and there is no valid local commit-pending state. Current code maps quota finalization 404 throughUnavailableError, and metering 404 through retryable delivery failure, which can leave rows retrying forever.Expected direction:
202 Accepteddurability boundaryAsync message ingest and async content create reserve before returning
202, then finalize in an in-process goroutine. If the process exits after202and before finalization, the accepted operation has no durable pre-success state to commit, release, or reconcile.Expected direction:
202The async success paths still call
AfterMemoryCreateSuccess(context.Background(), ...). If async202paths remain in this implementation, use the same detached bounded post-success context helper used by sync paths.Acceptance criteria
202runtime usage durability is either implemented or explicitly documented as product scope.