René's URL Explorer Experiment


Title: memory_heal has no orphan-facet sweep, and facets/remove needs the full targetId+dimension+value triple · Issue #1614 · rohitg00/agentmemory · GitHub

Open Graph Title: memory_heal has no orphan-facet sweep, and facets/remove needs the full targetId+dimension+value triple · Issue #1614 · rohitg00/agentmemory

X Title: memory_heal has no orphan-facet sweep, and facets/remove needs the full targetId+dimension+value triple · Issue #1614 · rohitg00/agentmemory

Description: Summary #1589 was closed by #1591 for the new deletion paths, which is the important half — thanks for that. This tracks the two follow-ups that PR body explicitly left out: "The memory_heal orphan sweep and targetId-only facets/remove a...

Open Graph Description: Summary #1589 was closed by #1591 for the new deletion paths, which is the important half — thanks for that. This tracks the two follow-ups that PR body explicitly left out: "The memory_heal orphan...

X Description: Summary #1589 was closed by #1591 for the new deletion paths, which is the important half — thanks for that. This tracks the two follow-ups that PR body explicitly left out: "The memory_heal o...

Opengraph URL: https://github.com/rohitg00/agentmemory/issues/1614

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"memory_heal has no orphan-facet sweep, and facets/remove needs the full targetId+dimension+value triple","articleBody":"## Summary\n\n#1589 was closed by #1591 for the *new deletion* paths, which is the important half — thanks for that. This tracks the two follow-ups that PR body explicitly left out:\n\n> \"The `memory_heal` orphan sweep and `targetId`-only `facets/remove` are separate changes.\" — #1591\n\nBoth matter for existing stores, because a cascade fix cannot clean rows that were already orphaned before it landed.\n\n## 1. `memory_heal` cannot see facets\n\n`src/functions/diagnostics.ts` on `main` has **zero** occurrences of `facet`. The heal categories are actions / leases / sentinels / sketches / signals / sessions / memories / lessons / summaries / semantic / procedural / crystals / insights / mesh — facets are not among them, so there is no supported way to reclaim orphan facet rows.\n\nMeasured on 0.9.30 with 4 orphan rows present:\n\n```\nPOST /agentmemory/diagnostics/heal  {\"dryRun\":true}\n  -> {\"details\":[],\"fixed\":0,\"skipped\":0,\"success\":true}\nPOST /agentmemory/diagnostics/heal\n  -> {\"details\":[],\"fixed\":0,\"skipped\":0,\"success\":true}\n```\n\nBoth runs report success while the orphans survive.\n\n## 2. `facets/remove` requires the full triple, unlike the query side\n\n```\nPOST /agentmemory/facets/query  {\"matchAll\":[\"tool:\u003cname>\"],\"targetType\":\"memory\"}\n  -> 200, returns the facet + targetId\n\nPOST /agentmemory/facets/remove {\"targetId\":\"\u003cid>\"}\n  -> 400 {\"error\":\"targetId and dimension are required\"}\n\nPOST /agentmemory/facets/remove {\"targetId\":\"\u003cid>\",\"dimension\":\"tool\",\"value\":\"\u003cname>\"}\n  -> 200 {\"removed\":1,\"success\":true}\n```\n\nSo the query API identifies a target by id alone, while removal needs you to already know every `(dimension, value)` pair it carries. For a target with N facets that is N calls, each of which has to be discovered from a query first.\n\n## Reproduction of the residue\n\n1. create a memory, tag it with two facets, confirm `facets/query` returns it\n2. delete the memory *before* #1591 landed → `{\"deleted\":1,...}`\n3. later, try to delete it again: `{\"deleted\":0,\"notFound\":[\"\u003cid>\"],\"success\":true}` — the body is gone\n4. `facets/query` for either facet value **still returns that targetId**\n5. `diagnostics/heal` dry-run and real both report `fixed:0`\n6. only per-facet `facets/remove` calls with the full triple clear them\n\n## Why it matters beyond hygiene\n\nA dedupe step that queries facets before writing (`xtool:true`, `tool:\u003cname>`) sees the orphan and concludes the entry already exists, so the real entry is never written. That is exactly how we hit it: an orphan made a compliant re-write look like a duplicate.\n\n## Proposed\n\n1. Add an orphan-facet sweep to `memory_heal`: scan `mem:facets`, drop rows whose `targetId` no longer resolves in the memories (and semantic) store. #1591 already ships the \"resolve first, then delete\" helper (`deleteFacetsForTargets`), so the sweep can reuse it.\n2. Either accept `targetId` alone on `facets/remove` (removing every facet for that target), or document the required triple next to the query API — the current asymmetry is easy to trip over.\n\nAlso worth folding in while it is open: #1591 notes observation, action and `mem:core` targets orphan the same way on their delete paths.\n\nHappy to test a patch against a store that has pre-existing orphans (we can produce them deterministically).","author":{"url":"https://github.com/7889545","@type":"Person","name":"7889545"},"datePublished":"2026-10-25T20:03:55Z","url":"https://github.com/rohitg00/agentmemory/issues/1614"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fa98cae5-e019-4f03-84f6-53a070b64880
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9D96:2B1900:B7E81:EE928:6AEBDF9E
html-safe-nonce62b0133999a8171b4f95823184f3a5758de33091d96c3828478a94480520bed0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDk2OjJCMTkwMDpCN0U4MTpFRTkyODo2QUVCREY5RSIsInZpc2l0b3JfaWQiOiI4MTM2Mzk0MjI0OTUzOTc0Njg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0dc248e71655cd7d6f0e18c18c94b3f3b372b3242158c66ceec6ec7e1ca0a040
hovercard-subject-tagissue:6028693138
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rohitg00/agentmemory/1614/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2dc2fe40b3b90e158d25fa0b5837f90591219ac6eb163f1ddee61ce081a06ab9/rohitg00/agentmemory/issues/1614
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2dc2fe40b3b90e158d25fa0b5837f90591219ac6eb163f1ddee61ce081a06ab9/rohitg00/agentmemory/issues/1614
og:image:altSummary #1589 was closed by #1591 for the new deletion paths, which is the important half — thanks for that. This tracks the two follow-ups that PR body explicitly left out: "The memory_heal orphan...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:username7889545
hostnamegithub.com
expected-hostnamegithub.com
None701f7e3aecc56e7594e73fa7b7e1483af74322a67f7038be453d0feb05e86e77
turbo-cache-controlno-preview
go-importgithub.com/rohitg00/agentmemory git https://github.com/rohitg00/agentmemory.git
octolytics-dimension-user_id48523873
octolytics-dimension-user_loginrohitg00
octolytics-dimension-repository_id1166408297
octolytics-dimension-repository_nworohitg00/agentmemory
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1166408297
octolytics-dimension-repository_network_root_nworohitg00/agentmemory
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release12d1048a3491dd63e4193b2937cf72f1c24a2a52
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/rohitg00/agentmemory/issues/1614#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frohitg00%2Fagentmemory%2Fissues%2F1614
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frohitg00%2Fagentmemory%2Fissues%2F1614
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=rohitg00%2Fagentmemory
Reloadhttps://github.com/rohitg00/agentmemory/issues/1614
Reloadhttps://github.com/rohitg00/agentmemory/issues/1614
Reloadhttps://github.com/rohitg00/agentmemory/issues/1614
rohitg00https://github.com/rohitg00
agentmemoryhttps://github.com/rohitg00/agentmemory
Codehttps://github.com/rohitg00/agentmemory
Issues238 (238)https://github.com/rohitg00/agentmemory/issues
Pull requests252 (252)https://github.com/rohitg00/agentmemory/pulls
Discussionshttps://github.com/rohitg00/agentmemory/discussions
Actionshttps://github.com/rohitg00/agentmemory/actions
Projectshttps://github.com/rohitg00/agentmemory/projects
Security and qualityhttps://github.com/rohitg00/agentmemory/security
Insightshttps://github.com/rohitg00/agentmemory/pulse
https://github.com/rohitg00/agentmemory
New issuehttps://github.com/login?return_to=https://github.com/rohitg00/agentmemory/issues/1614
New issuehttps://github.com/login?return_to=https://github.com/rohitg00/agentmemory/issues/1614
memory_heal has no orphan-facet sweep, and facets/remove needs the full targetId+dimension+value triplehttps://github.com/rohitg00/agentmemory/issues/1614#top
https://github.com/7889545
7889545https://github.com/7889545
on Oct 25, 2026https://github.com/rohitg00/agentmemory/issues/1614#issue-6028693138
#1589https://github.com/rohitg00/agentmemory/issues/1589
#1591https://github.com/rohitg00/agentmemory/pull/1591
#1591https://github.com/rohitg00/agentmemory/pull/1591
fix(facets): cascade facet deletion on memory delete #1591https://github.com/rohitg00/agentmemory/pull/1591
fix(facets): cascade facet deletion on memory delete #1591https://github.com/rohitg00/agentmemory/pull/1591
#1591https://github.com/rohitg00/agentmemory/pull/1591
Sign up for freehttps://github.com/signup?return_to=https://github.com/rohitg00/agentmemory/issues/1614
Sign in to commenthttps://github.com/login?return_to=https://github.com/rohitg00/agentmemory/issues/1614
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.