Repository navigation
feat(memory): retain transcript policy lineage - #123545
galiniliev wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 27, 2026, 10:07 AM ET / 14:07 UTC (Revision 8). ClawSweeper reviewWhat this changesThe branch stores policy and identity lineage beside SQLite transcript events and carries that lineage through reads, search, session copies, and archives. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 11 items remain Keep this protected draft open. Durable per-event memory policy lineage is absent from current main and the latest release, so the branch retains distinct value, but it is not ready to land. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw stores each agent's session transcript in SQLite. Memory policy facts enter with transcript writes; session replay, search, and archive operations later decide which events remain visible. flowchart LR
A[Memory policy facts] --> B[Transcript writer]
B --> C[Agent SQLite events and lineage]
C --> D{Current authority valid?}
D -->|Yes| E[Replay and search]
D -->|No| F[Hidden events]
C --> G[Session copies and archives]
Decision needed
Why: The staged design assigns atomic persistence to core, but its base is unmerged and current main intentionally retired one lifecycle path; that scope needs an explicit owner choice. Before merge
Findings
Agent review detailsSecurityNeeds attention: No supply-chain surface changes were found; the new internal archive importer has an unresolved authorization-integrity contract. PR surfaceSource +2132, Tests +1003, Docs +15, Generated +67. Total +3217 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Integrate one transcript-lineage owner into current session storage, with authorized-result pagination, trusted archive provenance, a nonblocking quarantine outcome, and demonstrated existing-database compatibility. Do we have a high-confidence way to reproduce the issue? Yes for the introduced search defect: place revoked top-ranked matches ahead of an authorized match with a small limit. The source proves the underfilled page path; this read-only review did not execute it. Is this the best way to solve the issue? No, not as submitted. Atomic core persistence is a plausible owner boundary, but the search page, archive authority contract, and current-main integration need repair before this is the best landing shape. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7cd8ee862c7d. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
3122cda to
0d20184
Compare
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This draft has had no commits since August 14 and changes persisted SQLite tables without the required migration proof. Please open a fresh PR against current main if this phase is still planned. |
What Problem This Solves
Memory-enabled transcripts could retain scoped content as raw events without enough durable, current authorization evidence to safely replay, search, derive, archive, or restore it after a lifecycle transition. That leaves revocation, resource expiry, session rebinding, and cross-session copies vulnerable to stale historical grants or unverified provenance.
Why This Change Was Made
This Phase 2B layer makes the transcript companion the canonical retention boundary. It atomically stores immutable policy-set, actor, delivery, exposure, subject, and transition evidence; every reader revalidates the stable policy and resource state at use time. Session lifecycle owners now establish cross-session transition provenance, while unconfirmed archives and legacy imports remain quarantined.
User Impact
Operators retain ordinary conversations, while scoped-memory transcript content disappears from memory recall as soon as its policy, resource, identity, or lineage is no longer valid. Confirmed archives preserve exact authorized lineage; raw legacy archives cannot regain memory visibility merely because they are imported.
Evidence
tbx_01kzzhjsz3x1fsrrrm035egekp:pnpm test src/config/sessions/session-accessor.sqlite-archive.worker.test.ts src/config/sessions/session-transcript-policy-archive.test.ts src/config/sessions/session-transcript-memory-policy.test.ts src/config/sessions/session-accessor.parent-fork.test.ts src/config/sessions/session-accessor.conformance.test.ts src/plugins/memory-run-exposure-ledger.test.ts extensions/memory-core/src/session-ingestion.test.tsoxfmt --checkpassed across all 22 changed files;git diff --checkpassed.--mode local) reported:autoreview clean: no accepted/actionable findings reported.docs/concepts/2026-07-29-memory-impl-plan.md.Scope and review notes
memory-permissions-p2a-integrationatb5c0418ba68; head:3122cda8551. This stack was deliberately not rebased ontomain.tsgoreaches only pre-existing failures outside this diff insrc/agents/memory-egress-admission.ts,src/auto-reply/dispatch.ts, andextensions/codex/src/app-server/run-attempt-connection.ts; the Phase 2B transition query typing errors were fixed before commit.