-
Notifications
You must be signed in to change notification settings - Fork 1
fix: bind R&R catalog ids instead of rejoining by name (v0.86.1) #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
cursor
wants to merge
1
commit into
feat/role-responsibility-agent-ontology
from
cursor/bc-896d08ea-3214-4eb0-a6d6-aea20353d83d-e9a1
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # ADR 0019 — Persist the R&R catalog identity on the role row | ||
|
|
||
| **Decision status:** Accepted | ||
| **Date:** 2026-08-16 | ||
| **Depends on:** ADR 0009 cross-post actor identity; ADR 0018 related-node | ||
| team/organization walk | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0009 and ADR 0018 expose `catalog_node_id` so a buyer can click an | ||
| R&R team or organization and walk sibling posts. The read path joined | ||
| `corporate_entity` by `entity_name`. That column is a display label, not | ||
| an identity key: two companies can share it, and `corporate_entity_code` | ||
| is the unique catalog key. A name join then either duplicated the role | ||
| or attached the homonym's id when both rows were mentioned on the same | ||
| post. | ||
|
|
||
| `cataloged_team` already protects the team path with | ||
| `UNIQUE NULLS NOT DISTINCT (team_name, affiliated_organization_name)`. | ||
| Person lookup used `LIMIT 1` without `ORDER BY`, so two same-named | ||
| people were non-deterministic. | ||
|
|
||
| Fellegi and Sunter (1969) treat a match decision as a binding to one | ||
| record, not a later re-search by a non-unique attribute. Bhattacharya | ||
| and Getoor (2007) keep that binding once collective resolution has | ||
| chosen a candidate. | ||
|
|
||
| ## Decision | ||
|
|
||
| `post_summary_role` stores the catalog foreign key resolved at write | ||
| time: | ||
|
|
||
| - `cataloged_team_id` for `prov_team` | ||
| - `corporate_entity_id` for `prov_organization` | ||
| - `cataloged_person_id` for `prov_person` | ||
|
|
||
| At most one of those columns is set, and the set column must match | ||
| `actor_type_code`. `fetch_persisted_summary` reads those columns. It | ||
| does not rejoin the catalog by display name. | ||
|
|
||
| Person lookup, when it still resolves by name, orders by | ||
| `created_at`, then `person_id`, and stores that id. It still does not | ||
| create a new `cataloged_person` row (ADR 0009 gap). | ||
|
|
||
| `GET /api/teams/{team_id}/related` keeps person/entity parity: unknown | ||
| UUID is 404; a team mentioned only on an unseen private post is 403. | ||
| A private `post_organization_mention` does not open the related walk | ||
| through the ADR 0018 UNION (Hu et al., 2014). | ||
|
|
||
| ## Consequences | ||
|
|
||
| - Open a post whose R&R names an organization that shares a display | ||
| name with another catalog row. The chip keeps the id persist stored. | ||
| Click it to walk that organization's posts, not the homonym's. | ||
| - A later mention of the homonym on the same post does not duplicate | ||
| the role or retarget the chip. | ||
| - Team and organization related endpoints fail closed the same way | ||
| Keyman and corporate-entity related already do. | ||
|
|
||
| ## References | ||
|
|
||
| Bhattacharya, I., & Getoor, L. (2007). Collective entity resolution in | ||
| relational data. *ACM Transactions on Knowledge Discovery from Data, | ||
| 1*(1), Article 5. https://doi.org/10.1145/1217299.1217304 | ||
|
|
||
| Fellegi, I. P., & Sunter, A. B. (1969). A theory for record linkage. | ||
| *Journal of the American Statistical Association, 64*(328), 1183–1210. | ||
| https://doi.org/10.1080/01621459.1969.10501049 | ||
|
|
||
| Hu, V. C., Ferraiolo, D., Kuhn, R., Schnitzer, A., Sandlin, K., | ||
| Miller, R., & Scarfone, K. (2014). *Guide to attribute based access | ||
| control (ABAC) definition and considerations* (NIST Special Publication | ||
| 800-162). National Institute of Standards and Technology. | ||
| https://doi.org/10.6028/NIST.SP.800-162 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADR 0019 on this branch says fetch reads
cataloged_person_id. This SELECT omits it, so personcatalog_node_idstays null and the UI cannot walk the stored person. #153 selects that column and maps it tonode_person.