Skip to content

fix: write the memory index's placement link in words that need no escape - #3105

Merged
yansfil merged 1 commit into
mainfrom
fix/memory-index-arrow
Nov 28, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/memory-index-arrow

Conversation

@yansfil

@yansfil yansfil commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Problem

Every agent session starts with a Project Memory index, and a card placed in a file or merged in a pull request showed as m794 PR은 CI 통과 후 바로 머지 -> AGENTS.md.
The index escapes <, > and & so a card's own text cannot close the <hide-memory-index> tag, but it also escaped Hide's own -> separator, so Hide's words read as noise to every agent.

Before → After

Before After
What the user gets m1033 ... -> docs/BUILD.md and ... -> merged in pull request #924 (original repository unknown) m1033 ... (in docs/BUILD.md) and ... (merged in pull request #924, original repository unknown)
Screen No screenshot: the text only agents read at session start changes, no screen

Same for the user: only the text agents read at session start changes.

Not verified

  • No live session start was read; the rendered index is asserted through Injection::context in hide-memory.
  • The hide-core and hided crates were not rebuilt: nothing outside hide-memory/src/store.rs constructs or reads InjectedItem, and rg finds no other writer of the -> path text.
Evidence
  • Verified: scripts/verify-cargo.sh nextest -p hide-memory -p hide-agent-hooks: 703 passed, 3 skipped; clippy -p hide-memory --all-targets -D warnings and cargo fmt --all --check clean.
Tests
  • Layer: unit, in hide-memory's store tests.
  • Catches: a placed card's rendered line containing > (Hide's link escaped again), or the card's own > in a title left unescaped; a_merged_card_points_at_its_file_and_is_never_given_in_full now reads the rendered index and a title containing >.
  • Repeat: deterministic, no waits.
  • Waits: none.
Risky files
  • hide-memory/src/store.rs - InjectedItem gains placed (serde default, skipped when none); the line is written once in index and rendered in Injection::context, which still escapes the card's text.

@yansfil
yansfil added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 7b98b92 Nov 28, 2026
50 checks passed
@yansfil
yansfil deleted the fix/memory-index-arrow branch November 28, 2026 01:44
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