fix(memory): /memory on and memory_search say why Memory is inert - #365
Merged
Conversation
Every fail-closed activation gate returned the same bare 'Memory remains off'/'unavailable' — a project with a real git identity but no /init stamp was indistinguishable from a disabled Memory (real case: /memory on silently staying off). New Memory.statusReason() names the gate a user can act on (missing /init stamp, commit-less global identity, non-git repo; retirement and admission repair stay log-only operator concerns); setEnabled(true) returns it, and memory_search attaches it to the unavailable answer. Closes #350
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #350
What
Memory.statusReason()(new on the Interface): mirrorsconfiguration()'s fail-closed gates and returns the actionable reason — missing/initstamp (run /init first, then /memory on), commit-less global identity (commit once or add a remote, then run /init), non-git repo. Identity retirement and admission-repair states stay log-only (operator concerns, not user guidance) →undefined.setEnabled(true): when the activation gate fails, the returned message is now the reason instead of the bare"Memory remains off".setEnabled(false)keeps the old string (turning off an inert Memory has nothing to explain).memory_search: whensearchanswersunavailable, the tool output carriesstatusReason()when one exists.Tests
memory-global-identity.test.ts: a real git identity without the/initstamp →statusReason()names/init,setEnabled(true)carries it (and is not the bare string); aftersetInitialized,statusReason()isundefined.bun test test/memory/+ memory-wiring 97/97; typecheck green; lint delta zero.