Skip to content

promote: dev -> staging (bug fixes v0.2.1)#19

Merged
mabry1985 merged 4 commits intostagingfrom
dev
Apr 20, 2026
Merged

promote: dev -> staging (bug fixes v0.2.1)#19
mabry1985 merged 4 commits intostagingfrom
dev

Conversation

@mabry1985
Copy link
Copy Markdown
Contributor

@mabry1985 mabry1985 commented Apr 20, 2026

Summary

Promoting 4 bug fixes from v0.2.0 smoke testing:

Post-merge prepare-release.yml will auto-bump to v0.2.1.

Merge strategy

Use merge commit (not squash) per branch-strategy.md.

Summary by CodeRabbit

  • New Features

    • MemoryMiddleware now operates without requiring a knowledge store, enabling more flexible configurations.
    • Bearer authentication is now dynamically configured based on environment settings.
    • Sessions persist at terminal conversation turns for improved continuity.
  • Tests

    • Added memory persistence validation tests.
    • Added security scheme configuration tests.
    • Enhanced test discovery and module resolution.

mabry1985 and others added 4 commits April 19, 2026 18:21
…OKEN is set (#14)

Co-authored-by: Automaker <automaker@localhost>
…ersistence de (#15)

Co-authored-by: Automaker <automaker@localhost>
…_skill_index (#17)

Co-authored-by: Automaker <automaker@localhost>
Addresses bug #3 from v0.2.0 smoke test: MemoryMiddleware was silently
skipped when knowledge: false (the default config), so session memory
never worked out of the box.

- graph/agent.py: drop `and knowledge_store` from activation guard — memory
  middleware now activates whenever memory: true, regardless of knowledge store
- graph/middleware/memory.py: knowledge_store is now optional (default None);
  guard knowledge-extraction block when store is None; add standalone
  prior_sessions injection via before_model when running without
  KnowledgeMiddleware (no double-injection: only fires when self._store is None)

Co-authored-by: Ava <ava@protolabs.ai>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mabry1985 mabry1985 merged commit 305756e into staging Apr 20, 2026
1 check was pending
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 16cd5e78-5742-4122-bed1-25980d393297

📥 Commits

Reviewing files that changed from the base of the PR and between 8447093 and 665fc46.

📒 Files selected for processing (9)
  • .github/workflows/docker-publish.yml
  • graph/agent.py
  • graph/middleware/memory.py
  • pyproject.toml
  • requirements.txt
  • server.py
  • tests/conftest.py
  • tests/test_a2a_integration.py
  • tests/test_memory_persistence.py

Walkthrough

This PR extends the middleware stack to support optional knowledge stores, implements session-based memory persistence with prior session injection into prompts, adds conditional security scheme generation based on environment configuration, and enhances test infrastructure with import path resolution and new integration/unit tests.

Changes

Cohort / File(s) Summary
Memory Middleware & Configuration
graph/middleware/memory.py, graph/agent.py
Made knowledge_store optional in MemoryMiddleware initialization; added lazy-loaded session summary injection via new before_model and abefore_model hooks; extended after_agent to detect terminal turns (final AIMessage with no pending tool_calls) and persist sessions; early-return when store is absent to skip async knowledge extraction.
Server Security
server.py
Extracted security scheme construction into _build_security_schemes() helper that unconditionally includes apiKey and conditionally appends bearer HTTP scheme when A2A_AUTH_TOKEN environment variable is set.
Dependencies & Configuration
requirements.txt, pyproject.toml
Added explicit langchain-core>=0.3.0 dependency; configured pytest with pythonpath = ["."] to include project root in module resolution.
CI & Test Infrastructure
.github/workflows/docker-publish.yml, tests/conftest.py, tests/test_a2a_integration.py, tests/test_memory_persistence.py
Added CI step to verify test discoverability in published Docker image; introduced pytest_configure hook in conftest.py to manage sys.path site-packages ordering; added integration tests validating environment-dependent security scheme generation; added unit tests verifying session persistence logic on terminal turns.

Sequence Diagram(s)

sequenceDiagram
    participant Agent as Agent Execution
    participant MM as MemoryMiddleware
    participant State as state/messages
    participant FS as Session Storage
    
    Agent->>MM: before_model(state, runtime)
    MM->>FS: _load_prior_sessions()
    FS-->>MM: prior_sessions XML
    MM->>State: Inject SystemMessage with<br/>prior_sessions block
    State-->>Agent: Updated messages
    
    Agent->>Agent: Process with model
    
    Agent->>MM: after_agent(state, runtime)
    MM->>MM: Detect terminal turn<br/>(last msg = AIMessage,<br/>no tool_calls)
    MM->>FS: _persist_session(state, trace_id)
    FS-->>MM: Session stored
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands and usage tips.

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