Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review of #1362 (#1361: protected memberships, team visibility, automatic super-admin membership). Allison's review, posted by Fermy (his agent). Line numbers are at Waiting on Allison (A)
This PR
Stack-wide
Tests
|
|
Allison's decision on A (all four on #1192). Posted by Fermy (his agent). 11-03 decision 8 stands, so super admins don't belong to every team automatically.
|
9e5517f to
db3b199
Compare
7da2ad1 to
23a4857
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e5517ff90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| UNION | ||
| SELECT t.company_id, t.id AS team_id, u.id AS user_id FROM company_teams t | ||
| JOIN users u ON u.company_id = t.company_id | ||
| WHERE t.company_id = ${companyId} AND u.role = 'super_admin' AND u.deactivated_at IS NULL |
There was a problem hiding this comment.
Apply effective memberships to the batched people reader
For an active super admin without an explicit membership row, the new union grants team access through Teams.memberships, but Teams.people still reads only company_team_members. In the inspected Patches paths, Audiences.forMember, validate, and forPeople consume that explicit-only reader, so the same super admin can open a team-scoped patch yet be excluded from eligible owners, receive InvalidOwner on reassignment, or receive AudienceExcludesOwner when selecting its team audience. Update Teams.people to use the effective-membership model too, while preserving its inactive-owner repair behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac6a318151
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const after = yield* send(location, { headers: { cookie: cookie(admin) } }); | ||
| assert.include(yield* Effect.promise(() => after.text()), "No people yet."); | ||
| const afterHtml = yield* Effect.promise(() => after.text()); | ||
| assert.include(afterHtml, "All teams"); |
There was a problem hiding this comment.
Align page assertions with recorded-only memberships
Both this assertion and the matching assertion in the atomic-rollback test require All teams, but TeamsPage.render no longer emits that label and team creation no longer implicitly enrolls super admins. In these scenarios, removing the only member or rolling back the attempted additions leaves an empty roster, so the page renders No people yet. instead. These assertions therefore fail the CompanyPage suite under the newly implemented policy; restore the empty-roster expectations.
Useful? React with 👍 / 👎.
|
Superseded by #1416 (the rollback bridge) and #1417 (teams), which carry this work forward under Allison's decisions on #1192 (#1192 (comment)). Closing without merging; Srikar is co-author there. Posted by Fermy (Allison's agent). |
What changed
Regular admins could remove other admins from teams, and members could inspect unrelated teams. Removal authority and team visibility now enforce those restrictions in Companies and direct form requests.
Closes #1361. Part of #1192; stacked on #1360. Allison’s later decision supersedes automatic membership: super admins open team content only through recorded membership, with attributable self-joining and owner recovery after leaving. Management oversight remains separate.
Look at
Teams.test.ts: atomic protected removal, member visibility and recorded super-admin join/leave.AuthPages.test.tsretains one forged-POST 403 check; duplicate page assertions and derived-membership tests were removed.setSharingpreserves teams a member cannot see; management history filters hidden teams. Their focused tests pass here. No duplicate implementation was added.OwnerRecovery.test.ts: a super-admin owner leaving the only audience team loses content/publish access while retaining management oversight. Existing serving-URL tests pass.How it was verified
77 tests passed across Companies Teams, AuthPages, Audiences, OwnerRecovery and serving Pages. Test typecheck, targeted lint, formatting and whitespace checks passed. Full verify and independent acceptance were not run for this revision.
Role reads use the lower stack’s canonical storage values. No new wire contract, CLI flag, migration or notification path was added for this correction. Membership/product docs are aligned. Per Srikar’s latest instruction, no dependent PR propagation or combined testing branch refresh was performed. No merge or deploy.
Release impact
This correction restores the agreed explicit-membership policy without a new storage format. The inherited stack’s migration/release constraints still apply; this is not authorization to release a partial stack.
Model: GPT-6. Harness: Codex.