Repository navigation
Aphrodite v1.2.2 - Security & Correctness Hardening Sweep
Compare Aphrodite/v1.2.1...Aphrodite/v1.2.2
Aphrodite v1.2.2 💋 Plugin v2.0.5
Summary
The largest patch release to date: a ~60-commit security-and-correctness hardening sweep driven by systematic bug-triage reports across the FFI layer, proxy runtime, CCR pipeline, and config resolution - plus the toolchain/CI modernization and packaging groundwork that enabled the first crates.io publish of all three crates (aphrodite-headroom-core 0.1.1, aphrodite 1.2.2, aphrodite-hermes 1.2.2) immediately after this tag.
Changes
- Fix (security): proxies now bind loopback only and reject DNS rebinding (
crates/aphrodite/src/proxy.rs) - the cache (:9797) and token (:9798) listeners previously bound0.0.0.0, exposing unauthenticated/retrieve,/history, and/ccr/*endpoints to the local network; theloopback_onlymiddleware only checked the TCP peer IP, so a hostile webpage could reach the proxy via DNS rebinding. The default bind is now127.0.0.1, the middleware additionally validates theHostheader against known loopback hostnames, andCorsLayer::permissive()was removed outright (the proxy has no legitimate browser consumer). - Fix: FFI/proxy correctness overhaul (
crates/aphrodite/src/{config,config_loader,proxy,hooks,session}.rs,crates/aphrodite-hermes/src/lib.rs) - 20+ interconnected issues from triage reports 06/07: per-handle locking replaces the single global mutex (two agent sessions can now compress concurrently);post_llm_callfinally callssession::archive_turn(previouslyaphrodite_diffalways returned zero turns in real Hermes usage); env-var overrides (APHRODITE_API_URL,APHRODITE_MODEL,APHRODITE_DB, ...) now actually pierce the TOML as documented; the response cache gained TTL enforcement, a complete cache key (tools/temperature/top_p/...), 2xx-only caching, and a 1 MB body cap; CCR store write failures now leave content uncompressed instead of minting unresolvable markers; upstream response headers (Retry-After,x-ratelimit-*) and query strings are forwarded; and the setup shim is generated from the live plugin source instead of a drifted hand-copied template. - Fix: proxy server startup and limits (
crates/aphrodite/src/proxy.rs) - all TCP listeners are bound up front so a port conflict aborts hard instead of leaving a silent half-alive process; the Prometheus latency histogram's unbounded bucket is relabeled+Inf; the catch-all proxy route gets its own 64 MB body limit (agent chats over ~200k tokens were rejected with 413 under the old blanket 1 MB limit). - Fix: CCR pipeline hardening (
crates/aphrodite/src/{marker,resolve,retrieve,catalog,hooks}.rs) -normalize_hash()at every retrieval boundary tolerates the LLM echoing a full marker body back as the hash argument;toc/searchJSON emits full 40-char hashes (12-char truncations were unresolvable); savings accounting made internally consistent;read_filereferences are tracked before the essential-tool early return (the most common file-reference source was silently never recorded); dead stage-2 shadowing lookup removed. - Fix: panic-safety across the C ABI (
crates/aphrodite-hermes/src/lib.rs) - everyextern "C"export now routes through aguarded()catch_unwindwrapper (a panic previously unwound across the FFI boundary - UB that aborts the host Hermes process), and_ccr_centeris threaded through compression as documented. - Feature: dynamic hook adapter and effect runtime for Python integration; PowerShell installation script for Windows; example Hermes Agent profile (
profiles/); SSE streaming -text/event-streamresponses forwarded chunk-by-chunk with a 64 MB cap for non-streaming bodies. - Chore (refactor): proxy modules feature-gated behind
cfg(feature = "proxy")so the cdylib no longer links axum/tokio/reqwest; 7 unused dependencies removed;preview.rsextracted fromlib.rs; inline catalog JSON replaced withcatalog::build_catalog;SetupErrorconverted tothiserror; duplicate proxy functions renamed. - Chore (toolchain/CI): MSRV bumped to 1.88 on the stable toolchain with cargo-deny strict-allowlist mode; GitHub Actions pinned to commit SHAs with new Rust test/deny jobs and split build/release orchestration; release scripts consolidated with version-sync and push-failure tracking; git hooks now guard against silent submodule data loss and pin submodules to the superproject index; ggshield secret-scanning pre-commit hook added.
- Chore (tests/docs): pytest suites replace the old smoke tests (handle-based C-ABI, plugin shim config surface); documentation tree rewritten (env-var reference consolidated into a single source of truth annotating live vs. unwired vars, CCR threshold/lifecycle/marker-format docs corrected, stale numeric claims fixed).
Infrastructure
- Tests:
cargo test --workspace✅ (1,089+ passed, 0 failed - 849 headroom-core + 240 aphrodite crates, as recorded in Maintain/CHANGELOG.md) - Build:
cargo build --release -p aphrodite -p aphrodite-hermes✅ clean (10.8s, per CHANGELOG) - crates.io: all three crates published in dependency order right after this tag -
aphrodite-headroom-core0.1.1 →aphrodite1.2.2 →aphrodite-hermes1.2.2 (the two packaging fixes this required - moving the plugin shim intotemplates/forinclude_str!, and the headroom-core pin bump 0.1.0 → 0.1.1 - landed immediately after the tag and are documented under v1.2.2 in the CHANGELOG)
What Ships
9 artifacts across 3 targets. No Windows binary on this tag - CI shipped the
three Unix targets plus their dylibs and checksums. The plugin submodule at this
tag is v2.0.5; the v2.0.6 sync landed immediately after tagging.
| # | Artifact | Platform | Kind | Size |
|---|---|---|---|---|
| 1 | aphrodite-aarch64-apple-darwin |
macOS ARM64 (Apple Silicon) | Proxy binary + CLI | 11.7 MB |
| 2 | aphrodite-x86_64-apple-darwin |
macOS Intel (x86_64) | Proxy binary + CLI | 12.6 MB |
| 3 | aphrodite-x86_64-unknown-linux-gnu |
Linux x86_64 (glibc) | Proxy binary + CLI | 38.3 MB |
| 4 | libaphrodite_hermes-aarch64-apple-darwin.dylib |
macOS ARM64 (Apple Silicon) | Hermes plugin (cdylib) | 29.4 MB |
| 5 | libaphrodite_hermes-x86_64-apple-darwin.dylib |
macOS Intel (x86_64) | Hermes plugin (cdylib) | 8.2 MB |
| 6 | libaphrodite_hermes-x86_64-unknown-linux-gnu.so |
Linux x86_64 (glibc) | Hermes plugin (cdylib) | 31.6 MB |
| 7 | SHA256SUMS-aarch64-apple-darwin.txt |
macOS ARM64 (Apple Silicon) | Checksums | 210 B |
| 8 | SHA256SUMS-x86_64-apple-darwin.txt |
macOS Intel (x86_64) | Checksums | 208 B |
| 9 | SHA256SUMS-x86_64-unknown-linux-gnu.txt |
Linux x86_64 (glibc) | Checksums | 215 B |
Missing target on this tag: x86_64-pc-windows-msvc. Plugin v2.0.5 ships from
the standalone repo, not as an asset here.
Links
- Full Changelog: Aphrodite/v1.2.1...Aphrodite/v1.2.2
- CHANGELOG.md: Maintain/CHANGELOG.md
- crates.io: https://crates.io/crates/aphrodite • https://crates.io/crates/aphrodite-hermes
- Plugin: https://github.com/PlayForm/Aphrodite-Hermes
- Headroom Fork: https://github.com/PlayForm/Headroom