Skip to content

test(authorization): cover role-grant combinators and leaf-only authorize - #31

Merged
yilmaztayfun merged 3 commits into
masterfrom
feature/role-grant-combinators
Oct 5, 2026
Merged

yilmaztayfun merged 3 commits into
masterfrom
feature/role-grant-combinators

Conversation

@yilmaztayfun

Copy link
Copy Markdown
Contributor

Summary

  • Integration coverage for role-grant allOf / anyOf and the leaf-only authorize?queryRoles=true rule ([enhancement] Add allOf/anyOf combinators to RoleGrant vnext#1057).
  • authorization-chain-lab expectations flipped from the root-AND conjunction to the leaf-only rule.
  • role-matrix-lab: CombinatorGrantTests (four eyes, queryRoles allOf, x-roles anyOf / deny allOf through the data function, cache keyed on the subject).
  • human-task-chain: corporate leaf with two allOf grants (OR), depth-1 and cross-domain variants; the chain's subflow mappings now forward sub / act_sub (identity propagation below the first level is the flow author's job).

Changes

  • tests/Core.IntegrationTests/Tests/{AuthorizationChainLab,RoleMatrixLab,HumanTaskChain} + READMEs, TEST-SCENARIOS.md rows.
  • core/ components: role-matrix-lab-combinators flow + master schema; human-task chain flows ht-a…ht-e 1.0.7 (generator realigned with the committed SubProcessTask spawn), spawn task 1.0.1.

Test Plan

  • run-docker.sh up core on the runtime branch, then dotnet test tests/Core.IntegrationTests --settings tests/Core.IntegrationTests/test.runsettings --filter "FullyQualifiedName~AuthorizationChainLab|FullyQualifiedName~RoleMatrixLab|FullyQualifiedName~HumanTaskChain"
  • Cross-domain HumanTaskChain cases need the four-domain lab (labs/cross-domain/lab.sh)

Integration test evidence

  • Runtime: burgan-tech/vnext feature/role-grant-combinators built locally, VNEXT_BASE_URL=http://localhost:4201, 2026-10-03
  • AuthorizationChainLab 45 passed / 0 failed / 9 skipped (MorphIdm); RoleMatrixLab 96/119 (new combinator tests 4/4; 23 known reds unchanged); HumanTaskChain 12/23 (11 reds = partner/credit domains not running)
  • TEST-SCENARIOS.md rows updated: yes

Notes

🤖 Generated with Claude Code

yilmaztayfun and others added 3 commits October 3, 2026 11:20
…rize

authorization-chain-lab: authorize?queryRoles=true is now decided by the
deepest active leaf alone (K9). ChainConjunctionTests becomes
ChainLeafDecisionTests: a role the root refuses is allowed while the leaf
admits it, and a new root-open/leaf-open pair pins that a leaf with no
queryRoles allows whatever the root declares.

role-matrix-lab: new role-matrix-lab-combinators flow and master schema
with transition four-eyes (allow maker, deny allOf[maker, $PreviousUser]),
queryRoles allOf[customer, $InstanceStarter] and x-roles anyOf/allOf
observed through the data function.

human-task-chain: corporate leaf state (two allOf allows plus an
$InstanceStarter hop probe) asserted in core and across the partner
boundary; flows bumped to 1.0.7 and the generator realigned with the
SubProcessTask spawn.

Written, not yet run against a runtime; npm run validate fails on the
combinator flows until vnext-schema ships allOf/anyOf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… subflows

role-matrix-lab: ALİ starts the combinator case acting for c-acme, so
CreatedByBehalfOf matches what the x-roles expectations assume.

human-task-chain: the runtime inherits the caller only for the first
SubFlow child; from depth 2 on the child gets exactly the mapping's
headers. Every next-subflow mapping now forwards sub and act_sub (flow
author's job, decision K8), and a depth-1 corporate leaf case proves the
grant logic independently of that forwarding.

authorization-chain-lab: rename the state-function test that no longer
asserts agreement with authorize.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yilmaztayfun
yilmaztayfun requested review from a team October 4, 2026 14:27
@coldtea-pr-lens

Copy link
Copy Markdown

Note

The title starts with test(authorization):, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 324ebaa2-0184-41a7-9a18-f05bcc87b546
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yilmaztayfun yilmaztayfun self-assigned this Oct 5, 2026
@yilmaztayfun
yilmaztayfun merged commit c070b5e into master Oct 5, 2026
2 of 3 checks passed
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