You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(memories): record the resolved path, not the raw pointer (FT-MR11) (#1)
* fix(memories): record the resolved path, not the raw pointer (FT-MR11)
`generateIndex` resolved each MEMORY.md reference correctly — trying the store
directory, then its parent — and then discarded the result, storing `ref.path`
verbatim. The canonical store writes pointers as `memory/foo.md`, where
`memory/` is a namespace label for the store rather than a subdirectory of it,
so the CLI's `rewritePathsAbsolute` re-applied the prefix against the store root
alone and emitted a doubled `…/memory/memory/foo.md`.
On the canonical store that left 420 of 492 published entries (85%) pointing at
files that do not exist. The UserPromptSubmit hook reads that published index on
every prompt, so every session was silently handed dead paths and fell back to
paraphrasing one-line summaries — precisely what the store's own rule forbids.
Entries now record the location that actually resolved, relative to the store
root with POSIX separators, so both of the store's drifted layouts resolve and
no memory file has to move. Store-relative rather than absolute keeps the
on-disk index portable, which is the contract `rewritePathsAbsolute` depends on.
Live index: 72/492 -> 492/492.
The original fixture put MEMORY.md *above* its `memory/` directory, so every ref
matched on the first base and the parent-base fallback was never under test —
which is how this reached production. `fixtures/flat-store/` pins the real
shape, with one flat topic and one genuinely-nested topic, and asserts every
entry resolves once joined onto the store root.
Also drop the hardcoded home directory from `DEFAULT_STORE`: it was an absolute
literal containing a username, so the shipped default resolved on exactly one
computer and leaked that username into a public package. Now derived from
`homedir()`, matching `defaultDest()` directly below it. The remaining username
literals in repo instructions and test data are gone too; `identity-scan` reads
RESULT CLEAN where it previously reported HIT 12.
Verify: 383 tests across all four packages, 0 fail, exit 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(deps): bump brace-expansion 5.0.6 -> 5.0.9 to clear the audit gate
CI's `npm audit --audit-level=moderate` step went red on three high-severity
brace-expansion DoS advisories (GHSA-3jxr-9vmj-r5cp, GHSA-mh99-v99m-4gvg,
GHSA-rgw5-rvv9-x895). Not introduced here — the advisories postdate main's last
green run on 2026-06-16, so main is red on this today too; it surfaced on this
PR because this is the first run since.
Dev-only transitive path: c8 -> test-exclude -> minimatch -> brace-expansion.
`npm audit fix` resolves it inside the existing minimatch range, so the delta is
five lockfile lines and one package. Audit now reports 0 vulnerabilities.
Verify: 383 tests across all four packages, 0 fail, exit 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
The production data flow, running on this rig right now:
17
17
18
18
```
19
-
canonical store C:/Users/mikey/.claude/projects/F--AI/memory/ (~330 .md files + MEMORY.md)
19
+
canonical store ~/.claude/projects/F--AI/memory/ (~330 .md files + MEMORY.md)
20
20
│ claude-memories index + validate ← "Index Freshness Ritual" in global CLAUDE.md
21
21
▼
22
22
store dispatch table <store>/index.json
@@ -61,7 +61,7 @@ Decompose-by-secrets (Parnas 1972) is right for N humans, operationally broken f
61
61
## Working rules
62
62
63
63
-**Read `ROADMAP.md` first** — it's the dispatch table for this repo, and each phase has a gate that halts on failure.
64
-
- Global rules (`C:/Users/mikey/.claude/CLAUDE.md`) and workspace rules (`E:/AI/.claude/CLAUDE.md`) apply here.
64
+
- Global rules (`~/.claude/CLAUDE.md`) and workspace rules (`E:/AI/.claude/CLAUDE.md`) apply here.
65
65
-**Cost discipline:** no agent fleets, no Workflow orchestration without explicit pricing + director approval. This layer's work is deterministic-first: scripts, validators, hand edits.
66
66
- The loadout-hook injects pointer lines on prompts — open the pointed file before acting; don't paraphrase from the summary line.
67
67
- Any new pipeline/script/SKILL.md authored here needs the six-standards compliance block (`workflow_standards.md`). Phase 6 (publish/deprecate/cutover) additionally requires a compensators table — no skip allowed.
0 commit comments