Skip to content

feat(api): inspect analysis-run retry children on loopback - #379

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

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

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

GAP-003A operator-visible retry-lineage GET on the loopback analysis-run surface.

GET /v1/analysis-runs/{run_id}/retries returns the metric-free direct retry children of a listed parent so operators can inspect lineage after retry. Collection GET (#368) lists parent and child independently. Retry HTTP (#369) clones without exposing parent/child linkage. Stored-request GET (#377) inspects snapshot/cutoff/model/profile, not children.

Stacked on #377 (f80bd97c) over retry #369 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 payload: parent run_id / run_state / idempotency_key plus retries[] of run_id / run_state / idempotency_key.
  • Forbidden keys: rmse, bias, coverage, SE-gate, scientific_acceptance, report, terminal_result, tenant_workspace_id, snapshot_id.
  • Direct children only. Empty retries is 200 when the parent exists and was never retried.
  • Consumer-isolated. Consumer mismatch → 400. Oversized run_id → 413. More than 64 children → 413.
  • Path decoder refuses collection, GET-by-id, /cancel, /retry, /request, /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 retried_from. Stored-request GET remains 200 and does not list children.

ADR

This slice uses ADR 0035 (docs/adr/0035-analysis-run-retry-lineage-get.md).

Do not reuse 0030 (#362/#364/#373), 0031 (#368), 0032 (#369/#370/#371), 0033 (#372/#375/#378), 0034 (#374/#377), or 0036 (#376). Next free ADR is 0037.

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 (87 lib tests including retry-lineage)
  • RUSTDOCFLAGS='-D warnings' cargo doc -p tepp_api --no-deps
  • python3 scripts/validate_documentation.py
  • python3 scripts/check_docstrings.py

Head: 2040a763505aba35daca131a73924f268d60344d

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 GET /v1/analysis-runs/{run_id}/retries returns metric-free
direct retry children of a listed parent so operators can inspect
lineage after retry. Empty retries is 200 when the parent was never
retried. Stacked on stored-request GET. ADR 0035.
@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.

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