Skip to content

feat(method): refuse copied-text residue as unique content - #149

Merged
seonghobae merged 8 commits into
mainfrom
agent/copied-text
Aug 24, 2026
Merged

feat(method): refuse copied-text residue as unique content#149
seonghobae merged 8 commits into
mainfrom
agent/copied-text

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

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-targets GREEN after RED (package did not exist)
  • clippy -D warnings PASS
  • workspace contract PASS
  • docstring contract PASS
  • lines 15/15; nightly-2026-08-01 branches 6/6

Does not allocate migration 0008. Does not recreate style_source, section_source, stopword_deletion, or method_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.

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

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 47 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: b6f21487-e9cf-4dd9-831b-bccd43ffd078

📥 Commits

Reviewing files that changed from the base of the PR and between f85ed11 and eee6d3b.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • ARCHITECTURE.md
  • CHANGELOG.md
  • Cargo.toml
  • README.md
  • crates/copied_text/Cargo.toml
  • crates/copied_text/src/error.rs
  • crates/copied_text/src/kind.rs
  • crates/copied_text/src/lib.rs
  • crates/copied_text/tests/copied_text_contract.rs
  • crates/copied_text/tests/crate_contract.rs
  • 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/copied-text-identity.md
  • docs/research/standards-and-literature.md
  • docs/validation/temporal-event-foundation.md
  • scripts/check_workspace_contract.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.

# Conflicts:
#	CHANGELOG.md
#	docs/validation/temporal-event-foundation.md
@seonghobae
seonghobae marked this pull request as ready for review August 20, 2026 17:57
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current head c1833ee merges protected main and retains the copied-text identity contract plus current provider/orchestration traceability. Focused proof passed: cargo fmt --all -- --check, cargo test -p copied_text --offline (6 tests), workspace contracts, documentation validation, Rust docstring contract, and git diff --check. The exact-head Checks are rerunning; merge remains gated by one qualifying independent approval.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review refresh for e0fa669:

  • Copied-text residue is refused as unique content, preventing corpus leakage or reuse artifacts from becoming an inferential signal.
  • git diff --check, documentation validation, workspace contract, docstring contract, and cargo fmt --all -- --check passed locally.
  • Current hosted checks are pass=14, pending=1, fail=0; merge remains withheld until the pending exact-head required check completes and qualifying approvals exist.
  • No new actionable source defect was found at this exact head; no approval is being self-issued.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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

@seonghobae

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head check triage for 6077b9ce7f0961a3e287c4e8afe0faa5a0638b2e: the current review finding is resolved and all source/security/coverage checks shown are green except strix; run 32436820110 job 96639597712 has no retrievable log because GitHub returns workflow-not-found (HTTP 404). This is infrastructure evidence only, not a source pass; coverage-evidence remains queued. No force merge or check manipulation is appropriate.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head audit update

  • Repository: ContextualWisdomLab/TEPP
  • Pull request: feat(method): refuse copied-text residue as unique content #149
  • Exact head SHA: 6077b9c
  • Exact base SHA: c45be17
  • Prior failure: the only failed check was the obsolete Strix run 32436820110; its workflow/job logs are no longer available, and its sole annotation is a generic process exit at .github:329 with no source finding.
  • Current review state: the copied-text diff and current-head review history were re-read. The prior duplicate-ledger finding is resolved on the current tree; no actionable current-head source defect was identified.
  • Revalidation: normal rerun API for the deleted target workflow returned 404. The active central Strix workflow was invoked through its protected default-branch repository_dispatch path with exact repository, PR number, base ref/SHA, and head SHA metadata. Central run: https://github.com/ContextualWisdomLab/.github/actions/runs/32521063450
  • Local evidence: the current tree contains the copied_text crate contract, workspace contract, and documentation changes already validated by the existing successful exact-head checks.
  • Decision: WAIT_AND_REMEDIATE until the exact-head central Strix evidence completes and repository review policy is satisfied. This general feature PR is not a guarded force-merge candidate; no D1-D5 emergency deadlock is established.

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

Copy link
Copy Markdown
Contributor Author

Maintainer exact-head update

  • Exact head: 61aac2eeff44e801d4cf571500f63f734550dfbd
  • Exact base: c45be17a9dbce95ef81cee230e9d128abc7160ac
  • Review finding: the PR committed .codegraph/.gitignore, but CodeGraph state is machine-local generated state and the repository contract requires it to remain outside source changes.
  • Fix: removed only the tracked generated file; the local CodeGraph database remains untracked and was not staged.
  • Local verification: pinned Rust 1.97.1 format, copied_text tests, workspace check, workspace tests, clippy -D warnings, documentation validation, workspace contract, Rust documentation contract, and git diff --check passed.
  • Hosted verification: all checks for the new exact head are pending; predecessor-head results, including the prior Strix provider failure, are not reused.
  • Review/merge state: no qualifying independent human approval; GitHub reports REVIEW_REQUIRED. Decision: WAIT_AND_REMEDIATE; no bypass or force merge.

@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

Comment thread docs/connectors/naruon-artifact-consumer.md
Comment on lines +70 to +84
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)
}

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

Open in Devin Review

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