Repository navigation
factory: organization changes reach the desk; go-ahead reads need sight of the workstream (G4) - #2625
Merged
Merged
Conversation
…are read only by those who see them
The engine follows an organization connection's event stream once it has
answered an organization method and relays team.changed, workstream.changed
and workstream.removed as factory.org_changed {connection, kind, id}. A gap
the server cannot replay is relayed as both list kinds with an empty id.
GET /v1/policy?group=<org workstream id> answers 404 to anyone who cannot
see that workstream, as the workstream's own route does.
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]>
Member
Author
|
|
ZeroPoint95
pushed a commit
that referenced
this pull request
Nov 24, 2026
…ht of the workstream (#2625) 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.
Teams wave lane G4. Two gaps left after G1–G3.
1. Organization events reach the desk
The org server already publishes
team.changed,workstream.changedandworkstream.removedonGET /v1/events, filtered per viewer. Nothing relayed remote factory events to the app before this; now the engine follows a connection's stream once that connection has answered any org method (factory.teams,factory.org_workstreams, …), with the same session, and emits:{"event":"factory.org_changed","seq":812,"data":{"connection":"fc_acme","kind":"workstream.changed","id":"ws_01JD…"}}kindteam.changedfactory.teamsworkstream.changedfactory.org_workstream {id}(may now benot_found: unshared from you)workstream.removedid: ""Last-Event-ID, so a short drop replays the missed events; a gap past the server's window becomes oneteam.changed+ oneworkstream.changedwith empty ids.docs/design/app-v3/PROTOCOL.md(Events table + the org methods section); the schema picks upFactoryOrgChangedfromeventShapes.Files:
internal/appwire/factory_org_events.go,cmd/codeaf/appfactory_org_events.go, hooks inappfactory.go/appfactory_org.go.2. Go-ahead policy reads need sight of the workstream
GET /v1/policy?group=<org workstream id>now answers 404 (workstream not found, the same words asGET /v1/workstreams/{id}) unless the caller can see the workstream (owner, owning team, shared team, operator). Groups that are not org workstreams are unchanged.orgWorkstreamWritebecameorgWorkstreamAccess(see + write) inworkstreams.go.Tests
TestOrgEventsAreRelayedWithTheConnection,TestOrgEventsStopWhenTheConnectionIsDetached(cmd/codeaf, stub org server with a real SSE stream;-race -count=3clean)TestGoAheadReadOnOrgWorkstreamNeedsSight(internal/factory/serve, the org scene; red without the fix)make pr-ready BASE=origin/work/teams: see comment below.