Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
cc8ed99
feat(analysis): bind CWC within/between slopes to an analysis-run pro…
seonghobae Aug 31, 2026
caa8f42
test(analysis): close longitudinal CWC coverage gaps
seonghobae Aug 31, 2026
c5dec0f
Merge origin/main into feat/longitudinal-cwc-analysis-run-gap-006
seonghobae Sep 14, 2026
8a5ae85
docs(analysis_engine): keep the rustdoc adjacent to execute_longitudi…
seonghobae Sep 14, 2026
6fd006e
test(analysis): expose longitudinal CWC contract gaps
seonghobae Sep 14, 2026
ec2bc21
fix(analysis): enforce longitudinal CWC temporal and artifact contracts
seonghobae Sep 14, 2026
99dbf5e
test(analysis): require longitudinal CWC row snapshot provenance
seonghobae Sep 14, 2026
5efa234
fix(analysis): bind CWC rows to immutable snapshot provenance
seonghobae Sep 14, 2026
90eb364
test(analysis): migrate longitudinal CWC fixtures to snapshot provenance
seonghobae Sep 14, 2026
9fd5384
docs(adr): keep longitudinal CWC decision proposed until landing
seonghobae Sep 14, 2026
a0783f9
docs(doctoring): record longitudinal CWC repair lineage
seonghobae Sep 14, 2026
e66a90f
test(analysis): expose longitudinal CWC evidence replay
seonghobae Sep 18, 2026
138be1f
fix(analysis): reject replayed longitudinal CWC evidence
seonghobae Sep 18, 2026
66cffe0
test(analysis): bind CWC fixtures to evidence identity
seonghobae Sep 18, 2026
418222f
test(analysis): retain row identity in CWC regressions
seonghobae Sep 18, 2026
104e2b1
docs(analysis): doctor CWC evidence identity boundary
seonghobae Sep 18, 2026
bb8cb21
test(analysis): keep future replay outside historical identity census
seonghobae Sep 18, 2026
6b07a4e
fix(analysis): deduplicate only cutoff-visible CWC evidence
seonghobae Sep 18, 2026
63ac964
docs(analysis): align CWC identity census with cutoff history
seonghobae Sep 18, 2026
35a8f08
test(analysis): keep future-only rows out of historical CWC artifacts
seonghobae Sep 18, 2026
28509b7
fix(analysis): remove future-only census from CWC artifact
seonghobae Sep 18, 2026
f1230ef
test(analysis): make CWC artifact invariant to future-only rows
seonghobae Sep 18, 2026
4befe86
test(analysis): remove future census from CWC artifact fixture
seonghobae Sep 18, 2026
98daaa7
docs(adr): bind CWC replay to cutoff-visible evidence
seonghobae Sep 18, 2026
ac894bd
docs(analysis): doctor future-only CWC artifact leakage
seonghobae Sep 18, 2026
0ea8f65
test(analysis): require cutoff-before-snapshot CWC admission
seonghobae Sep 18, 2026
0736022
fix(analysis): admit CWC availability before snapshot provenance
seonghobae Sep 18, 2026
b4edede
docs(adr): bind CWC snapshot provenance to visible evidence
seonghobae Sep 18, 2026
c9a99ff
docs(analysis): doctor future-only snapshot provenance
seonghobae Sep 18, 2026
2a05f4d
test(longitudinal): prove CWC evidence-order invariance
seonghobae Sep 18, 2026
3ef70bd
chore(longitudinal): preserve analysis profile shared surfaces
seonghobae Sep 19, 2026
6ce952c
chore(longitudinal): restack CWC evidence contracts on analysis profile
seonghobae Sep 19, 2026
e71af50
fix(longitudinal): restore surviving #416 tree after restack
seonghobae Sep 19, 2026
5a5a220
fix(longitudinal): synchronize CWC lock dependency
seonghobae Sep 19, 2026
456f0a3
fix(longitudinal): restore Cargo registry checksum integrity
seonghobae Sep 19, 2026
91377de
test(cwc): reject all-singleton success artifact
seonghobae Sep 19, 2026
5e61f7d
fix(cwc): reject all-singleton success artifact
seonghobae Sep 19, 2026
c40d306
test(cwc): keep singleton RED minimal
seonghobae Sep 19, 2026
da1a846
test(longitudinal): expose unbound admitted evidence payload
seonghobae Sep 19, 2026
625a3a4
fix(longitudinal): bind CWC artifact to admitted evidence payload
seonghobae Sep 19, 2026
676173f
test(longitudinal): migrate CWC artifact payload commitment fixture
seonghobae Sep 19, 2026
d215930
test(longitudinal): prove admitted evidence commitment ordering
seonghobae Sep 19, 2026
9886798
refactor(longitudinal): keep admitted digest helper slice-bounded
seonghobae Sep 19, 2026
58f021e
docs(adr): bind CWC output to admitted evidence provenance
seonghobae Sep 19, 2026
7a7e82f
docs(doctoring): record CWC admitted evidence commitment
seonghobae Sep 19, 2026
a5a039e
test(temporal): reject noncanonical CWC cutoff spellings
seonghobae Sep 19, 2026
6c06c0d
fix(temporal): canonicalize CWC cutoff identity
seonghobae Sep 19, 2026
fe7a282
docs(adr): record canonical CWC cutoff identity
seonghobae Sep 19, 2026
47b6a6c
docs(doctoring): trace canonical CWC cutoff repair
seonghobae Sep 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/analysis_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ episode_membership = { path = "../episode_membership", version = "0.2.0" }
inferred_status = { path = "../inferred_status", version = "0.2.0" }
membership_target = { path = "../membership_target", version = "0.2.0" }
subevent_containment = { path = "../subevent_containment", version = "0.2.0" }
psychometric_core = { path = "../psychometric_core", version = "0.2.0" }
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
Expand Down
40 changes: 38 additions & 2 deletions crates/analysis_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@
//! through [`tepp_api`]. It deliberately does not claim latent-variable or topic
//! estimation authority; those estimators remain separate scientific crates.
//! estimation authority; it invokes estimators through their scientific crate
//! contracts and preserves their artifact meaning.
//! contracts and preserves their artifact meaning. Longitudinal CWC composition
//! is invoked through [`psychometric_core`] and is not a causal estimand.

mod case_deletion_refit;
mod copy_identity_artifact;
mod episode_membership_artifact;
mod inferred_status_artifact;
mod lineage_criterion;
mod location_membership_artifact;
mod longitudinal_cwc_artifact;
mod membership_target_artifact;
mod subevent_containment_artifact;
mod topic_context_posterior;
mod topic_lineage_artifact;

use psychometric_core::PsychometricError;
use serde::Serialize;
use sha2::{Digest, Sha256};
use std::collections::BTreeSet;
Expand Down Expand Up @@ -78,6 +81,13 @@ pub use location_membership_artifact::{
LocationMembershipArtifact, LocationMembershipDocument, LocationMembershipExecution,
execute_location_membership_run,
};
/// Longitudinal CWC composition artifact and execution contracts.
pub use longitudinal_cwc_artifact::{
LONGITUDINAL_CWC_ARTIFACT_BYTE_LIMIT, LONGITUDINAL_CWC_ARTIFACT_SCHEMA_VERSION,
LONGITUDINAL_CWC_MODEL_CONTRACT_VERSION, LONGITUDINAL_CWC_OUTPUT_PROFILE,
LongitudinalClusterScore, LongitudinalCwcArtifact, LongitudinalCwcExecution,
execute_longitudinal_cwc_run,
};
/// Membership-target artifact and execution contracts from this engine.
pub use membership_target_artifact::{
MEMBERSHIP_TARGET_ARTIFACT_BYTE_LIMIT, MEMBERSHIP_TARGET_ARTIFACT_SCHEMA_VERSION,
Expand Down Expand Up @@ -294,6 +304,10 @@ pub enum AnalysisEngineError {
TopicMeasurement(TopicMeasurementError),
/// A topic-lineage artifact violated its bounded schema or count invariants.
InvalidTopicLineageArtifact,
/// A psychometric recovery rejected the offered coordinates.
Psychometric(PsychometricError),
/// A longitudinal CWC artifact violated its bounded schema or count invariants.
InvalidLongitudinalCwcArtifact,
/// A copy-identity artifact violated its bounded schema or count invariants.
InvalidCopyIdentityArtifact,
/// An episode-membership artifact violated its bounded schema or count invariants.
Expand All @@ -320,6 +334,8 @@ impl fmt::Display for AnalysisEngineError {
Self::LimitExceeded => "analysis corpus exceeded its execution bound",
Self::TopicMeasurement(error) => return error.fmt(formatter),
Self::InvalidTopicLineageArtifact => "invalid topic lineage artifact",
Self::Psychometric(error) => return error.fmt(formatter),
Self::InvalidLongitudinalCwcArtifact => "invalid longitudinal CWC artifact",
Self::InvalidCopyIdentityArtifact => "invalid copy-identity artifact",
Self::InvalidEpisodeMembershipArtifact => "invalid episode-membership artifact",
Self::InvalidInferredStatusArtifact => "invalid inferred-status artifact",
Expand All @@ -345,6 +361,12 @@ impl From<TopicMeasurementError> for AnalysisEngineError {
}
}

impl From<PsychometricError> for AnalysisEngineError {
fn from(error: PsychometricError) -> Self {
Self::Psychometric(error)
}
}

/// Execute the cutoff-safe temporal evidence readiness analysis.
///
/// Evidence whose `available_time` is later than the request cutoff is excluded
Expand Down Expand Up @@ -478,7 +500,8 @@ mod tests {
use super::{
ANALYSIS_ARTIFACT_SCHEMA_VERSION, ANALYSIS_STATISTIC_COUNT, AnalysisCorpus,
AnalysisEngineError, AnalysisEvidenceUnit, MAX_ANALYSIS_IDENTIFIER_BYTES,
MAX_EVIDENCE_UNITS, TopicMeasurementError, add_membership_count, execute_analysis_run,
MAX_EVIDENCE_UNITS, PsychometricError, TopicMeasurementError, add_membership_count,
execute_analysis_run,
};
use temporal_core::{AvailableTime, EventTime};
use tepp_api::{AnalysisRunAccepted, AnalysisRunRequest, AnalysisRunTerminalState, ApiError};
Expand Down Expand Up @@ -746,6 +769,14 @@ mod tests {
AnalysisEngineError::InvalidTopicLineageArtifact,
"invalid topic lineage artifact",
),
(
AnalysisEngineError::Psychometric(PsychometricError::CausalUnderidentified),
"temporal precedence is not causal identification",
),
(
AnalysisEngineError::InvalidLongitudinalCwcArtifact,
"invalid longitudinal CWC artifact",
),
(
AnalysisEngineError::InvalidCopyIdentityArtifact,
"invalid copy-identity artifact",
Expand Down Expand Up @@ -778,6 +809,11 @@ mod tests {
assert_eq!(converted.to_string(), "invalid API wire payload");
let from_topic: AnalysisEngineError = TopicMeasurementError::DidNotConverge.into();
assert_eq!(from_topic.to_string(), "topic estimator did not converge");
let from_psych: AnalysisEngineError = PsychometricError::CausalUnderidentified.into();
assert_eq!(
from_psych.to_string(),
"temporal precedence is not causal identification"
);
assert_eq!(
add_membership_count(u64::MAX, 1),
Err(AnalysisEngineError::ArithmeticOverflow)
Expand Down
Loading
Loading