You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Authentication and installation membership prove who a user is and whether they may enter Hub, but they should not decide which prototypes that user can access. Hub needs its own product authorization boundary so teams can share prototypes without requiring repository access and can keep explicit Hub decisions above future synchronized policy sources.
What changes
Hub now stores workspaces, prototypes, and immutable prototype versions. Direct workspace and prototype rules support viewer, commenter, editor, and administrator roles, plus explicit deny and prototype-specific overrides. One explainable evaluator applies explicit Hub deny first, then explicit Hub roles, then an optional lower-precedence baseline, and otherwise denies access.
Every new product route enforces that policy and preserves Hub's origin, CSRF, logging, caching, pagination, and rate-limit boundaries. Administrator changes, membership suspension or removal, prototype archival, and version creation use transactional locks so overlapping requests cannot orphan administration or create history after archival. Structured audits commit with access-sensitive changes and omit request bodies and secrets.
GitHub repository synchronization, repository-to-role mapping, artifact ingestion, publishing credentials, promotion, retention, and rollback remain later layers.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
A UUID-casing bypass can remove the final administrator, baseline-only viewers are incorrectly denied access, and the added tests contain a TypeScript error.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Authorization queries can perform unbounded scans and skip accessible workspaces after cursor access is revoked, while grant-setting tests lack coverage for unknown, suspended, or removed targets.
The database suite does not test the role thresholds for direct access changes, archival, or version creation, so weakening these checks would leave it passing. Add editor attempts to set and remove workspace/prototype rules, plus commenter attempts to archive a prototype and create a version. Assert 403 prototype_access_denied and unchanged product state and audits.
Add coverage for last prototype administrator guards
The workspace tests never reach this guard: they either fail workspace continuity first or create no child prototypes. Add downgrade and removal cases with two workspace administrators, one restricted to viewer on a child prototype, and assert 409 last_prototype_administrator with unchanged grants and audits. Cover both this guard and the matching guard in removeWorkspaceAccess() at lines 590–606.
Assert route mock arguments and request-to-service mapping
hub/server/routes/product/index.test.ts:167
These mocks reject regardless of their arguments, so swapping a scope ID and user ID or omitting the session token still leaves the route tests passing. Assert the exact mock.calls arguments for each endpoint, including distinct prototype/version IDs and request query/body values, so the suite protects request-to-service mapping.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed to evaluate cross-prototype pagination behavior, inconsistent validation responses, and gaps in administration-continuity test coverage.
No open issues 🎉
Review effort: Max (auto)
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
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.
Why
Authentication and installation membership prove who a user is and whether they may enter Hub, but they should not decide which prototypes that user can access. Hub needs its own product authorization boundary so teams can share prototypes without requiring repository access and can keep explicit Hub decisions above future synchronized policy sources.
What changes
Hub now stores workspaces, prototypes, and immutable prototype versions. Direct workspace and prototype rules support viewer, commenter, editor, and administrator roles, plus explicit deny and prototype-specific overrides. One explainable evaluator applies explicit Hub deny first, then explicit Hub roles, then an optional lower-precedence baseline, and otherwise denies access.
Every new product route enforces that policy and preserves Hub's origin, CSRF, logging, caching, pagination, and rate-limit boundaries. Administrator changes, membership suspension or removal, prototype archival, and version creation use transactional locks so overlapping requests cannot orphan administration or create history after archival. Structured audits commit with access-sensitive changes and omit request bodies and secrets.
GitHub repository synchronization, repository-to-role mapping, artifact ingestion, publishing credentials, promotion, retention, and rollback remain later layers.