Skip to content

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

Rust

Merge PR #645: self-contained build + two-tier dev test loop

AkitaOnRails2e7e2e5725cb
diff --cc .github/workflows/ci.yml
index 1938f0f3,21b7e67b..61f6a2f6
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@@ -58,11 -58,26 +58,26 @@@ jobs
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
- uses: Swatinem/rust-cache@f0d9c3887740aee45f6153b24b3a6b815192ec16 # v2
+ # On macOS, rustls-tls-native-roots otherwise enumerates Keychain every
+ # time a test process builds a reqwest client. Scope the PEM-bundle
+ # shortcut to macOS CI instead of setting a repo-wide Cargo env var that
+ # breaks other local platforms.
+ - name: Use macOS PEM bundle
+ if: matrix.os == 'macos-latest'
+ run: echo "SSL_CERT_FILE=/etc/ssl/cert.pem" >> "$GITHUB_ENV"
+ # Linux regenerates the web stylesheet from source, so a stale vendored
+ # static/tailwind.css fails here instead of shipping.
+ - name: Regenerate the Tailwind bundle
+ if: matrix.os == 'ubuntu-latest'
+ run: echo "TAILWIND_BUILD=1" >> "$GITHUB_ENV"
- run: cargo test --workspace --all-targets
+ - name: Vendored tailwind.css is current
+ if: matrix.os == 'ubuntu-latest'
+ run: git diff --exit-code -- crates/ai-memory-web/static/tailwind.css
# Native Windows coverage lives in `.github/workflows/windows.yml`: it
- # runs on every push to main, nightly, on demand, and on any pull request
- # carrying the `windows` label. It was ~1000s here against ~250s for the
+ # runs nightly, on demand, and on any pull request carrying the `windows`
+ # label. It was ~1000s here against ~250s for the
# same tests on Linux, which meant every pull request waited roughly
# seventeen minutes when every gating job below finishes in about eight —
# and it was `continue-on-error`, so those extra minutes gated nothing.
diff --cc CHANGELOG.md
index 89462a86,5ae746e0..a050f732
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -7,49 -7,28 +7,70 @@@ and this project adheres to [Semantic V
## [Unreleased]
+ ### Changed
+ - The build is self-contained on every platform: the vendored web stylesheet
+ is now the default and `TAILWIND_BUILD=1 cargo build -p ai-memory-web`
+ regenerates it, so no command needs `TAILWIND_SKIP=1` any more. CI
+ regenerates the bundle on Linux and fails if the committed
+ `static/tailwind.css` is stale, a check that did not exist before.
+ - Developer loop: `cargo t` (everyday, skips `slow`/`stress` modules) and
+ `cargo tf` (everything) aliases over cargo-nextest, integration tests that
+ compile into each crate's own test harness from `tests/suite/` (78 test
+ binaries down to 11 in the everyday loop; only the CLI keeps a separate one,
+ and the evals harness builds only under `--workspace`), a dev profile that
+ keeps only line tables, and an opt-in pre-push hook that runs the full tier.
+ `bin/release` and the documented gate also run `git diff --check`. Measured:
+ workspace edit-to-result ~380s to ~150s on macOS; the warm everyday test run
+ 28s to 19s on a 32-thread Windows box.
+
### Fixed
+- Authentication-disabled HTTP servers now ignore stale or unexpected Bearer
+ headers and preserve anonymous access. Previously, a client retaining an old
+ `AI_MEMORY_AUTH_TOKEN` received `401 Unauthorized` even though the server
+ reported `auth=false`; invalid Bearers remain rejected whenever static or
+ human authentication is enabled. (#639)
+- Cursor sessions no longer land in the default `default/scratch` bucket.
+ Cursor sends the workspace directory only as `workspace_roots` — its
+ `sessionStart` / `sessionEnd` payloads carry no `cwd` key at all, and its
+ tool events send `cwd: ""` — so cwd resolution produced nothing and the
+ server fell back to its default project for every Cursor event. Both the
+ native `ai-memory hook` path and the POSIX/PowerShell hook scripts now read
+ `workspace_roots` (alongside Antigravity's `workspacePaths`) and treat an
+ empty `cwd` as absent rather than as an answer.
+- Cursor sessions are no longer attributed to `claude-code`. The Cursor CLI
+ also runs the hook commands declared in Claude Code's
+ `~/.claude/settings.json`, which `install-hooks --agent claude-code`
+ hardcoded to `--agent claude-code`, so a Cursor-driven session was stored
+ with `agent_kind = claude-code`. Hook payloads carrying Cursor's
+ `cursor_version` marker are now attributed to `cursor` regardless of the
+ `?agent=` the hook command declared.
+- A project that first materializes while the server is running is now
+ self-describing immediately, instead of only after the next startup
+ backfill (#643). Scope manifests (`_meta.md`) were written at startup and on
+ the rename/move admin paths, so a session in a checkout the server had not
+ seen before produced a scope directory with pages but no manifest. Stop the
+ server in that window and `reindex` could not rebuild that tree — the one
+ situation where an operator most needs the rebuild to work. The manifest is
+ now written with the scope's first page, one store lookup per scope per
+ process, byte-identical to what the backfill writes so restarts still do not
+ churn the wiki's git history. The startup backfill is unchanged and remains
+ the repair path for trees written by older releases.
+- `ai-memory reindex` now names the exact missing or unreadable scope
+ `_meta.md` path instead of collapsing the filesystem error to a bare `No such
+ file or directory (os error 2)`. This makes the existing startup-backfill
+ workaround discoverable when a scope was first created during the server's
+ last run. (#643)
+- Generated routing instructions and all project-scoped managed Agent Skills now
+ distinguish session-aware MCP clients from static clients. Static clients are
+ told to pass exact `workspace` + `project` values from `.ai-memory.toml` or
+ operator configuration on every project-scoped call, preventing another
+ session's last active project from capturing reads or writes; global searches
+ and global preference writes retain their scope-free argument rules (#372).
+ - Consolidation prompt assembly no longer re-renders the whole observation
+ projection and re-scores every observation after each pruned one. With a few
+ hundred long observations the quadratic loop cost ~14s per prompt; pruning
+ now works from per-observation scores and block sizes computed once, with
+ byte-identical output.
## [2.0.3] - 2026-09-04