Repository navigation
factory: an organization's members make jobs on its repositories without GitHub (film D10) - #2660
Merged
Merged
Conversation
…out GitHub (film D10) A person who signed in to an organization with a password or a passkey read no repository at all, because a signed-in person's repositories were only what their own GitHub token reached, so Add job had nothing to offer and Create job stayed off. The server's own GitHub grant fed only its poll. The repositories the operator turns on in Repos are now the organization's: every signed-in member reads them, beside whatever their own token reads, which is asked exactly as before. The operator also reads what the server's grant last discovered, so a password operator can choose from it in Repos. Only the operator turns one on or off, as before. A link's join check still judges a GitHub stranger by their own token alone. POST /v1/jobs (factory.job_create) takes workstream: the caller must be able to edit it, and the job joins it in the same request. A job on a repository the caller reads only through the organization must name one, so a view-only member reads jobs and makes none. The manual says how to make a job without a GitHub account and who turns repositories on. 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
…out GitHub (film D10) (#2660) * factory: an organization's members make jobs on its repositories without GitHub (film D10) A person who signed in to an organization with a password or a passkey read no repository at all, because a signed-in person's repositories were only what their own GitHub token reached, so Add job had nothing to offer and Create job stayed off. The server's own GitHub grant fed only its poll. The repositories the operator turns on in Repos are now the organization's: every signed-in member reads them, beside whatever their own token reads, which is asked exactly as before. The operator also reads what the server's grant last discovered, so a password operator can choose from it in Repos. Only the operator turns one on or off, as before. A link's join check still judges a GitHub stranger by their own token alone. POST /v1/jobs (factory.job_create) takes workstream: the caller must be able to edit it, and the job joins it in the same request. A job on a repository the caller reads only through the organization must name one, so a view-only member reads jobs and makes none. The manual says how to make a job without a GitHub account and who turns repositories on. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]> * docs: the change entry for the organization's repositories (film D10) Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]> --------- 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.
Fixes film D10: an organization whose people sign in only with a password or passkey can now make a Factory job. Desk half: Agent-Field/codeaf-desk#462.
What was true, and what is true now
repoAccessfiltered a signed-in person's repositories through their own GitHub token, and a profile with no token saw nothing. The server's own grant (factorygithub.ReadTokenAt,GH_TOKEN) fed only its poll. Add job had no repositories to offer, and Create job stayed disabled.internal/factory/serve/org_repos.go,visibility.go repoSight).available-repos.json). That lets a password operator see and turn repositories on in Repos. Turning a repository on or off stays operator-only (unchanged:requireOperatorinrepos_v2.go).POST /v1/jobsandfactory.job_createtakeworkstream. The caller must be able to edit it: 403 if they can't, 404 if they can't see it, 409 if it is archived. The job joins the workstream in the same request through the sharedjoinWorkstreamJob, whichPUT /v1/workstreams/{id}/jobs/{job}now also uses. A job on a repository the caller reads only through the organization is refused 403 without a workstream: "Make this job in a workstream you can edit: this repository is the organization's." So a view-only member sees jobs but cannot create them. The operator, and anyone whose own token reads the repo, are never asked for a workstream.device.go) is still judged by their own token only. The organization's repositories never admit anyone.internal/manual/chat/factory.mdgains "make a job without a GitHub account …". Its "people, each signed in with their own GitHub" now says password, passkey or GitHub. Two new probes added.docs/design/app-v3/PROTOCOL.mddocumentsfactory.job_create {workstream}.~/work/teams-wave/WAVE2.md§4.7 was edited in place; that file is outside the repo.docs/changes/unreleased/2660-org-repositories-for-every-member.md.Security note
What a password member can now reach. Every repository the operator turned on in Repos, read through the server. That covers its place in the job picker, its jobs, their steps, briefs, activity, and the pull requests the factory opened. Workstream sight still applies on top: a job in a workstream you cannot view stays a 404.
What it does not give. A member gets no GitHub credential, no write to GitHub as anyone, and no repository the operator did not turn on. Repositories the server's grant can reach but nobody turned on stay operator-only. A member can make a job on an org repository only inside a workstream they can edit. GitHub members lose nothing and their own-token checks are unchanged.
Why this is the admin's explicit choice. A repository becomes the organization's only when the operator turns it on in Repos. That is the same operator-only, audited act (
repos.changed … as operatorin the record) that already makes the server poll and run it. Turning it off removes it for every member at once.Changed by design: a GitHub member whose own token cannot read a repository that is turned on now sees it. Two older tests pinned the opposite and were updated to the new rule:
TestQueueListsVisibleWatchedRepositoriesWithoutJobsandTestRepositoryIdentityContractAndViewerFiltering.TestPersonOwnsWatchedRepositoryWithNoJobsnow watches only the repository it reads.Tests
New tests in
internal/factory/serve/org_repos_test.go, on a password-only org with real token files and sign-ups:TestAPasswordMemberMakesAJobOnAnOrganizationRepository: abir (edit, no GitHub) is offered acme/api once it is on and creates a job in the workstream. The job is in the workstream, kim (view) reads it, and acme/web (off) is still refused.TestAViewOnlyMemberCannotMakeAJobOnAnOrganizationRepository: kim gets 403 inside the workstream and 403 outside it, abir without a workstream gets 403, and no job is left behind. The operator succeeds.TestOnlyTheOperatorTurnsAnOrganizationRepositoryOn: the password operator sees the grant's list. abir gets 403 on both turn-on doors and on turn-off, and sees nothing until a repo is on.TestAPersonsOwnTokenStillFiltersAndTheOrganizationOnlyAdds: mia's GitHub token is still asked per repository. mia reads her own repo and the org's, neveracme/secret, and still creates without a workstream on a repo her token reads.internal/appwire:TestFactoryJobCreateTakesAWorkstreamID.Gate:
BASE=$(git rev-parse origin/work/teams) make pr-readyis green on base3dc626ece. The touched legs werecmd/codeaf(8 shards),appwire,factory/api,factory/serveandmanual. The known base reds were not hit.