Skip to content
Closed
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
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ boundaries above remain the target modular MSA architecture.
| `tepp_simulation` | known-truth temporal/event data generation |
| `validation_core` | RMSE, bias, coverage, graph, Monte Carlo, and exact-head claim-promotion metrics |
| `tepp_api` | versioned DTO, schema, terminal-result, and export contracts |
| `analysis_engine` | bounded cutoff-safe temporal evidence readiness execution, digest-bound terminal artifacts, GAP-003A scientific-acceptance validation runs (`tepp.scientific_acceptance.v1`; not implemented-main), loopback `POST /v1/analysis-runs/{run_id}/execute` that produces that artifact without a caller-supplied payload, the published `tepp-loopback` binary that binds that wrapper, typed naruon/`LineageWeave` execute exchanges, and HTTP/1.1 rendering of those exchanges onto the spawned `tepp-loopback` TCP listener |
| `analysis_engine` | bounded cutoff-safe temporal evidence readiness execution, digest-bound terminal artifacts, GAP-003A scientific-acceptance validation runs (`tepp.scientific_acceptance.v1`; not implemented-main), loopback `POST /v1/analysis-runs/{run_id}/execute` that produces that artifact without a caller-supplied payload, the published `tepp-loopback` binary that binds that wrapper, typed naruon/`LineageWeave` execute exchanges, HTTP/1.1 rendering of those exchanges onto the spawned `tepp-loopback` TCP listener, and the published `tepp-execute` CLI that POSTs those typed exchanges |
| `episode_membership` | event-time episode membership containment gate |
| `prompt_source` | prompt boilerplate is not unique latent content and not stopword deletion |
| `corpus_background` | corpus-background wording is not unique latent content and not stopword deletion |
Expand Down Expand Up @@ -113,7 +113,7 @@ boundaries above remain the target modular MSA architecture.
| `episode_membership` | episode membership cannot escape the episode event-time interval |
| `membership_target` | language, episode, template, department, and opportunity-pool targets cannot collapse into entity or project |
| `topic_measurement` | logistic-normal ALR/ILR coordinates and the CPU `f64` TRSL-TM reference estimator |
| `analysis_engine` | bounded cutoff-safe temporal evidence readiness execution, digest-bound terminal artifacts, GAP-003A scientific-acceptance validation runs (`tepp.scientific_acceptance.v1`; not implemented-main), loopback `POST /v1/analysis-runs/{run_id}/execute` that produces that artifact without a caller-supplied payload, the published `tepp-loopback` binary that binds that wrapper, typed naruon/`LineageWeave` execute exchanges, and HTTP/1.1 rendering of those exchanges onto the spawned `tepp-loopback` TCP listener |
| `analysis_engine` | bounded cutoff-safe temporal evidence readiness execution, digest-bound terminal artifacts, GAP-003A scientific-acceptance validation runs (`tepp.scientific_acceptance.v1`; not implemented-main), loopback `POST /v1/analysis-runs/{run_id}/execute` that produces that artifact without a caller-supplied payload, the published `tepp-loopback` binary that binds that wrapper, typed naruon/`LineageWeave` execute exchanges, HTTP/1.1 rendering of those exchanges onto the spawned `tepp-loopback` TCP listener, and the published `tepp-execute` CLI that POSTs those typed exchanges |
| `psychometric_core` | posterior-aware structural input gates, CWC within/between OLS plus the contextual effect, event-time log-rate, unequal-interval discrete-lag remapping, constant-predictor discrete effect, time-varying-predictor discrete effect (Eq. 14), exact scalar discrete process noise (Driver et al., 2017, Eq. 3), lagged latent covariance and unconditional latent variance (Driver et al., 2017, Eq. 3–4), stationary within-subject variance (Driver et al., 2017, Eq. 4 as `Δt → ∞`; `asymDIFFUSION`), trait-plus-state variance (Driver et al., 2017, §4.3 `TRAITVAR`; not process noise), observed-indicator variance and lagged observed covariance (Driver et al., 2017, Eq. 5; Table 2 `MANIFESTVAR` is `Θ`, not `Var(y)`; `MANIFESTTRAITVAR` is not `MANIFESTVAR`; `Θ` does not enter lagged observed covariance; observed-indicator mean is `τ + λ μ`; `MANIFESTMEANS` is not `E(y)`; `CINT` is not `MANIFESTMEANS`; discrete latent mean is `exp(a Δt) μ_0 + (exp(a Δt) − 1)/a κ`; `T0MEANS` is not `μ_t`; `CINT` is not the discrete increment; evolved observed mean is `τ + λ μ_t`; `τ + λ μ_0` is not `E(y_t)`; contemporaneous `TDPREDEFFECT` impulse is `m x`, not `CINT`, not `TIPREDEFFECT`, and not Voelkle Eq. 14; Eq. 5 of that contemporaneous impulse is `τ + λ(μ_t + m x)`, and `τ + λ μ_t` is not that observed mean; time-independent `TIPREDEFFECT` increment is `A^{-1}[e^{A Δt} − I] B z`, not `CINT`, not `M x`, not Voelkle Eq. 14, and not the coefficient `B`; Eq. 5 of that increment is `τ + λ(μ_t + A^{-1}[e^{A Δt} − I] B z)`, and `τ + λ μ_t` is not that observed mean; `τ + λ(μ_t + m x)` is not that observed mean; `τ + λ(μ_t + e^{a(t−u)} m x)` is not that observed mean when `u ≠ t`; within-interval `TDPREDEFFECT` carry is `e^{A(t−u)} M x` for `t0 < u < t`, not the contemporaneous Dirac, not `CINT`, not `TIPREDEFFECT`, and not Voelkle Eq. 14; Eq. 5 of that carry is `τ + λ(μ_t + e^{a(t−u)} m x)`, and `τ + λ μ_t` is not that observed mean; `τ + λ(μ_t + m x)` is not that carried observed mean when `u ≠ t`; first-occasion `T0TIPREDEFFECT` shift is `t0_b z` and Eq. 3 first-summand carry is `e^{A Δt} t0_b z` (`T0TIPREDEFFECT` is not `TIPREDEFFECT` `B`; `t0_b z` is not `A^{-1}[e^{A Δt} − I] B z`; `e^{A Δt} t0_b z` is not `t0_b z`; Eq. 5 of that carry is `τ + λ(μ_t + e^{a Δt} t0_b z)`, and `τ + λ μ_t` is not that observed mean; `τ + λ(μ_t + A^{-1}[e^{A Δt} − I] B z)` is not that observed mean), first-occasion `T0TDPREDEFFECT` shift is `t0_m x0` and Eq. 3 first-summand carry is `e^{A Δt} t0_m x0` (`T0TDPREDEFFECT` is not `TDPREDEFFECT` `M`; `t0_m x0` is not `M x`; `e^{A Δt} t0_m x0` is not `t0_m x0`; `e^{A Δt} t0_m x0` is not `e^{A(t−u)} M x` for `t0 < u < t`; `t0_m x0` is not `t0_b z`; an impulse at `u ≤ t0` that used `M` is already in `η(t0)` as `TDPREDEFFECT`, not as `T0TDPREDEFFECT`; Eq. 5 of that carry is `τ + λ(μ_t + e^{a Δt} t0_m x0)`, and `τ + λ μ_t` is not that observed mean; `τ + λ(μ_t + A^{-1}[e^{A Δt} − I] B z)` is not that observed mean; `τ + λ(μ_t + e^{a Δt} t0_b z)` is not that observed mean; §7.2 level-change `CINT` is `κ = −a m x` with `a < 0` so `−κ / a = m x` (`−a m x` is not the dissipating Dirac, not a free `CINT`, not `TIPREDEFFECT`, and not the extra near-zero-drift latent process also named in §7.2; Eq. 3 of that setting is `(1 − e^{a Δt}) m x`, which is not `m x`, not `κ`, and not `TIPREDEFFECT`; §7.2 extra-process contribution is `a_{ηξ} x (e^{ε Δt} − e^{a Δt}) / (ε − a)` (`ε = a` is `a_{ηξ} x Δt e^{a Δt}`; identification `TDPREDEFFECT` on the extra process is 1; printed extra `DRIFT` is `−0.000001`; not `κ = −a m x`, not `(1 − e^{a Δt}) m x`, and not the dissipating Dirac `m x`; `ε ≥ 0` fails closed; Eq. 5 of that contribution is `τ + λ(μ_t + a_{ηξ} x (e^{ε Δt} − e^{a Δt}) / (ε − a)`; the extra process has `LAMBDA` 0 and is not an observed indicator; `τ + λ μ_t` is not that observed mean; `τ + λ(μ_t + m x)` is not that observed mean; the contribution is not `E(y_t)`; the evolved-plus-contribution latent mean is not `E(y_t)`; after-t0 extra-process `TDPREDEFFECT` is `a_{ηξ} x (e^{ε(t−u)} − e^{a(t−u)}) / (ε − a)` for `t0 < u < t` while `μ_t` uses `Δt`; Eq. 5 of that after-t0 contribution is `τ + λ(μ_t + a_{ηξ} x (e^{ε(t−u)} − e^{a(t−u)}) / (ε − a)`; the first-occasion extra-process observed mean is not that observed mean when `u ≠ t0`; `e^{a(t−u)} m x` is a Dirac on the original process, not this `DRIFT` drive; §7.2 `asymTIPREDEFFECT` is `-B z / a` for `a < 0` (`-B z / a` is not the coefficient `B`, not `A^{-1}[e^{A Δt} − I] B z`, not `CINT`, and not `M x`; §7.2 `addedTIPREDVAR` is `(B / a)² v`, not `TRAITVAR`, not `asymDIFFUSION`, and not `-B z / a`; Table 2 `asymCINT` is `-κ / a` for `a < 0` and is not `κ`, not `A^{-1}[e^{A Δt} − I] κ`, not `T0MEANS`, and not `-B z / a`; p. 16 stationary `T0MEANS` is `-κ / a + −B z / a` and is not free `T0MEANS`, not `asymCINT` alone, not `asymTIPREDEFFECT` alone, and not the finite-interval discrete latent mean; Eq. 5 of that constrained mean is `τ + λ(−κ / a + −B z / a)`; `τ + λ μ_0` is not that observed mean; `τ + λ(−κ / a)` is not that observed mean when `B z ≠ 0`; `τ + λ μ_t` is not that observed mean; `MANIFESTMEANS` is not `E(y_0)`; the constrained latent mean is not `E(y_0)`; stationary `T0VAR` is `trait + −q / (2 a) + (B / a)² v` (not free `T0VAR`, not `asymDIFFUSION` alone, not `TRAITVAR` alone, not `addedTIPREDVAR` alone, and not the finite-interval discrete latent variance. Eq. 5 of that constrained variance is `λ²(trait + −q / (2 a) + (B / a)² v) + θ + ψ` (JSS PDF re-opened 2026-08-22T03:20Z; form the stationary latent variance first, then `λ² p + θ + ψ`; `λ² p_0` is not that observed variance; `λ²(−q / (2 a)) + θ` is not that observed variance when `TRAITVAR` or `addedTIPREDVAR` is nonzero; `MANIFESTVAR` is not `Var(y_0)`; the constrained latent variance is not `Var(y_0)`); lagged stationary `T0VAR` is `trait + e^{a Δt}(−q / (2 a)) + (B / a)² v` (trait and `addedTIPREDVAR` do not decay; contemporaneous `T0VAR` is not that lagged map; decaying the constrained total as if it were all state is not that lagged map; Eq. 5 of that lagged covariance is `λ²(trait + e^{a Δt}(−q / (2 a)) + (B / a)² v) + ψ`; `Θ` does not enter; contemporaneous `Var(y_0)` is not that lagged observed covariance; the lagged latent covariance is not that observed covariance); later-occasion stationary `T0VAR` is `trait + e^{2 a Δt}(−q / (2 a)) + Q_Δt + (B / a)² v` (trait and `addedTIPREDVAR` do not enter `Q_Δt`; under stationarity that composition equals contemporaneous `T0VAR`; evolving the constrained total as if it were all state is not that later map; the lagged covariance omits `Q_Δt`; `Q_Δt` is not that later map; Eq. 5 of that later-occasion variance is `λ²(trait + e^{2 a Δt}(−q / (2 a)) + Q_Δt + (B / a)² v) + θ + ψ`; lagged observed covariance omits `Q_Δt` and `θ`; `MANIFESTVAR` is not `Var(y_t)`; the later-occasion latent variance is not `Var(y_t)`))), irregular already-centered residual lag, Rubin `T` on OLS loadings, and strong-gated latent means (two-observation residual variance is identically `0` and caps at strong/scalar; Putnick & Bornstein, 2016) |
| `validation_core` | RMSE, bias, coverage, graph, and Monte Carlo metrics |
| `tepp_api` | versioned DTO, schema, and export contracts |
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.d/scientific-acceptance-execute-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

- `analysis_engine` GAP-003A execute CLI slice (ADR 0041, active-PR, not implemented-main): published `tepp-execute` POSTs typed naruon and `LineageWeave` execute exchanges onto spawned `tepp-loopback` TCP so operators obtain `tepp.scientific_acceptance.v1` without writing HTTP. Public bind hosts and `localhost` fail closed. Persistence remains GAP-003B.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ All notable changes to TEPP are documented here. The format follows Keep a Chang

## [Unreleased]

- `analysis_engine` GAP-003A execute CLI slice (ADR 0041, active-PR, not implemented-main): published `tepp-execute` POSTs typed naruon and `LineageWeave` execute exchanges onto spawned `tepp-loopback` TCP so operators obtain `tepp.scientific_acceptance.v1` without writing HTTP. Public bind hosts, `localhost`, credential-shaped flags, empty stdin, LLM recovery, metric keys, and `http://` origins fail closed. This does not duplicate the TCP renderer (#382), execute builders (#381), published binary (#375), engine-execute (#370), lifecycle CLI (#362), create CLI (#385), cancel consumer-parity (#373), cancel CLI (#378), stored-request GET (#377), stored-request consumer-parity (#387), retry-children (#379), idempotency (#380), retry-parent (#384), collection GET (#368), GET (#359), lifecycle POST (#360), cancel HTTP (#361), collection CLI (#371), retry (#369), engine-library (#356), DTO (#358), or persistence (#287); persistence remains GAP-003B.

- `analysis_engine` GAP-003A execute-exchange loopback TCP slice (ADR 0037, active-PR, not implemented-main): `loopback_http1_from_execute_exchange` renders typed naruon and `LineageWeave` execute exchanges onto the spawned `tepp-loopback` TCP listener so POST `/execute` is published consumer HTTP without embedding the library. Public bind hosts, `localhost`, and non-execute exchanges fail closed. This does not duplicate the execute consumer-exchange builders (#381), published binary (#375), engine-execute library (#370), cancel consumer parity (#373), loopback CLI (#362), collection CLI (#371), retry (#369), GET (#359), lifecycle POST (#360), cancel HTTP (#361), collection GET (#368), DTO (#358), or engine library (#356); persistence remains GAP-003B.

- `analysis_engine` GAP-003A execute consumer-exchange slice (ADR 0034, active-PR, not implemented-main): `naruon_analysis_run_execute_exchange` and `lineageweave_analysis_run_execute_exchange` mint credential-free HTTPS `POST /v1/analysis-runs/{run_id}/execute` so naruon and `LineageWeave` obtain `tepp.scientific_acceptance.v1` without hand-rolled HTTP or a caller-supplied artifact. The typed body refuses `scientific_acceptance_json`, receipt metric keys, and LLM-authored recovery. Non-`https` origins fail closed. This does not duplicate the published binary (#375), engine-execute library (#370), cancel consumer parity (#373), loopback CLI (#362), collection CLI (#371), retry (#369), GET (#359), lifecycle POST (#360), cancel HTTP (#361), collection GET (#368), DTO (#358), or engine library (#356); persistence remains GAP-003B.
Expand Down
2 changes: 2 additions & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ TEPP's approved PRD v0.4 and implementation plan are the primary product baselin
| Scientific-acceptance published loopback binary doctoring | [`docs/research/scientific-acceptance-loopback-binary.md`](docs/research/scientific-acceptance-loopback-binary.md) |
| Scientific-acceptance execute consumer-exchange doctoring | [`docs/research/scientific-acceptance-execute-consumer-exchange.md`](docs/research/scientific-acceptance-execute-consumer-exchange.md) |
| Scientific-acceptance execute-exchange loopback TCP doctoring | [`docs/research/scientific-acceptance-execute-exchange-loopback-tcp.md`](docs/research/scientific-acceptance-execute-exchange-loopback-tcp.md) |
| Scientific-acceptance execute CLI doctoring | [`docs/research/scientific-acceptance-execute-cli.md`](docs/research/scientific-acceptance-execute-cli.md) |
| Retention/deletion/legal-hold doctoring | [`docs/research/retention-deletion-legal-hold.md`](docs/research/retention-deletion-legal-hold.md) |
| Provider-payload minimization doctoring | [`docs/research/provider-payload-minimization.md`](docs/research/provider-payload-minimization.md) |
| Relation absence is not negative evidence | [`docs/research/relation-absence-not-negative.md`](docs/research/relation-absence-not-negative.md) |
Expand Down Expand Up @@ -157,6 +158,7 @@ TEPP's approved PRD v0.4 and implementation plan are the primary product baselin
| Scientific-acceptance published loopback binary doctoring | [`docs/research/scientific-acceptance-loopback-binary.md`](docs/research/scientific-acceptance-loopback-binary.md) |
| Scientific-acceptance execute consumer-exchange doctoring | [`docs/research/scientific-acceptance-execute-consumer-exchange.md`](docs/research/scientific-acceptance-execute-consumer-exchange.md) |
| Scientific-acceptance execute-exchange loopback TCP doctoring | [`docs/research/scientific-acceptance-execute-exchange-loopback-tcp.md`](docs/research/scientific-acceptance-execute-exchange-loopback-tcp.md) |
| Scientific-acceptance execute CLI doctoring | [`docs/research/scientific-acceptance-execute-cli.md`](docs/research/scientific-acceptance-execute-cli.md) |
| Retention/deletion/legal-hold doctoring | [`docs/research/retention-deletion-legal-hold.md`](docs/research/retention-deletion-legal-hold.md) |
| Stopword-deletion doctoring | [`docs/research/stopword-deletion.md`](docs/research/stopword-deletion.md) |
| Provider-payload minimization doctoring | [`docs/research/provider-payload-minimization.md`](docs/research/provider-payload-minimization.md) |
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM rust:1.98.0-bookworm@sha256:e70e2eec3d495fd5c8e0be74adda86507dfac7f51a724fbf9813ff59b2b247c7 AS build
WORKDIR /src
COPY . .
RUN cargo build --locked --release -p analysis_engine --bin tepp-loopback
RUN cargo build --locked --release -p analysis_engine --bin tepp-loopback --bin tepp-execute

FROM debian:bookworm-slim@sha256:abd67ffcfa541b485a3dff59865ab629aa048a6c613e639d36e7456b0b229241
RUN apt-get update \
&& apt-get install --yes --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/target/release/tepp-loopback /usr/local/bin/tepp-loopback
COPY --from=build /src/target/release/tepp-execute /usr/local/bin/tepp-execute
USER 65532:65532
HEALTHCHECK --interval=10s --timeout=3s --start-period=2s --retries=5 \
CMD curl --fail --silent --show-error \
Expand Down
6 changes: 6 additions & 0 deletions crates/analysis_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@ path = "src/bin/tepp_loopback.rs"
test = false
bench = false

[[bin]]
name = "tepp-execute"
path = "src/bin/tepp_execute.rs"
test = false
bench = false

[lints]
workspace = true
32 changes: 32 additions & 0 deletions crates/analysis_engine/src/bin/tepp_execute.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//! Operator CLI for POST /execute through typed naruon/`LineageWeave` exchanges.

use std::io::{self, IsTerminal};
use std::process::ExitCode;

use analysis_engine::{
ScientificAcceptanceExecuteCliInvocation, execute_scientific_acceptance_execute_cli,
read_scientific_acceptance_execute_cli_stdin, render_scientific_acceptance_execute_cli_stdout,
};
use tepp_api::ApiError;

fn main() -> ExitCode {
match run() {
Ok(()) => ExitCode::SUCCESS,
Err(_) => ExitCode::FAILURE,
}
}

fn run() -> Result<(), ApiError> {
let args: Vec<String> = std::env::args().skip(1).collect();
let body =
read_scientific_acceptance_execute_cli_stdin(io::stdin().is_terminal(), io::stdin())?;
let invocation = ScientificAcceptanceExecuteCliInvocation::from_args(&args, body)?;
let response = execute_scientific_acceptance_execute_cli(&invocation)?;
let stdout = render_scientific_acceptance_execute_cli_stdout(&invocation, &response)?;
println!("{stdout}");
if (200..300).contains(&response.status_code) {
Ok(())
} else {
Err(ApiError::InvalidWirePayload)
}
}
11 changes: 10 additions & 1 deletion crates/analysis_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
//! binds that wrapper so `POST /v1/analysis-runs/{run_id}/execute` is reachable
//! on the loopback listener without embedding this crate. Naruon and
//! `LineageWeave` mint that POST through typed execute exchanges in this crate
//! and render them onto the spawned `tepp-loopback` TCP listener.
//! and render them onto the spawned `tepp-loopback` TCP listener. The published
//! `tepp-execute` CLI POSTs those typed exchanges so operators do not write HTTP.

mod case_deletion_refit;
mod lineage_criterion;
mod loopback_execute;
mod loopback_execute_cli;
mod topic_context_posterior;
mod topic_lineage_artifact;
mod validation_run;
Expand Down Expand Up @@ -64,6 +66,13 @@ pub use loopback_execute::{
lineageweave_analysis_run_execute_exchange, loopback_http1_from_execute_exchange,
loopback_http1_from_naruon_exchange, naruon_analysis_run_execute_exchange,
};
/// Operator loopback CLI that POSTs typed execute exchanges to `tepp-loopback`.
pub use loopback_execute_cli::{
ScientificAcceptanceExecuteCliInvocation, ScientificAcceptanceExecuteCliVerb,
compose_scientific_acceptance_execute_cli_http, dispatch_scientific_acceptance_execute_cli,
execute_scientific_acceptance_execute_cli, read_scientific_acceptance_execute_cli_stdin,
render_scientific_acceptance_execute_cli_stdout,
};
/// Bounded posterior topic-context producer contract and record types.
pub use topic_context_posterior::{
TOPIC_CONTEXT_POSTERIOR_BYTE_LIMIT, TOPIC_CONTEXT_POSTERIOR_SCHEMA_VERSION,
Expand Down
Loading
Loading