Skip to content

V31 Gate 6: Organization Team Role Policy Authority#49

Merged
geraldarthurdavis merged 1 commit into
version/v31from
v31/gate-6-organization-team-role-policy-authority
May 22, 2026
Merged

V31 Gate 6: Organization Team Role Policy Authority#49
geraldarthurdavis merged 1 commit into
version/v31from
v31/gate-6-organization-team-role-policy-authority

Conversation

@geraldarthurdavis

Copy link
Copy Markdown
Contributor

Summary

  • add the package-owned BtdOrganizationPolicyAuthority projection over organization/team/member identity, role, explicit grants, wallet binding, policy id/hash, multi-sig readiness, policy decision, denial reasons, recovery route, source visibility, and authority root
  • map that authority through Auxillaries route contracts and surface it in Auxillaries Profile plus Terminal selected-activity organization authority detail
  • update V31 specs/docs, add focused fail-closed tests, and wire the Gate 6 checker into gate quality

Validation

  • pnpm run check:v31-gate1
  • pnpm run check:v31-gate2
  • pnpm run check:v31-gate3
  • pnpm run check:v31-gate4
  • pnpm run check:v31-gate5
  • pnpm run check:v31-gate6
  • pnpm --filter @bitcode/btd typecheck
  • pnpm --filter @bitcode/api build
  • pnpm -C uapi exec tsc --noEmit --pretty false
  • pnpm --filter @bitcode/btd test -- --runTestsByPath tests/btd.test.ts --runInBand
  • pnpm --filter @bitcode/api exec jest --config jest.config.cjs --runTestsByPath src/routes/tests/auxillaries-contract.test.ts --runInBand
  • pnpm -C uapi exec jest --runTestsByPath tests/profileStep.test.tsx tests/terminalOrganizationAuthority.test.ts tests/terminalTransactionDetailCards.test.tsx --runInBand
  • pnpm -C uapi exec jest --runTestsByPath tests/userDataRoute.test.ts --runInBand
  • pnpm -C uapi exec jest --runTestsByPath tests/auxillariesWalletPane.test.tsx --runInBand
  • git diff --check
  • changed-file secret sweep

Own the organization/team/role/policy authority projection in @bitcode/btd, map it through Auxillaries contracts, and share it with Auxillaries Profile and Terminal detail surfaces.

Add fail-closed BTD tests, API contract coverage, UI projection tests, Gate 6 spec/docs updates, and the Gate 6 checker/workflow hook.
@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
engi-uapi Ready Ready Preview, Comment May 22, 2026 4:38am

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a3d16d4a1

ℹ️ 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".

Comment on lines +835 to +836
return typeof value === 'string' && value in ACTION_REQUIREMENTS
? value as BtdOrganizationPermissionAction

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard action normalization against prototype keys

Use an own-property check here instead of value in ACTION_REQUIREMENTS. With the current check, inherited keys like "toString" are treated as valid actions, so buildBtdOrganizationPolicyAuthority can select a non-requirements value and then crash when it tries requirements.permissionGrants.includes(...). Any caller that forwards untrusted string input into action can trigger this runtime failure instead of returning a fail-closed denied decision.

Useful? React with 👍 / 👎.

readString(profile?.multiSigPolicyRoot) ??
null,
},
recoveryRoute: '/terminal?auxillary-open-to=profile',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Let authority derive recovery route from denial reason

Remove the hardcoded profile route override so the builder can emit reason-specific repair routing. Passing '/terminal?auxillary-open-to=profile' here forces every denied authority to use the same recovery route, even when the denial is wallet_binding_missing or interface_not_admitted, which should direct users to wallet/interfaces. This regresses remediation UX because downstream repair links can send users to the wrong pane.

Useful? React with 👍 / 👎.

@geraldarthurdavis
geraldarthurdavis merged commit 0c75d49 into version/v31 May 22, 2026
30 checks passed
@geraldarthurdavis
geraldarthurdavis deleted the v31/gate-6-organization-team-role-policy-authority branch May 22, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant