Return fresh project after update
Merged
RO
5mo ago+162+162+012345678901234567890123456789-2-2-0123456789
Summary
- Refetch projects after
projects updatebefore returning the response envelope - Add a red/green regression test for stale update responses
Validation
Reproduced on current main against Rob Zolkos test account/project: the update response returned the old description while a follow-up projects show returned the new description.
After this change, the same live validation returns the updated description in the projects update response.
Local tests:
GOWORK=off go test ./internal/commands -run TestProjectsUpdateReturnsFreshProjectAfterDescriptionChange
GOWORK=off go test ./internal/commands
Closes #468.
Summary by cubic
Return the fresh project after projects update by refetching, fixing stale fields in the response. If the refetch fails, fall back to the update response and include a diagnostic. Closes #468.
- Bug Fixes
- After a successful update, refetch with
Projects().Getand return that result sodescriptionandupdated_atare current. - When refetch fails, return the update response and add a notice via
output.WithDiagnostic; tests also assert the PUT body includes the currentnamewhen onlydescriptionchanges.
- After a successful update, refetch with