Repository navigation
factory: teams on the organization server (G1) - #2622
Merged
Merged
Conversation
GET/POST /v1/teams, PATCH/DELETE /v1/teams/{id} and PUT/DELETE
/v1/teams/{id}/members/{handle}. Teams persist in the store beside the
go-ahead policies; writes are the operator's; only existing members join;
removing a person takes them out of every team; DELETE answers 409 while
TeamOwnership says the team owns a workstream. /v1/me gains teams. Every
change goes out as {"kind":"team.changed","id"} on the event stream.
TeamMembership (TeamsOf, Members) is exported for org workstreams.
Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
ZeroPoint95
pushed a commit
that referenced
this pull request
Nov 24, 2026
Teams routes, storage, operator checks, membership, events and /v1/me teams for the Teams wave (G1). Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane G1 of the Teams wave. Implements the SPEC's
/v1/teams*routes and theteamsfield on/v1/me.What it adds
GET /v1/teams,POST /v1/teams,PATCH|DELETE /v1/teams/{id},PUT|DELETE /v1/teams/{id}/members/{handle}.factory-teams.jsonin the store root, rewritten under a cross-process lock besidefactory-policies.json(how go-aheads persist). Survives a restart.memberList) can join; any other handle gets 422.DELETEanswers 409 whileTeamOwnership.TeamOwnsWorkstream(team)is true. With nothing set, a team owns nothing. G2 fills this withh.SetTeamOwnership(...).DELETE /v1/people/{handle}/sessions, or revoking an uncounted access link) takes them out of every team. "Revoke all sessions" does not remove anyone from a team, because it signs people out without removing them./v1/megains"teams":[team_id], always a list.handle,name,avatar_urlandoperatorwere already there.{"kind":"team.changed","id"}to the live event stream. Every member can see it.TeamMembership(TeamsOf(handle),Members(team)) throughh.Membership().Tests (
serve/teams_test.go, using thepeopleV2Setupfixture): operator-only writes, duplicate names, membership limited to existing members,/v1/meteams, persistence across aNewrestart, the 409 from the ownership stub followed by 204 and then 404, removal from every team, and the event payloads.