Skip to content

feat(api): authorize purpose-bound exports via loopback CLI - #410

Draft
seonghobae wants to merge 1 commit into
mainfrom
feat/export-authorize-cli-gap-003a
Draft

feat(api): authorize purpose-bound exports via loopback CLI#410
seonghobae wants to merge 1 commit into
mainfrom
feat/export-authorize-cli-gap-003a

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Why

Protected main already serves POST /v1/exports on NaruonLiveService, but operators still had to write raw HTTP/1.1. tepp-loopback is AnalysisRunLiveService and does not serve this path. Stdout stays purpose-bound. tepp.scientific_acceptance.v1 never appears.

Live slices that this PR does not duplicate:

What

Purpose-bound export CLI stacked on protected main 1bc02f580cf48e1d39da239f0e818453437c31c3:

  • tepp-naruon-live binds NaruonLiveService on 127.0.0.1:18082 by default
  • tepp-exports authorize client of POST /v1/exports
  • stdin is ExportAuthorizationRequest JSON; only modular_service_consumer
  • idempotency key must not equal principal_id
  • metric-free decision JSON; tepp.scientific_acceptance.v1 never prints
  • loopback-only; credential flags, empty stdin, unknown verbs, and metric keys fail closed
  • ADR 0026 on protected main (distinct from GAP-003A ADR 0026 on other stacks)

Not an ADR 0014 scientific claim. Not persistence. Not GET /v1/exports/{export_id}.

Verification

  • cargo clippy -p tepp_api --all-targets -- -D warnings
  • cargo test -p tepp_api --lib export_authorize_cli
  • cargo test -p tepp_api --test export_authorize_cli_contract
  • RUSTDOCFLAGS='-D warnings' cargo doc -p tepp_api --no-deps
  • python3 scripts/validate_documentation.py
  • python3 scripts/check_docstrings.py

Exact head: 0c0341e39f0fb166c8fc37bb8368cf26652095f3

Do not merge without two independent APPROVE reviews on this exact head and current Checks. Author COMMENTED is not independent APPROVE.

Operators can POST /v1/exports through `tepp-exports authorize` against
`tepp-naruon-live` without writing raw HTTP. Metric-free decision JSON only.
tepp.scientific_acceptance.v1 never appears. tepp-loopback remains
AnalysisRunLiveService and does not serve /v1/exports. Not GAP-010
Figma/export. Not analysis-run CLIs. Stacked on protected main.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

Copy link
Copy Markdown
Contributor Author

Hour-27 exact-head: 0c0341e39f0fb166c8fc37bb8368cf26652095f3. Purpose-bound export CLI tepp-exports authorize against tepp-naruon-live (NaruonLiveService POST /v1/exports) stacked on protected main. tepp-loopback does not serve this path. Metric-free decision JSON; tepp.scientific_acceptance.v1 never appears. Devin/CodeRabbit/author COMMENTED is not independent APPROVE. Ruleset 18156473 needs two independent APPROVE reviews. No self-approve.

This was referenced Aug 31, 2026

@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 on 0c0341e (draft). Unique occupied: tepp-exports authorize POST /v1/exports on NaruonLiveService / tepp-naruon-live (ADR 0026). tepp-loopback (AnalysisRunLiveService) does not serve /v1/exports. Non-loopback host is AuthorizationDenied. Forbidden keys include rmse family, se_gate, scientific_acceptance, terminal_result. Consumer is naruon.

Do not duplicate this authorize CLI. Retrieval is #417; collection is #444; stored-request is #459; lookup/quarantine is #466. Do not un-draft. Zero reviews on this SHA before this COMMENT. Never self-approve. Do not weaken fail-closed. No Buyer language.

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