Skip to content

feat(analysis): bind irregular event-time log-rate to an analysis-run profile - #389

Draft
seonghobae wants to merge 1 commit into
mainfrom
feat/irregular-event-time-analysis-run-gap-006
Draft

feat(analysis): bind irregular event-time log-rate to an analysis-run profile#389
seonghobae wants to merge 1 commit into
mainfrom
feat/irregular-event-time-analysis-run-gap-006

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

GAP-006 remaining operator-visible slice with no live implementation PR: bind Voelkle et al. (2012) irregular event-time local log-rate recovery to a cutoff-safe analysis-run profile.

  • New irregular_event_time_v1 output profile on analysis_engine
  • Invokes recover_event_series_mean_log_rate and map_discrete_lag_across_event_intervals without reimplementing the exponential map
  • Refuses pooled discrete lags across unequal intervals
  • Refuses non-event clocks
  • Cutoff-excludes unavailable occasions
  • Artifact schema tepp.irregular_event_time.v1 with inference status composed_interval_mapped_lags_not_dsem
  • ADR 0040; not DSEM; not a Driver p.16 std-family restore; not GAP-003A; not Leiden; not Compose persistence

Not implemented-main. Exact-head Checks and two independent APPROVE reviews are required. Author COMMENTED is not independent APPROVE. Do not self-approve. Do not --admin merge.

Known-truth

Scores 1.0, 0.5, 0.25 at event times 0, 1, 2 recover mean log-rate ln(0.5) and mapped reference lag 0.25 at Δt_ref = 2.

Verification

cargo fmt -p analysis_engine -- --check
cargo test -p analysis_engine
cargo clippy -p analysis_engine --all-targets -- -D warnings
python3 scripts/validate_documentation.py

Devin Review

… profile

GAP-006 remaining operator-visible slice: cutoff-safe irregular_event_time_v1
maps discrete lags through a and refuses pooled unequal-interval coefficients.
Not DSEM, not a Driver p.16 std-family restore, and not implemented-main.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 39 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f7bf165d-27eb-4b11-a610-23c6e07b278a

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc02f5 and 035bfb0.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • CHANGELOG.md
  • crates/analysis_engine/Cargo.toml
  • crates/analysis_engine/src/irregular_event_time_artifact.rs
  • crates/analysis_engine/src/lib.rs
  • crates/analysis_engine/tests/irregular_event_time_execution_contract.rs
  • docs/TRACEABILITY.md
  • docs/adr/0040-irregular-event-time-analysis-run.md
  • docs/adr/README.md
  • docs/doctoring/irregular-event-time-analysis-run.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Hour-22 exact-head review request.

New unique GAP-006 operator-visible slice (no prior live implementation PR). Current head 035bfb087d47543fd7dd87cfdbc4edd778f4a6aa.
Does not duplicate GAP-003A (#356/#358/#359), persistence/Compose (#287), Leiden (#351), Driver p.16 std-family (#310+), GAP-007 (#364), GAP-169 ESEM/DSEM (#376), CWC (#372), Rubin (#374), OLS invariance (#386), or CWC-then-irregular psychometric expose (#327).
Not implemented-main. Exact-head Checks on 035bfb0 only. Devin/CodeRabbit/author COMMENTED is not independent APPROVE. Copilot review requests are not APPROVE. Ruleset 18156473 needs two independent approvals on this exact SHA. Do not self-approve. Do not --admin merge.

@opencode-agent review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 6 potential issues.

Devin Review

reference_delta,
lag_clock,
)?;
let _ = claim_causal_effect(CausalHeuristic::TemporalPrecedence);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Causal refusal is silently discarded

Every run discards claim_causal_effect's guaranteed refusal and emits a successful artifact. The causal-claim gate never blocks promotion.

Prompt for agents
The irregular-event-time executor calls psychometric_core::claim_causal_effect(CausalHeuristic::TemporalPrecedence), which always returns PsychometricError::CausalUnderidentified, but discards the result. This contradicts ADR 0040's claim that invoking the gate prevents causal promotion. Decide whether this profile is actually attempting a causal claim. If it is, propagate the refusal and return no successful artifact. If it is not, remove the meaningless call and enforce the non-causal boundary through a validated artifact/status contract that consumers cannot reinterpret as causal.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +154 to +156
|| self.occasion_count < 2
|| self.interval_count == 0
|| self.interval_count != self.occasion_count.saturating_sub(1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Impossible evidence counts pass validation

validate accepts counts exceeding the 100,000-score execution limit, including u64::MAX. Fabricated artifacts can represent runs the executor cannot produce.

Prompt for agents
IrregularEventTimeArtifact::validate checks only the relationship between occasion_count and interval_count. It does not enforce MAX_EVIDENCE_UNITS or ensure occasion_count + excluded_after_cutoff_count stays within that input limit. Add overflow-safe count validation matching execute_irregular_event_time_run's bounded input contract, and add round-trip rejection tests for oversized eligible counts, oversized excluded counts, and overflowing totals.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +273 to +280
let mean_log_rate = recover_event_series_mean_log_rate(&eligible.occasions, lag_clock)?;
let (source_lag, source_delta) = first_source_lag(&eligible.occasions)?;
let mapped_reference_lag = map_discrete_lag_across_event_intervals(
source_lag,
source_delta,
reference_delta,
lag_clock,
)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Reference lag represents one pair

mapped_reference_lag uses only the earliest pair, while mean_log_rate summarizes every interval. Clarify this estimand prominently for artifact consumers.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

if request.snapshot_id != snapshot_id {
return Err(AnalysisEngineError::SnapshotMismatch);
}
if request.knowledge_cutoff != knowledge_cutoff.to_rfc3339()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Equivalent cutoffs require canonical spelling

Valid RFC 3339 cutoffs denoting the same instant can fail the exact string comparison. Document canonical formatting or compare parsed instants.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread CHANGELOG.md
Comment on lines +5 to +9
## [Unreleased]

### Added

- **Irregular event-time analysis-run profile**: cutoff-safe `irregular_event_time_v1` binds `recover_event_series_mean_log_rate`, maps pooled discrete lags across unequal intervals, and maps a reference-interval lag through `a` (`analysis_engine`). Not DSEM and not implemented-main.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Unreleased entries remain split

A second Unreleased heading leaves pending changes in two sections. Consolidate them before release tooling consumes the changelog.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread CHANGELOG.md

### Added

- **Irregular event-time analysis-run profile**: cutoff-safe `irregular_event_time_v1` binds `recover_event_series_mean_log_rate`, maps pooled discrete lags across unequal intervals, and maps a reference-interval lag through `a` (`analysis_engine`). Not DSEM and not implemented-main.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Changelog reverses pooling behavior

The entry says unequal-interval lags are pooled and mapped, but the profile rejects pooling. Correct the operator-facing capability description.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Hour-23 exact-head review request.

Current head 035bfb087d47543fd7dd87cfdbc4edd778f4a6aa.
GAP-006 irregular event-time analysis-run (irregular_event_time_v1 / ADR 0040). Not DSEM. Not CWC-then-irregular psychometric expose (#327). Do not duplicate this interval-map slice.

@opencode-agent review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant