Skip to content

fix(demo): treat HTTP 202 Accepted as background-store success#239

Closed
Fearvox wants to merge 668 commits into
EverMind-AI:mainfrom
Fearvox:fix/issue-93-handle-202-accepted
Closed

fix(demo): treat HTTP 202 Accepted as background-store success#239
Fearvox wants to merge 668 commits into
EverMind-AI:mainfrom
Fearvox:fix/issue-93-handle-202-accepted

Conversation

@Fearvox
Copy link
Copy Markdown
Collaborator

@Fearvox Fearvox commented Jun 3, 2026

fix(demo): treat HTTP 202 Accepted as background-store success

Closes #93.

Problem

SimpleMemoryManager.store() (the demo client in
methods/EverCore/demo/utils/simple_memory_manager.py) called
response.json() on every non-error POST. When the EverCore memory API
runs extraction in the background it answers POST /api/v1/memories with
202 Accepted and an empty body. response.raise_for_status() passes the
202 through (2xx), then response.json() either raises or yields no status,
so store() drops into the failure branch and prints
❌ Storage failed: ... — even though the write was accepted. This is exactly
the symptom reported in #93: "Storage failed: Request accepted, processing in
background."

Fix

Add a 202 branch right after raise_for_status() and before response.json().
On 202 the demo prints a ⏳ Accepted … (Processing in background) notice and
returns True. No other behavior changes — non-202 success and error paths are
untouched.

response.raise_for_status()

# Background mode returns 202 Accepted (memory extraction
# continues asynchronously). Treat it as success instead of
# falling through to result.json() and reporting a failure.
if response.status_code == 202:
    print(
        f"  ⏳ Accepted: {content[:40]}... (Processing in background)"
    )
    return True

result = response.json()

Test

Adds methods/EverCore/tests/test_simple_memory_manager.py, an offline
regression that monkeypatches httpx.AsyncClient to return a 202 response and
asserts store() returns True. No live EverCore stack, database, or network
is required.

Run it:

cd methods/EverCore
PYTHONPATH=src:. uv run pytest tests/test_simple_memory_manager.py -q
# 1 passed

Verified locally on this branch:

  • With the fix: 1 passed (exit 0).
  • Without the fix (negative control): 1 failed (exit 1) —
    '_AcceptedResponse' object has no attribute 'json' and the demo prints
    ❌ Storage failed, reproducing Storage failed: Request accepted, processing in background #93. This confirms the test exercises the
    fix rather than passing vacuously.

Scope

Two files, surgical:

  • methods/EverCore/demo/utils/simple_memory_manager.py (+10, the 202 branch only)
  • methods/EverCore/tests/test_simple_memory_manager.py (new, offline regression)

No production memory-layer code is touched; this is demo-client robustness plus
its regression test.

Credit

The 202-handling approach matches upstream PR
#211
("fix: handle 202 Accepted response in demo store method") by @haifengqiu (梓宏),
credited on the commit via Co-authored-by.


🤖 Generated with Claude Code

libin.zhang and others added 30 commits December 31, 2025 18:23
Use self-deployed embedding and rerank APIs by default

See merge request npc-work/aic/ai/evermemos-opensource!64
vLLM Rerank API adopts an instruction-tuned approach

See merge request npc-work/aic/ai/evermemos-opensource!65
feat: metrics client and rerank/vectorize/retrieve metrics

See merge request npc-work/aic/ai/evermemos-opensource!66
fix:update episode prompt

See merge request npc-work/aic/ai/evermemos-opensource!68
feat: add rerank metrics

See merge request npc-work/aic/ai/evermemos-opensource!69
cyfyifanchen and others added 25 commits April 27, 2026 03:42
* chore: rename project from evermemos to EverCore

This commit renames the project directory and updates all internal references from "evermemos" to "EverCore". The changes include:
- Renaming the main directory from `methods/evermemos` to `methods/EverCore`
- Updating all import paths and module references
- Maintaining the same code structure and functionality
- Adding new configuration files (.vscode/settings.json, .pylintrc, pyrightconfig.json)
- Updating Dockerfile and project metadata

* docs: update references from evermemos to EverCore

Update documentation files to reflect the renaming of the 'evermemos' directory to 'EverCore'. This includes fixing clone commands, directory paths, and documentation links across multiple files to ensure consistency and correct navigation for users.

* chore: rename EverMemOS to EverCore across codebase

This is a project-wide rebranding from EverMemOS to EverCore. The changes include:
- Update project name in source files, documentation, and configuration
- Rename API references, environment variables, and service names
- Modify demo descriptions and benchmark configurations
- Update URLs and citations to reflect new project identity

All functionality remains identical; only naming has changed to align with the new project branding.

* docs: update README with EverCore focus and restructured TOC

- Add line break before Table of Contents for better visual separation
- Rewrite project description to highlight EverCore as the central component
- Reorder directory tree to prioritize benchmarks and methods over use-cases
- Update use-cases list with more examples and clarify they are templates
- Improve flow from Quick Start to use-cases to benchmarks

* docs: update README with clearer methods description and benchmarks

Add benchmark numbers directly in the method summaries for better visibility.
Clarify introductory text to emphasize choice and composition of methods.

* docs: fix markdown formatting in README table of contents

Adjust whitespace and line breaks to ensure proper rendering of the collapsible table of contents section.
…d-AI#204)

- Replace specific EverMemBench-Dynamic badge with general EverMind-AI HuggingFace badge
- Remove redundant License badge
- Change "Methods" section heading to "Architecture Methods"
- Update sub-section headings from h4 (####) to h3 (###) for better hierarchy
…rMind-AI#208)

* docs: restructure README and add AGENTS.md for better navigation

- Reorder sections to emphasize architecture methods and use cases
- Move use cases section before quick start for better flow
- Rename "Methods" to "Architecture Methods" for clarity
- Add AGENTS.md with quick commands and key entry points
- Update section headers to improve document hierarchy
- Maintain all existing content while improving organization

* docs: add community and contribution files

* docs: reorder README directory tree for logical grouping

* docs: move community files to .github/ and update references

* ci: change deploy workflow trigger from feature branch to main
* docs: restructure README and add subdirectory guides

Move the directory tree from the main README to new dedicated README files for each top-level folder (use-cases, methods, benchmarks). Add detailed introductions and tables to guide users to the appropriate subprojects. This improves navigation and provides clear entry points for different use cases.

* docs: expand showcase section with new projects and links

Add six new project entries to the README showcase, each with a banner image, description, and code/plugin link. Also update an existing benchmark entry to include a dataset link. This enhances the repository's demonstration of real-world applications and available resources.
* docs(readme): update project links and formatting

* docs(use-cases): enhance README with visual catalogue of demos

Expand the use cases section from a simple table to a detailed visual catalogue with project banners, descriptions, and links. This improves user engagement and provides a better showcase of community integrations and demos.

* docs: update READMEs and add validation for use-case links
* docs: update plugin repository link in README

* docs(readme): update banner gif link
)

* docs(readme): update code example link to pinned commit

pin the reference to the voice assistant example code to a specific commit hash and fix folder name capitalization

* docs: update voice assistant demo link in README
* docs(readme): add four new use case entries

* docs(readme): update outdated banner links to correct github repos
…e-demo-content-payload

Fix EverCore demo memory payload
…actions-hygiene

Harden GitHub Actions workflows
…adme-quickstart

docs: verify EverCore quickstart path
…I#236)

Delete deprecated EvoAgentBench, EverMemBench benchmark suites and
HyperMem memory system implementation, including all associated
configurations, scripts, and supporting assets.
SimpleMemoryManager.store() called response.json() on every successful
POST. When the EverCore memory API runs background extraction it replies
202 Accepted with no JSON body, so store() fell into the failure path and
printed "Storage failed", even though the write was accepted. Add a 202
branch that returns True with a 'processing in background' notice before
parsing the body.

Closes #93.

Adds tests/test_simple_memory_manager.py, an offline regression that mocks
httpx.AsyncClient to return 202 and asserts store() returns True (no live
stack required).

Co-authored-by: 梓宏 <41323770+haifengqiu@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 3, 2026 02:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Storage failed: Request accepted, processing in background