feat(analysis): bind house-voice style refusals to an analysis-run profile - #418
feat(analysis): bind house-voice style refusals to an analysis-run profile#418seonghobae wants to merge 1 commit into
Conversation
…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.
|
Warning Review limit reachedNext included review available in 2 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: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
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 |
| pub struct StyleSourceDocument { | ||
| document_id: String, | ||
| kind: StyleKind, | ||
| } |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| pub struct StyleSourceDocument { | ||
| document_id: String, | ||
| kind: StyleKind, | ||
| } |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| 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 { |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| uuid.workspace = true | ||
|
|
||
| [dev-dependencies] | ||
| style_source = { path = "../style_source", version = "0.2.0" } |
| { | ||
| let mut value = artifact.clone(); | ||
| value.refused_as_unique_content_count = 1; | ||
| value | ||
| }, |
There was a problem hiding this comment.
Summary
GAP-004 leftover / ADR 0059. Bind existing
style_source::refuse_style_as_unique_contentandrefuse_style_as_stopword_deletionto a cutoff-safestyle_source_v1analysis-run profile (tepp.style_source.v1).style_residue_is_not_unique_content_not_stopword_deletion.identity_recovery_ratestays library-side; inspect payloads stay metric-free (scientific_acceptancenever appears).CopyKind) and feat(analysis): bind simulation method-effect labels to an analysis-run profile #415 simulation method-effect census.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_enginecargo clippy -p analysis_engine --all-targets -- -D warningspython3 scripts/validate_documentation.pyMerge 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.