Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Published `tepp-export-lookup-request get` is quarantine-parity of ADR 0099: the typed exchange returns `authorization_denied` after origin/key validation and never prints a stored export-authorization request (ADR 0100). Empty stdin admitted. Public bind/`localhost`/`http` origin/unpublished consumer/LineageWeave/credential flags fail closed. Does not weaken ADR 0099. `NaruonLiveService` stays POST-only. Does not re-open cancel lineages.
1 change: 1 addition & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ TEPP's approved PRD v0.4 and implementation plan are the primary product baselin
| Export idempotency-key lookup HTTP doctoring | [`docs/research/export-idempotency-lookup-http.md`](docs/research/export-idempotency-lookup-http.md) |
| Export idempotency-key lookup CLI doctoring | [`docs/research/export-idempotency-lookup-cli.md`](docs/research/export-idempotency-lookup-cli.md) |
| Export idempotency-key lookup stored-request GET doctoring | [`docs/research/export-idempotency-lookup-stored-request-http.md`](docs/research/export-idempotency-lookup-stored-request-http.md) |
| Export idempotency-key lookup stored-request CLI doctoring | [`docs/research/export-idempotency-lookup-stored-request-cli.md`](docs/research/export-idempotency-lookup-stored-request-cli.md) |
| Change history | [`CHANGELOG.md`](CHANGELOG.md) |

## Maturity vocabulary
Expand Down
6 changes: 6 additions & 0 deletions crates/tepp_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,11 @@ path = "src/bin/tepp_export_lookup.rs"
test = false
bench = false

[[bin]]
name = "tepp-export-lookup-request"
path = "src/bin/tepp_export_lookup_request.rs"
test = false
bench = false

[lints]
workspace = true
42 changes: 42 additions & 0 deletions crates/tepp_api/src/bin/tepp_export_lookup_request.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//! Operator CLI for quarantined naruon export lookup stored-request GET.
//!
//! Compose returns `authorization_denied` after origin/key validation (ADR
//! 0099). This binary never prints a stored export-authorization request.

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

use tepp_api::{
ApiError, ExportIdempotencyLookupStoredRequestCliInvocation,
execute_export_idempotency_lookup_stored_request_cli,
read_export_idempotency_lookup_stored_request_cli_stdin,
render_export_idempotency_lookup_stored_request_cli_stdout,
};

fn main() -> ExitCode {
match run() {
Ok(()) => ExitCode::SUCCESS,
Err(error) => {
eprintln!("tepp-export-lookup-request: {error}");
ExitCode::FAILURE
}
}
}

fn run() -> Result<(), ApiError> {
let args: Vec<String> = std::env::args().skip(1).collect();
let body = read_export_idempotency_lookup_stored_request_cli_stdin(
io::stdin().is_terminal(),
io::stdin(),
)?;
let invocation = ExportIdempotencyLookupStoredRequestCliInvocation::from_args(&args, body)?;
let response = execute_export_idempotency_lookup_stored_request_cli(&invocation)?;
let stdout =
render_export_idempotency_lookup_stored_request_cli_stdout(&invocation, &response)?;
println!("{stdout}");
if (200..300).contains(&response.status_code) {
Ok(())
} else {
Err(ApiError::InvalidWirePayload)
}
}
Loading
Loading