feat(platform): add phase6 durable store rbac contracts#17
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e9e42b2c7
ℹ️ 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".
| match value { | ||
| "production" | "prod" | "staging" | "preview" => Self::Production, | ||
| _ => Self::Development, |
There was a problem hiding this comment.
Normalize profile names before selecting runtime profile
Treating INSOMEOS_PROFILE as case-sensitive here means values like PRODUCTION or Production fall into the default Development branch, which re-enables weak fallback (dev-tenant/dev-project/dev-actor/admin) and accepts missing runtime context in production deployments. Any environment that sets uppercase/mixed-case profile names will silently bypass the stricter Phase 6 RBAC/context requirements.
Useful? React with 👍 / 👎.
| "tenant_id" | "tenantId" | "X-Tenant-Id" => input.tenant_id = Some(value), | ||
| "project_id" | "projectId" | "X-Project-Id" => input.project_id = Some(value), | ||
| "actor" | "X-Actor" => input.actor = Some(value), | ||
| "roles" | "X-Roles" => input.roles = Some(vec![value]), |
There was a problem hiding this comment.
Accumulate repeated
roles query parameters
This parser overwrites input.roles on each roles occurrence instead of accumulating values, so a request like ?roles=engineer&roles=reviewer ends up with only the last role. That yields incorrect permission decisions for clients using repeated query params (which your role parsing API explicitly supports), producing unexpected 403s or missing intended privileges.
Useful? React with 👍 / 👎.
Summary
Adds Phase 6 durable store boundary, runtime context, RBAC guards, tenant/project isolation, smoke coverage, frontend API Lab context headers, OpenAPI contracts, and handoff documentation.
Scope
Validation
OpenAPI
Redocly passes with 1 existing localhost dev server warning.
Boundary
Still in-memory skeleton. No real model API, no DB migration, no infra change, no proprietary loader/SDK/EXE.