Repository navigation
Fixes #36958: Set OSS approval defaults and hide pending memories from other readers - #36989
Conversation
…read Release testing found the Memories page showing a reader another user's Shared memory awaiting review, and an admin another user's Draft; the plain list also kept a paging.total that counted memories the caller cannot see. Document extraction kept a person's contact details, which chat capture never saves. - A listing asking for Unprocessed or Draft gets them for the caller's own memories only, admins included, as a search asking for them already did. - A list page that hides rows reports the total of memories the caller may read, counted over at most 10,000 rows. - The extraction prompt forbids personal data and credentials, like capture. ADR:2026-11-03-context-center-listings-show-and-count-only-what-the-caller-may-read ADR:2026-11-03-document-extraction-keeps-no-personal-data Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ft keeps the share rules The listing rule from the previous commit made Draft owner-only too, which hid evidence holds (Draft with no review task) from the reviewers and readers that Draft as the review queue relies on. Only a person's Unprocessed memory is now listed to its owners alone, admins included; a document's pills and every other stage keep the share rules. The plain list applies the same rule (ContextMemoryVisibility.isListedToOwnersOnly) as the search-backed listing. paging.total is now recounted whenever the database counted more rows than the page shows, not only when this page hid a row, so a count-only call and a page without hidden rows no longer count memories the caller cannot list. ADR:2026-11-03-context-center-listings-show-and-count-only-what-the-caller-may-read amends ADR:2026-10-15-search-admits-a-subjects-own-pending-memories-on-request Co-Authored-By: Claude Opus 5.5 <[email protected]>
…admin creates start Unprocessed Item 15: an Unprocessed or Draft memory is listed only to its owners and to admins, on the search-backed listing, the plain list and the per-document cards. This replaces the previous commit's Unprocessed-only rule and its extraction exemption. The plain list also shows a document's pending pills to the document's owners, since the extractor, not the uploader, owns them. A read by id keeps the share rules. Item 18: a memory created by anyone but an admin or a bot starts Unprocessed, whatever entityStatus it requests. ContextMemoryRepository.prepare applies it on every create (POST, a PUT that creates, MCP create_entity), before the stage stamps a review, and keeps a hold for retired evidence. ADR:2026-11-03-context-center-listings-show-and-count-only-what-the-caller-may-read amends ADR:2026-10-15-search-admits-a-subjects-own-pending-memories-on-request, ADR:2026-10-15-a-memory-cites-its-supporting-queries-and-their-retirement-holds-it-for-review and ADR:2026-10-09-data-consumers-create-context-memories Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es a memory Review finding: a Data Steward's create started Unprocessed, then a PATCH of /entityStatus approved it, grounding everyone's answers without review. ContextMemoryRepository.checkStageDecision now refuses (403) any move into Approved unless an admin or a bot writes it, or a conflict review decision does (the resolver writes as themselves through governance-bot). A PUT re-sends its create request, stage included, so it keeps the stored stage instead. Evidence holds, reconciliation, extraction, capture and upsertMemory are unaffected. An owner can no longer restore their own retired memory to Approved; the lifecycle ITs now assert that and restore as admin. Also: an admin's list skips the visible-total recount, since nothing is hidden from an admin, and a document's pending pills list to the members of a team that owns it (SubjectContext.isOwner). amends ADR:2026-10-09-data-consumers-create-context-memories Co-Authored-By: Claude Opus 5.5 <[email protected]>
…o requested hold Review finding: a non-admin could still approve their own memory through a conflict review. Anyone who may edit a memory could add disputes, the review is assigned to the owners of both sides, and its decision writes through governance-bot. New disputes are now accepted only from an admin, a bot, or a bot writing for a user (Collate's reconciliation writes them either way), on create and on update; anyone else gets a 403. The create rule no longer trusts a Draft that carries the evidence-hold text. It runs before the server's own hold, which still starts a memory citing a retired Query in Draft, and a PUT that creates now runs the POST create so it is prepared once. amends ADR:2026-10-09-data-consumers-create-context-memories Co-Authored-By: Claude Opus 5.5 <[email protected]>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
OSS has no reconciliation app or general approval UI. Keep review required as a repository policy that Collate selects explicitly, including its creation and owner approval restrictions. Preserve explicit OSS stages and existing memories. Keep ownership, provenance, visibility, and evidence checks in both distributions.
|
…r tests Both PRs added tests at the same spot, so whichever merged second conflicted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review ✅ Approved 1 closed / 1 findings🔴 High risk · Restricting who can list pending memories and defaulting OSS creations to Approved could hide review items or expose unreviewed facts for grounding. Adds personal-data and conflicting-value rules to the document memory extractor prompt, plus owner/admin-only listing of pending memories and admin/bot-only approval. Changes requested: the conflicting-values extraction rule has no decision record and no test asserting its prompt text, and the companion Collate agent carries only the personal-data rule. ✅ 1 closedClosed: Quality: New conflicting-values extraction rule has no record or test
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
…ken by memory-status, page-size and leave-team changes (#37338) * test(playwright): fix Context Center, Table and ProfileTeam specs after memory-status, page-size and leave-team changes - createMemoryViaApi and the Permission owner fixture pin entityStatus Approved: #36989 made Collate (reviewRequired) start memories Unprocessed and hid pending memories from non-owners, so readers never saw the fixtures. - Table tag-search test uses dim_customer.average_order_size: with 15-row column pages sorted by name (#35288), shop_id moved to page 2. - ProfileTeam leave waits for PATCH /users/<me>: leaving now updates the user's teams instead of DELETE /teams/<id>/users/<id>. * test(playwright): assert 200 on ProfileTeam join/leave responses after awaiting them * test(playwright): address review on Context Center, Table and ProfileTeam spec fixes - createMemoryViaApi keeps the Approved default when entityStatus is passed as undefined - Dashboard drops the Approved asserts that only echoed the helper (OSS default is guarded by ContextMemoryCreateGrantIT) - Permission owner fixture goes through createMemoryViaApi so a failed POST fails fast - Table tag test searches the column before tagging, so pagination and sort no longer matter; afterAll hard-deletes the glossary and classification - ProfileTeam join/leave waits are scoped to the admin's own PATCH via waitForResponseWithStatus * chore(playwright): auto-refresh impact-map.generated.json --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>



Describe your changes:
Fixes #36958
paging.totalcounts only the memories the caller can see.Type of change:
High-level design:
ContextMemoryVisibility.isListedToOwnersOnlycovers the REST list and document cards.ContextMemorySearchVisibility.buildVisibilityFiltercovers the search listing, by splitting the pending statuses into the owner clause.ContextMemoryResourcerecounts the total, capped at 10,000 rows, whenever the database counted more rows than the page shows. Admins skip the recount.ContextMemoryRepository:prepare, before the memory is stamped as reviewed. An evidence hold on a retired query still starts in Draft.checkStageDecision.governance-bot, which no client can claim without the bot's token.2026-11-03-context-center-listings-show-and-count-only-what-the-caller-may-read,2026-11-03-document-extraction-keeps-no-personal-data, and2026-11-05-oss-memories-are-approved-without-reconciliation.2026-10-15-search-admits-a-subjects-own-pending-memories-on-request(v2),2026-10-15-a-memory-cites-its-supporting-queries-and-their-retirement-holds-it-for-review(v2: the held-Draft queue is now the owners' and admins'), and2026-10-09-data-consumers-create-context-memories(v4: OSS defaults and distribution review policy).Tests:
Use cases covered
paging.totalwith hidden rows counts only visible ones, including withlimit=0.Unit tests
4badfea9115: the planner-selected unit run passed 303 tests (286 service, 17 MCP), no failures or skips.mvn -B package -pl openmetadata-mcp,openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=CompanyContextToolTest,ContextFileProcessingServiceTest,ContextMemoryExtractorTest,ContextMemoryLifecycleTest,ContextMemoryReconcilerTest,ContextMemoryRepositoryTest,ContextMemoryResourceTest,ContextMemorySearchVisibilityTest,ContextMemoryStatusTransitionTest,ContextMemoryVisibilityTest,ContextMemoryWriteAccessTest,EntityRepositoryEntityStatusTest,MemoryDerivationsTest,PageContextProcessingEngineTest,SearchRequestBuilderMemoryVisibilityTest,SemanticMemoryDuplicateFinderTest -Dsurefire.failIfNoSpecifiedTests=false.mvn spotless:applyand the Java impact map check passed.Backend integration tests
Focused Java verification at
6cf57120efccca2d61134d482154c2f9d648006a: PASSED.MemoryEvidenceHoldsTest(21),ContextMemoryWriteAccessTest(24),ContextMemoryStatusTransitionTest(14),ContextMemoryRepositoryTest(40): 99 passed.ContextMemoryIT(35),ContextMemoryLifecycleIT(4),ContextMemoryCreateGrantIT(4): 43 passed. This exercises default creation, explicit stages, owner transitions, visibility and create grants over HTTP.UI screen recording:
Not applicable: backend-only change.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md: fresh review of4badfea9115found no remaining Important findings or test-map gaps. The extraction prompt preserves both privacy and conflicting-value rules.Regression follow-up (2026-11-04)
limit=10andlimit=0, and allows an article owner to list its pending pills even when another user owns those memories.7ab64030a0a20d53a9556d8fcc58ca75827a422f, fresh REVIEW.md pass, no unanswered Important findings. Coverage findings were fixed before this pass.7d7ac24b6e4e274b935954a067dbae7fa61007a3, AIeacb39819e854615b6eebf27b6fa486b4b9beba3, Collatef10b2d235cd4ec4f461a2db409f43a9289d4e3ae. Targeted combined runs are reported here; this does not claim that every planner-selected integration or browser suite ran.Distribution approval policy (2026-11-05)
repository/context/*Test.javaselection so normal unit CI executes it. No POM/build-file changes were made.6cf57120efccca2d61134d482154c2f9d648006a; the CI selection gap was fixed at304afdc4549f946801ecc99411deb0b78a5c155d.surefire:test@unit-testsselection passed 2,690 tests, including all 3 relocatedContextMemoryRepositoryExtTestcases; no failures or skips.Merge readiness (2026-11-06)
main(2190456), no conflicts. The privacy test moved to the end ofContextMemoryExtractorTest(a5a23e3), so this PR and Fixes #36957: Let extracted memories await review and keep every value a document gives #36988 merge in either order.ContextMemoryRepositoryTestand Collate Modify Docs around installation on Windows OS #8241'sContextMemoryLifecycleIT.🤖 Generated with Claude Code