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
1 change: 1 addition & 0 deletions CHANGELOG.d/interpretation-run-cancel-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `orchestrator_live` `tepp-interpretation-run-cancel cancel` mints a typed contextual-orchestrator `POST /v1/interpretation-runs/{idempotency_key}/cancel` onto spawned `tepp-orchestrator-loopback` TCP (ADR 0074). Metric-free cancelled identities only (`claim_status=hypothetical`, `scientific_authority=false`, `cancelled=true`). `tepp.scientific_acceptance.v1` never appears. Does not infer causality. Naruon and LineageWeave are refused. Not cancel HTTP-only, not analysis-run cancel CLI, not persistence.
1 change: 1 addition & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ TEPP's approved PRD v0.4 and implementation plan are the primary product baselin
| Interpretation-run collection GET doctoring | [`docs/research/interpretation-run-collection-http.md`](docs/research/interpretation-run-collection-http.md) |
| Interpretation-run GET-by-id doctoring | [`docs/research/interpretation-run-retrieval-http.md`](docs/research/interpretation-run-retrieval-http.md) |
| Interpretation-run cancel HTTP doctoring | [`docs/research/interpretation-run-cancel-http.md`](docs/research/interpretation-run-cancel-http.md) |
| Interpretation-run cancel CLI doctoring | [`docs/research/interpretation-run-cancel-cli.md`](docs/research/interpretation-run-cancel-cli.md) |
| UML/runtime/scientific flows | [`docs/UML.md`](docs/UML.md) |
| Logical/physical ERD | [`docs/ERD.md`](docs/ERD.md) |
| Security policy | [`SECURITY.md`](SECURITY.md) |
Expand Down
6 changes: 6 additions & 0 deletions crates/orchestrator_live/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@ path = "src/bin/tepp_interpretation_runs.rs"
test = false
bench = false

[[bin]]
name = "tepp-interpretation-run-cancel"
path = "src/bin/tepp_interpretation_run_cancel.rs"
test = false
bench = false

[lints]
workspace = true
34 changes: 34 additions & 0 deletions crates/orchestrator_live/src/bin/tepp_interpretation_run_cancel.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//! Operator CLI for loopback contextual-orchestrator interpretation-run cancel.

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

use orchestrator_live::{
execute_interpretation_run_cancel_cli, read_interpretation_run_cancel_cli_stdin,
render_interpretation_run_cancel_cli_stdout, InterpretationRunCancelCliInvocation,
OrchestratorLiveError,
};

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

fn run() -> Result<(), OrchestratorLiveError> {
let args: Vec<String> = std::env::args().skip(1).collect();
match args.first().map(String::as_str) {
Some("cancel") => run_cancel(&args),
_ => Err(OrchestratorLiveError::InvalidWirePayload),
}
}

fn run_cancel(args: &[String]) -> Result<(), OrchestratorLiveError> {
let body = read_interpretation_run_cancel_cli_stdin(io::stdin().is_terminal(), io::stdin())?;
let invocation = InterpretationRunCancelCliInvocation::from_args(args, body)?;
let response = execute_interpretation_run_cancel_cli(&invocation)?;
let stdout = render_interpretation_run_cancel_cli_stdout(&invocation, &response)?;
println!("{stdout}");
Ok(())
Comment on lines +12 to +33

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Binary behavior lacks direct coverage

Tests call library functions but never launch tepp-interpretation-run-cancel. Its command dispatch, exit status, stdin, and stdout paths remain uncovered.

Devin Review

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

}
Loading
Loading