Skip to content

refactor(experiments): remove deprecated /experiments URL aliases#850

Merged
shanaiabuggy merged 2 commits into
mainfrom
remove-deprecated-experiment-apis/sbuggy
Jul 24, 2026
Merged

refactor(experiments): remove deprecated /experiments URL aliases#850
shanaiabuggy merged 2 commits into
mainfrom
remove-deprecated-experiment-apis/sbuggy

Conversation

@shanaiabuggy

@shanaiabuggy shanaiabuggy commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Why

The intake evaluation endpoints moved from /experiments to /evaluations. The old /experiments… paths were kept as hidden aliases (include_in_schema=False) for backwards compatibility, with a matching set of hand-added entries in the auth bundle. Now that callers have migrated, this removes the temporary alias layer (the code literally carried a "TEMPORARY — remove in a follow-up PR" note).

What

Removing the deprecated /experiments… URLs required touching everything that produced, consumed, or authorized them:

  • intake — drop the alias-registration loop + now-unused APIRoute import; update the README curl example; remove the two URL-alias tests.
  • nemo-insights — migrate the testbed ingest client (the only runtime consumer of /experiments) to /evaluations, plus its test.
  • auth — remove the 4 stale /experiments endpoint blocks from static-authz.yaml, and the dedicated PDP alias test.

Scope note

Only the deprecated URLs are removed. The deprecated field aliases (experiment_id query param; experiment_name / parent_experiment_id / experiment_count response fields) are intentionally left in place — removing those changes the OpenAPI schema and requires an SDK regen, so it belongs in a separate PR.

Validation

  • No /experiments intake consumers remain repo-wide.
  • ruff clean; ty clean on changed files.
  • Tests pass: intake CRUD (34), auth PDP (73), nemo-insights ingest (15).
  • OPA policy suite: 236/236.
  • No SDK/OpenAPI regen needed — the aliases were include_in_schema=False / x-not-in-openapi, so they were never in the generated spec.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • API Changes
    • Replaced legacy Intake v2 /experiments routes with the canonical /evaluations routes for experiment/evaluation operations.
    • Updated experiment creation behavior and related rollup interactions to target /evaluations.
  • Documentation
    • Updated the Local Development curl command to use the /evaluations rollup endpoint.
  • Authorization
    • Removed static authorization mappings for the deprecated /experiments back-compat routes.
  • Tests
    • Updated and removed assertions covering legacy /experiments routing and authorization.

The child endpoints moved from /experiments to /evaluations; the old
/experiments... paths were registered as hidden aliases (include_in_schema=False)
for backwards compatibility. Remove them now that callers have migrated.

- intake: drop the alias-registration loop + unused APIRoute import; update the
  README example and remove the two URL-alias tests
- nemo-insights: migrate the testbed ingest client (the only runtime consumer)
  to /evaluations
- auth: remove the 4 stale /experiments blocks from static-authz.yaml and the
  dedicated PDP alias test

Deprecated field aliases (experiment_id query param; experiment_name /
parent_experiment_id / experiment_count response fields) are intentionally left
in place — removing those requires an SDK regen and is a separate change.

Verified: ruff clean; intake CRUD (34) + auth PDP (73) + nemo-insights (15)
tests pass; opa policy suite 236/236. No SDK/OpenAPI regen needed (aliases were
include_in_schema=False / x-not-in-openapi).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: shanaiabuggy <[email protected]>
@shanaiabuggy
shanaiabuggy requested review from a team as code owners July 22, 2026 21:22
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4e486b90-5221-4499-8f8f-15c256d0e1fe

📥 Commits

Reviewing files that changed from the base of the PR and between 93dbe59 and 21e49bc.

📒 Files selected for processing (2)
  • services/intake/src/nmp/intake/api/v2/experiments/endpoints.py
  • services/intake/tests/integration/test_experiments_crud.py
💤 Files with no reviewable changes (2)
  • services/intake/src/nmp/intake/api/v2/experiments/endpoints.py
  • services/intake/tests/integration/test_experiments_crud.py

📝 Walkthrough

Walkthrough

The Intake API removes hidden /experiments aliases and their authorization coverage. NeMo Insights, integration tests, and local documentation now use the canonical /evaluations endpoints.

Changes

Intake evaluations route transition

Layer / File(s) Summary
Remove legacy intake aliases
services/intake/src/nmp/intake/api/v2/experiments/endpoints.py, services/intake/tests/integration/test_experiments_crud.py
Removes hidden /experiments route registration and tests for the deprecated aliases.
Remove legacy authorization mappings
services/core/auth/src/nmp/core/auth/assets/static-authz.yaml, services/core/auth/tests/test_embedded_pdp.py
Deletes static authorization entries and PDP coverage for deprecated /experiments paths.
Update evaluation callers
plugins/nemo-insights/testbed/ingest.py, plugins/nemo-insights/tests/testbed/test_ingest.py, services/intake/README.md
Changes client requests, test expectations, and the read-back example to use /evaluations.

Possibly related PRs

Suggested reviewers: briannewsom

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: removing deprecated /experiments URL aliases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-deprecated-experiment-apis/sbuggy

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27157/34869 77.9% 62.1%
Integration Tests 15968/33581 47.5% 20.0%

@shanaiabuggy shanaiabuggy changed the title refactor(intake): remove deprecated /experiments URL aliases refactor(experiments): remove deprecated /experiments URL aliases Jul 24, 2026
@shanaiabuggy
shanaiabuggy enabled auto-merge July 24, 2026 21:21
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit 4512edd Jul 24, 2026
65 checks passed
@shanaiabuggy
shanaiabuggy deleted the remove-deprecated-experiment-apis/sbuggy branch July 24, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants