feat(api): consolidate export stored-request GET and CLI - #459
feat(api): consolidate export stored-request GET and CLI#459seonghobae wants to merge 2 commits into
Conversation
…ment GET
GAP-003A unique slice: GET /v1/exports/{export_id}/request returns the
accepted naruon authorization request on AnalysisRunLiveService so operators
do not replay POST. NaruonLiveService stays POST-only. LineageWeave refused.
Metric-free. ADR 0089. Stacked on #411. Does not re-open cancel lineages.
Publish tepp-export-request get so operators mint naruon_export_stored_request_exchange onto spawned tepp-loopback TCP. Empty stdin is admitted. LineageWeave, leftover stdin, public bind, localhost, http origin, unpublished consumer, and credential flags fail closed. NaruonLiveService stays POST-only. ADR 0090.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
|
||
| fn run() -> Result<(), ApiError> { | ||
| let args: Vec<String> = std::env::args().skip(1).collect(); | ||
| let body = read_export_stored_request_cli_stdin(io::stdin().is_terminal(), io::stdin())?; |
There was a problem hiding this comment.
🟡 Invalid commands can hang on stdin
run drains non-terminal stdin before validating arguments. Invalid commands can block indefinitely while an open input pipe sends no data.
Prompt for agents
Refactor crates/tepp_api/src/bin/tepp_export_request.rs so argument syntax and required flags are validated before reading non-terminal stdin. ExportStoredRequestCliInvocation::from_args currently combines argument parsing with body validation, so split parsing/assembly or add an argument-only parsing stage. Preserve the requirement that a valid GET invocation reads stdin and rejects any nonempty body.
Was this helpful? React with 👍 or 👎 to provide feedback.
seonghobae
left a comment
There was a problem hiding this comment.
exact-head COMMENT only (not APPROVE) on dee8b50e9b5a49b3154604ea9ccecc98626f1e33. Devin COMMENTED is not independent APPROVE.
Unique remains tepp-export-request + ADR 0090 (GET stored-request on the naruon-owned export adapter). naruon_export_stored_request_exchange is credential-free HTTPS GET; LineageWeave is refused on this adapter; NaruonLiveService stays POST-only. Keep metric keys fail-closed via FORBIDDEN_STORED_REQUEST_KEYS. This is stored-request by export identity, not unscoped stored-request-by-client-key disclosure.
Do not un-quarantine the ADR 0099 lookup-by-key path that lives on #466 @ 71f34b89 (ApiError::AuthorizationDenied after origin/key validation; never print stored create / tenant_workspace_id / principal_id). Do not duplicate tepp-export-lookup / tepp-export-lookup-request. Do not add GET to NaruonLiveService. Do not open LineageWeave on this naruon-owned adapter.
Still draft. Do not un-draft. Zero exact-head APPROVEs. Do not merge without two independent current-head APPROVEs under ruleset 18156473.
Consolidated landing vehicle
This PR folds predecessor #457 into one naruon-facing Analysis Run / export stored-request application-adapter vehicle. The head already contains #457 as its direct ancestor, so retargeting to #457's former base preserves the GET implementation/tests while eliminating one open micro-PR. #457 remains as immutable review/history evidence.
Preserved GET behavior from #457:
GET /v1/exports/{export_id}/request, extra-segment parsing before GET-by-id, hostile identity/LineageWeave/credential refusals, empty body, metric-free stored authorization request, and cancel-route refusal.CLI behavior on this head: published
tepp-export-request get, empty-stdin admission, public-bind/localhost/http-origin/unpublished-consumer/LineageWeave/credential refusals, stored-request dispatch/rendering, and metric/scientific-acceptance exclusion.This is one Analysis Run application/adapter vehicle, not a bounded context. ADR 0089/0090 remain implementation lineage pending #437 normalization. Merge only after fresh exact-head hosted checks, resolved conversations, and qualifying independent approval under the live ruleset. No predecessor-head evidence transfer or bypass.