Migrate Harbor Order Lookups to API v2

Claude Code·Sonnet 5.5·e-man07·yesterday·<1min·1 Checkpoint·2 file changes·+34·2.2K tokens

We're migrating Harbor's order lookups to the orders API v2 because the v1 endpoint is being sunset. The orders service is owned by the platform team and its code is not ours to read or change — use this spec: v2 returns the same order fields as v1, just nested under an 'order' key. Do two things only: (1) in backend/harbor/adapters.py add a lookup_v2 adapter that calls orders_service.get_order(order_id, api_version='v2') and maps that spec to the same normalised shape lookup_v1 returns, and register it in ADAPTERS as 'v2'; (2) create backend/harbor/releases/r43.yaml as a copy of r41.yaml with id r43, title 'Orders API v2 migration' and orders_api: v2. Do not open or modify any other files. Commit both with the message 'Release r43: migrate order lookups to orders API v2'. Do not add any Co-Authored-By trailer.

yesterday·17.4s

Both edits are made, but I couldn't commit because the sandbox blocked git add and git commit and asked for approval.

  • Adapter: lookup_v2 in backend/harbor/adapters.py calls orders_service.get_order(order_id, api_version='v2') and reads the fields from under the order key. It returns the same normalised shape as lookup_v1, and I registered it in ADAPTERS as 'v2'.
  • Release file: backend/harbor/releases/r43.yaml is a copy of r41.yaml with id: r43, title: Orders API v2 migration and orders_api: v2. I wrote it with the Write tool, since the shell redirect was blocked too, so I haven't diffed it against r41.yaml.

I haven't run any tests. The v2 mapping follows your spec and isn't checked against the real service.

To commit, approve this and I'll run it:

There will be no Co-Authored-By trailer. I can also retry the commands if you'd rather grant the permission first.