fix(ssot): align ADMIN_ROLES + permission vocabulary to tinyland-auth v0.4.0 (TIN-2435 drift)#11
Merged
Jess Sullivan (Jesssullivan) merged 1 commit intoJul 5, 2026
Conversation
… v0.4.0 (TIN-2435 drift) ADMIN_ROLES was missing 'member' (7 of the authority's 8 roles) and ADMIN_PERMISSIONS carried a dead 'admin.users.moderate' string not present in tinyland-auth v0.4.0's 21-permission vocabulary. Align both lists, and the duplicated role enums across all three schemas, to the ratified authority exactly. Add tests/vocabulary-alignment.test.ts to guard against future drift.
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
ADMIN_ROLESwas missingmember(7 of the authority's 8 roles).@tummycrypt/tinyland-authv0.4.0 defines 8 roles:super_admin, admin, moderator, editor, event_manager, contributor, member, viewer. AddedmembertoADMIN_ROLESand to the duplicated rolez.enum([...])lists inadminUserSchema,createAdminUserSchema, andupdateAdminUserSchema(the last of these was also separately missingcontributor— fixed for consistency, since all three role enums must mirrorADMIN_ROLES).ADMIN_PERMISSIONS/ theAdminPermissiontype carried a dead'admin.users.moderate'string that does not exist in tinyland-auth v0.4.0's 21-permission vocabulary (src/types/permissions.ts). Removed it from bothADMIN_PERMISSIONSand theAdminPermissionunion type.tests/vocabulary-alignment.test.tsassertingADMIN_ROLESmatches the transcribed v0.4.0 authority role list, and that noADMIN_PERMISSIONSentry falls outside the transcribed 21-permission authority set. Comments reference TIN-2435 and explain this package can only reach@tummycrypt/tinyland-authat the type level (via the Bazelnpm_link_packageinBUILD.bazel/MODULE.bazel), not as a runtime npm dependency, so the authority vocabulary is transcribed by hand rather than imported live.tests/admin-validation.test.tsassertions that had encoded the stale vocabulary (ADMIN_ROLESlength 7 / nomember,ADMIN_PERMISSIONSlength 9 / includesadmin.users.moderate) to match the corrected vocabulary.Reference: TIN-2435 (SSOT ratification), findings reported against v0.2.3 (
src/schemas.ts:19-41,src/types.ts:13-22).Test plan
pnpm test(vitest) — 140/140 passing (was 138/138 before this change; +2 new alignment tests)pnpm typecheckfailure:tsccannot resolve@tummycrypt/tinyland-authoutside the Bazel module graph — this predates this change (present at HEADea3c8ef) and is unaffected by it.