Skip to content

feat(api): inspect stored analysis-run create fields on loopback - #377

Draft
seonghobae wants to merge 1 commit into
feat/analysis-run-retry-http-gap-003afrom
feat/analysis-run-stored-request-get-gap-003a
Draft

feat(api): inspect stored analysis-run create fields on loopback#377
seonghobae wants to merge 1 commit into
feat/analysis-run-retry-http-gap-003afrom
feat/analysis-run-stored-request-get-gap-003a

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

GAP-003A operator-visible stored-request GET on the loopback analysis-run surface.

GET /v1/analysis-runs/{run_id}/request returns the stored create fields of a listed run (snapshot_id, knowledge_cutoff, model_contract_version, output_profile) so operators can inspect a failed/cancelled run before retry. Collection GET (#368) lists only run_id / run_state / idempotency_key; retry (#369) clones blindly. This slice closes that inspect gap.

Stacked on #369 (58bfc40d) over collection #368 over cancel #361 over protected main.

Issue: #166

Contract

  • HTTPS-only GET, empty body, no idempotency header, no credentials on the NARUON exchange.
  • Metric-free receipt. Forbidden keys: rmse, bias, coverage, SE-gate, scientific_acceptance, report, terminal_result, tenant_workspace_id.
  • tepp.scientific_acceptance.v1 never appears.
  • Consumer-isolated. Consumer mismatch → 400. Oversized run_id → 413.
  • Path decoder refuses collection, GET-by-id, /cancel, /retry, /running, /terminal.
  • GET-by-id remains 400 on this stack (owned by feat(api): serve scientific acceptance only on loopback status GET #359). Collection GET remains 200 and does not leak snapshot_id.

ADR

This slice uses ADR 0034 (docs/adr/0034-analysis-run-stored-request-get.md).

Numbering collision: #374 (Rubin loading uncertainty, on main) also claimed ADR 0034. Same pattern as ADR 0030 (#362 / #364 / #373) and ADR 0032 (#369 / #370 / #371). Do not rewrite this PR's ADR number after push. Next free ADR is 0035. Do not reuse 0030, 0031, 0032, 0033, or 0034.

Hour-20 suggested 0033; #375 and #372 already claimed 0033.

Not this PR (live — do not duplicate)

Verification (local)

  • cargo clippy -p tepp_api --all-targets -- -D warnings
  • cargo test -p tepp_api --all-targets (82 unit tests including stored-request)
  • RUSTDOCFLAGS='-D warnings' cargo doc -p tepp_api --no-deps
  • python3 scripts/validate_documentation.py
  • python3 scripts/check_docstrings.py

Head: f80bd97c05641601d5158c12eef2aa48e7944892

Do not self-approve. Do not --admin merge. Ruleset 18156473 requires two independent current-head APPROVE reviews. Copilot/Devin/CodeRabbit COMMENTED is not independent APPROVE.

GAP-003A ninth slice: GET /v1/analysis-runs/{run_id}/request returns
metric-free snapshot, cutoff, model contract, and output profile so
operators can inspect a listed failed or cancelled run before retry.
GET-by-id remains refused. Stacked on retry HTTP. ADR 0034.
@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.

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