Skip to content

feat(membership): refuse location as entity identity or language - #153

Merged
seonghobae merged 3 commits into
mainfrom
agent/location-membership
Aug 24, 2026
Merged

feat(membership): refuse location as entity identity or language#153
seonghobae merged 3 commits into
mainfrom
agent/location-membership

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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-targets GREEN after RED (stub accepted every kind)
  • clippy -D warnings PASS
  • workspace contract PASS
  • docstring contract PASS
  • lines 15/15; nightly branches 6/6

Does not allocate migration 0008. Does not touch persistence_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.


Open in Devin Review

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.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

View limit details

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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 397409e6-b308-4b1e-b256-163ed620013d

📥 Commits

Reviewing files that changed from the base of the PR and between 9347512 and f667ea3.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • ARCHITECTURE.md
  • CHANGELOG.md
  • Cargo.toml
  • crates/location_membership/Cargo.toml
  • crates/location_membership/src/error.rs
  • crates/location_membership/src/kind.rs
  • crates/location_membership/src/lib.rs
  • crates/location_membership/tests/crate_contract.rs
  • crates/location_membership/tests/location_membership_contract.rs
  • docs/TRACEABILITY.md
  • docs/adr/0003-relational-event-multiple-membership.md
  • docs/research/location-membership-identity.md
  • docs/research/multilevel-multiple-membership-measurement.md
  • docs/research/standards-and-literature.md
  • scripts/check_workspace_contract.py
  • tests/quality/test_check_docstrings.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 20, 2026 17:42
@seonghobae

Copy link
Copy Markdown
Contributor Author

Promoted this PR to ready-for-review after verifying exact HEAD 4a1d4c852701b9518effdbefcc6a0a56afe46385. All exact-head repository, Rust quality, coverage, live PostgreSQL, security, Strix, Noema, OpenCode, and documentation gates are green; no current check failure remains. The PR is merge-blocked only pending an independent qualifying approval and current-head review.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Please perform an exact-head OpenCode review of 4a1d4c8 against base main at 7c29e7c. Review only this SHA; do not merge or update the branch.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current HEAD 4a1d4c852701b9518effdbefcc6a0a56afe46385 has all reported checks successful and no unresolved review comments are present. Please provide the required independent approval; no merge bypass is available.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current HEAD 4a1d4c852701b9518effdbefcc6a0a56afe46385 against base 7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a on main. Verify the complete changed-file diff, current protected Checks, coverage/docstring evidence, security, and resolved review findings. Review only this SHA; do not modify or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review independently review exact current HEAD 4a1d4c852701b9518effdbefcc6a0a0b4ee1f4d1a1a6c7a against base 7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a on main. Verify the scientific/API contract, current protected Checks, coverage, security, and resolved review findings. Review only this SHA; do not modify or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current HEAD 4a1d4c852701b9518effdbefcc6a0a56afe46385 against base 7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a on main. The earlier request carried an invalid payload; this is the authoritative exact SHA. Review only this SHA; do not modify or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review independently review exact current HEAD 4a1d4c852701b9518effdbefcc6a0a56afe46385 against base 7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a on main. The earlier request carried an invalid payload; this is the authoritative exact SHA. Review only this SHA; do not modify or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review refresh for 4a1d4c8:

  • Location remains contextual evidence and is not accepted as an entity identity or language identity, preserving multilingual and membership semantics.
  • git diff --check, documentation validation, workspace contract, docstring contract, and cargo fmt --all -- --check passed locally.
  • Current-head review remains merge-ineligible until all required statuses and qualifying independent approvals are current.
  • No new actionable source defect was found at this exact head; no approval is being self-issued.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@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).

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 00:55
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review disposition

  • Exact head: e7c871bc2f5e6023002ceeea30217130561842e1; base: c45be17a9dbce95ef81cee230e9d128abc7160ac.
  • The bounded location_membership crate keeps location as time-varying multiple membership, refuses location-as-entity/language conflation, and includes a truth-recovery comparison plus APA 7 doctoring. No actionable source defect found in the current diff.
  • Required, Strix, coverage, SAST, dependency, PostgreSQL, Noema, and OpenCode checks are green for this head.
  • REVIEW_REQUIRED remains with no qualifying independent approval. Decision: WAIT_AND_REMEDIATE; no bypass.

…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
@seonghobae
seonghobae merged commit e1915a1 into main Aug 24, 2026
19 of 22 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

Open in Devin Review


sources = docstrings.rust_sources(REPOSITORY_ROOT)
crate_roots = sorted(REPOSITORY_ROOT.glob("crates/*/src/lib.rs"))
self.assertEqual(len(crate_roots), 11)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 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.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +86 to +92
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 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.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant