Skip to content

fix!: Swap track_metrics_of parameter order to match spec#144

Merged
jsonbailey merged 1 commit intomainfrom
jb/aic-2378/fix-track-metrics-param-order
Apr 27, 2026
Merged

fix!: Swap track_metrics_of parameter order to match spec#144
jsonbailey merged 1 commit intomainfrom
jb/aic-2378/fix-track-metrics-param-order

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented Apr 27, 2026

Summary

  • Swaps the parameter order of track_metrics_of and track_metrics_of_async so that metrics_extractor is first and the operation callable (func) is second, matching spec requirement AITRACK 1.1.14.1
  • Updates all internal call sites (managed_agent.py, managed_model.py, judge/__init__.py)
  • Updates tests in test_tracker.py

Breaking change

Any caller passing positional arguments to track_metrics_of or track_metrics_of_async must swap their argument order.

Test plan

  • Existing unit tests in test_tracker.py updated and pass
  • Verify no other call sites use the old positional order

Closes AIC-2378

🤖 Generated with Claude Code


Note

Medium Risk
Breaking API change for any callers using positional arguments to track_metrics_of/track_metrics_of_async; incorrect ordering would fail at runtime or mis-track metrics.

Overview
Aligns the public tracking API with the spec by swapping argument order for LDAIConfigTracker.track_metrics_of and track_metrics_of_async so metrics_extractor comes first and the operation callable comes second.

Updates internal invocation sites in ManagedModel, ManagedAgent, and Judge, and adjusts test_tracker.py to use the new positional order.

Reviewed by Cursor Bugbot for commit 0392d8c. Bugbot is set up for automated code reviews on this repo. Configure here.

Spec requirement 1.1.14.1 defines metrics_extractor as the first
parameter and the operation callable as the second. The previous
implementation had them reversed.

This is a breaking change for any callers passing positional arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey marked this pull request as ready for review April 27, 2026 18:17
@jsonbailey jsonbailey requested a review from a team as a code owner April 27, 2026 18:17
@jsonbailey jsonbailey changed the title fix: swap track_metrics_of parameter order to match spec fix!: Swap track_metrics_of parameter order to match spec Apr 27, 2026
@jsonbailey jsonbailey merged commit 53db736 into main Apr 27, 2026
49 checks passed
@jsonbailey jsonbailey deleted the jb/aic-2378/fix-track-metrics-param-order branch April 27, 2026 19:00
@github-actions github-actions Bot mentioned this pull request Apr 27, 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.

2 participants