Skip to content

fix: batch fix 7 open issues — #1178 #1158 #1151 #1143 #1137 #1141 #1149 - #1197

Open
syltharion wants to merge 7 commits into
oceanbase:mainfrom
syltharion:fix/batch-7-issues-clean
Open

fix: batch fix 7 open issues — #1178 #1158 #1151 #1143 #1137 #1141 #1149#1197
syltharion wants to merge 7 commits into
oceanbase:mainfrom
syltharion:fix/batch-7-issues-clean

Conversation

@syltharion

Copy link
Copy Markdown

Summary

Batch fix for 7 open issues. Each fix is a separate commit for easy review.

Fixes

Issue Fix Files
#1178 Remove stale dynamic CSS class lookup from feature icons Features/index.tsx
#1158 Add NimRerank and NimRerankConfig to rerank package exports rerank/__init__.py
#1151 Persist should_forget marker in metadata dict for OceanBase core/memory.py
#1143 Extract retention_score from intelligence.current_retention before persist multi_agent.py, multi_user.py
#1137 Sanitize 23 str(e) leaks in API responses (security) health_check.py, 4 services, system.py
#1141 Unify _rule_based_evaluation() with six-dimension weighted scoring importance_evaluator.py
#1149 Replace linear decay formula with EbbinghausAlgorithm.calculate_current_retention() multi_agent.py, multi_user.py

Commit structure

fix(website): remove stale dynamic CSS class lookup (#1178)
fix(rerank): add NimRerank to package exports (#1158)
fix(intelligence): persist should_forget in metadata for OceanBase (#1151)
fix(agent): retention_score + Ebbinghaus decay (#1143, #1149)
fix(server): sanitize str(e) leaks in API responses (#1137)
refactor(intelligence): unify importance scoring with six-dimension weighting (#1141)
test: add regression tests for all 7 fixes

Detailed descriptions

FC-1 (#1178): PR #1170 removed per-feature CSS classes but left the dynamic ${styles[icon-${feature.key}]} lookup in JSX, rendering literal undefined on all 5 feature icon wrappers.

FC-2 (#1158): PR #1157 added NimRerank provider but did not update __init__.py, causing ImportError on package-level import.

FC-3 (#1151): _forget_marker_updates() only wrote top-level fields. OceanBase's _build_record_for_insert() only maps known fields to DB columns, silently dropping should_forget. Fix adds a metadata dict copy so the marker persists via the JSON column.

FC-4 (#1143): _persist_memory_to_storage() wrote retention_score: null because it read from memory_data before the field was populated. Fix extracts from enhanced_metadata['intelligence']['current_retention'].

FC-5 (#1137): 23 locations across health_check.py and service files used str(e) in API responses, potentially leaking DSNs, credentials, and paths. All replaced with generic messages; raw exceptions preserved in logs.

FC-6 (#1141): _rule_based_evaluation() used a standalone English-only keyword heuristic. Refactored to call all six _evaluate_* dimension methods and aggregate with criteria_weights. get_importance_breakdown() now includes weighted_total.

FC-7 (#1149): update_memory_decay() used hardcoded linear decay instead of EbbinghausAlgorithm. Replaced with proper exponential decay, with fallback for memories missing metadata.intelligence.

Test results

  • Unit tests: 93/93 passed (100%)
  • Smoke tests: 9/9 passed

syltharion added 7 commits July 25, 2026 20:01
Closes oceanbase#1178

PR oceanbase#1170 removed per-feature icon CSS classes (.icon-developer,
.icon-intelligent, etc.) from styles.module.css but left the dynamic
lookup ${styles[`icon-${feature.key}`]} in the JSX. All five feature
icon wrappers rendered a literal 'undefined' class token.

Remove the stale interpolation since the redesign uses one shared
icon treatment (${styles.icon}).
Closes oceanbase#1158

PR oceanbase#1157 added the NimRerank provider but did not update the rerank
package __init__.py, causing ImportError on package-level import:

    from powermem.integrations.rerank import NimRerank

Add NimRerank (from .nim) and NimRerankConfig (from .config.providers)
to the imports and __all__.
…OceanBase

Closes oceanbase#1151

When EbbinghausIntelligencePlugin.on_get() returns delete_flag=True,
_forget_marker_updates() only wrote should_forget and
marked_for_forgetting_at as top-level fields. OceanBase's vector store
only maps known fields to DB columns, so these were silently dropped.

SQLite was unaffected because it stores the entire payload as JSON.

Fix: add a metadata dict copy in _forget_marker_updates() so the
marker is persisted via the metadata JSON column on all backends.
Keep top-level fields for backward compatibility.
…inghaus

Closes oceanbase#1143
Closes oceanbase#1149

Two related fixes in agent layer memory management:

FC-4 (oceanbase#1143): _persist_memory_to_storage() wrote retention_score=null
because it read from memory_data before the field was populated. Fix:
extract from enhanced_metadata['intelligence']['current_retention']
with fallback to 1.0.

FC-7 (oceanbase#1149): update_memory_decay() used a hardcoded linear formula
(current_score * (1 - 0.1 * hours/24)) instead of the project's
EbbinghausAlgorithm. Replace with EbbinghausAlgorithm.calculate_current_retention(),
with graceful fallback for memories missing metadata.intelligence.
Closes oceanbase#1137

Replace 23 instances of str(e) interpolation in user-facing API
responses with generic error messages. Raw exceptions may contain
DSNs, credentials, internal hostnames, or filesystem paths.

Affected files:
- health_check.py: _check_database_sync(), _check_llm_sync()
- memory_service.py: create/get/update/delete/search operations
- user_service.py: create/get/update/delete operations
- agent_service.py: create/get/update/delete operations
- search_service.py: search operation
- system.py: delete-all-memories

All raw exceptions are preserved via logger.error()/logger.exception()
for operator diagnostics. Pattern follows the public_startup_error_with_recommendation()
helper introduced in PR oceanbase#1133.
…n weighting

Closes oceanbase#1141

_rule_based_evaluation() used a standalone keyword heuristic
(English-only keywords, content length thresholds) instead of the
existing six _evaluate_* dimension methods and criteria_weights.

Refactor to call all six dimension evaluators (_evaluate_relevance,
_evaluate_novelty, _evaluate_emotional_impact, _evaluate_actionable,
_evaluate_factual, _evaluate_personal) and aggregate with
criteria_weights. Also add weighted_total to get_importance_breakdown()
output.

Chinese content and full-width punctuation now handled via extended
keyword lists.
Add per-issue regression tests to prevent future regressions:

- test_issue_1178_css_fix.py: verify no 'undefined' in rendered classes
- test_issue_1158_nim_rerank_export.py: verify NimRerank importable
- test_issue_1151_forget_marker.py: verify metadata dict has should_forget
- test_issue_1143_retention_score.py: verify non-null retention_score
- test_issue_1137_api_error_leak.py: verify no str(e) in responses
- test_issue_1141_importance_evaluator.py: verify weighted scoring
- test_issue_1149_ebbinghaus_decay.py: verify Ebbinghaus is used
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


syltharion seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants