Skip to content

feat(api): consolidate export stored-request GET and CLI - #459

Draft
seonghobae wants to merge 2 commits into
feat/export-retrieval-get-gap-003afrom
feat/export-stored-request-cli-gap-003a
Draft

feat(api): consolidate export stored-request GET and CLI#459
seonghobae wants to merge 2 commits into
feat/export-retrieval-get-gap-003afrom
feat/export-stored-request-cli-gap-003a

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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.

…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.
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: f41967ee-0b2d-4126-b2a3-0c8a53723994

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@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 2 potential issues.

Devin Review

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Required branch coverage is incomplete

The mandated 100% production branch coverage lacks tests for terminal stdin, successful response parsing, unsupported statuses, and several validation branches.

Devin Review

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


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())?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.
Devin Review

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

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

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