Skip to content

engine: factory.team_* and factory.org_workstream* forward to the organization (Teams G3) - #2623

Merged
santoshkumarradha merged 3 commits into
work/teamsfrom
teams/g3-engine-methods
Nov 13, 2026
Merged

santoshkumarradha merged 3 commits into
work/teamsfrom
teams/g3-engine-methods

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Lane G3 of the Teams wave. Adds the local engine methods the desk calls, per the Teams SPEC contract, plus the hello words org_teams and org_workstreams.

What changed

  • internal/appwire/factory_org.go: typed wire types (OrgTeam, OrgWorkstream, …) and 15 methods (factory.teams, factory.team_create|rename|delete|member_add|member_remove, factory.org_workstreams, factory.org_workstream[_create|_update|_delete|_owner|_shares|_share_preview|_import]). Each checks ids (one path segment, handle shape, owner kind, rev ≥ 1), builds the one route the contract names, and calls the engine's FactoryOrg.FactoryOrgCall. The app never chooses a path.
  • cmd/codeaf/appfactory_org.go: carries the request with the session already held for the connection (credentialed), sends the rev as If-Match, reads up to 8 MiB. Refusals keep their status: 403 → forbidden, 409 → conflict, 412 → conflict with detail.reason: "stale". A write that may have left is uncertain, never retried.
  • factory.me now answers teams ([] from an older server) and accepts connection as well as factory. Every factoryRead method accepts either word.
  • PROTOCOL.md rows + paragraph.

Contract notes for the desk lanes

  • Every pre-existing factory.* method takes factory, not connection. The new methods take connection per SPEC and also read factory when connection is absent, so either spelling works.
  • engine_features is the hello features list; the words are exactly org_teams and org_workstreams.

Tests: cmd/codeaf/appfactory_org_test.go runs a stub httptest server that speaks the contract (not G1/G2). It covers every route and method, the bearer on every request, If-Match + 412 stale, 409/403 with the server's words, bad ids refused before sending, the older-server 404, and factory.me teams.

santoshkumarradha and others added 3 commits November 13, 2026 10:59
…anization

The desk reads and changes an organization's teams and workstreams through
the local engine. Each new factory.* method checks its ids, builds the one
route the Teams contract names, and sends it once to the attached connection
with the session already held; the server's answer comes back in its typed
shape. 403 is forbidden, 409 conflict, 412 conflict with reason "stale".
factory.me also answers teams, and hello announces org_teams and
org_workstreams.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
G1 put teams on api.Me, so the engine's private copy of the field goes.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit 12ed250 into work/teams Nov 13, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the teams/g3-engine-methods branch November 13, 2026 16:21
ZeroPoint95 pushed a commit that referenced this pull request Nov 24, 2026
…anization (#2623)

The Teams wave G3 engine methods, factory.me teams, and hello org_teams/org_workstreams.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
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.

1 participant