Repository navigation
[M2.3d3c2] Expose scoped project and environment mutations - #106
Merged
Merged
Conversation
5 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.3d3c1-organization-write-http
branch
from
November 5, 2026 15:02
522b82f to
f060e90
Compare
samuelmbabhazi
changed the base branch from
feat/m2.3d3c1-organization-write-http
to
main
November 5, 2026 15:02
samuelmbabhazi
force-pushed
the
feat/m2.3d3c2-resource-write-http
branch
from
November 5, 2026 15:03
7e61086 to
11c79f3
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
## Task M2.3d4a, stacked on #106. Review in order; no automatic merge. This is the final PR for this work session, at the maintainer's request. ## What changed and why Expose the organization membership directory and project/environment effective-role directories as session-only GET endpoints. Each route requires current `member.manage` authority at its exact scope. Responses include membership metadata, effective role/source, direct overrides and inherited roles; credentials are never returned. Pagination uses the existing bounded, exclusive UUID contract and authorization filters precede pagination. Add OpenAPI DTOs, regenerate the API/client contracts and document the endpoints. Split the remaining M2.3d4 work in PLAN; only the directory slice is complete. Membership/binding writes, the complete registered-route matrix, project-owned tokens and administration screens remain pending. ## Validation - API, web and generated client lint, typechecks, tests and builds pass (155 API tests and 51 web tests). - Restricted-PostgreSQL HTTP acceptance covers all three routes against eleven actor profiles, including explicit environment downgrades and outsiders; exclusive pagination; metadata-only responses; effective/inherited roles; disabled members; immediate role removal; bearer denial; malformed input and mismatched ancestry. - The administration query integration suite also passes. - Generated OpenAPI explicitly declares session-only authentication for all three routes and the expected response schemas. - Semgrep: zero findings across all six changed TypeScript files, with complete parsing. Staged whitespace check passes; commit hooks check formatting and secrets. ## Security considerations No new mutation endpoint, dependency or shell invocation. Reads delegate to the existing account-locked application authorization and forced-RLS tenant transactions. Scoped resource administrators cannot read the organization directory or sibling resource grants. API tokens are rejected even when they contain member-management scopes. Disabled members remain visible only to authorized administrators for cleanup. ## CI execution blocked GitHub currently refuses to start jobs because of failed recent account payments or an insufficient spending limit. Resolve Billing & plans and rerun workflows before treating remote validation as complete. CodeQL remains separately disabled by repository configuration. ## Checklist - [x] M2.3d4a acceptance met and PLAN/SPEC updated - [x] Generated contracts committed without manual edits - [x] Local checks and real HTTP/PostgreSQL acceptance pass - [x] No secret response or unaudited business mutation introduced - [x] Human review required; no automatic merge
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.
Task
M2.3d3c2, stacked on #105. Review in order; no automatic merge.
What changed and why
Expose project/environment creation and settings through the existing account-locked, audited commands. Each route requires its exact permission and canonical path ancestry, for sessions and explicitly scoped API tokens. Creation returns 201 and settings replacement returns 200. Omitted options retain the documented safe defaults; nulls, ownership injection and malformed values are rejected.
All four routes share encrypted mutation retries, session Origin/CSRF checks and single-count API quotas. Regenerate OpenAPI and the TypeScript client, and mark the resource HTTP slice complete in PLAN.
Validation
Security considerations
Ownership comes only from the validated path. Commands recheck current authority under the account lock, and audits identify the authenticated user or exact API token. No destructive resource endpoint, new dependency, shell invocation or secret response is introduced.
CI execution blocked
GitHub currently refuses to start jobs because of failed recent account payments or an insufficient spending limit. Billing & plans must be resolved and workflows rerun before remote validation is complete. CodeQL is separately disabled by repository configuration.
Checklist