Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7267376
docs(adr): record executable TDT/CHRONOS composition maturity for #170
seonghobae Aug 26, 2026
f103473
feat(event): wire composition module exports and rustdoc
seonghobae Aug 26, 2026
f9e3705
feat(event): add composition refusal EventError variants
seonghobae Aug 26, 2026
dcdd24b
feat(event): add versioned TDT/CHRONOS composition module
seonghobae Aug 26, 2026
6f1bc70
test(event): add TDT/CHRONOS composition fail-closed contract
seonghobae Aug 26, 2026
c128862
test(event): add TDT/CHRONOS composition known-truth contract
seonghobae Aug 26, 2026
a39457d
style(event_core): rustfmt TDT/CHRONOS composition contract test
seonghobae Aug 26, 2026
97ef401
style(event_core): rustfmt composition module and re-export order
seonghobae Aug 26, 2026
f546c44
test(event_core): close TDT/CHRONOS composition fail-closed coverage
seonghobae Aug 26, 2026
fc8327e
test(event_core): cover composition config accessors and unknown-righ…
seonghobae Aug 26, 2026
b5e8240
test(event_core): cover composition config accessors and unknown-righ…
seonghobae Aug 26, 2026
d66c64c
test(event_core): cover composition config accessors and unknown-righ…
seonghobae Aug 26, 2026
9856685
style(event_core): keep compose allow on one line for docstring and c…
seonghobae Aug 26, 2026
42133ab
fix product CI rustfmt, tepp_api rustdoc, and mlx unused imports
seonghobae Aug 26, 2026
7bc6a05
fix product CI rustfmt, tepp_api rustdoc, and mlx unused imports
seonghobae Aug 26, 2026
4cbe5cd
fix product CI rustfmt, tepp_api rustdoc, and mlx unused imports
seonghobae Aug 26, 2026
773fe9c
fix product CI rustfmt, tepp_api rustdoc, and mlx unused imports
seonghobae Aug 26, 2026
79c7fd3
fix product CI rustfmt, tepp_api rustdoc, and mlx unused imports
seonghobae Aug 26, 2026
59c7bf5
fix(ci): rustfmt wrap scientific_claim_boundary_contract imports
seonghobae Aug 26, 2026
2cf7436
fix(ci): drop duplicate rustfmt import in scientific_claim
seonghobae Aug 26, 2026
6842576
fix(ci): rustfmt wrap multilevel_event_time_recovery_contract imports
seonghobae Aug 26, 2026
13e6b60
fix(ci): rustfmt wrap event_time recover import list
seonghobae Aug 26, 2026
269a380
test(event_core): split TDT composition known-truth tests under clipp…
seonghobae Aug 26, 2026
bb1e1d0
fix(ci): store composition layers and cover clippy unused_self
seonghobae Aug 26, 2026
450aa9d
fix(ci): cover linux MLX probe refusal and receipt emit
seonghobae Aug 27, 2026
ba08f6a
fix(ci): cover event-time posterior draw-count overflow
seonghobae Aug 27, 2026
6856c01
fix(ci): cover Jeffreys criterion overflow and recovery
seonghobae Aug 27, 2026
7983d15
fix(ci): cover duplicate mention-extent fail-closed
seonghobae Aug 27, 2026
d418abd
fix(ci): cover membership overflow and topic From
seonghobae Aug 27, 2026
fe727cb
fix(ci): fail closed on event-time mass usize conversion
seonghobae Aug 27, 2026
f817a38
fix(ci): rustfmt event-time posterior import order
seonghobae Aug 27, 2026
f5c5601
fix(ci): derive Debug on mlx ProbeReceipt for linux refusal
seonghobae Aug 27, 2026
892415c
fix(ci): cover Jeffreys fail-closed numerical and continued-fraction …
seonghobae Aug 27, 2026
ee8289c
fix(ci): fail closed on mlx probe emit and hide test-only main
seonghobae Aug 27, 2026
f019e35
test(api): cover linux accelerators and every journey event type
seonghobae Aug 27, 2026
9998aff
test(engine): reject empty padded oversized pair identities
seonghobae Aug 27, 2026
124acc2
test(engine): fail closed on empty seed and padded document identities
seonghobae Aug 27, 2026
c46a3df
fix(ci): keep sqlx_live.rs out of unique branch fold
seonghobae Aug 27, 2026
2c3b082
test(quality): prove live sqlx transport arms stay outside the fold
seonghobae Aug 27, 2026
63d6748
fix(ci): discard unused Vec::pop results in lineage contract tests
seonghobae Aug 27, 2026
dc060e8
style(ci): rustfmt 2024 import order in lineage contract tests
seonghobae Aug 27, 2026
0ec5e2d
fix(ci): add semicolon after branch_transition_sha256.clear() for clippy
seonghobae Aug 27, 2026
678294f
fix(ci): compare continued-fraction lift sentinels by to_bits
seonghobae Aug 27, 2026
d1f6b00
fix(ci): recover I_x(1,1)=x closed form in regularized_beta
seonghobae Aug 27, 2026
505e2b4
fix(ci): fail closed on non-finite mlx receipt difference
seonghobae Aug 27, 2026
ef07651
test(ci): cover I_x(1,2) continued-fraction regularized_beta arm
seonghobae Aug 27, 2026
8f744c5
test(ci): cover identifier and digest unique-site branch arms
seonghobae Aug 27, 2026
03baf0c
test(ci): cover packaged mlx_native_receipt binary main on linux host
seonghobae Aug 27, 2026
438d9ef
test(ci): cover duplicate pair_ids and non-uuid admitted identity
seonghobae Aug 27, 2026
4c7255a
fix(event): fail closed when track assignments are not index-aligned
seonghobae Aug 27, 2026
ecb3274
test(event): refuse duplicate and reversed track assignment alignment
seonghobae Aug 27, 2026
0d14281
fix(event): fail closed when mention identities are not unique
seonghobae Aug 27, 2026
e0e1ae8
test(event): refuse duplicate mention identities on compose and append
seonghobae Aug 27, 2026
66f1075
style(event): rustfmt edition 2024 import order in composition
seonghobae Aug 27, 2026
65f839d
style(event): rustfmt edition 2024 import order in composition tests
seonghobae Aug 27, 2026
d36af5d
Merge branch 'main' into feat/tdt-chronos-composition
seonghobae Aug 27, 2026
d957b33
fix(event_core): gate unused unit-interval helper behind cfg(test)
seonghobae Aug 27, 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
17 changes: 14 additions & 3 deletions crates/analysis_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ pub fn execute_analysis_run(
// future bound change cannot wrap membership totals silently.
let eligible_evidence_count = eligible.len() as u64;
let eligible_membership_count = eligible.iter().try_fold(0_u64, |sum, unit| {
sum.checked_add(u64::from(unit.membership_count))
.ok_or(AnalysisEngineError::ArithmeticOverflow)
add_membership_count(sum, unit.membership_count)
})?;
let (earliest, latest) = eligible.iter().fold(
(eligible[0].event_time, eligible[0].event_time),
Expand Down Expand Up @@ -379,6 +378,11 @@ pub fn execute_analysis_run(
})
}

fn add_membership_count(sum: u64, membership_count: u32) -> Result<u64, AnalysisEngineError> {
sum.checked_add(u64::from(membership_count))
.ok_or(AnalysisEngineError::ArithmeticOverflow)
}

/// Require the accepted receipt to carry the request's idempotency identity.
fn require_receipt_identity(
request: &AnalysisRunRequest,
Expand Down Expand Up @@ -409,7 +413,7 @@ mod tests {
use super::{
ANALYSIS_ARTIFACT_SCHEMA_VERSION, ANALYSIS_STATISTIC_COUNT, AnalysisCorpus,
AnalysisEngineError, AnalysisEvidenceUnit, MAX_ANALYSIS_IDENTIFIER_BYTES,
MAX_EVIDENCE_UNITS, TopicMeasurementError, execute_analysis_run,
MAX_EVIDENCE_UNITS, TopicMeasurementError, add_membership_count, execute_analysis_run,
};
use temporal_core::{AvailableTime, EventTime};
use tepp_api::{AnalysisRunAccepted, AnalysisRunRequest, AnalysisRunTerminalState, ApiError};
Expand Down Expand Up @@ -683,6 +687,13 @@ mod tests {
}
let converted: AnalysisEngineError = ApiError::InvalidWirePayload.into();
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");
assert_eq!(
add_membership_count(u64::MAX, 1),
Err(AnalysisEngineError::ArithmeticOverflow)
);
assert_eq!(add_membership_count(0, 4), Ok(4));
}

#[test]
Expand Down
Loading
Loading