Repository navigation
refactor(memory): await standing intent operations - #144832
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: blocked before merge. Reviewed September 11, 2026, 6:59 AM ET / 10:59 UTC (Revision 2). ClawSweeper reviewWhat this changesMakes Memory Core’s event-triggered reminder operations asynchronous and updates tools, hooks, documentation, and tests to await completion. Merge readiness⛔ Blocked before merge - 1 item remains Keep this useful, maintainer-authored PR open. No blocking defect was found, and the previous migration-proof blocker is unsupported: the introduced changes preserve schemas, stored values, and transaction boundaries. Priority: P2 Review scores
Verification
How this fits togetherMemory Core stores event-triggered reminders in each agent’s SQLite database. Agent tools manage reminders, while prompt and scheduled-turn hooks match or maintain them before returning results. flowchart TD
A[Agent tool requests] --> C[Standing intent operations]
B[Prompt and scheduled hooks] --> C
C --> D[Asynchronous database admission]
D --> E[Synchronous SQLite transactions]
E --> F[Awaited results or errors]
F --> G[Tool response or reminder context]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +357, Docs 0. Total +365 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep domain operations awaitable through the existing database owner while preserving synchronous claims, reminder eligibility, and durable formats. Do we have a high-confidence way to reproduce the issue? Not applicable: this is asynchronous-contract groundwork, not a demonstrated current-main failure; delayed-admission tests target the intended completion boundaries. Is this the best way to solve the issue? Yes: the patch converts complete operations and their callers through the existing admission owner without duplicating storage logic or changing the data model. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 227e7ae26af4. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Compatibility confirmation: this changes awaited admission and callers, with no changes to the SQLite schema, stored scope encoding, serialization, eligibility predicates, firing limits or native claim transaction. The existing agent-database owner captures the database identity and retains it through settlement. The 53-case suite uses real isolated SQLite and covers registered tools/hooks, concurrent firing claims and fresh reopen. Twelve delayed/rejected admission cases fail against the prior source at the missing-await boundary and pass after conversion. No data migration is required. The review narrative also confirms the original generic migration concern is unsupported by the actual diff. |
|
Merged via squash.
|
* commit 'f2ce199238e974b1d4caff8f11112aa51eb00d9e': (310 commits) refactor(copilot): deduplicate transcript user text (#144888) refactor(sessions): await discovery and config readiness (#144854) refactor(e2e): deduplicate release file assertions (#144904) ci: keep growing hosted test plans within the job cap (#144965) fix(macos): avoid stale dashboard command assertions (#144710) refactor(memory): await standing intent operations (#144832) refactor(ui): derive native device settings types from schemas (#144705) refactor(memory): await journal operations and allocate sequences atomically (#144824) refactor(tests): share command field assertions (#144955) refactor(matrix): share bounded context cache insertion (#144939) refactor(i18n): share Apple catalog reader (#144848) fix(doctor): preserve legacy registry files when quarantine fails (#144787) refactor(tests): reuse PixVerse auth fixtures (#144926) fix(bonjour): silence transient ENODEV socket warnings (#144870) fix(matrix): preserve unrelated files when migration fails (#144883) feat(sqlite): run Team Reports storage in owned workers (#144871) fix(update): install explicit same-version artifacts (#144894) refactor(ui): share cached message extraction (#144244) refactor: normalize Claude usage responses at one boundary (#144707) refactor: simplify CLI child listener registration (#144929) ...
…45107) Give each before_prompt_build handler an ephemeral result-acceptance capability and revoke it when the runner stops awaiting that handler. Memory Core checks it after lazy loading and before its synchronous standing-intent effects, preserving live callers of a shared database open. Missing host support produces a diagnostic without consuming a reminder. Document the optional SDK capability and cover timed-out, settled, and coalesced callers. Underlying work retains its existing cleanup lifecycle. Related: #144832 Validation: 91 focused tests, selected changed checks, and independent P2 review.
…enclaw#145107) Give each before_prompt_build handler an ephemeral result-acceptance capability and revoke it when the runner stops awaiting that handler. Memory Core checks it after lazy loading and before its synchronous standing-intent effects, preserving live callers of a shared database open. Missing host support produces a diagnostic without consuming a reminder. Document the optional SDK capability and cover timed-out, settled, and coalesced callers. Underlying work retains its existing cleanup lifecycle. Related: openclaw#144832 Validation: 91 focused tests, selected changed checks, and independent P2 review.
Related: #144592
What Problem This Solves
Standing-intent tools and hooks assume database work has completed when their synchronous store calls return. They need to retain the operation and propagate its result when database admission becomes asynchronous.
Why This Change Was Made
Await create, list, sweep, cancel and match through the existing asynchronous agent-database owner, including actual tool and registered hook callers. Keep native schema, lifecycle, FTS selection and claim transactions synchronous and intact; pure scope and context helpers remain synchronous.
User Impact
Tool results and prompt injection wait for the corresponding store operation. Rejections reach the existing error policy, and an operation retains its originally selected database across ambient path changes. Durable formats, eligibility and firing budgets are unchanged.
Evidence