Skip to content

test(core): add real-Agent NFR-P7 idle-session memory bench#5849

Merged
bug-ops merged 1 commit into
mainfrom
nfr-p7-agent-memory-bench
Jul 6, 2026
Merged

test(core): add real-Agent NFR-P7 idle-session memory bench#5849
bug-ops merged 1 commit into
mainfrom
nfr-p7-agent-memory-bench

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Review notes

  • Team review (developer, tester, perf, security, impl-critic, code-reviewer) surfaced and resolved several issues before this PR: an initial per-actor-private-SkillRegistry construction was replaced with the shared-Arc pattern production actually uses; a doc comment mis-attributing the measured cost to the message-history buffer (this is a zero-conversation-turn floor, so history is empty) was corrected; the composite-vs-housing-only scope mismatch against NFR-P7's own budget was made explicit in both the test doc comment and the spec; a synthetic-lower-bound caveat and a decomposition TODO were added.
  • A pre-existing, unrelated cargo deny advisory (RUSTSEC-2026-0204, via zeph-indexignorecrossbeam-epoch) still fails the deny gate; this PR's diff does not touch that dependency chain.
  • .local/testing/coverage-status.md and .local/testing/playbooks/session-persistence.md were updated in the main repository (not part of this diff, per project convention for shared testing docs).

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins (12368 passed)
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked
  • cargo test --doc -p zeph-core
  • Manually ran the new bench: cargo nextest run -p zeph-core -E 'test(nfr_p7)' --run-ignored ignored-only --no-capture — passes, ~876-905 KiB/session across multiple runs

Closes the measurement gap #5445's standalone harness left open: that
harness could not construct a real Agent<LoopbackChannel> (private to
zeph-core), so it only measured SessionActor::spawn's housing cost.
This adds an in-crate, ignored test that spawns real SessionActors
wrapping real Agent<LoopbackChannel> instances (sharing one SkillRegistry
across sessions, mirroring production) and samples RSS the same way
production's system_metrics module does, reporting a combined
housing+Agent-state floor directly comparable against NFR-P7's budget.

Measured ~875-905 KiB/session, under budget but with far less headroom
than the housing-only figure implied. specs/068-session-persistence/nfr.md
gains a rationale paragraph making explicit that this composite is a
distinct, larger quantity than NFR-P7's own housing-only scope, rather
than silently redefining it.
@github-actions github-actions Bot added tests Test-related changes documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate dependencies Dependency updates size/M Medium PR (51-200 lines) and removed tests Test-related changes labels Jul 6, 2026
@bug-ops bug-ops enabled auto-merge (squash) July 6, 2026 23:35
@bug-ops bug-ops merged commit a5f9c60 into main Jul 6, 2026
43 checks passed
@bug-ops bug-ops deleted the nfr-p7-agent-memory-bench branch July 6, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build a real-Agent-based memory bench to close the NFR-P7 idle-session measurement gap

1 participant