feat(analysis): bind independent TDT link-criterion fitting to an analysis-run profile - #423
feat(analysis): bind independent TDT link-criterion fitting to an analysis-run profile#423seonghobae wants to merge 2 commits into
Conversation
…lysis-run profile GAP-004 leftover / ADR 0062. Bind existing fit_lineage_criterion_posteriors to cutoff-safe lineage_criterion_v1. Event-time draws remain producer evidence; date inference from record order is refused.
|
Warning Review limit reachedNext included review available in 57 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 selected for processing (8)
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 |
ADR 0062 is already taken by live TEPP #422 corpus-background refusals.
| observations: &'a [LineageCriterionObservation], | ||
| draw_count: usize, |
There was a problem hiding this comment.
🔴 Historical cutoff never filters evidence
LineageCriterionInput carries no availability timestamps, so evidence released after the requested cutoff still produces a successful artifact.
Prompt for agents
The lineage-criterion analysis-run input in crates/analysis_engine/src/lineage_criterion_artifact.rs cannot prove historical eligibility because LineageCriterionObservation and LineageCriterionInput contain no availability time. Extend the input contract with availability provenance, validate every observation against the requested KnowledgeCutoff before fitting, and add a test where an otherwise valid observation is unavailable until after the cutoff. Preserve the distinction between event-time draws and evidence availability.
Was this helpful? React with 👍 or 👎 to provide feedback.
| let fits = fit_lineage_criterion_posteriors(input.observations(), input.draw_count()).map_err( | ||
| |error| match error { | ||
| LineageCriterionFitError::EmptyInput | ||
| | LineageCriterionFitError::InvalidPairIdentity | ||
| | LineageCriterionFitError::TemporalDrawMismatch => { | ||
| AnalysisEngineError::InvalidEvidence | ||
| } | ||
| LineageCriterionFitError::Criterion(_) => { | ||
| AnalysisEngineError::LineageCriterionFitFailure | ||
| } | ||
| }, | ||
| )?; |
There was a problem hiding this comment.
🟡 Malformed event times pass validation
execute_lineage_criterion_run validates only temporal draw counts. Arbitrary strings still produce a successful result that claims valid event-time evidence.
Prompt for agents
Validate every predecessor_event_time_draws and successor_event_time_draws value as an EventTime before fitting in the lineage-criterion execution path. Return InvalidEvidence for malformed timestamps and add integration tests covering malformed predecessor and successor draws. If LineageCriterionObservation is intended to guarantee validity earlier, replace raw strings with typed EventTime values instead.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if request.knowledge_cutoff != knowledge_cutoff.to_rfc3339() | ||
| || request.model_contract_version != LINEAGE_CRITERION_MODEL_CONTRACT_VERSION |
There was a problem hiding this comment.
| let fits = fit_lineage_criterion_posteriors(input.observations(), input.draw_count()).map_err( | ||
| |error| match error { | ||
| LineageCriterionFitError::EmptyInput | ||
| | LineageCriterionFitError::InvalidPairIdentity | ||
| | LineageCriterionFitError::TemporalDrawMismatch => { | ||
| AnalysisEngineError::InvalidEvidence | ||
| } | ||
| LineageCriterionFitError::Criterion(_) => { | ||
| AnalysisEngineError::LineageCriterionFitFailure | ||
| } | ||
| }, | ||
| )?; |
There was a problem hiding this comment.
Summary
GAP-004 leftover / ADR 0063. Bind existing
analysis_engine::fit_lineage_criterion_posteriorsto a cutoff-safelineage_criterion_v1analysis-run profile (tepp.lineage_criterion.v1).independent_tdt_criterion_not_date_from_record_order.case_deletion_refit_v1,composed_fitted_lineage_v1,fitted_candidate_k_v1,pareto_candidate_k_v1,trsl_topic_lineage_v1, andmethod_effects_v1.Not corpus-background refusals (#422 / ADR 0062). Not non-lexical modality (#421 / ADR 0061). Not project-history CLI (#420). Not prompt-boilerplate (#419 / ADR 0060). Not house-voice (#418 / ADR 0059). Not template-copy (#416 / ADR 0058). Not method-effects (#415 / ADR 0057). Not case-deletion (#413 / ADR 0056). Not a Bayesian sampler. Not GPU. Not topic birth/split/merge. Not implemented-main.
Distinct from live slices
Does not duplicate #422/#421/#420/#419/#418/#417/#416/#415/#414/#413/#412/#411/#410/#409/#408/#407/#406/#405/#404/#398/#376/#374/#372/#389/#364/#356/#358/#359, Leiden (#351), 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.