Policy
The policy of each talent, which gives the programming languages, the sites and the minimum complexity that the CI accepts.
Fluid Attacks gives a policy to each talent in the repository. The policy
gives the programming languages, the sites and the minimum complexity for your
solutions. The CI job test-policy applies your policy to each merge request.
Read your policy before you solve your first challenge. The policy controls what the CI accepts.
policies/data.yaml contains the policies.
policies/schema.json gives their structure.
Users
The users field of a policy is the list of the talents that the policy
controls. Your GitLab username is in the users list of one policy.
The CI job takes your username from the name of your branch. The job stops with an error when no policy has your username. Ask the Academy team for a policy in that condition.
Scopes
A policy has the three scopes: code, hack and vbd. Each scope has an
active parameter:
active. When the value isTrue, the CI accepts a solution of that scope. When the value isFalse, the CI rejects it.
Sites
The sites field is in the three scopes: code, hack and vbd. It has two
parameters:
active. When the value isTrue, the policy accepts only the sites inlist. When the value isFalse, the policy accepts each site.list. This is the list of the sites where you can solve challenges.
For the code scope, Fluid Attacks supports two sites: CodeAbbey and
SPOJ. Each policy gives its subset of these sites in code.sites.list.
Langs
The langs field is only in the code scope. It gives the programming
languages that you can use. It has the same two parameters:
active. When the value isTrue, the CI accepts only the languages inlist. When the value isFalse, the CI accepts each supported language.list. This is the list of the language names. The names are the keys incode/lang-data-supported.yml.
The extension of your solution gives its programming language. If active is
True, and that language is not in list, the CI job fails.
Complexity
The complexity field applies only to a code solution on CodeAbbey.
CodeAbbey is the only site that gives a stable numeric value for the
progression of a challenge. The CI compares that value with min.
The CI does not do this check for SPOJ. The score of a SPOJ problem is
dynamic, and its formula is 80 / (40 + N). The usual range is from 0.007 to
2.0, which is not compatible with the integer values of the policy. For a
talent on SPOJ, Fluid Attacks examines the progression on the user profile
page.
The complexity field has three parameters:
active. When the value isFalse, the CI does not do the complexity check.min. This is the minimum complexity that the CI accepts. A solution with a complexity belowminfails the pipeline.goal. This is the target complexity. Fluid Attacks wants you to get to this value during the cycles. The value is only information.
NOTE: The CI applies only the rule
complexity >= minon this field. Use thegoalof your policy to select the type of challenge that you solve. The CI accepts a solution with a complexity above thegoal, and it accepts concurrent merge requests.
Issues
To move from one policy to a different policy, you must contribute to an issue in the repository. The Academy team gives you the issue. The open issues of the repository are on GitLab.