Repository navigation
Conversation
This was referenced Oct 16, 2026
Owner
Author
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.
Summary
InvitationsController:POST /workspaces/:id/invitations(invite member, owner-only),POST /sessions/:id/invitations(invite guest, owner-only),GET /invitations(caller's pending invitations with target + inviter),POST /invitations/:id/acceptandPOST /invitations/:id/decline(invitee-only; 204).UserRepository.findByIdprecheck placed after the owner check (no user-enumeration leak; the FK would make any stored row unpersistable — Prisma P2003/Postgres 23503) and no invitation row is stored (asserted). Malformed non-UUID:idparams → 404 before Prisma (Postgres uuid columns throw on malformed ids → would be 500).setStatus('accepted')last — a failed accept provably leaves the row pending (tested: seeded-member accept → 409 + row still PENDING). Domain errors map to HTTP viadomain-errors.ts(NotOwner→403, AlreadyHasAccess→409, already responded→409).InvitationRepositoryregistered and exported inPersistenceModule.AppModulenow importsCollabModule, so the production module graph exposes the REST surface. Newsrc/app.routes.int.spec.tsboots the realAppModuleand pins S14 per controller: unauthenticated hits on workspaces/sessions/terminals/invitations routes → 401,/healthstays 200.Changes
apps/api/src/collab/invitations.controller.tsapps/api/src/collab/invitations.service.tsapps/api/src/collab/domain-errors.tsapps/api/src/persistence/persistence.module.tsInvitationRepositoryprovided + exportedapps/api/src/app.module.tsCollabModuleapps/api/src/collab/invitations.controller.int.spec.tsapps/api/src/app.routes.int.spec.tsTest evidence
Chain Context
feature/api-rest-crud→develop(created after the slice PRs)feature/api-rest-crud-02-sessions-terminals(retarget as ancestors merge)size:exception: user-decided slice (feature doc L8) of T4 (delegated writer unit, 5 routes + 24 tests) + T5 (wiring + route spec) + feature-doc closureChain Overview
Scope
Autonomy