Skip to content

feat(api): retrieve authorized exports via loopback GET - #411

Closed
seonghobae wants to merge 3 commits into
mainfrom
feat/export-retrieval-get-gap-003a
Closed

feat(api): retrieve authorized exports via loopback GET#411
seonghobae wants to merge 3 commits into
mainfrom
feat/export-retrieval-get-gap-003a

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Folded into #417

Closed as superseded_by_fold, not discarded. #417's current head contains this PR as its direct ancestor and has been retargeted to protected main, preserving the export retrieval GET implementation/tests and this review history while reducing queue WIP. Export collection/stored-request/idempotency-lookup vehicles #444/#459/#466 also retain this ancestry.

Canonical retrieval landing vehicle: #417 (feat(api): consolidate export retrieval GET and CLI).

Do not reopen unless a surviving folded head demonstrably loses unique behavior or evidence.

GAP-003A unique slice: AnalysisRunLiveService mints a metric-free
export_id on naruon POST /v1/exports and serves GET /v1/exports/{id}.
NaruonLiveService stays POST-only. Persistence remains GAP-003B.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 10 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3919b644-61d2-41eb-a276-897919c169de

📥 Commits

Reviewing files that changed from the base of the PR and between 1bc02f5 and 93b3fa9.

📒 Files selected for processing (16)
  • ARCHITECTURE.md
  • CHANGELOG.d/export-retrieval-http.md
  • CHANGELOG.md
  • crates/tepp_api/src/analysis_run_live.rs
  • crates/tepp_api/src/export_http.rs
  • crates/tepp_api/src/lib.rs
  • crates/tepp_api/src/naruon_http.rs
  • crates/tepp_api/tests/export_retrieval_http_contract.rs
  • docs/API_CONTRACT.md
  • docs/TRACEABILITY.md
  • docs/adr/0054-export-retrieval-get.md
  • docs/adr/README.md
  • docs/connectors/naruon-artifact-consumer.md
  • docs/research/export-retrieval-http.md
  • docs/research/naruon-http-interchange.md
  • schemas/export_retrieval_v1.json

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.

ADR 0053 is already live on #409 (Pareto candidate-K vs main).
Rename this stack's decision identity rather than collide.

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 5 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.

🔍 Mandatory coverage evidence is absent

The verification list omits the complete suite and 100% line and branch coverage gates required for production changes.

Devin Review

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

Comment thread crates/tepp_api/src/export_http.rs
Comment on lines +17 to +18
"export_id": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": ".*\\S.*" },
"artifact_id": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": ".*\\S.*" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Schema-valid identities fail Rust parsing

The schema accepts control-bearing export_id and artifact_id values that ExportRetrieval::from_json rejects. Schema-valid receipts can therefore fail Rust consumers.

Prompt for agents
Align schemas/export_retrieval_v1.json with ExportRetrieval::validate in crates/tepp_api/src/export_http.rs. Add JSON Schema constraints that reject Unicode control characters for export_id, artifact_id, decision_code, and idempotency_key while preserving the existing nonempty and length rules. Add contract tests proving representative control-bearing strings fail both schema validation and Rust parsing.
Devin Review

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

Comment thread crates/tepp_api/src/analysis_run_live.rs Outdated
Comment thread crates/tepp_api/src/export_http.rs Outdated

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

Devin Review

Comment on lines +145 to +147
if self.export_id.len() > EXPORT_RETRIEVAL_ID_MAX_LEN
|| self.artifact_id.len() > EXPORT_RETRIEVAL_ID_MAX_LEN
|| self.idempotency_key.len() > EXPORT_RETRIEVAL_ID_MAX_LEN

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Unicode identifiers violate published limit

Schema-valid non-ASCII identifiers can exceed ExportRetrieval::validate's byte limit. The live POST then returns 413 for payloads clients correctly accepted.

Prompt for agents
Align crates/tepp_api/src/export_http.rs and schemas/export_retrieval_v1.json on one length unit. Rust currently uses UTF-8 byte length for export_id, artifact_id, and idempotency_key, while JSON Schema maxLength counts Unicode characters. Either validate character counts in ExportRetrieval::validate and the path/exchange helpers, or express and enforce a byte-oriented schema constraint so schema-valid inputs receive the same result from the live POST and DTO parser. Add non-ASCII boundary tests.
Devin Review

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

Comment on lines +245 to +247
let encoded_id = encode_path_segment(export_id);
let target_path = format!("{NARUON_EXPORT_PATH}/{encoded_id}");
let target_url = compose_https_target(origin, &target_path)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Slash asymmetry does not affect minted IDs

naruon_export_retrieval_exchange encodes slashes while the server rejects them. Server-minted UUID v7 identifiers contain no slashes, so supported retrieval remains unaffected.

Devin Review

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

This was referenced Aug 31, 2026
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