Repository navigation
fix(memory): watcher warnings recommend a removed setting - #137181
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 8:16 AM ET / 12:16 UTC. ClawSweeper reviewWhat this changesThe PR replaces the memory watcher-pressure warning’s retired configuration advice with supported path-reduction, restart, and agent-specific reindex guidance, with documentation and regression coverage. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: current main still emits the invalid retired-setting advice, while this focused producer-side repair replaces it with supported remediation. No actionable patch defect was found; exact-head CI remains the pre-merge gate. Priority: P2 Review scores
Verification
How this fits togetherMemory Core watches memory roots and configured extra paths, then emits an advisory warning when the watched set is large. That warning directs Gateway operators to configuration changes and a CLI reindex for the affected agent. flowchart LR
A[Memory roots and extra paths] --> B[Memory watcher]
B --> C[Pressure count]
C --> D[Advisory warning]
D --> E[Operator reduces watched scope]
E --> F[Gateway restart]
F --> G[Agent memory reindex]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +8, Docs +21. Total +33 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the producer-owned warning repair once exact-head CI is complete and green, keeping the retired configuration key absent from the supported contract. Do we have a high-confidence way to reproduce the issue? Yes: current main contains the retired-setting warning, and the reviewed issue/PR evidence gives a concrete isolated Gateway and CLI-validation path for observing the contradiction. Is this the best way to solve the issue? Yes: correcting the warning at its producer and reusing the established CLI formatter is narrower and safer than restoring a retired configuration surface or adding another command-routing path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0dad1fc1333. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
The same-state recovery proof requested in the completed review is now finished on 0351e7bcaa31, build With 2,001 synthetic files indexed, the real Gateway returned both sentinel searches and emitted the exact profile/agent-qualified recovery command. After stopping that owned Gateway, only the effective extra-path list changed from 2,001 entries to one. The same isolated state/profile was restarted, and the displayed The index then reported one eligible/indexed file. CLI search and the normal HTTP memory tool both returned the retained sentinel and no excluded sentinel, with a valid FTS index and no stale/disabled/unavailable result. No new pressure warning appeared through the startup-check window. All 2,001 source-file hashes were unchanged. Parent verification independently compared the configuration and raw responses, then confirmed both owned Gateways and the listener were stopped. This addresses both before-merge requests and the rank-up request in the completed review. The +4 production lines are retained for the existing formatter and affected-agent binding, rather than duplicating CLI routing or supplying a generic command that targets the wrong index. The PR body now contains the redacted trace and exact local test/check commands. CI is still blocking merge: run 33733479603 exposed a Gateway update-tool argument assertion failure in |
0351e7b to
e4802bf
Compare
Keep the exact update-tool and chat-command dispatch assertions aligned with the host-minted system actor added by #136952. Preserve every routing, scope, timeout, signal and resolver expectation; change no authorization or update implementation. Both stale expectations failed in CI for #137181 and reproduced in focused runs before the edit. The repaired suites pass 31 cases; actor, caller and update-owner siblings pass 87. Rebased memory watcher/configuration scopes pass 90 and 343 cases. The complete five-file changed gate and fresh independent Codex autoreview pass at the configured review scope.
|
The complete revised candidate is now e4802bf2de55, rebuilt and tested as Both failed jobs in the original CI run came from stale update-dispatch expectations after main added explicit host actor metadata. All four failures reproduced before editing. Two expected The real same-state recovery flow was repeated on the new build, not relabeled from the earlier evidence. It indexed 2,001 synthetic files, returned both sentinels, and emitted the exact profile/agent-qualified recovery command once. After stopping that owned Gateway, only the effective extra-path list changed to one entry. The same state/profile was restarted and the displayed reindex command succeeded. CLI and HTTP search retained the included sentinel and excluded the removed scope, with a valid one-file FTS index and no new pressure warning. All 2,001 physical source hashes were preserved. {"physicalFilesPreserved":2001,"indexedFilesBefore":2001,"indexedFilesAfter":1,"httpBefore":{"retained":1,"excluded":1},"httpAfter":{"retained":1,"excluded":0},"cliAfter":{"retained":1,"excluded":0},"newPressureWarnings":0,"configurationChangedOnlyExtraPaths":true,"bothOwnedGatewaysStopped":true,"listenerAbsent":true}Parent verification independently compared raw HTTP responses, actual CLI status, configuration, source hashes, and process/listener cleanup. The existing review's recovery-proof and +4-LOC requests remain addressed. The initial push attempt stopped at a rewrite-policy timeout before mutation; the same guarded preflight recovered without changing policy or credentials, and the task branch was updated with an exact lease. Exact-head CI and native preparation remain required. No merge or gate bypass has occurred. |
e4802bf to
0e350b7
Compare
|
Updated candidate: 0e350b77b8c8, built as The failed CI test claimed service-relay coverage but actually selected Anthropic's SDK-owned process path. The replacement refactors three existing real supervisor/relay cases to observe readiness before cancellation, while retaining the existing fake-clock deadline tests and plugin-owned timeout tests. The exact construction regression fails on the raw pre-fix supervisor and passes on the current owner. Fault injection also proves cleanup when readiness fails before PID registration. No production timeout or authorization code changed. Current proof passes 141 owner/caller/sibling cases, 90 memory cases, 343 config cases, four retained plugin timeout/cancellation cases, all 29 changed checks, and fresh scoped independent review. The earlier update-actor expectations are now upstream and no longer contribute to this diff. The same-state memory recovery was repeated on this exact build. After 2,001 synthetic files were indexed, both HTTP sentinel queries succeeded and the warning printed the affected-agent/profile command. Only effective extra paths changed to one; all physical file hashes were retained. The same isolated state/profile restarted, the displayed reindex command succeeded, and CLI/HTTP search retained the included sentinel while excluding the removed scope, with a valid one-file FTS index and no new watcher-pressure warning. {"physicalFilesPreserved":2001,"indexedFilesBefore":2001,"indexedFilesAfter":1,"httpBefore":{"retained":1,"excluded":1},"httpAfter":{"retained":1,"excluded":0},"cliAfter":{"retained":1,"excluded":0},"newPressureWarnings":0,"configurationChangedOnlyExtraPaths":true,"launcherReceiptsWritten":true,"ownedGatewaysStopped":true,"listenerAbsent":true,"rawResponsesIndependentlyCompared":true}An earlier attempt on this build lost its launcher completion receipt after preview shutdown and remains recorded as incomplete. The passing fresh attempt let each verified launcher settle and publish its genuine receipt before preview cleanup. The parent independently checked raw responses, config differences, source hashes, actual index status and process/listener absence. No product code, frozen helper, or execution deadline changed for that repeat. The PR body now records the exact commands, source/owner diagnosis, review scope, retained failures and proof limits. Required exact-head CI and native preparation remain gates; no merge or bypass has occurred. |
Replace the rejected memory.search.sync.watch recommendation with effective extra-path/root reduction, host-limit review, and an affected-agent reindex command for the Gateway environment. Reuse the existing CLI formatter to preserve profile/container routing. Watcher behavior, thresholds, timers, schemas and defaults stay unchanged. Cover native-directory and Chokidar-path warnings, named profiles, exact-once timing and cleanup. Canonicalize the touched test fixture instead of exceeding its line limit. Proof: real isolated baseline warning and rejected-key CLI validation; 90 watcher/filesystem/registry tests, 343 config/profile siblings, scoped checks and fresh independent review. Candidate recovery proof remains a pre-land gate. Fixes #137156.
0e350b7 to
9adf91d
Compare
|
Land-ready verification for Exact-head CI run 33753098239 passed on attempt 1. The native CI watcher returned GREEN with no pending checks; GitHub reports CLEAN/MERGEABLE. Fresh isolated Codex autoreview covered all three changed files plus 12 source/context datasets and returned scoped-clean with no findings at the configured P0 threshold. The fresh build Fresh local proof passed: 90 memory cases, 343 config/profile cases, 105 adopted main process/CLI cases, and all 25 selected checks. Commands used through the pinned Node 24.15.0 environment: node scripts/run-vitest.mjs extensions/memory-core/src/memory/manager.watcher-config.test.ts extensions/memory-core/src/memory/manager.watcher-filesystem.test.ts extensions/memory-core/src/memory/manager-registry.test.tsnode scripts/run-vitest.mjs src/agents/memory-search.test.ts src/config/dead-config-keys.test.ts src/cli/profile.test.tsnode scripts/run-vitest.mjs src/commands/agent-exec.construction.test.ts src/commands/agent-exec.test.ts src/process/supervisor/supervisor.test.ts src/process/supervisor/adapters/child.service-lifecycle.test.tsnode scripts/check-changed.mjs --timed --base 88be1b80f58df698fe730b4f3f34934ecae92e21 -- extensions/memory-core/src/memory/manager-watch-ops.ts extensions/memory-core/src/memory/manager.watcher-config.test.ts docs/reference/memory-config.mdpnpm build:ci-artifactsThe final diff contains only the original three memory files. Main's process-test repair was adopted after the actual conflict rather than retaining a competing test path. Production is +5/-1 (net +4), tests +45/-37, docs +21. The four production lines bind the existing formatter to the affected agent, resolving the completed ClawSweeper review's growth item without restoring retired configuration. Its green exact-head CI requirement is now satisfied. Known limits remain explicit: this is real CLI/HTTP proof, not rendered UI; browser tab capacity prevented rendered preview access. Existing build diagnostics remain recorded. Earlier failed/incomplete attempts are retained under their original identities, not counted as current proof. Native preparation and merge are next; no gate has been bypassed. |
|
Merged via squash.
|
…36761-session-mode-local-20260903 * commit '58187248c8cafd7b8cfbba3de8d001762fb08b48': improve(testing): add watchOS Gateway upgrade survivor (#137203) improve(ui): structure Devices rows with an actions menu and a facts panel (#137084) test(cli): reuse canonical pairing call guard (#137210) fix(sessions): prevent gateway stalls during large session cleanup (#126035) fix(qa): resolve Slack runtime dependency (#137283) fix: fence Session Observer catalog requests (#137243) fix(memory): make watcher pressure guidance actionable (#137181) test(entry): type the respawn exit mock directly (#137258) fix(release): install first-hop fixtures through the candidate registry (#137286) # Conflicts: # scripts/e2e/lib/upgrade-survivor/assertions.mjs
Replace the rejected memory.search.sync.watch recommendation with effective extra-path/root reduction, host-limit review, and an affected-agent reindex command for the Gateway environment. Reuse the existing CLI formatter to preserve profile/container routing. Watcher behavior, thresholds, timers, schemas and defaults stay unchanged. Cover native-directory and Chokidar-path warnings, named profiles, exact-once timing and cleanup. Canonicalize the touched test fixture instead of exceeding its line limit. Proof: real isolated baseline warning and rejected-key CLI validation; 90 watcher/filesystem/registry tests, 343 config/profile siblings, scoped checks and fresh independent review. Candidate recovery proof remains a pre-land gate. Fixes openclaw#137156.
Closes #137156
What Problem This Solves
Fixes an issue where following the memory file-watcher pressure warning would make configuration invalid: it recommended
memory.search.sync.watch, which the same build rejects. The warning offered an unusable recovery step.Why This Change Was Made
Replace stale advice at the warning producer with supported extra-path/root reduction, host-limit review, Gateway restart, and reindexing the affected agent in the Gateway's environment. Reuse the existing CLI formatter for the active profile or container hint. Watcher behavior, thresholds, timers, configuration schemas, defaults, and storage remain unchanged.
The existing regression fixture now uses canonical configuration and its existing manager helper, removing ignored legacy setup. After an actual merge conflict, the redundant process-test repair was dropped because main had landed the owner-correct coverage in PR #137157. This PR is back to its original three memory files. Those files are byte-identical to the previously reviewed head.
User Impact
Operators get a usable command targeting the agent whose watcher emitted the warning. Documentation explains that global and per-agent extra paths combine, narrowing only a glob does not reduce watched directory roots, and default memory roots remain eligible.
The count is advisory, not proof of descriptor exhaustion. This change does not raise host limits, disable watching, add configuration options, or migrate data. See memory configuration and memory indexing.
Evidence
Candidate:
9adf91dc2160dfdd63ba0e29af801e7e93917507, based on88be1b80f58df698fe730b4f3f34934ecae92e21. Native main-baseline inspection at13b1f71c7010baaf2394555198e2fc04bef03586found no additional changes in the inspected memory, formatter, schema, or dependency contracts.Fail-first proof: the original isolated Gateway indexed 2,001 synthetic files and emitted one warning recommending the retired key. A separate config copy containing that key failed actual CLI validation. Both existing native-directory/Chokidar warning cases failed against the old wording and pass with affected-agent/profile-qualified guidance.
Fresh post-rebase validation: 90 memory watcher/filesystem/registry tests, 343 config/retired-key/profile tests, and 105 adopted process/CLI tests passed with zero failures or skips. The complete three-file changed gate passed all 25 checks, including five doctor-contract tests. No guard, baseline, suppression, or timeout was relaxed.
Fresh independent review and build: isolated Codex autoreview covered the complete three-file diff plus 12 source/context datasets, with no findings or filtering at the configured P0 threshold. Mandatory scanning and reviewer isolation remained intact.
pnpm build:ci-artifactspassed in 105.2 seconds on Node 24.15.0 and pnpm 12.1.0. Exact build:2026.8.1-9adf91dc2160-2026-09-03T11-59-35.447Z. Source remained clean and matched the reviewed hashes. No ineffective-dynamic-import warning occurred; dependency direct-eval, browser externalization, and plugin-timing diagnostics remain recorded.Fresh exact-build recovery: a new isolated Gateway/state/profile indexed 2,001 physical files, returned both sentinels through the normal HTTP memory tool, and emitted the exact affected-agent/profile-qualified command once. After stopping that owned Gateway, only effective extra paths changed to one entry. All 2,001 physical source hashes were preserved. The same state/profile was restarted and the displayed command executed:
The CLI and HTTP searches then retained the included sentinel and excluded the removed scope, with a valid one-file FTS index and no stale/disabled/unavailable result. No new watcher-pressure warning appeared through the startup-check window. Both configurations passed CLI validation with zero schema warnings. The parent independently compared raw HTTP responses, index status, configuration changes, physical file hashes, command arguments, and genuine shutdown receipts.
{"physicalFilesPreserved":2001,"indexedFilesBefore":2001,"indexedFilesAfter":1,"httpBefore":{"retained":1,"excluded":1},"httpAfter":{"retained":1,"excluded":0},"cliAfter":{"retained":1,"excluded":0},"newPressureWarnings":0,"configurationChangedOnlyExtraPaths":true,"launcherReceiptsWritten":true,"ownedGatewaysStopped":true,"listenerAbsent":true,"rawResponsesIndependentlyCompared":true}CI history: run 33740221493 exposed a process test selecting the SDK process owner while claiming relay coverage. Main now owns its replacement, including a real CLI process-backend construction test; all 105 relevant cases passed after adopting it. The subsequent watcher for run 33748627404 stopped on a verified merge conflict, not an observed test failure. The current head passed CI run 33753098239 on attempt 1. The native watcher returned GREEN with zero pending checks.
Review disposition and LOC: production +5/-1 (net +4), tests +45/-37 (net +8), docs +21. The four production lines bind the existing formatter to the affected agent. This is the narrow producer-owned fix; restoring the retired setting or adding a new formatting path would create unnecessary policy/compatibility surface. This addresses the production-growth item in the completed ClawSweeper review. Its green exact-head CI requirement is now satisfied.
Provenance: config-surface consolidation retired the public synchronization switches while carrying the stale warning forward. The first affected stable release is not established.
Gaps and retained evidence: this is real CLI/HTTP behavior, not rendered UI proof; browser tab capacity prevented rendered preview access. Earlier attempts and reviews retain their original identities, including the incomplete older run missing a launcher receipt and the successful older recovery in the previous proof comment. Neither is relabeled as current-head evidence. Required exact-head CI passed. Native preparation and merge completed through
scripts/pr; landed as f4647c4d1af59b3bb798a0a9a0f27f87cb7075dd. The native workflow reported its default advisory for newer CI/tooling changes on main; no strict-drift override was set. The merged files and synchronized clean main match the reviewed hashes. No gate was bypassed.