Skip to content

fix(memory): /memory on and memory_search say why Memory is inert - #365

Merged
LeXwDeX merged 2 commits into
devfrom
feat/350-issue350
Aug 19, 2026
Merged

fix(memory): /memory on and memory_search say why Memory is inert#365
LeXwDeX merged 2 commits into
devfrom
feat/350-issue350

Conversation

@LeXwDeX

@LeXwDeX LeXwDeX commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Closes #350

What

  • Memory.statusReason() (new on the Interface): mirrors configuration()'s fail-closed gates and returns the actionable reason — missing /init stamp (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: when search answers unavailable, the tool output carries statusReason() when one exists.

Tests

  • New case in memory-global-identity.test.ts: a real git identity without the /init stamp → statusReason() names /init, setEnabled(true) carries it (and is not the bare string); after setInitialized, statusReason() is undefined.
  • Two existing assertions updated: they pinned the old bare "Memory remains off" for exactly the two inertness shapes this issue is about (retired identity, global identity) — now assert the message carries "unavailable" + reason.
  • bun test test/memory/ + memory-wiring 97/97; typecheck green; lint delta zero.

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
@LeXwDeX
LeXwDeX merged commit ab29932 into dev Aug 19, 2026
7 checks passed
@LeXwDeX
LeXwDeX deleted the feat/350-issue350 branch August 19, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant