feat(membership): refuse collapsing targets into entity or project - #131
feat(membership): refuse collapsing targets into entity or project#131seonghobae wants to merge 9 commits into
Conversation
Add insert/lookup contracts for entity_record and project_record so membership foreign keys cannot be seeded from empty, oversized, or hostile type/status labels. No new migration number while 0007 is in flight.
Language, episode, template, department, and opportunity-pool memberships stay typed (ADR 0003). They cannot stand in for the entity/project pair stored by migration 0006. Recovery is the computed share of target kinds that match known truth versus collapsing every target to entity.
|
Warning Review limit reached
Next review available in: 26 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (32)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # CHANGELOG.md
|
Current head |
# Conflicts: # CHANGELOG.md # crates/persistence_postgres/tests/live_postgres.rs # docs/ERD.md
|
Current-head validation update (e05f1d6): fixed the quality contract to derive the Rust crate count from scripts/check_workspace_contract.py instead of hard-coding 10. Local evidence: 89 quality tests passed; coverage 100% (991/991 statements, 442/442 branches); workspace, docstring, documentation, and diff checks passed. Please review and rerun Checks against this exact head; merge remains subject to the repository's two independent approvals and protected rules. |
…view/pr113-current # Conflicts: # CHANGELOG.md
|
Current-head review refresh for e65620b:
|
|
Rebased current head 967b89f onto origin/main. The changelog conflict retains both feature and current-main entries; inherited documentation trailing whitespace was removed. Local merge-tree, git diff --cached --check, and cargo fmt --all -- --check pass. Exact-head hosted checks and required independent approvals remain required before protected merge. |
|
|
||
| ## Roles, membership, and multilevel structure | ||
|
|
||
| Browne, W. J., Goldstein, H., & Rasbash, J. (2001). Multiple membership multiple classification (MMMC) models. *Statistical Modelling, 1*(2), 103–124. https://doi.org/10.1177/1471082X0100100201 |
There was a problem hiding this comment.
🟡 Same research paper cited with two conflicting DOIs
The Browne, Goldstein & Rasbash (2001) reference is added (docs/research/standards-and-literature.md:79) with DOI 10.1177/1471082X0100100201, but the same paper is already cited elsewhere in the repository with 10.1177/1471082X0100100202 (docs/research/typed-membership-assignment-persistence.md:31), so one of the two citations points readers to the wrong record.
Impact: A reader following the reference can land on an incorrect or non-resolving source, undermining the APA-7 traceability the repository requires.
Where the conflicting DOIs appear
The new/added citations use the ...100201 suffix in two places: docs/research/standards-and-literature.md:79 and docs/research/membership-target-identity.md:31. The pre-existing citation of the identical paper uses the ...100202 suffix at docs/research/typed-membership-assignment-persistence.md:31. Both cannot be correct for the same article; the DOIs should be reconciled to a single accurate value.
| Browne, W. J., Goldstein, H., & Rasbash, J. (2001). Multiple membership multiple classification (MMMC) models. *Statistical Modelling, 1*(2), 103–124. https://doi.org/10.1177/1471082X0100100201 | |
| Browne, W. J., Goldstein, H., & Rasbash, J. (2001). Multiple membership multiple classification (MMMC) models. *Statistical Modelling, 1*(2), 103–124. https://doi.org/10.1177/1471082X0100100202 |
Was this helpful? React with 👍 or 👎 to provide feedback.
Language, episode, template, department, and opportunity-pool memberships stay typed (ADR 0003). They cannot collapse into the entity/project pair stored by migration
0006. Recovery is the computed share of recovered target kinds that match known truth versus treating every target as an entity.Local gates on this head:
cargo test -p membership_target --all-targetsGREEN after RED (package did not exist)-D warningsPASSDoes not allocate migration
0008. Does not recreatemembership_core,role_contradiction,support_edge, or in-flight crates.Keep this PR draft. Preferred merge remains #46 only when exact-head required Checks pass and a qualifying independent (non-Cursor/CodeRabbit) APPROVE exists. OpenCode
CHANGES_REQUESTEDon #46 is a stale coverage-evidence race on a now-green head — do not empty-commit.