powermem icon indicating copy to clipboard operation
powermem copied to clipboard

docs(memory): publish a lifecycle coverage map (6 phases × 4 objectives) and state that forgetting is not erasure

Open AlexStocks opened this issue 1 month ago • 3 comments

Feature description

Publish a bilingual documentation page that maps PowerContext's Memory lifecycle across six phases (Write / Store / Retrieve / Execute / Share & Propagate / Forget & Rollback) and four objectives (Integrity / Confidentiality / Availability / Governance). All 24 phase/objective pairs must be visible.

The page is an index of specific capabilities, limitations, design references, and unresolved assessments. It introduces no API, runtime behavior, authorization policy, retention mechanism, or default change. It must distinguish implemented boundaries from proposed designs and unverified guarantees.

Problem and proposed solution

Problem: readers must compare several workflow pages, RFCs, and implementation paths to understand the boundary.

The relevant material includes RFC 1652 (memory quality and lifecycle), RFC 1396 and its follow-ups (access control), RFC 1770 (decision policy governance), RFC 1400 (Source model), and RFC 0050 (Review Inbox). A common index would help readers find the applicable contract and let future changes identify the exact capability they implement or assess.

Three concrete documentation needs motivate this work:

  1. Explain forgetting, restoration, and Source erasure together. The Atomic Memory guide already says that forgotten content and history remain available and that restoration is possible. Preserve that explanation and make the Source boundary explicit: PowerContext currently exposes no supported Source-level erase/purge API. Distinguish this from content restoration and the already implemented undo of Memory merge chains. Do not imply that forgetting erases data or that all rollback is absent.
  2. Expose unresolved ownership without assigning a fictitious owner. RFC 1652's "Compression and physical retention boundary" section defers physical compaction, legal retention, external erasure, and cross-artifact cleanup to #1425. That reference currently returns HTTP 404. Record the unresolved reference and missing verified owner; do not treat #1425 as a working tracking issue or silently substitute a loosely related issue.
  3. Separate implementation from design intent. RFC 1652 describes Source evidence declarations and a derived validity projection, including superseded filtering. These are distinct from the implemented Atomic Memory states (active, forgotten, merged, retired). #1975 tracks the Source declaration prerequisite. A design reference must not be presented as a current API, an implemented guarantee, or proof that all related decisions are final.

Status applies to a named capability, not a broad security objective

Each of the 24 cells must contain one or more bounded capability entries, or an explicit unassessed entry. Every entry states:

  • Claim: the specific behavior or guarantee being assessed, including its relevant surface and configuration.
  • Status: exactly one state from the legend below.
  • Evidence: a primary code/contract/RFC reference; add supporting references where needed to substantiate the claim.
  • Limits and follow-up: what the evidence does not establish, and any verified owning issue or explicitly missing owner.
Status Meaning and required evidence
covered The named capability is implemented on the stated surface and configuration. Cite the owning code path/symbol and relevant contract; an existing behavior test may support the claim. This does not certify the entire phase/objective cell.
designed A cited RFC section describes the named capability, but the implementation is absent. Preserve the RFC's actual proposal/acceptance status and unresolved questions; an RFC's existence alone does not mean every detail is approved. Link an existing implementation issue when verified.
out of scope A cited boundary decision deliberately excludes the named capability, and a resolvable owning issue identifies the deferred work. Verify the target and its relevance rather than relying on the issue number.
unassessed The assessment is incomplete or available evidence is insufficient for another status. State the concrete question, boundary, or missing ownership. A known exclusion with an unresolved owner stays visible here. Use not yet assessed in the evidence field when appropriate; no fabricated code pointer or new issue is required.

Do not assign a single aggregate covered badge to a cell containing different capabilities. For example, historical-content labelling can be implemented while host-specific enforcement and resistance to indirect prompt injection remain separate assessments. Likewise, resource access control and downstream redistribution policy are different claims.

Implementation baseline to assess

Baseline checked against master commit e192e08c39b098dd56b2de342c83ff6ae86ded23 on 2026-11-02. Revalidate relevant paths against the documentation PR's current base. These are six starting areas, not six completed security cells or an exhaustive assessment.

Phase Existing behavior and limits to preserve Primary evidence/seams
Write Ordinary explicit Atomic Memory writes do not require Candidate review; configured write authorization still applies. RFC 1652's L2 maintenance review is a separate proposed extension, not a gate on every ordinary write. Direct write does not mean the system has no authorization policy. src/powercontext/builtin/artifacts/atomic_memory/service.py; src/powercontext/builtin/runtime/artifact_merge.py (ArtifactMergeAccess.authorize); RFC 1652, "Normal Memory writes remain normal" and "Semantic maintenance is reviewed work".
Store Content revisions are immutable and current Family state is separate. Forgetting does not advance the content revision. Restoration/retirement operations can append revisions; do not generalize the forgetting rule to every lifecycle operation. Physical retention and compaction are separate questions. src/powercontext/builtin/artifacts/atomic_memory/models.py (AtomicMemory, AtomicMemoryState); docs/en/docs/workflows/atomic-memory.md, "Current state and forgetting" and "Merge and restore".
Retrieve Ordinary Atomic Memory search selects active memories. Search admission and RRF govern relevance, not trust or access authority. Configured authorization must be assessed through the Runtime access boundary. RFC 1652's additional validity projection is separate design work. If numerical lexical defaults are documented, include the short-query exception in fts_query_requirements; do not state an unconditional two-term requirement. src/powercontext/builtin/artifacts/atomic_memory/search.py; src/powercontext/builtin/artifacts/search.py (fts_query_requirements); src/powercontext/builtin/runtime/atomic_memory.py (AtomicMemoryAccess); RFC 1652, "Design invariants".
Execute Prepared text explicitly labels recalled material as untrusted historical data and gives current instructions, user requests, repository rules, and live validation precedence. Handoff resolution exposes trust="untrusted_history". These contracts do not by themselves prove that every host/model always complies or that prompt injection is fully prevented. Assess individual supported host paths separately if making a host-specific claim. src/powercontext/builtin/runtime/prepared_text.py (TRUST_POLICY, render_context_text); src/powercontext/builtin/artifacts/handoff/models.py (HandoffResolution); integrations/capabilities.toml and the relevant integration guide for host scope.
Share & Propagate SourceRef supplies identity rather than trust or ACL metadata. Configured Server access control expresses Principal/resource permissions, including Atomic Memory Artifact read grants; scope identity alone grants no access. These controls do not establish a content-specific purpose, redistribution, or downstream propagation policy. Assess such policies separately instead of describing access control as absent. src/powercontext/sources/models.py (SourceRef); src/powercontext/server/authz/profiles.py (ARTIFACT_FAMILY_PROFILES); src/powercontext/builtin/runtime/artifact_merge.py (ArtifactMergeAccess); docs/en/docs/workflows/scopes-and-access.md.
Forget & Rollback Forgetting preserves history and is recoverable. Atomic Memory already supports content restoration and undo of dependent merge chains: for A+B -> C followed by C+D -> E, restoring B reactivates A, B, and D and retires C and E. Ordinary downstream Artifacts and Source cursors are not rolled back. No supported Source-level erase/purge API is currently exposed; external side effects and compliance erasure are separate boundaries. docs/en/docs/workflows/atomic-memory.md, "Merge and restore"; tests/e2e/test_atomic_memory_cascade_restoration.py; RFC 1652, "Compression and physical retention boundary"; openapi/powercontext.yaml (supported public operations and Handoff evidence-resolution boundary).

Missing visibility labels, trust fields, or retention fields on a particular content model are not sufficient evidence that the corresponding system capability is absent. Trace the boundary that owns the behavior. Do not move authority, authorization, or policy into Memory/Source bodies merely to fill a matrix cell.

Documentation changes

  • Add docs/en/docs/workflows/memory-lifecycle-coverage.md and the equivalent page under docs/zh/docs/workflows/.
  • Register memory-lifecycle-coverage next to atomic-memory in both workflow meta.json files.
  • Link the page from "Current state and forgetting" in both Atomic Memory guides. Retain their existing explanation and add the explicit Source boundary, for example: "Forgetting preserves content and history; it does not erase the underlying Source, and PowerContext currently exposes no supported Source-level erase/purge API."
  • Use the existing Source, Handoff, access-control, and host-integration documents as linked contracts rather than duplicating their complete specifications.
  • State the assessed implementation commit/date and how future changes should update affected capability entries. Use source documentation and stable symbols/sections; do not edit generated website content.

Acceptance criteria

  • [ ] All 24 phase/objective pairs are present in both locales. Every capability entry has a bounded claim, exactly one status, evidence or an explicit unassessed marker, and any material limits/ownership question.
  • [ ] covered applies only to the stated capability/surface/configuration. The page makes no blanket security, universal host compliance, or prompt-injection-prevention claim.
  • [ ] Existing instruction-priority labelling, configured resource access control, and Atomic Memory content/merge restoration are represented accurately. Forgetting is not generalized to all state transitions, and merge rollback is not generalized to arbitrary downstream effects.
  • [ ] designed entries distinguish RFC proposals from implemented behavior and preserve unresolved design questions. The Source declaration prerequisite links to #1975 where applicable.
  • [ ] Every out of scope entry has a cited boundary decision and a verified, relevant owning issue. Missing ownership, including the unresolved #1425 reference, is explicit and is not hidden behind a completed status. No unrelated issue is assigned ownership by analogy.
  • [ ] The page and both Atomic Memory guides explicitly distinguish forgetting/restoration from Source erasure and state the current absence of a supported Source-level erase/purge API.
  • [ ] English and Chinese have equivalent claims, statuses, limits, and references; both navigation entries and guide links work.
  • [ ] Recheck capability claims and referenced issue targets against the PR's current base; run git diff --check and the repository's documentation check/build (make docs-test, or its documented component commands if the environment requires them). Report any validation limit. A documentation build alone does not establish backend or host security behavior.
  • [ ] No API, schema, runtime/default behavior, new authorization model, retention/erasure implementation, host enforcement change, or bulk creation of follow-up issues.

Alternatives considered

  • Extend the Atomic Memory guide only. This keeps navigation smaller, but the assessment also spans Source, Handoff, access control, and host delivery. A separate page keeps that scope visible while the Atomic Memory guide retains a short user-facing explanation and link.
  • Keep only a tracking issue. Implementation tracking remains useful, but readers need a discoverable documentation entry for deletion, sharing, and restoration questions.
  • Wait for RFC 1652 implementation. The index can already distinguish existing behavior, proposed designs, and open assessments without enabling any lifecycle feature.

Additional context

The organizing reference is A Survey on Long-Term Memory Security in LLM Agents, arXiv:2604.16548v5. The six-phase/four-objective frame organizes questions; it does not define PowerContext's product scope, replace its contracts, certify security, or authorize adopting external governance mechanisms. Any later behavior change requires its own scoped design and implementation work.

AlexStocks avatar Nov 02 '26 04:11 AlexStocks

plz assign to me

MaoMengww avatar Nov 02 '26 04:11 MaoMengww

4. plz assign to me

do it.

AlexStocks avatar Nov 02 '26 04:11 AlexStocks

The paper decomposes long-term memory security into six lifecycle stages — write, storage, retrieval, execution, propagation, and forgetting — and builds a threat model and a set of governance requirements on top of them. It proposes five classes of governance capabilities together with a number of evaluation metrics, and derives corresponding defenses: provenance authentication, write authorization, provenance/version metadata, retrieval-time filtering, rollback, and forgetting assessment. PowerContext already implements most of these. A few points, however, warrant closer scrutiny:

Differentiating trusted sources and applying source-specific write criteria does improve security, but may come at the cost of recall coverage and memory usability. Cross-medium deletion, deletion receipts, and residual detection conflict with this project's immutable history, audit trail, and backup policies. I have shortlisted a few directions that may be worth pursuing:

Lineage graph — forward lookup from a source to all related memories, experiences, skills, etc., as well as reverse lookup from any artifact back to its origin. Subject–resource graph, with ownership and propagation anomaly detection. Provenance/trust filtering and contradiction detection — already in progress in this project. Scope-level recovery — restoring the entire view of a scope to a given point in time. Some of these still have an unfavorable cost–benefit ratio — #4 in particular — and contribute little to the product's core capabilities.

My assessment:​ the paper is a governance framework, not an engineering design. It is valuable for security evaluation and gap analysis of PowerContext, but its direct engineering value is limited.

MaoMengww avatar Nov 05 '26 04:11 MaoMengww