Skip to content

fix: harden memory buffer, reranker init, and tenant-scoped bulk delete - #298

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/overall-code-stability-7614
Draft

fix: harden memory buffer, reranker init, and tenant-scoped bulk delete#298
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/overall-code-stability-7614

Conversation

@cursor

@cursor cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Post-merge stability review after #294 (CI secret scan) and #296 (Go deps bump). Full local CI matrix passed on master; code review found three runtime/security gaps that are fixed here.

Type

  • fix — bug fix

Changes

  • MessageBuffer typed-nil: avoid passing typed-nil Neo4j client into buffer interface; guard flush when backend unavailable
  • Reranker typed-nil: clear reranker interface on init failure to prevent search panics when rerank=true
  • Tenant-scoped bulk delete: BulkDeleteByFilter now requires auth-bound tenant_id in Neo4j query and service layer
  • Handler context: memory update/process/batch/reset/bulk-delete and v3 compat paths use requestContextWithTenant
  • GetMemoryHistory: verify tenant access via GetMemory before returning history

Testing

go build ./...
go test -short ./...
  • Built locally
  • Tested affected endpoints/components
  • Full CI matrix validated locally: dashboard+open, landing, node SDK, python SDK (17 passed), mintlify validate, docs export, api-proxy, gosec, secret scan

Deploy impact

  • API (api.hystersis.com)
  • Landing
  • Docs
  • Dashboard

Agent notes

Cloud Agent PR on cursor/overall-code-stability-7614; auto-merge when CI Success passes.

Open in Web View Automation 

- Guard MessageBuffer flush when Neo4j backend is unavailable (typed-nil fix)
- Clear reranker interface on init failure to prevent search panics
- Scope BulkDeleteByFilter by auth-bound tenant_id in Neo4j and service layer
- Route memory mutation/compat handlers through requestContextWithTenant

Co-authored-by: Himan <Himan-D@users.noreply.github.com>
@ecc-tools

ecc-tools Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
agent-memorydash 2574547 Jul 20 2026, 04:02 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
hystersis-app 2574547 Jul 20 2026, 04:06 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
hystersis-docs 2574547 Jul 20 2026, 04:11 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
agent-memory 2574547 Jul 20 2026, 04:14 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant