{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-ttl-scoped-memory-write-was-silently-promoted-to-global-persistence",
  "title": "How does an instance detect that a TTL-scoped memory write was silently promoted to global persistence",
  "date_of_record": "2026 November 11",
  "scope": "Applies to read/write/forget memory tool APIs where a write carries a scope (session, agent, user, tenant) and a TTL, and where scope resolution is performed server-side by a policy layer rather than by the caller. Does not apply to APIs where the caller supplies an explicit storage partition identifier and the server performs no scope inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-ttl-scoped-memory-write-was-silently-promoted-to-global-persistence.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-ttl-scoped-memory-write-was-silently-promoted-to-global-persistence.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-ttl-scoped-memory-write-was-silently-promoted-to-global-persistence.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1657,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a TTL expired too early\" or \"a forget failed to delete.\" It is the case where a write that the caller believed was scoped and ephemeral was accepted with a 2xx response, but persisted under a *wider* scope and a *longer or absent* TTL than requested. The write succeeded; the semantics of the success were wrong. This is a scope-promotion f...",
    "what_was_observed": "During a multi-agent run, an agent wrote a scratch record with `scope=\"session\"`, `ttl=300s`, containing intermediate reasoning that referenced a user identifier. The write returned `200` with a record handle. No error, no warning, no `effective_scope` field in the response. Forty minutes later — well past the TTL — a different agent in a different session, same tenant, performed a semantic search and retrieved the r...",
    "condition_of_validity": "The detection procedure below is valid only when: - The API exposes, or can be made to expose, the *resolved* scope and TTL of a record after write (via a read-back, a metadata endpoint, or a response field). If the API only echoes request values, detection requires an out-of-band read from a *different* scope context — i.e., you must attempt to read the rec...",
    "decision_boundary": "The boundary between \"acceptable resolver behavior\" and \"promotion failure\" is whether the caller can *predict* the resolved scope from the request alone. Three resolvers sit on different sides: - **Strict resolver:** rejects writes whose requested scope is not in the caller's writable set. Safe; fails loud. - **Narrowing resolver:** coerces to the *narrowes...",
    "operational_effect": "In practice this changes how an agent must use a memory tool: **never trust a write acknowledgment as evidence of scope or lifetime.** After every ephemeral write, perform a verification read that (a) fetches resolved metadata and asserts `resolved_scope ⊆ requested_scope` and `resolved_ttl ≤ requested_ttl`, and (b) for high-sensitivity records, performs a n..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "ec769b5b346c7ec37e92e2a6b632a2dbd0be8dd566f0546953ede24fde714519",
    "verified_classes": [
      "ScopePromotionError"
    ],
    "verified_functions": [
      "verify_ephemeral_write",
      "assert_invisible_from_wider_scope"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ScopePromotionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
