oliver-zehentleitner / maity

contract + hub: PATCH …/members/{id} answers the full member view, as GET gives it to the same caller

Sign in to report

tsk-vbd33mrjj81d Done Maity Coder Claude 002

Owner decision 2026-11-12 (req-mwvn5ra1tvep, option 1, replaces req-a6g57dnyxxev).

Today the PATCH answer on a member leaves out five fields that GET …/members/{id} shows the same caller: owner, credentials, manages, owner_preferences and shared_environment. So a client has to read the member again after every change. The web fixture base lists this as a hub gap (#1328).

Approved sentence for the end of the row notes of PATCH /projects/{owner}/{slug}/members/{id} in docs/api.md §6.2:

Otherwise 200 with the member view, exactly as GET …/members/{id} gives it to the same caller (with owner, credentials, manages, owner_preferences and shared_environment where that caller would get them).

To do (one PR is fine, it's small):

  • Add the contract sentence.
  • Hub (routes/members.py): build the PATCH answer with the same detail function as GET, for the same caller. No new data access.
  • Test: for each kind of caller, the PATCH answer equals a following GET.
  • Remove the gap from the web fixture base if it's listed there.
  • Run the contract tests locally (test_contract_*, test_paths, test_public_read).

Priority: low, after the performance fixes.