fix: audit-health JSON timeouts and partial results on large stores#1214
Conversation
- Add `status` field ("ok"|"partial"|"failed") and `errors` array to AuditHealthReport schema
- Keep backward-compatible `ok` field (deprecated)
- Add 5000-row LIMIT to implicitFeedbackPrefixHistogram query to prevent scanning huge fact tables
- Wrap prefix histogram in try-catch with error tracking
- Add 5-second timeout for LanceDB size calculation (getStorageSizes)
- Update strict mode to check both status and ok fields
- Update markdown printer to show errors section
- Update tests to validate new schema fields
Fixes hang on long-lived stores by bounding expensive operations.
Agent-Logs-Url: https://github.com/markus-lassfolk/openclaw-hybrid-memory/sessions/64bfcd5d-27d4-4a78-b223-6142f3a0b1ab
Co-authored-by: markus-lassfolk <3661143+markus-lassfolk@users.noreply.github.com>
Agent-Logs-Url: https://github.com/markus-lassfolk/openclaw-hybrid-memory/sessions/64bfcd5d-27d4-4a78-b223-6142f3a0b1ab Co-authored-by: markus-lassfolk <3661143+markus-lassfolk@users.noreply.github.com>
- Pin CI/security to Node 22.16 (node:sqlite + FTS5, nodejs/node#57621) - engines, .nvmrc, docs: require >=22.16.0; sync verify/maintenance copy - Tests: storageGrowth null handling; EventLog CHECK relaxed - CHANGELOG [Unreleased]: Node requirement under Changed Co-authored-by: Cursor <cursoragent@cursor.com>
Forge Feedback Loop
|
Changed Files SummarySource (4)
Tests (2)
Docs (1)
Total: 7 files changed |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6accf8f712
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR improves operator reliability of the hybrid-mem audit-health CLI JSON output on large/long-lived stores by introducing bounded work (timeouts/limits) and adding machine-readable partial-result metadata, while also bumping the project’s minimum supported Node.js version to 22.16.0 for node:sqlite/FTS5 support.
Changes:
- Add
statusanderrors[]fields to the audit-health JSON report and surface errors in markdown output. - Bound potentially expensive audit-health work (row cap for implicit-feedback prefix scan; 5s timeout wrapper around LanceDB size probing).
- Update Node.js minimum version to
>=22.16.0across engines, CI, docs, and related tests/messages.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates Node.js version badge to 22.16.0 minimum. |
| packages/openclaw-hybrid-memory-install/package.json | Bumps Node.js engine requirement to >=22.16.0. |
| package.json | Bumps root Node.js engine requirement to >=22.16.0. |
| extensions/memory-hybrid/tests/maintenance-log-analyzer.test.ts | Updates expected Node.js minimum version text in classification tests. |
| extensions/memory-hybrid/tests/event-log.test.ts | Adjusts expectation for relaxed event_type enforcement (no CHECK constraint). |
| extensions/memory-hybrid/tests/audit-health-cli.test.ts | Extends audit-health JSON schema assertions to include status and errors, and tightens storageGrowth assertions. |
| extensions/memory-hybrid/services/maintenance-rules.json | Updates operator guidance to Node.js >=22.16.0. |
| extensions/memory-hybrid/README.md | Updates documented Node.js requirement to >=22.16.0. |
| extensions/memory-hybrid/package.json | Bumps Node.js engine requirement to >=22.16.0. |
| extensions/memory-hybrid/package-lock.json | Updates lockfile metadata (version/engines) to match Node.js requirement and package version. |
| extensions/memory-hybrid/cli/commands/manage/register-storage-and-stats.ts | Implements audit-health partial/error reporting, caps an expensive query, and wraps LanceDB sizing in a timeout. |
| extensions/memory-hybrid/cli/cmd-verify.ts | Updates Node.js-related verification guidance to >=22.16.0. |
| docs/QUICKSTART.md | Updates onboarding Node.js requirement to >=22.16.0. |
| CHANGELOG.md | Documents audit-health reliability changes and Node.js minimum bump. |
| .nvmrc | Updates the pinned Node.js version to 22.16.0. |
| .github/workflows/security.yml | Updates workflow Node.js version to 22.16. |
| .github/workflows/ci.yml | Updates CI Node.js versions/caching keys from 22.12 to 22.16. |
Files not reviewed (1)
- extensions/memory-hybrid/package-lock.json: Language not supported
…gelog ref - Derive partial status when warnings or report errors exist; align legacy ok flag. - Record LanceDB du timeout in report.errors; kill du via execFile timeout. - Rename misleading EventLog test describe; changelog references #1214. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1da6cf32c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… LIMIT+1 Co-authored-by: Cursor <cursoragent@cursor.com>
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.