Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

test(wiki): pin exported percent encoding

AkitaOnRailseb5338ae22ef
diff --git a/CHANGELOG.md b/CHANGELOG.md
index da1fca12..326bbc31 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -95,6 +95,9 @@ version in [`docs/changelog/`](docs/changelog/):
when evaluating slot staleness and title uniqueness.
([#1389](https://github.com/akitaonrails/ai-memory/pull/1389))
- Resolved percent-encoded ordinary Markdown link paths before indexing and web-route encoding, preserving spaces and Unicode filenames without double decoding or changing project scope. ([#1382](https://github.com/akitaonrails/ai-memory/pull/1382))
+- Encoded a literal `%` in an exported wikilink target as `%25`, so an OKF
+ bundle's Markdown link still resolves to the same literal page path.
+ ([#1456](https://github.com/akitaonrails/ai-memory/pull/1456))
- Preserved indexed Markdown links with escaped or nested brackets in their labels, including links exported in OKF bundles and reindexed after import. ([#1380](https://github.com/akitaonrails/ai-memory/pull/1380))
- Fixed `open_feedback_findings` reporting feedback attached to TTL-expired
pages. The store query now filters out expired page targets against the
diff --git a/crates/ai-memory-wiki/src/markdown.rs b/crates/ai-memory-wiki/src/markdown.rs
index 43a39e47..ca24015f 100644
--- a/crates/ai-memory-wiki/src/markdown.rs
+++ b/crates/ai-memory-wiki/src/markdown.rs
@@ -1884,10 +1884,14 @@ mod tests {
#[test]
fn rewrite_local_wikilinks_keeps_a_literal_percent_in_the_target() {
let page = PagePath::new("notes/here.md").unwrap();
- for body in ["See [[notes/a%20b]].\n", "See [[notes/cpu-95%cap]].\n"] {
+ for (body, href) in [
+ ("See [[notes/a%20b]].\n", "a%2520b.md"),
+ ("See [[notes/cpu-95%cap]].\n", "cpu-95%25cap.md"),
+ ] {
let before = extract_links(body, &page);
assert_eq!(before.len(), 1, "{body}");
let exported = rewrite_local_wikilinks(body, &page, "proj");
+ assert!(exported.contains(&format!("]({href})")), "{exported}");
assert_eq!(extract_links(&exported, &page), before, "{exported}");
}
}