feat(membership): refuse location as entity identity or language - #153
Conversation
Geographic and market assignments stay time-varying multiple-membership structure (ADR 0003). Location is not permanent entity identity and is not a language channel. Recovery is the computed share of location kinds that match known truth versus collapsing every assignment to entity identity.
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
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 |
|
Promoted this PR to ready-for-review after verifying exact HEAD |
|
Current HEAD |
|
@opencode-agent review exact current HEAD |
|
@cwl-noema-review independently review exact current HEAD |
|
@opencode-agent review exact current HEAD |
|
@cwl-noema-review independently review exact current HEAD |
|
Current-head review refresh for 4a1d4c8:
|
|
@cwl-noema-review @opencode-agent Exact-head review request. Review only HEAD e7c871b against base c45be17. The branch was conflicting only in CHANGELOG.md; I preserved both the location-membership entry and current main naruon entry in a normal merge commit. Local proof at this exact tree: Rust 1.97.1 format check; full cargo test workspace offline; documentation validator; git diff check; CodeGraph sync; CodeReviewGraph update. Current hosted checks have been newly dispatched and are queued. Return a formal independent review verdict for this exact HEAD only after current protected checks complete. Do not modify, merge, or rely on stale approvals. |
|
@opencode-agent please review — this is a direct test of the review-pipeline fix landed in ContextualWisdomLab/.github#1221 (root cause #3 of ContextualWisdomLab/.github#1212). |
Exact-head review disposition
|
…ship # Conflicts: # ARCHITECTURE.md # CHANGELOG.md # Cargo.toml # docs/TRACEABILITY.md # docs/adr/0003-relational-event-multiple-membership.md # docs/research/standards-and-literature.md # scripts/check_workspace_contract.py # tests/quality/test_check_docstrings.py
|
|
||
| sources = docstrings.rust_sources(REPOSITORY_ROOT) | ||
| crate_roots = sorted(REPOSITORY_ROOT.glob("crates/*/src/lib.rs")) | ||
| self.assertEqual(len(crate_roots), 11) |
There was a problem hiding this comment.
🔍 Stale crate count in docstring test
The added assertEqual(len(crate_roots), 11) conflicts with the tree, which holds 47 crates/*/src/lib.rs files and 48 EXPECTED_CRATES entries. The 11 and the count mismatch already exist at the base SHA, so this is a pre-existing composite artifact, not introduced by adding one crate.
Was this helpful? React with 👍 or 👎 to provide feedback.
| let mut matches = 0_u32; | ||
| for (truth_kind, decided_kind) in truth.iter().zip(decided) { | ||
| if truth_kind == decided_kind { | ||
| matches += 1; | ||
| } | ||
| } | ||
| Ok(f64::from(matches) / truth.len() as f64) |
There was a problem hiding this comment.
📝 Info: Loop false-branch coverage relies on integration test
The unit tests in kind.rs only call identity_recovery_rate with fully-matching inputs, so the false branch of if truth_kind == decided_kind (kind.rs) is never exercised there. Under the workspace's 100% branch-coverage contract this branch is only covered because the integration test recovered_kinds_match_known_truth_better_than_an_entity_collapse in location_membership_contract.rs feeds mismatched (collapsed) input. Since cargo llvm-cov --workspace aggregates integration tests, coverage holds — but the guarantee is cross-file, so removing/altering that integration test would silently break the branch-coverage gate.
Was this helpful? React with 👍 or 👎 to provide feedback.
Geographic and market assignments stay time-varying multiple-membership structure (ADR 0003). Location is not permanent entity identity and is not a language channel. Recovery is the computed share of recovered kinds that match known truth versus collapsing every assignment to entity identity.
Complementary to #131 membership-target (entity/project/department/template/language/opportunity-pool/episode; location omitted) and #146 episode-interval containment. This crate owns location-versus-entity/language identity.
Local gates:
cargo test -p location_membership --all-targetsGREEN after RED (stub accepted every kind)-D warningsPASSDoes not allocate migration
0008. Does not touchpersistence_postgres(#113 collision). Does not recreate in-flight membership crates.Keep this PR draft. Preferred merge is now #48 only when exact-head required Checks pass and a qualifying independent APPROVE exists. Do not empty-commit #48. Re-draft #144 if it is undrafted.