feat(method): refuse copied-text residue as unique content - #149
Conversation
Copied and boilerplate residue stays explicit method structure (ADR 0004/0012). It is not unique latent content and is not erased by a stopword list. Recovery is the computed share of recovered kinds that match known truth.
|
Warning Review limit reachedNext included review available in 47 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 (18)
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 # docs/validation/temporal-event-foundation.md
|
Current head |
|
Current-head validation update (101d10f): 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. |
|
Current-head review fix (e0fa669): removed the duplicate active-PR Purpose-bound provider payloads ledger row; one implemented-main row now remains. Local validation passed: 89 quality tests, 100% statement/branch coverage (991/991, 442/442), workspace/docstring/documentation contracts, and diff check. Please re-review this exact head. |
|
Current-head review refresh for e0fa669:
|
|
Rebased current head 6077b9c onto origin/main. The changelog conflict retains both copied-text 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. |
|
@opencode-agent @cwl-noema-review Review-only request for exact current head 6077b9c. Re-review copied-text identity and current validation ledger, the Rust identity contract, APA 7 research scope, documentation maturity, and protected-merge requirements. Do not merge or enable auto-merge. |
|
Current-head RCA (no source change): the failed evidence is provider infrastructure, not a target vulnerability. The structured Strix report contains NVIDIA NIM rate-limit/provider warnings; the prior gate did not classify report-only provider evidence for configured fallback retry. The root fix is being reviewed in ContextualWisdomLab/.github#1153; after that protected central change merges, rerun this exact head and require terminal current-head checks. |
|
Current-head RCA (no source change): the failed Strix evidence is provider infrastructure, not a target vulnerability. The structured Strix report contains NVIDIA NIM rate-limit/provider warnings; the prior gate did not classify report-only provider evidence for configured fallback retry. The root fix is being reviewed in ContextualWisdomLab/.github#1153. After that protected central change merges, rerun this exact head and require terminal current-head checks. |
|
Exact-head check triage for |
Exact-head audit update
|
Maintainer exact-head update
|
| pub fn identity_recovery_rate( | ||
| truth: &[CopiedKind], | ||
| decided: &[CopiedKind], | ||
| ) -> Result<f64, CopiedTextError> { | ||
| if truth.is_empty() || truth.len() != decided.len() { | ||
| return Err(CopiedTextError::InvalidCopiedPayload); | ||
| } | ||
| 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: identity_recovery_rate logic is correct and fail-closed
identity_recovery_rate in kind.rs correctly rejects empty and length-mismatched inputs before computing, and returns matches / len over paired kinds. The u32 match counter would only overflow beyond ~4 billion elements, which is not a realistic concern. The clippy::cast_precision_loss allow at lib.rs covers the truth.len() as f64 cast. No correctness issue.
Was this helpful? React with 👍 or 👎 to provide feedback.
# Conflicts: # ARCHITECTURE.md # CHANGELOG.md # Cargo.lock # Cargo.toml # README.md # docs/TRACEABILITY.md # docs/adr/0004-shared-multilingual-latent-space.md # docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md # docs/adr/README.md # docs/research/standards-and-literature.md # docs/validation/temporal-event-foundation.md # scripts/check_workspace_contract.py # tests/quality/test_check_docstrings.py
Copied and boilerplate residue stays explicit method structure (ADR 0004/0012). It is not unique latent content and is not erased by a stopword list. Recovery is the computed share of recovered kinds that match known truth versus collapsing every token to unique content.
Complementary to #148 (
style_source), #147 (section_source), #145 (stopword_deletion), and #75 (method_effects: method source is not an inferential weight). This crate owns copied-versus-unique-content identity.Local gates:
cargo test -p copied_text --all-targetsGREEN after RED (package did not exist)-D warningsPASSDoes not allocate migration
0008. Does not recreatestyle_source,section_source,stopword_deletion, ormethod_effects.Keep this PR draft. #47 is the single ready preferred merge (review-blocked). Do not mass-undraft #48–#148. If an hourly fire undrafts a PR, restore draft except when a qualifying independent APPROVE and exact-head required Checks already exist on #47.