Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ All notable changes to TEPP are documented here. The format follows Keep a Chang

## [Unreleased]

- **Topic activity analysis-run profile**: cutoff-safe `topic_activity_v1` binds `topic_lineage` dormancy/reactivation and remint refusal (`analysis_engine`). Reactivation is not a new topic; not birth/split/merge and not implemented-main.
- Removed the repository-local hourly PR-maintenance caller now covered by the central required scheduler, retired stale workflow registrations, narrowed documentation triggers, keyed PR concurrency by fixed workflow name, repository, and pull-request number without cancelling non-PR runs, and combined line/branch coverage on one sequential runner while preserving both 100% gates and diagnostics.

- `event_core` adds bounded Allen interval-consistency classification, atomic path-consistency closure, contradiction/resource refusals, and an explicit dependency-error fallback without claiming unrestricted global satisfiability.
Expand Down
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 @@ -20,6 +20,7 @@ serde_json = { workspace = true }
sha2 = { workspace = true }
tepp_api = { path = "../tepp_api", version = "0.2.0" }
temporal_core = { path = "../temporal_core", version = "0.2.0" }
topic_lineage = { path = "../topic_lineage", version = "0.2.0" }
topic_measurement = { path = "../topic_measurement", version = "0.2.0" }
uuid.workspace = true

Expand Down
43 changes: 41 additions & 2 deletions crates/analysis_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
//! 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. Topic activity composition
//! invokes [`topic_lineage`] and cannot mint a new identity on reactivation.

mod case_deletion_refit;
mod lineage_criterion;
mod topic_activity_artifact;
mod topic_context_posterior;
mod topic_lineage_artifact;

Expand All @@ -25,6 +27,7 @@ use tepp_api::{
AnalysisResultSummary, AnalysisRunAccepted, AnalysisRunRequest, AnalysisRunTerminalResult,
ApiError,
};
use topic_lineage::TopicLineageError;
use topic_measurement::TopicMeasurementError;

/// One document admitted to exhaustive case-deletion fitting.
Expand All @@ -46,12 +49,21 @@ pub use lineage_criterion::{
LineageCriterionFit, LineageCriterionFitError, LineageCriterionObservation,
fit_lineage_criterion_posteriors,
};
/// Topic-activity artifact and execution contracts from this engine.
pub use topic_activity_artifact::{
TOPIC_ACTIVITY_ARTIFACT_BYTE_LIMIT, TOPIC_ACTIVITY_ARTIFACT_SCHEMA_VERSION,
TOPIC_ACTIVITY_MODEL_CONTRACT_VERSION, TOPIC_ACTIVITY_OUTPUT_PROFILE, TopicActivityArtifact,
TopicActivityExecution, TopicActivityInput, TopicActivityTransition,
execute_topic_activity_run,
};
/// Bounded posterior topic-context producer contract and record types.
pub use topic_context_posterior::{
TOPIC_CONTEXT_POSTERIOR_BYTE_LIMIT, TOPIC_CONTEXT_POSTERIOR_SCHEMA_VERSION,
TopicActivityInterval, TopicContextMembership, TopicContextPosteriorArtifact,
TopicDocumentRelation, TopicLineageEvent, TopicPostPlausibleValue,
};
/// Durable topic identity used by topic-activity composition.
pub use topic_lineage::TopicIdentity;
/// Topic-lineage artifact and execution contracts from this engine.
pub use topic_lineage_artifact::{
TOPIC_LINEAGE_ARTIFACT_BYTE_LIMIT, TOPIC_LINEAGE_ARTIFACT_SCHEMA_VERSION,
Expand Down Expand Up @@ -248,6 +260,10 @@ pub enum AnalysisEngineError {
TopicMeasurement(TopicMeasurementError),
/// A topic-lineage artifact violated its bounded schema or count invariants.
InvalidTopicLineageArtifact,
/// Topic activity/dormancy/reactivation refused the offered sequence.
TopicActivity(TopicLineageError),
/// A topic-activity artifact violated its bounded schema or claim boundary.
InvalidTopicActivityArtifact,
}

impl fmt::Display for AnalysisEngineError {
Expand All @@ -262,6 +278,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::TopicActivity(error) => return error.fmt(formatter),
Self::InvalidTopicActivityArtifact => "invalid topic activity artifact",
};
formatter.write_str(message)
}
Expand All @@ -281,6 +299,12 @@ impl From<TopicMeasurementError> for AnalysisEngineError {
}
}

impl From<TopicLineageError> for AnalysisEngineError {
fn from(error: TopicLineageError) -> Self {
Self::TopicActivity(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 @@ -413,7 +437,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, TopicLineageError, TopicMeasurementError, add_membership_count,
execute_analysis_run,
};
use temporal_core::{AvailableTime, EventTime};
use tepp_api::{AnalysisRunAccepted, AnalysisRunRequest, AnalysisRunTerminalState, ApiError};
Expand Down Expand Up @@ -681,6 +706,14 @@ mod tests {
AnalysisEngineError::InvalidTopicLineageArtifact,
"invalid topic lineage artifact",
),
(
AnalysisEngineError::InvalidTopicActivityArtifact,
"invalid topic activity artifact",
),
(
AnalysisEngineError::TopicActivity(TopicLineageError::ReactivationIsNotNewTopic),
"reactivation is not a new topic",
),
];
for (error, message) in messages {
assert_eq!(error.to_string(), message);
Expand All @@ -689,6 +722,12 @@ 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_activity: AnalysisEngineError =
TopicLineageError::InvalidActivityTransition.into();
assert_eq!(
from_activity.to_string(),
"invalid topic activity transition"
);
assert_eq!(
add_membership_count(u64::MAX, 1),
Err(AnalysisEngineError::ArithmeticOverflow)
Expand Down
Loading
Loading