Skip to content

feat(analysis): bind house-voice style refusals to an analysis-run profile - #418

Draft
seonghobae wants to merge 1 commit into
mainfrom
feat/style-source-analysis-run-gap-004
Draft

feat(analysis): bind house-voice style refusals to an analysis-run profile#418
seonghobae wants to merge 1 commit into
mainfrom
feat/style-source-analysis-run-gap-004

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

GAP-004 leftover / ADR 0059. Bind existing style_source::refuse_style_as_unique_content and refuse_style_as_stopword_deletion to a cutoff-safe style_source_v1 analysis-run profile (tepp.style_source.v1).

Not GPU. Not MCMC. Not topic birth/split/merge. Not implemented-main.

Distinct from live slices

Does not duplicate #417 (export-retrieval CLI), #416 (copy-identity), #415 (method-effects), #414 (temporal-context CLI), #413 (case-deletion), #412 (composed fitted-K+lineage), #411 (export GET), #410 (export-authorize CLI), #409 (Pareto candidate-K), #408 (joint posterior Laplace), #407 (topic activity), #406 (wait CLI), #405 (interpreter/verifier), #404 (fitted candidate-K), #351 (Leiden), or Driver p.16 std-family micro-PRs.

Verification

  • cargo test -p analysis_engine
  • cargo clippy -p analysis_engine --all-targets -- -D warnings
  • python3 scripts/validate_documentation.py

Merge gate

Two independent current-head APPROVEs required. Author/bot COMMENTED is not independent APPROVE. Exact-head Checks on this SHA only. Predecessor Checks do not transfer. Do not self-approve. Do not merge without two independent approvals.


Devin Review

…ofile

GAP-004 leftover / ADR 0059. Bind existing style_source refusals
(refuse_style_as_unique_content, refuse_style_as_stopword_deletion) to
cutoff-safe style_source_v1. identity_recovery_rate stays library-side.
Distinct from copy-identity (#416) and method-effects (#415). Not GPU,
not MCMC, and not topic birth/split/merge.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 2 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: Team

Run ID: f3f2bb41-1219-44b2-b31b-c0f6c9a036cd

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc02f5 and fa6b234.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • CHANGELOG.md
  • DOCUMENTATION.md
  • crates/analysis_engine/Cargo.toml
  • crates/analysis_engine/src/lib.rs
  • crates/analysis_engine/src/style_source_artifact.rs
  • crates/analysis_engine/tests/style_source_execution_contract.rs
  • docs/TRACEABILITY.md
  • docs/adr/0059-style-source-analysis-run.md
  • docs/adr/README.md
  • docs/doctoring/style-source-analysis-run.md

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.

@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 5 potential issues.

Devin Review

Comment on lines +28 to +31
pub struct StyleSourceDocument {
document_id: String,
kind: StyleKind,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Future documents enter historical censuses

StyleSourceDocument carries no availability time, so execute_style_source_run counts documents that became available after the requested cutoff. Historical artifacts can include future evidence.

Prompt for agents
Add typed availability provenance to StyleSourceDocument in crates/analysis_engine/src/style_source_artifact.rs. In execute_style_source_run, enforce that every counted document was available no later than the bound KnowledgeCutoff, either by excluding later documents before all counts and duplicate checks or by failing closed according to the analysis-run contract. Add integration tests containing documents on both sides of the cutoff and verify that no future-available document contributes to the artifact.
Devin Review

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

Comment on lines +28 to +31
pub struct StyleSourceDocument {
document_id: String,
kind: StyleKind,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Unrelated documents inherit snapshot identity

StyleSourceDocument carries no snapshot identity, so callers can label any document set with the request snapshot. The digest then certifies an unverified evidence binding.

Prompt for agents
Bind each StyleSourceDocument, or an immutable corpus wrapper containing the documents, to validated snapshot provenance in crates/analysis_engine/src/style_source_artifact.rs. Make execute_style_source_run derive or verify its snapshot identity from that bound input instead of trusting an independent snapshot_id argument. Reject mixed or mismatched snapshot provenance and add tests proving unrelated documents cannot be emitted under a requested snapshot.
Devin Review

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

Comment on lines +195 to +200
let mut seen = std::collections::BTreeSet::new();
let mut unique_content_count = 0_u64;
let mut style_residue_count = 0_u64;
let mut refused_as_unique_content_count = 0_u64;
let mut refused_as_stopword_deletion_count = 0_u64;
for document in documents {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Unbounded censuses exhaust execution resources

execute_style_source_run accepts unlimited documents and retains every identity. Oversized runs bypass the engine’s 100,000-item bound and can exhaust memory.

Prompt for agents
Enforce a document-count limit before allocating the seen set or iterating in execute_style_source_run. Reuse the analysis engine's 100,000-evidence execution bound or define and document a profile-specific bound, return LimitExceeded when it is exceeded, and add a boundary test for limit plus one.
Devin Review

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

uuid.workspace = true

[dev-dependencies]
style_source = { path = "../style_source", version = "0.2.0" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Duplicate dependency declaration

style_source appears in both dependency sections with identical configuration. The development entry is redundant and can drift from the production declaration.

Devin Review

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

Comment on lines +372 to +376
{
let mut value = artifact.clone();
value.refused_as_unique_content_count = 1;
value
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Second refusal invariant lacks coverage

The tampering suite exercises only one refusal count. Add a mutation for refused_as_stopword_deletion_count to substantiate the repository’s complete-coverage requirement.

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