Repository navigation
Conversation
Entity memories about restricted assets were visible through direct REST reads. Check ViewBasic on the anchor for non-owners. Search still relies on domain inheritance and search RBAC; asset policies are not evaluated per result.
The by-name Company Context lookup omitted primaryEntity, so an anchored memory appeared unanchored to the visibility check. Fetch the decision fields before projecting the pill. Query search remains governed by search RBAC and inherited domains.
History endpoints exposed earlier versions without checking the current memory's visibility. Check the current memory before serving either history endpoint. Keep paging cursors when hidden memories are filtered from a list page so callers can reach later visible rows.
Map supersession and dispute fields in every search locale and request the relationship fields needed by memory docs during reindex. Default an omitted status to Active on create. The generated model leaves the schema default null, which broke lifecycle reads after regeneration.
Stamp lifecycle status on chunk docs and accept it in both vector query builders. Non-Active transitions change the fingerprint to refresh the filter fields; existing Active memories keep their fingerprint.
Preserve server-managed lifecycle fields on PUT so re-extraction cannot reactivate a superseded memory or erase disputes. Reject newly referenced memories the editor cannot read, and cache anchor access decisions within each list page.
Search cannot evaluate an anchor's asset policy for each indexed hit. Limit anchored Entity memories to owners and admins in lexical and vector search; direct reads still allow asset readers. Require an explicit unanchored marker so older documents fail closed until reindexed. Stamp the marker on entity and chunk documents.
Keep retired memories available through direct lifecycle and version reads while excluding them from lexical, vector, and Company Context retrieval.
Allow status selection alongside search, asset, author, and sort filters while keeping ordinary search Active-only. Preserve lifecycle fields on omitted-status PUT and prevent non-Active memories from proposing glossary terms. Extend API and UI coverage for these behaviors.
Reconcile Public memory visibility and index fields after the parent PR landed. Cover retired memory behavior in Playwright and align the deleted-source glossary expectation. Refs open-metadata#34394
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
wait to merge until #34541 is in!! |
|
|
|
…n-metadata/OpenMetadata into pmbrull/memory-lifecycle-main
Map legacy migration values directly to shared statuses while retaining the 2.1.1 conversion for databases that stored preview values. Treat statusless memories as Approved in reconciliation, ontology derivation, and duplicate matching. Refs open-metadata#34394
…le-3' into pmbrull/memory-lifecycle-main
Code Review ✅ Approved 4 closed / 4 findings🔴 High risk · Anchor-based authorization and lifecycle status changes alter memory access and visibility. Adds memory lifecycle and status filtering with Draft, Approved, Deprecated, Rejected, and Archived states, alongside access controls and supersession validation. Resolves file-extracted knowledge pill visibility for non-admin users, legacy status normalization to prevent update failures, search inclusion of statusless memories, and chunk header schema alignment with ✅ 4 closed✅ Bug: File-extracted knowledge pills drop out of search for non-admin users
✅ Bug: Memories stored without a status can no longer be updated
✅ Bug: Status-less legacy memories vanish from search, list, pills and proposals
✅ Performance: Chunk header requests
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
|



Replaced by #34647, targeting
mainafter #34541 merged. GitHub closed this PR when its former base branch was removed; the prior discussion is retained here. Current validation evidence is in #34647.Describe your changes
Fixes #34394. This PR is stacked on #34541, which introduces the shared
entityStatusfield and per-entity lifecycle declarations. Please merge #34541 first.supersededByreference; Rejected means its claim was invalidated, withstatusReasonavailable to explain why. These outcomes do not add values to the sharedEntityStatusenum.entityStatusto older chunk mappings.Type of change
Tests
yarn jestonContextCenterMemoriesPage.test.tsx,CreateMemoryModal.test.tsx,MemoriesView.test.tsx, andMemoryDerivedOntology.utils.test.tswith--runInBand— 39 passed. The page tests reproduce view/editor reopening and cover a successor response arriving after close.PW_PRESEEDED_STATE=true PLAYWRIGHT_IS_OSS=true PLAYWRIGHT_TEST_BASE_URL=http://127.0.0.1:3000 yarn playwright test playwright/e2e/Features/ContextCenterMemoryLifecycle.spec.ts --project=chromium --workers=1— all 3 tests passed after refreshing the admin test session. The added regression exercises Cancel, Escape, Edit/Cancel, the close button, and successor navigation. A separate read-only test of the reported local memory link also passed.yarn lint:playwrightcompleted with 0 errors (existing warnings).yarn token-auditstill reports 83 errors in untouched stylesheets; this fix changes no styles.mvn -pl openmetadata-spec clean install -DskipTests— generated Java enum rebuilt successfully.mvn -pl openmetadata-service -Dtest=ContextMemoryLifecycleTest,ContextMemorySchemaTest,ContextMemoryStatusTransitionTest,ContextMemoryIndexTest,ContextMemorySearchVisibilityTest,OpenSearchVectorServiceTest,VectorDocBuilderChunkTest,VectorSearchQueryBuilderTest,OntologyChangePreflightTest,OntologyMemoryDerivationServiceTest -DfailIfNoTests=false test— 158 passed.mvn -pl openmetadata-mcp -Dtest=CompanyContextToolTest -DfailIfNoTests=false test— 18 passed.mvn -pl openmetadata-integration-tests -Dtest=ContextMemoryLifecycleIT,ContextMemoryAnchorIT,ContextMemoryStatusMigrationIT,OntologyChangeSetIT -DfailIfNoTests=false test— 43 reported, no failures (PostgreSQL). The concurrent runner's per-class report undercounted the memory classes, so they were rerun alone: Lifecycle 20/20 and Anchor 12/12.mvn -pl openmetadata-integration-tests -Dtest=ContextMemoryLifecycleIT,ContextMemoryAnchorIT,ContextMemoryStatusMigrationIT -DfailIfNoTests=false test— 33 passed, no failures. The focused service, MCP, and Jest runs passed again: 158, 18, and 36 tests respectively.ContextMemoryStatusMigrationITpassed against both PostgreSQL and MySQL after restoring its fixture unchanged.mvn -pl openmetadata-integration-tests -Dtest=ContextMemoryLifecycleIT,ContextMemoryAnchorIT,OntologyChangeSetIT -DfailIfNoTests=false test— 42 passed.mvn -pl openmetadata-service -Dtest=ContextMemoryReconcilerTest,OntologyMemoryDerivationQueueTest,SemanticMemoryDuplicateFinderTest,ContextMemoryLifecycleTest,ContextMemorySearchVisibilityTest,OpenSearchVectorServiceTest,VectorSearchQueryBuilderTest -DfailIfNoTests=false test— 130 passed. This fixes the two legacy-status failures reported by the previous full service CI run and covers legacy duplicate reuse.mvn -pl openmetadata-service -Dtest=ContextMemoryReconcilerTest,OntologyMemoryDerivationQueueTest,SemanticMemoryDuplicateFinderTest -DfailIfNoTests=false test— 28 passed.openmetadata-service-unit-testsCI on commitbf7bffae5c— 11,049 tests, 0 failures, 0 errors, 1 skipped. The previous two legacy-memory failures are resolved.yarn jest --runInBand --passWithNoTestson the four focused Context Center suites — 36 passed.mvn -pl openmetadata-service,openmetadata-integration-tests,openmetadata-mcp spotless:applyand UI checkstyle on changed files — passed; Playwright spec ESLint/Prettier passed.bf7bffae5cran the updatedContextCenterMemoryLifecycle.spec.ts: both lifecycle tests passed with Deprecated/Rejected. The shard finished 128 passed, 1 failed inArticleReviewerWorkflow.spec.ts(article remained Draft instead of In Review); that workflow is outside this PR's changed files. Commit445b016f2aonly removes migration changes.yarn tsc:checkandyarn tsc:playwrightremain red on errors outside the changed files; neither reported an error in the Context Center files or the lifecycle Playwright spec.The full local
mvn -pl openmetadata-service testrun reached 11,048 tests with zero assertion failures and two errors in the unrelatedK8sPipelineClientBotTokenBugTest: the local Okio/OkHttp classpath throwsNoSuchMethodError: okio.Okio.socket(java.net.Socket). Running that class alone reproduces the same errors. Full service CI subsequently passed. One PostgreSQL/OpenSearch integration lane onbf7bffae5chad unrelated failures inTaskResourceITpagination andAppOperationPermissionsITHTTP setup; its memory migration test passed.Local server and index evidence
Local Chromium ran the current OSS UI at
:3000, proxied to the running backend at:8585. It verified Approved/Deprecated/Rejected labels, status filtering combined with text/author/sort, retired reasons and hidden proposal actions, successor navigation, and all modal close paths. The reported memory link closes and leaves the list usable. The UI served directly at:8585belongs to a separate Collate workspace and needs to incorporate the updated OSS UI build.An earlier new-memory semantic run was blocked by an embedding dimension mismatch: DJL produced 384-dimensional vectors while that chunk index required 512. Vector filter behavior is covered by the focused Java tests; a compatible vector index is needed for a live semantic rerun.
The
maven-collate-cicheck on this stacked PR has failed at dispatch because its workflow looks for the OSS base branchagent/lets-look-at-what-life-cycle-3inopen-metadata/openmetadata-collate, where that ref does not exist. No Collate files or workflows were changed here.