feat(api): resolve analysis-run identity by idempotency key on loopback - #380
Conversation
GAP-003A operator-visible lookup GET. Collection is cursor-paginated;
stored-request and retry-lineage require a run_id; retry mints a new key.
GET /v1/analysis-runs/by-idempotency/{key} returns the metric-free identity
of the unique consumer-scoped run that used that key.
ADR 0037. Stacked on retry-lineage GET (#379).
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
left a comment
There was a problem hiding this comment.
Exact-head COMMENT on ed21a10 (draft). Unique occupied: GET /v1/analysis-runs/by-idempotency/{key} (ADR 0037). Dual-identity analysis-run lookup is occupied with CLI #401; do not duplicate. Metric-free identity only. Forbidden keys include rmse family, se_gate, scientific_acceptance. CLI stacked on #401. Do not un-draft. Zero reviews on this SHA before this COMMENT. Never self-approve. Persistence remains GAP-003B. Do not weaken fail-closed. No Buyer language.
Summary
GAP-003A operator-visible idempotency-key lookup GET on the loopback analysis-run surface.
GET /v1/analysis-runs/by-idempotency/{idempotency_key}returns the metric-free identity of the unique consumer-scoped run that used that key. Collection GET (#368) is cursor-paginated. Stored-request GET (#377) and retry-lineage GET (#379) require arun_id. Retry HTTP (#369) mints a new key. Operators with a 202 receipt or log key cannot jump to that run without scanning pages.Stacked on #379 (
2040a763) over stored-request #377 over retry #369 over collection #368 over cancel #361 over protectedmain.Issue: #166
Contract
run_id/run_state/idempotency_key.rmse,bias,coverage, SE-gate,scientific_acceptance,report,terminal_result,tenant_workspace_id,snapshot_id./cancel,/retry,/retries,/request,/running,/terminal, and reservedby-idempotencyas a key.ADR
This slice uses ADR 0037 (
docs/adr/0037-analysis-run-idempotency-lookup-get.md).Do not reuse 0030 (#362/#364/#373), 0031 (#368), 0032 (#369/#370/#371), 0033 (#372/#375/#378), 0034 (#374/#377), 0035 (#379), or 0036 (#376). Next free ADR is 0038.
Not this PR (live — do not duplicate)
df33bfa3)96a34a41)42e05e31)99464037)dba3db0e)d8f3c5fa)b7a039b8)6a5d9777)58bfc40d)3f9e2d8b)f7d5e5a3)cc8ed995)837a18ab)442b159d)409a7bdc)58bacd75)f80bd97c)c891d46a)2040a763) — this PR's baseVerification (local)
cargo clippy -p tepp_api --all-targets -- -D warningscargo test -p tepp_api --all-targets(92 lib tests including idempotency lookup)RUSTDOCFLAGS='-D warnings' cargo doc -p tepp_api --no-depspython3 scripts/validate_documentation.pypython3 scripts/check_docstrings.pyHead:
ed21a10579d69faf4182ef6c07004fd622983a1eDo not self-approve. Do not
--adminmerge. Ruleset 18156473 requires two independent current-head APPROVE reviews. Copilot/Devin/CodeRabbit COMMENTED is not independent APPROVE.